Skip to content

Commit 2e2b68d

Browse files
Merge pre_prod into APS-9999-cypress-cli-security-omnibus-sep2026
Resolve package-lock.json conflict by taking pre_prod's baseline and re-running `npm install --package-lock-only` so my security overrides re-apply on top of pre_prod's newer package.json (adm-zip added, version bumped to 1.37.1, decompress removed). Verified post-merge tree: js-yaml: 4.1.x → 4.3.2, 3.14.x → 3.15.2 (my overrides) brace-expansion: 1.1.x → 1.1.18, 2.1.x → 2.1.4 (my overrides) adm-zip: 0.6.1 (from pre_prod) axios: 1.16.1 (unchanged) form-data: 4.0.5 (unchanged) Target CVEs (GHSA-52cp-r559-cp3m js-yaml, GHSA-3jxr-9vmj-r5cp brace-expansion) absent from `npm audit`. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2 parents 4e3233c + e164271 commit 2e2b68d

8 files changed

Lines changed: 43 additions & 427 deletions

File tree

‎.github/workflows/Semgrep.yml‎

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

2828
container:
2929
# A Docker image with Semgrep installed. Do not change this.
30-
image: returntocorp/semgrep:1.166.0
30+
# Pinned to a digest for supply-chain integrity (APS-19017 / INF-007).
31+
# returntocorp/semgrep:1.166.0 resolved 2026-09-16.
32+
image: returntocorp/semgrep:1.166.0@sha256:c180f0c93a17b420c0af5006214a29d3c747c5459c732b740191adf657dd0068
33+
3134
# Skip any PR created by dependabot to avoid permission issues:
3235
if: (github.actor != 'dependabot[bot]')
3336

‎.npmrc‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
1+
min-release-age=7
12
package-lock=true
23
lockfile-version=1
4+
strict-ssl=true
5+
save-exact=true

‎bin/helpers/buildArtifacts.js‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const logger = require('./logger').winstonLogger,
1111
const { default: axios } = require('axios');
1212
const { HttpsProxyAgent = require('https-proxy-agent') } = require('https-proxy-agent');
1313
const FormData = require('form-data');
14-
const decompress = require('decompress');
14+
const AdmZip = require('adm-zip');
1515
const unzipper = require("unzipper");
1616
const { setAxiosProxy } = require('./helper');
1717

@@ -154,10 +154,11 @@ const downloadAndUnzip = async (filePath, fileName, url) => {
154154
const unzipFile = async (filePath, fileName) => {
155155
return new Promise( async (resolve, reject) => {
156156
try {
157-
await decompress(path.join(filePath, fileName), filePath);
157+
const zip = new AdmZip(path.join(filePath, fileName));
158+
await zip.extractAllToAsync(filePath, /* overwrite */ true);
158159
resolve();
159160
} catch (error) {
160-
logger.debug(`Error unzipping with decompress, trying with unzipper. Stacktrace: ${error}.`);
161+
logger.debug(`Error unzipping with adm-zip, trying with unzipper. Stacktrace: ${error}.`);
161162
try {
162163
fs.createReadStream(path.join(filePath, fileName))
163164
.pipe(unzipper.Extract({ path: filePath }))

‎bin/helpers/reporterHTML.js‎

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const fs = require('fs'),
66
utils = require("./utils"),
77
Constants = require('./constants'),
88
config = require("./config"),
9-
decompress = require('decompress');
9+
AdmZip = require('adm-zip');
1010
const { isTurboScaleSession } = require('../helpers/atsHelper');
1111

1212
const { setAxiosProxy } = require('./helper');
@@ -171,15 +171,14 @@ function getReportResponse(filePath, fileName, reportJsonUrl) {
171171

172172
const unzipFile = async (filePath, fileName) => {
173173
return new Promise( async (resolve, reject) => {
174-
await decompress(path.join(filePath, fileName), filePath)
175-
.then((files) => {
176-
let message = "Unzipped the json and html successfully."
177-
resolve(message);
178-
})
179-
.catch((error) => {
174+
try {
175+
const zip = new AdmZip(path.join(filePath, fileName));
176+
await zip.extractAllToAsync(filePath, /* overwrite */ true);
177+
resolve("Unzipped the json and html successfully.");
178+
} catch (error) {
180179
reject(error);
181180
process.exitCode = Constants.ERROR_EXIT_CODE;
182-
});
181+
}
183182
});
184183
}
185184

0 commit comments

Comments
 (0)