Skip to content

Commit 610a668

Browse files
Merge remote-tracking branch 'origin/main' into mergeback/v4.35.4-to-main-68bde559
2 parents 1627096 + b81d0d2 commit 610a668

7 files changed

Lines changed: 23 additions & 2 deletions

lib/analyze-action-post.js

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/init-action-post.js

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/start-proxy-action-post.js

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/upload-sarif-action-post.js

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"description": "CodeQL action",
66
"scripts": {
77
"_build_comment": "echo 'Run the full build so we typecheck the project and can reuse the transpiled files in npm test'",
8-
"build": "./scripts/check-node-modules.sh && npm run transpile && node build.mjs && npx tsx ./pr-checks/bundle-metadata.ts",
8+
"build": "./scripts/check-node-modules.sh && npm run transpile && node build.mjs",
99
"lint": "eslint --report-unused-disable-directives --max-warnings=0 .",
1010
"lint-ci": "SARIF_ESLINT_IGNORE_SUPPRESSED=true eslint --report-unused-disable-directives --max-warnings=0 . --format @microsoft/eslint-formatter-sarif --output-file=eslint.sarif",
1111
"lint-fix": "eslint --report-unused-disable-directives --max-warnings=0 . --fix",

src/artifact-scanner.test.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,12 @@ test("scanArtifactsForTokens handles files without tokens", async (t) => {
141141
}
142142
});
143143

144-
if (os.platform() !== "win32") {
144+
// This test is slow (extracts and scans a zip artifact), so by default we only run it in CI. Set
145+
// RUN_SLOW_TESTS=1 to run it locally.
146+
if (
147+
os.platform() !== "win32" &&
148+
(process.env.CI === "true" || process.env.RUN_SLOW_TESTS === "1")
149+
) {
145150
test("scanArtifactsForTokens finds token in debug artifacts", async (t) => {
146151
t.timeout(15000); // 15 seconds
147152
const messages: LoggedMessage[] = [];

src/artifact-scanner.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,10 @@ async function scanArchiveFile(
156156
);
157157
}
158158

159+
if (process.platform === "win32") {
160+
throw new Error("Scanning archives is not supported on Windows.");
161+
}
162+
159163
const result: ScanResult = {
160164
scannedFiles: 0,
161165
findings: [],

0 commit comments

Comments
 (0)