Skip to content

Commit e61413b

Browse files
Rohan Nagariyaclaude
andcommitted
fix(security): supply-chain hygiene — mocha to devDeps, pin Semgrep image, add files allowlist [APS-19017]
INF-005: remove mocha from dependencies (kept in devDependencies); CLI loads mocha from user project via requireModule(), prod copy unnecessary. npm ls mocha --omit=dev now empty. INF-007: pin Semgrep CI image returntocorp/semgrep -> @sha256:f4791a54c891eabe1188248135574e6e03dfc31dfd3f3b747c7bec7079bfed1b (latest as of 2026-06-15). INF-008: add package.json files allowlist [bin/, README.md, LICENSE.md] so npm pack no longer ships .github/, CODEOWNERS, .nycrc.yml, test/. Verified via npm pack --dry-run. NOT applied: CSL-003 md5->sha256 (constants.js) — behavioral change to upload-dedup hash; needs human sign-off. Resolves: APS-19017 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 4048be3 commit e61413b

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

.github/workflows/Semgrep.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ jobs:
2727

2828
container:
2929
# A Docker image with Semgrep installed. Do not change this.
30-
image: returntocorp/semgrep
30+
# Pinned to a digest for supply-chain integrity (APS-19017 / INF-007).
31+
# returntocorp/semgrep:latest as of 2026-06-15.
32+
image: returntocorp/semgrep@sha256:f4791a54c891eabe1188248135574e6e03dfc31dfd3f3b747c7bec7079bfed1b
3133

3234
# Skip any PR created by dependabot to avoid permission issues:
3335
if: (github.actor != 'dependabot[bot]')

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
"version": "1.36.9",
44
"description": "BrowserStack Cypress CLI for Cypress integration with BrowserStack's remote devices.",
55
"main": "index.js",
6+
"files": [
7+
"bin/",
8+
"README.md",
9+
"LICENSE.md"
10+
],
611
"scripts": {
712
"test": "nyc mocha 'test/**/*.js' --recursive --timeout 60000 --exit"
813
},
@@ -30,7 +35,6 @@
3035
"glob": "^7.2.0",
3136
"https-proxy-agent": "^5.0.1",
3237
"mkdirp": "1.0.4",
33-
"mocha": "^10.2.0",
3438
"node-ipc": "9.1.1",
3539
"table": "5.4.6",
3640
"tsc-alias": "^1.8.16",

0 commit comments

Comments
 (0)