Visitar URL original
Merge releases/v4 into releases/v3 by github-actions[bot] · Pull Request #3254 · github/codeql-action · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
c4b7372
Add overlay-base database cache key tests
cklin Sep 24, 2025
b4ce335
Ensure uniqueness of overlay-base database cache keys
kaspersv Oct 24, 2025
cbcae45
Reorder components of overlay-base cache key postfix
kaspersv Oct 24, 2025
66759e5
Improve error handling for overlay-base cache key creation
kaspersv Oct 24, 2025
fa46f22
Update changelog and version after v4.31.0
github-actions[bot] Oct 24, 2025
dd565f3
Rebuild
github-actions[bot] Oct 24, 2025
ae78991
Merge pull request #3236 from github/mergeback/v4.31.0-to-main-4e94bd11
mbg Oct 24, 2025
4e0b2cd
Merge pull request #3232 from github/kaspersv/unique-overlay-base-keys
kaspersv Oct 27, 2025
91ec0ed
Move diff-range computation into utils for reuse
kaspersv Oct 27, 2025
cc17bed
Move diff-range computation tests
kaspersv Oct 27, 2025
db47d17
Remove `add-snippets` input
mbg Oct 27, 2025
8d77149
Merge pull request #3238 from github/kaspersv/extract-diff-range-comp…
kaspersv Oct 27, 2025
127851b
Add environment variable for skipping workflow validation
mbg Oct 27, 2025
06fbd89
Move workflow check to a function in `init.ts` and add tests
mbg Oct 27, 2025
5060176
Also skip workflow validation for `dynamic` workflows
mbg Oct 27, 2025
55c0837
Move `checkWorkflow` to `workflow.ts`
mbg Oct 27, 2025
52cec41
Downgrade log message from warning to debug level
mbg Oct 27, 2025
42f957b
Bump actions/upload-artifact from 4 to 5 in /.github/workflows
dependabot[bot] Oct 27, 2025
714962e
Rebuild
github-actions[bot] Oct 27, 2025
c9d47e2
Bump the npm-minor group with 4 updates
dependabot[bot] Oct 27, 2025
df9e49e
Rebuild
github-actions[bot] Oct 27, 2025
f9eed03
Bump @actions/artifact from 2.3.1 to 4.0.0
dependabot[bot] Oct 27, 2025
723a946
Rebuild
github-actions[bot] Oct 27, 2025
b5bbb5a
Bump ruby/setup-ruby
dependabot[bot] Oct 27, 2025
fcc1377
Rebuild
github-actions[bot] Oct 27, 2025
239e305
Check disk usage using Node.js API
henrymercer Oct 27, 2025
ad8ad98
Merge pull request #3240 from github/mbg/allow-skip-workflow-validation
mbg Oct 28, 2025
20900ee
Build: Run npm install when `package-lock.json` out of date
henrymercer Oct 28, 2025
8b1e55d
Use Actions logger in API client
henrymercer Oct 28, 2025
57c7b6a
Disable SIP disablement check
henrymercer Oct 28, 2025
fe16891
Add unit test for `checkDiskUsage`
henrymercer Oct 28, 2025
55895ef
Stub `GITHUB_WORKSPACE` in test
henrymercer Oct 28, 2025
d4ba404
Tweak assertions
henrymercer Oct 28, 2025
41c0a26
Use Node `fs` APIs instead of `del`
henrymercer Oct 28, 2025
d84f470
Improve method naming
henrymercer Oct 28, 2025
a53e78e
Merge pull request #3243 from github/dependabot/npm_and_yarn/actions/…
henrymercer Oct 28, 2025
284bf9b
Merge pull request #3241 from github/dependabot/github_actions/dot-gi…
henrymercer Oct 28, 2025
311fc42
Merge pull request #3242 from github/dependabot/npm_and_yarn/npm-mino…
henrymercer Oct 28, 2025
1af9394
Merge pull request #3244 from github/dependabot/github_actions/dot-gi…
henrymercer Oct 28, 2025
66459ea
Apply suggestion
henrymercer Oct 28, 2025
4256e2e
Merge branch 'main' into henrymercer/disk-usage-node-api
henrymercer Oct 28, 2025
e1c8976
Merge pull request #3247 from github/henrymercer/disk-usage-node-api
henrymercer Oct 28, 2025
ea5cb4a
Merge branch 'main' into henrymercer/prefer-fs-delete
henrymercer Oct 28, 2025
8cc18ac
Merge pull request #3250 from github/henrymercer/prefer-fs-delete
henrymercer Oct 28, 2025
3d988b2
Pass minimal copy of `core`
henrymercer Oct 28, 2025
d49e837
Merge branch 'main' into henrymercer/api-logging
henrymercer Oct 28, 2025
ac9aeee
Merge pull request #3249 from github/henrymercer/api-logging
henrymercer Oct 28, 2025
53acf0b
Turn enablement errors into configuration errors
mbg Oct 28, 2025
194ba0e
Make error message tests less brittle
mbg Oct 29, 2025
52a7bd7
Check for 403 status
mbg Oct 29, 2025
4ae68af
Warn if the `add-snippets` input is used
mbg Oct 29, 2025
34c50c1
Merge pull request #3251 from github/mbg/user-error/enablement
mbg Oct 29, 2025
74c8748
Update analyze/action.yml
mbg Oct 29, 2025
777daa0
Merge pull request #3239 from github/mbg/remove/add-snippets
mbg Oct 29, 2025
237497c
Update changelog for v4.31.1
github-actions[bot] Oct 30, 2025
5fe9434
Merge pull request #3252 from github/update-v4.31.1-777daa0c7
henrymercer Oct 30, 2025
37e7dfb
Revert "Update version and changelog for v3.31.0"
github-actions[bot] Oct 30, 2025
2f60793
Revert "Rebuild"
github-actions[bot] Oct 30, 2025
ddd0dc7
Merge remote-tracking branch 'origin/releases/v4' into backport-v3.31…
github-actions[bot] Oct 30, 2025
c0d3370
Update version and changelog for v3.31.1
github-actions[bot] Oct 30, 2025
c2805e0
Rebuild
github-actions[bot] Oct 30, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove add-snippets input
  • Loading branch information
mbg committed Oct 27, 2025
commit db47d17142535b3ce67f3c591f562a44f9e26dee
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ See the [releases page](https://github.com/github/codeql-action/releases) for th

## [UNRELEASED]

No user facing changes.
- The `add-snippets` input has been removed from the `analyze` action. This input has been deprecated since CodeQL Action 3.26.4 in August 2024 when this removal was announced.

## 4.31.0 - 24 Oct 2025

Expand Down
9 changes: 0 additions & 9 deletions analyze/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,6 @@ inputs:
memory available in the system (which for GitHub-hosted runners is 6GB for Linux, 5.5GB for Windows,
and 13GB for macOS).
required: false
add-snippets:
description: Specify whether or not to add code snippets to the output sarif file.
required: false
default: "false"
deprecationMessage: >-
The input "add-snippets" is deprecated and will be removed on the first release in August 2025.
When this input is set to true it is expected to add code snippets with an alert to the SARIF file.
However, since Code Scanning ignores code snippets provided as part of a SARIF file this is currently
a no operation. No alternative is available.
skip-queries:
description: If this option is set, the CodeQL database will be built but no queries will be run on it. Thus, no results will be produced.
required: false
Expand Down
3 changes: 1 addition & 2 deletions lib/analyze-action-post.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 2 additions & 11 deletions lib/analyze-action.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions lib/autobuild-action.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions lib/init-action-post.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions lib/init-action.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions lib/resolve-environment-action.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions lib/setup-codeql-action.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions lib/upload-lib.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions lib/upload-sarif-action.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/analyze-action-env.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ test("analyze action with RAM & threads from environment variables", async (t) =
t.deepEqual(runFinalizeStub.firstCall.args[1], "--threads=-1");
t.deepEqual(runFinalizeStub.firstCall.args[2], "--ram=4992");
t.assert(runQueriesStub.calledOnce);
t.deepEqual(runQueriesStub.firstCall.args[3], "--threads=-1");
t.deepEqual(runQueriesStub.firstCall.args[2], "--threads=-1");
t.deepEqual(runQueriesStub.firstCall.args[1], "--ram=4992");
});
});
2 changes: 1 addition & 1 deletion src/analyze-action-input.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ test("analyze action with RAM & threads from action inputs", async (t) => {
t.deepEqual(runFinalizeStub.firstCall.args[1], "--threads=-1");
t.deepEqual(runFinalizeStub.firstCall.args[2], "--ram=3012");
t.assert(runQueriesStub.calledOnce);
t.deepEqual(runQueriesStub.firstCall.args[3], "--threads=-1");
t.deepEqual(runQueriesStub.firstCall.args[2], "--threads=-1");
t.deepEqual(runQueriesStub.firstCall.args[1], "--ram=3012");
});
});
1 change: 0 additions & 1 deletion src/analyze-action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,6 @@ async function run() {
runStats = await runQueries(
outputDir,
memory,
util.getAddSnippetsFlag(actionsUtil.getRequiredInput("add-snippets")),
threads,
diffRangePackDir,
actionsUtil.getOptionalInput("category"),
Expand Down
2 changes: 0 additions & 2 deletions src/analyze.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ test("status report fields", async (t) => {
setupActionsVars(tmpDir, tmpDir);

const memoryFlag = "";
const addSnippetsFlag = "";
const threadsFlag = "";
sinon.stub(uploadLib, "validateSarifFileSchema");

Expand Down Expand Up @@ -105,7 +104,6 @@ test("status report fields", async (t) => {
const statusReport = await runQueries(
tmpDir,
memoryFlag,
addSnippetsFlag,
threadsFlag,
undefined,
undefined,
Expand Down
2 changes: 0 additions & 2 deletions src/analyze.ts
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,6 @@ export function addSarifExtension(
export async function runQueries(
sarifFolder: string,
memoryFlag: string,
addSnippetsFlag: string,
threadsFlag: string,
diffRangePackDir: string | undefined,
automationDetailsId: string | undefined,
Expand Down Expand Up @@ -811,7 +810,6 @@ export async function runQueries(
databasePath,
queries,
sarifFile,
addSnippetsFlag,
threadsFlag,
enableDebugLogging ? "-vv" : "-v",
sarifRunPropertyFlag,
Expand Down
3 changes: 0 additions & 3 deletions src/codeql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,6 @@ export interface CodeQL {
databasePath: string,
querySuitePaths: string[] | undefined,
sarifFile: string,
addSnippetsFlag: string,
threadsFlag: string,
verbosityFlag: string | undefined,
sarifRunPropertyFlag: string | undefined,
Expand Down Expand Up @@ -817,7 +816,6 @@ export async function getCodeQLForCmd(
databasePath: string,
querySuitePaths: string[] | undefined,
sarifFile: string,
addSnippetsFlag: string,
threadsFlag: string,
verbosityFlag: string,
sarifRunPropertyFlag: string | undefined,
Expand All @@ -836,7 +834,6 @@ export async function getCodeQLForCmd(
"--format=sarif-latest",
verbosityFlag,
`--output=${sarifFile}`,
addSnippetsFlag,
"--print-diagnostics-summary",
"--print-metrics-summary",
"--sarif-add-baseline-file-info",
Expand Down
10 changes: 0 additions & 10 deletions src/util.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,16 +101,6 @@ test("getMemoryFlag() throws if the ram input is < 0 or NaN", async (t) => {
}
});

test("getAddSnippetsFlag() should return the correct flag", (t) => {
t.deepEqual(util.getAddSnippetsFlag(true), "--sarif-add-snippets");
t.deepEqual(util.getAddSnippetsFlag("true"), "--sarif-add-snippets");

t.deepEqual(util.getAddSnippetsFlag(false), "--no-sarif-add-snippets");
t.deepEqual(util.getAddSnippetsFlag(undefined), "--no-sarif-add-snippets");
t.deepEqual(util.getAddSnippetsFlag("false"), "--no-sarif-add-snippets");
t.deepEqual(util.getAddSnippetsFlag("foo bar"), "--no-sarif-add-snippets");
});

test("getThreadsFlag() should return the correct --threads flag", (t) => {
const numCpus = os.cpus().length;

Expand Down
15 changes: 0 additions & 15 deletions src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -343,21 +343,6 @@ export function getMemoryFlag(
return `--ram=${megabytes}`;
}

/**
* Get the codeql flag to specify whether to add code snippets to the sarif file.
*
* @returns string
*/
export function getAddSnippetsFlag(
userInput: string | boolean | undefined,
): string {
if (typeof userInput === "string") {
// have to process specifically because any non-empty string is truthy
userInput = userInput.toLowerCase() === "true";
}
return userInput ? "--sarif-add-snippets" : "--no-sarif-add-snippets";
}

/**
* Get the value of the codeql `--threads` flag specified for the `threads`
* input. If no value was specified, all available threads will be used.
Expand Down