mirror of
https://github.com/github/codeql-action.git
synced 2025-12-14 11:29:20 +08:00
Compare commits
65 Commits
default-se
...
v3.31.7
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bffd034ab1 | ||
|
|
817dbfb39b | ||
|
|
793f7006bb | ||
|
|
d2e9832330 | ||
|
|
c2e4b7785f | ||
|
|
66d7f51a10 | ||
|
|
497990dfed | ||
|
|
89cb79a131 | ||
|
|
dbf6819ebd | ||
|
|
5af51f4048 | ||
|
|
e439418aab | ||
|
|
249860e323 | ||
|
|
d3ced5c96c | ||
|
|
c12d7c1f2d | ||
|
|
2e2a1cf1ef | ||
|
|
e2cca77d06 | ||
|
|
801a18bea6 | ||
|
|
1c715a714c | ||
|
|
c3d42c5d08 | ||
|
|
9031cd9330 | ||
|
|
f58938aee2 | ||
|
|
1f1c162805 | ||
|
|
7ab96a0e6f | ||
|
|
e3cb86275a | ||
|
|
f94c9befff | ||
|
|
e5971bdba6 | ||
|
|
c5a9d29dc9 | ||
|
|
9f1109665d | ||
|
|
f8f60f3a2b | ||
|
|
f4d10b9ef7 | ||
|
|
5d5cd550d3 | ||
|
|
c6eb09db21 | ||
|
|
09db9044dc | ||
|
|
d3cd47d8d6 | ||
|
|
8e9caa5100 | ||
|
|
23a6333b88 | ||
|
|
c503cb4fbb | ||
|
|
c2805e0a04 | ||
|
|
c0d3370b54 | ||
|
|
ddd0dc746a | ||
|
|
2f607936ce | ||
|
|
37e7dfbaa0 | ||
|
|
d198d2fabf | ||
|
|
9e3918e481 | ||
|
|
7dd1575dac | ||
|
|
28fc48d83c | ||
|
|
12c6008004 | ||
|
|
d3019effb0 | ||
|
|
42213152a8 | ||
|
|
e677e67801 | ||
|
|
5f3f3164ad | ||
|
|
ba42101490 | ||
|
|
f11af5849b | ||
|
|
ba5430dc86 | ||
|
|
13e883e119 | ||
|
|
755f44910c | ||
|
|
948223fe01 | ||
|
|
a37add20d4 | ||
|
|
ab163cf08b | ||
|
|
319796f085 | ||
|
|
bd1ac56295 | ||
|
|
a8d1ac45b9 | ||
|
|
c551c50310 | ||
|
|
01f1a24033 | ||
|
|
b264e15259 |
2
.github/actions/check-sarif/action.yml
vendored
2
.github/actions/check-sarif/action.yml
vendored
@@ -16,5 +16,5 @@ inputs:
|
|||||||
Comma separated list of query ids that should NOT be included in this SARIF file.
|
Comma separated list of query ids that should NOT be included in this SARIF file.
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: node24
|
using: node20
|
||||||
main: index.js
|
main: index.js
|
||||||
|
|||||||
39
CHANGELOG.md
39
CHANGELOG.md
@@ -2,60 +2,52 @@
|
|||||||
|
|
||||||
See the [releases page](https://github.com/github/codeql-action/releases) for the relevant changes to the CodeQL CLI and language packs.
|
See the [releases page](https://github.com/github/codeql-action/releases) for the relevant changes to the CodeQL CLI and language packs.
|
||||||
|
|
||||||
## [UNRELEASED]
|
## 3.31.7 - 05 Dec 2025
|
||||||
|
|
||||||
No user facing changes.
|
|
||||||
|
|
||||||
## 4.31.8 - 11 Dec 2025
|
|
||||||
|
|
||||||
- Update default CodeQL bundle version to 2.23.8. [#3354](https://github.com/github/codeql-action/pull/3354)
|
|
||||||
|
|
||||||
## 4.31.7 - 05 Dec 2025
|
|
||||||
|
|
||||||
- Update default CodeQL bundle version to 2.23.7. [#3343](https://github.com/github/codeql-action/pull/3343)
|
- Update default CodeQL bundle version to 2.23.7. [#3343](https://github.com/github/codeql-action/pull/3343)
|
||||||
|
|
||||||
## 4.31.6 - 01 Dec 2025
|
## 3.31.6 - 01 Dec 2025
|
||||||
|
|
||||||
No user facing changes.
|
No user facing changes.
|
||||||
|
|
||||||
## 4.31.5 - 24 Nov 2025
|
## 3.31.5 - 24 Nov 2025
|
||||||
|
|
||||||
- Update default CodeQL bundle version to 2.23.6. [#3321](https://github.com/github/codeql-action/pull/3321)
|
- Update default CodeQL bundle version to 2.23.6. [#3321](https://github.com/github/codeql-action/pull/3321)
|
||||||
|
|
||||||
## 4.31.4 - 18 Nov 2025
|
## 3.31.4 - 18 Nov 2025
|
||||||
|
|
||||||
No user facing changes.
|
No user facing changes.
|
||||||
|
|
||||||
## 4.31.3 - 13 Nov 2025
|
## 3.31.3 - 13 Nov 2025
|
||||||
|
|
||||||
- CodeQL Action v3 will be deprecated in December 2026. The Action now logs a warning for customers who are running v3 but could be running v4. For more information, see [Upcoming deprecation of CodeQL Action v3](https://github.blog/changelog/2025-10-28-upcoming-deprecation-of-codeql-action-v3/).
|
- CodeQL Action v3 will be deprecated in December 2026. The Action now logs a warning for customers who are running v3 but could be running v4. For more information, see [Upcoming deprecation of CodeQL Action v3](https://github.blog/changelog/2025-10-28-upcoming-deprecation-of-codeql-action-v3/).
|
||||||
- Update default CodeQL bundle version to 2.23.5. [#3288](https://github.com/github/codeql-action/pull/3288)
|
- Update default CodeQL bundle version to 2.23.5. [#3288](https://github.com/github/codeql-action/pull/3288)
|
||||||
|
|
||||||
## 4.31.2 - 30 Oct 2025
|
## 3.31.2 - 30 Oct 2025
|
||||||
|
|
||||||
No user facing changes.
|
No user facing changes.
|
||||||
|
|
||||||
## 4.31.1 - 30 Oct 2025
|
## 3.31.1 - 30 Oct 2025
|
||||||
|
|
||||||
- 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.
|
- 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
|
## 3.31.0 - 24 Oct 2025
|
||||||
|
|
||||||
- Bump minimum CodeQL bundle version to 2.17.6. [#3223](https://github.com/github/codeql-action/pull/3223)
|
- Bump minimum CodeQL bundle version to 2.17.6. [#3223](https://github.com/github/codeql-action/pull/3223)
|
||||||
- When SARIF files are uploaded by the `analyze` or `upload-sarif` actions, the CodeQL Action automatically performs post-processing steps to prepare the data for the upload. Previously, these post-processing steps were only performed before an upload took place. We are now changing this so that the post-processing steps will always be performed, even when the SARIF files are not uploaded. This does not change anything for the `upload-sarif` action. For `analyze`, this may affect Advanced Setup for CodeQL users who specify a value other than `always` for the `upload` input. [#3222](https://github.com/github/codeql-action/pull/3222)
|
- When SARIF files are uploaded by the `analyze` or `upload-sarif` actions, the CodeQL Action automatically performs post-processing steps to prepare the data for the upload. Previously, these post-processing steps were only performed before an upload took place. We are now changing this so that the post-processing steps will always be performed, even when the SARIF files are not uploaded. This does not change anything for the `upload-sarif` action. For `analyze`, this may affect Advanced Setup for CodeQL users who specify a value other than `always` for the `upload` input. [#3222](https://github.com/github/codeql-action/pull/3222)
|
||||||
|
|
||||||
## 4.30.9 - 17 Oct 2025
|
## 3.30.9 - 17 Oct 2025
|
||||||
|
|
||||||
- Update default CodeQL bundle version to 2.23.3. [#3205](https://github.com/github/codeql-action/pull/3205)
|
- Update default CodeQL bundle version to 2.23.3. [#3205](https://github.com/github/codeql-action/pull/3205)
|
||||||
- Experimental: A new `setup-codeql` action has been added which is similar to `init`, except it only installs the CodeQL CLI and does not initialize a database. Do not use this in production as it is part of an internal experiment and subject to change at any time. [#3204](https://github.com/github/codeql-action/pull/3204)
|
- Experimental: A new `setup-codeql` action has been added which is similar to `init`, except it only installs the CodeQL CLI and does not initialize a database. Do not use this in production as it is part of an internal experiment and subject to change at any time. [#3204](https://github.com/github/codeql-action/pull/3204)
|
||||||
|
|
||||||
## 4.30.8 - 10 Oct 2025
|
## 3.30.8 - 10 Oct 2025
|
||||||
|
|
||||||
No user facing changes.
|
No user facing changes.
|
||||||
|
|
||||||
## 4.30.7 - 06 Oct 2025
|
## 3.30.7 - 06 Oct 2025
|
||||||
|
|
||||||
- [v4+ only] The CodeQL Action now runs on Node.js v24. [#3169](https://github.com/github/codeql-action/pull/3169)
|
No user facing changes.
|
||||||
|
|
||||||
## 3.30.6 - 02 Oct 2025
|
## 3.30.6 - 02 Oct 2025
|
||||||
|
|
||||||
@@ -291,17 +283,13 @@ No user facing changes.
|
|||||||
## 3.26.12 - 07 Oct 2024
|
## 3.26.12 - 07 Oct 2024
|
||||||
|
|
||||||
- _Upcoming breaking change_: Add a deprecation warning for customers using CodeQL version 2.14.5 and earlier. These versions of CodeQL were discontinued on 24 September 2024 alongside GitHub Enterprise Server 3.10, and will be unsupported by CodeQL Action versions 3.27.0 and later and versions 2.27.0 and later. [#2520](https://github.com/github/codeql-action/pull/2520)
|
- _Upcoming breaking change_: Add a deprecation warning for customers using CodeQL version 2.14.5 and earlier. These versions of CodeQL were discontinued on 24 September 2024 alongside GitHub Enterprise Server 3.10, and will be unsupported by CodeQL Action versions 3.27.0 and later and versions 2.27.0 and later. [#2520](https://github.com/github/codeql-action/pull/2520)
|
||||||
|
|
||||||
- If you are using one of these versions, please update to CodeQL CLI version 2.14.6 or later. For instance, if you have specified a custom version of the CLI using the 'tools' input to the 'init' Action, you can remove this input to use the default version.
|
- If you are using one of these versions, please update to CodeQL CLI version 2.14.6 or later. For instance, if you have specified a custom version of the CLI using the 'tools' input to the 'init' Action, you can remove this input to use the default version.
|
||||||
|
|
||||||
- Alternatively, if you want to continue using a version of the CodeQL CLI between 2.13.5 and 2.14.5, you can replace `github/codeql-action/*@v3` by `github/codeql-action/*@v3.26.11` and `github/codeql-action/*@v2` by `github/codeql-action/*@v2.26.11` in your code scanning workflow to ensure you continue using this version of the CodeQL Action.
|
- Alternatively, if you want to continue using a version of the CodeQL CLI between 2.13.5 and 2.14.5, you can replace `github/codeql-action/*@v3` by `github/codeql-action/*@v3.26.11` and `github/codeql-action/*@v2` by `github/codeql-action/*@v2.26.11` in your code scanning workflow to ensure you continue using this version of the CodeQL Action.
|
||||||
|
|
||||||
## 3.26.11 - 03 Oct 2024
|
## 3.26.11 - 03 Oct 2024
|
||||||
|
|
||||||
- _Upcoming breaking change_: Add support for using `actions/download-artifact@v4` to programmatically consume CodeQL Action debug artifacts.
|
- _Upcoming breaking change_: Add support for using `actions/download-artifact@v4` to programmatically consume CodeQL Action debug artifacts.
|
||||||
|
|
||||||
Starting November 30, 2024, GitHub.com customers will [no longer be able to use `actions/download-artifact@v3`](https://github.blog/changelog/2024-04-16-deprecation-notice-v3-of-the-artifact-actions/). Therefore, to avoid breakage, customers who programmatically download the CodeQL Action debug artifacts should set the `CODEQL_ACTION_ARTIFACT_V4_UPGRADE` environment variable to `true` and bump `actions/download-artifact@v3` to `actions/download-artifact@v4` in their workflows. The CodeQL Action will enable this behavior by default in early November and workflows that have not yet bumped `actions/download-artifact@v3` to `actions/download-artifact@v4` will begin failing then.
|
Starting November 30, 2024, GitHub.com customers will [no longer be able to use `actions/download-artifact@v3`](https://github.blog/changelog/2024-04-16-deprecation-notice-v3-of-the-artifact-actions/). Therefore, to avoid breakage, customers who programmatically download the CodeQL Action debug artifacts should set the `CODEQL_ACTION_ARTIFACT_V4_UPGRADE` environment variable to `true` and bump `actions/download-artifact@v3` to `actions/download-artifact@v4` in their workflows. The CodeQL Action will enable this behavior by default in early November and workflows that have not yet bumped `actions/download-artifact@v3` to `actions/download-artifact@v4` will begin failing then.
|
||||||
|
|
||||||
This change is currently unavailable for GitHub Enterprise Server customers, as `actions/upload-artifact@v4` and `actions/download-artifact@v4` are not yet compatible with GHES.
|
This change is currently unavailable for GitHub Enterprise Server customers, as `actions/upload-artifact@v4` and `actions/download-artifact@v4` are not yet compatible with GHES.
|
||||||
- Update default CodeQL bundle version to 2.19.1. [#2519](https://github.com/github/codeql-action/pull/2519)
|
- Update default CodeQL bundle version to 2.19.1. [#2519](https://github.com/github/codeql-action/pull/2519)
|
||||||
|
|
||||||
@@ -424,12 +412,9 @@ No user facing changes.
|
|||||||
## 3.25.0 - 15 Apr 2024
|
## 3.25.0 - 15 Apr 2024
|
||||||
|
|
||||||
- The deprecated feature for extracting dependencies for a Python analysis has been removed. [#2224](https://github.com/github/codeql-action/pull/2224)
|
- The deprecated feature for extracting dependencies for a Python analysis has been removed. [#2224](https://github.com/github/codeql-action/pull/2224)
|
||||||
|
|
||||||
As a result, the following inputs and environment variables are now ignored:
|
As a result, the following inputs and environment variables are now ignored:
|
||||||
|
|
||||||
- The `setup-python-dependencies` input to the `init` Action
|
- The `setup-python-dependencies` input to the `init` Action
|
||||||
- The `CODEQL_ACTION_DISABLE_PYTHON_DEPENDENCY_INSTALLATION` environment variable
|
- The `CODEQL_ACTION_DISABLE_PYTHON_DEPENDENCY_INSTALLATION` environment variable
|
||||||
|
|
||||||
We recommend removing any references to these from your workflows. For more information, see the release notes for CodeQL Action v3.23.0 and v2.23.0.
|
We recommend removing any references to these from your workflows. For more information, see the release notes for CodeQL Action v3.23.0 and v2.23.0.
|
||||||
- Automatically overwrite an existing database if found on the filesystem. [#2229](https://github.com/github/codeql-action/pull/2229)
|
- Automatically overwrite an existing database if found on the filesystem. [#2229](https://github.com/github/codeql-action/pull/2229)
|
||||||
- Bump the minimum CodeQL bundle version to 2.12.6. [#2232](https://github.com/github/codeql-action/pull/2232)
|
- Bump the minimum CodeQL bundle version to 2.12.6. [#2232](https://github.com/github/codeql-action/pull/2232)
|
||||||
|
|||||||
@@ -94,6 +94,6 @@ outputs:
|
|||||||
sarif-id:
|
sarif-id:
|
||||||
description: The ID of the uploaded SARIF file.
|
description: The ID of the uploaded SARIF file.
|
||||||
runs:
|
runs:
|
||||||
using: node24
|
using: node20
|
||||||
main: "../lib/analyze-action.js"
|
main: "../lib/analyze-action.js"
|
||||||
post: "../lib/analyze-action-post.js"
|
post: "../lib/analyze-action-post.js"
|
||||||
|
|||||||
@@ -15,5 +15,5 @@ inputs:
|
|||||||
$GITHUB_WORKSPACE as its working directory.
|
$GITHUB_WORKSPACE as its working directory.
|
||||||
required: false
|
required: false
|
||||||
runs:
|
runs:
|
||||||
using: node24
|
using: node20
|
||||||
main: '../lib/autobuild-action.js'
|
main: '../lib/autobuild-action.js'
|
||||||
|
|||||||
@@ -165,6 +165,6 @@ outputs:
|
|||||||
codeql-version:
|
codeql-version:
|
||||||
description: The version of the CodeQL binary used for analysis
|
description: The version of the CodeQL binary used for analysis
|
||||||
runs:
|
runs:
|
||||||
using: node24
|
using: node20
|
||||||
main: '../lib/init-action.js'
|
main: '../lib/init-action.js'
|
||||||
post: '../lib/init-action-post.js'
|
post: '../lib/init-action-post.js'
|
||||||
|
|||||||
19
lib/analyze-action-post.js
generated
19
lib/analyze-action-post.js
generated
@@ -27627,7 +27627,7 @@ var require_package = __commonJS({
|
|||||||
"package.json"(exports2, module2) {
|
"package.json"(exports2, module2) {
|
||||||
module2.exports = {
|
module2.exports = {
|
||||||
name: "codeql",
|
name: "codeql",
|
||||||
version: "4.31.9",
|
version: "3.31.7",
|
||||||
private: true,
|
private: true,
|
||||||
description: "CodeQL action",
|
description: "CodeQL action",
|
||||||
scripts: {
|
scripts: {
|
||||||
@@ -120735,23 +120735,6 @@ ${output}`
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async resolveDatabase(databasePath) {
|
|
||||||
const codeqlArgs = [
|
|
||||||
"resolve",
|
|
||||||
"database",
|
|
||||||
databasePath,
|
|
||||||
"--format=json",
|
|
||||||
...getExtraOptionsFromEnv(["resolve", "database"])
|
|
||||||
];
|
|
||||||
const output = await runCli(cmd, codeqlArgs, { noStreamStdout: true });
|
|
||||||
try {
|
|
||||||
return JSON.parse(output);
|
|
||||||
} catch (e) {
|
|
||||||
throw new Error(
|
|
||||||
`Unexpected output from codeql resolve database --format=json: ${e}`
|
|
||||||
);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
async mergeResults(sarifFiles, outputFile, {
|
async mergeResults(sarifFiles, outputFile, {
|
||||||
mergeRunsFromEqualCategory = false
|
mergeRunsFromEqualCategory = false
|
||||||
}) {
|
}) {
|
||||||
|
|||||||
45
lib/analyze-action.js
generated
45
lib/analyze-action.js
generated
@@ -27627,7 +27627,7 @@ var require_package = __commonJS({
|
|||||||
"package.json"(exports2, module2) {
|
"package.json"(exports2, module2) {
|
||||||
module2.exports = {
|
module2.exports = {
|
||||||
name: "codeql",
|
name: "codeql",
|
||||||
version: "4.31.9",
|
version: "3.31.7",
|
||||||
private: true,
|
private: true,
|
||||||
description: "CodeQL action",
|
description: "CodeQL action",
|
||||||
scripts: {
|
scripts: {
|
||||||
@@ -88211,8 +88211,8 @@ var path4 = __toESM(require("path"));
|
|||||||
var semver4 = __toESM(require_semver2());
|
var semver4 = __toESM(require_semver2());
|
||||||
|
|
||||||
// src/defaults.json
|
// src/defaults.json
|
||||||
var bundleVersion = "codeql-bundle-v2.23.8";
|
var bundleVersion = "codeql-bundle-v2.23.7";
|
||||||
var cliVersion = "2.23.8";
|
var cliVersion = "2.23.7";
|
||||||
|
|
||||||
// src/overlay-database-utils.ts
|
// src/overlay-database-utils.ts
|
||||||
var fs3 = __toESM(require("fs"));
|
var fs3 = __toESM(require("fs"));
|
||||||
@@ -88512,7 +88512,7 @@ function computeChangedFiles(baseFileOids, overlayFileOids) {
|
|||||||
var CACHE_VERSION = 1;
|
var CACHE_VERSION = 1;
|
||||||
var CACHE_PREFIX = "codeql-overlay-base-database";
|
var CACHE_PREFIX = "codeql-overlay-base-database";
|
||||||
var MAX_CACHE_OPERATION_MS = 6e5;
|
var MAX_CACHE_OPERATION_MS = 6e5;
|
||||||
async function checkOverlayBaseDatabase(codeql, config, logger, warningPrefix) {
|
function checkOverlayBaseDatabase(config, logger, warningPrefix) {
|
||||||
const baseDatabaseOidsFilePath = getBaseDatabaseOidsFilePath(config);
|
const baseDatabaseOidsFilePath = getBaseDatabaseOidsFilePath(config);
|
||||||
if (!fs3.existsSync(baseDatabaseOidsFilePath)) {
|
if (!fs3.existsSync(baseDatabaseOidsFilePath)) {
|
||||||
logger.warning(
|
logger.warning(
|
||||||
@@ -88520,23 +88520,6 @@ async function checkOverlayBaseDatabase(codeql, config, logger, warningPrefix) {
|
|||||||
);
|
);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
for (const language of config.languages) {
|
|
||||||
const dbPath = getCodeQLDatabasePath(config, language);
|
|
||||||
try {
|
|
||||||
const resolveDatabaseOutput = await codeql.resolveDatabase(dbPath);
|
|
||||||
if (resolveDatabaseOutput === void 0 || !("overlayBaseSpecifier" in resolveDatabaseOutput)) {
|
|
||||||
logger.info(`${warningPrefix}: no overlayBaseSpecifier defined`);
|
|
||||||
return false;
|
|
||||||
} else {
|
|
||||||
logger.debug(
|
|
||||||
`Overlay base specifier for ${language} overlay-base database found: ${resolveDatabaseOutput.overlayBaseSpecifier}`
|
|
||||||
);
|
|
||||||
}
|
|
||||||
} catch (e) {
|
|
||||||
logger.warning(`${warningPrefix}: failed to resolve database: ${e}`);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
async function cleanupAndUploadOverlayBaseDatabaseToCache(codeql, config, logger) {
|
async function cleanupAndUploadOverlayBaseDatabaseToCache(codeql, config, logger) {
|
||||||
@@ -88559,8 +88542,7 @@ async function cleanupAndUploadOverlayBaseDatabaseToCache(codeql, config, logger
|
|||||||
);
|
);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
const databaseIsValid = await checkOverlayBaseDatabase(
|
const databaseIsValid = checkOverlayBaseDatabase(
|
||||||
codeql,
|
|
||||||
config,
|
config,
|
||||||
logger,
|
logger,
|
||||||
"Abort uploading overlay-base database to cache"
|
"Abort uploading overlay-base database to cache"
|
||||||
@@ -90905,23 +90887,6 @@ ${output}`
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async resolveDatabase(databasePath) {
|
|
||||||
const codeqlArgs = [
|
|
||||||
"resolve",
|
|
||||||
"database",
|
|
||||||
databasePath,
|
|
||||||
"--format=json",
|
|
||||||
...getExtraOptionsFromEnv(["resolve", "database"])
|
|
||||||
];
|
|
||||||
const output = await runCli(cmd, codeqlArgs, { noStreamStdout: true });
|
|
||||||
try {
|
|
||||||
return JSON.parse(output);
|
|
||||||
} catch (e) {
|
|
||||||
throw new Error(
|
|
||||||
`Unexpected output from codeql resolve database --format=json: ${e}`
|
|
||||||
);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
async mergeResults(sarifFiles, outputFile, {
|
async mergeResults(sarifFiles, outputFile, {
|
||||||
mergeRunsFromEqualCategory = false
|
mergeRunsFromEqualCategory = false
|
||||||
}) {
|
}) {
|
||||||
|
|||||||
23
lib/autobuild-action.js
generated
23
lib/autobuild-action.js
generated
@@ -27627,7 +27627,7 @@ var require_package = __commonJS({
|
|||||||
"package.json"(exports2, module2) {
|
"package.json"(exports2, module2) {
|
||||||
module2.exports = {
|
module2.exports = {
|
||||||
name: "codeql",
|
name: "codeql",
|
||||||
version: "4.31.9",
|
version: "3.31.7",
|
||||||
private: true,
|
private: true,
|
||||||
description: "CodeQL action",
|
description: "CodeQL action",
|
||||||
scripts: {
|
scripts: {
|
||||||
@@ -83701,8 +83701,8 @@ var path3 = __toESM(require("path"));
|
|||||||
var semver4 = __toESM(require_semver2());
|
var semver4 = __toESM(require_semver2());
|
||||||
|
|
||||||
// src/defaults.json
|
// src/defaults.json
|
||||||
var bundleVersion = "codeql-bundle-v2.23.8";
|
var bundleVersion = "codeql-bundle-v2.23.7";
|
||||||
var cliVersion = "2.23.8";
|
var cliVersion = "2.23.7";
|
||||||
|
|
||||||
// src/overlay-database-utils.ts
|
// src/overlay-database-utils.ts
|
||||||
var fs2 = __toESM(require("fs"));
|
var fs2 = __toESM(require("fs"));
|
||||||
@@ -84973,23 +84973,6 @@ ${output}`
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async resolveDatabase(databasePath) {
|
|
||||||
const codeqlArgs = [
|
|
||||||
"resolve",
|
|
||||||
"database",
|
|
||||||
databasePath,
|
|
||||||
"--format=json",
|
|
||||||
...getExtraOptionsFromEnv(["resolve", "database"])
|
|
||||||
];
|
|
||||||
const output = await runCli(cmd, codeqlArgs, { noStreamStdout: true });
|
|
||||||
try {
|
|
||||||
return JSON.parse(output);
|
|
||||||
} catch (e) {
|
|
||||||
throw new Error(
|
|
||||||
`Unexpected output from codeql resolve database --format=json: ${e}`
|
|
||||||
);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
async mergeResults(sarifFiles, outputFile, {
|
async mergeResults(sarifFiles, outputFile, {
|
||||||
mergeRunsFromEqualCategory = false
|
mergeRunsFromEqualCategory = false
|
||||||
}) {
|
}) {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"bundleVersion": "codeql-bundle-v2.23.8",
|
"bundleVersion": "codeql-bundle-v2.23.7",
|
||||||
"cliVersion": "2.23.8",
|
"cliVersion": "2.23.7",
|
||||||
"priorBundleVersion": "codeql-bundle-v2.23.7",
|
"priorBundleVersion": "codeql-bundle-v2.23.6",
|
||||||
"priorCliVersion": "2.23.7"
|
"priorCliVersion": "2.23.6"
|
||||||
}
|
}
|
||||||
|
|||||||
23
lib/init-action-post.js
generated
23
lib/init-action-post.js
generated
@@ -27627,7 +27627,7 @@ var require_package = __commonJS({
|
|||||||
"package.json"(exports2, module2) {
|
"package.json"(exports2, module2) {
|
||||||
module2.exports = {
|
module2.exports = {
|
||||||
name: "codeql",
|
name: "codeql",
|
||||||
version: "4.31.9",
|
version: "3.31.7",
|
||||||
private: true,
|
private: true,
|
||||||
description: "CodeQL action",
|
description: "CodeQL action",
|
||||||
scripts: {
|
scripts: {
|
||||||
@@ -123084,8 +123084,8 @@ var path4 = __toESM(require("path"));
|
|||||||
var semver4 = __toESM(require_semver2());
|
var semver4 = __toESM(require_semver2());
|
||||||
|
|
||||||
// src/defaults.json
|
// src/defaults.json
|
||||||
var bundleVersion = "codeql-bundle-v2.23.8";
|
var bundleVersion = "codeql-bundle-v2.23.7";
|
||||||
var cliVersion = "2.23.8";
|
var cliVersion = "2.23.7";
|
||||||
|
|
||||||
// src/overlay-database-utils.ts
|
// src/overlay-database-utils.ts
|
||||||
var fs3 = __toESM(require("fs"));
|
var fs3 = __toESM(require("fs"));
|
||||||
@@ -125350,23 +125350,6 @@ ${output}`
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async resolveDatabase(databasePath) {
|
|
||||||
const codeqlArgs = [
|
|
||||||
"resolve",
|
|
||||||
"database",
|
|
||||||
databasePath,
|
|
||||||
"--format=json",
|
|
||||||
...getExtraOptionsFromEnv(["resolve", "database"])
|
|
||||||
];
|
|
||||||
const output = await runCli(cmd, codeqlArgs, { noStreamStdout: true });
|
|
||||||
try {
|
|
||||||
return JSON.parse(output);
|
|
||||||
} catch (e) {
|
|
||||||
throw new Error(
|
|
||||||
`Unexpected output from codeql resolve database --format=json: ${e}`
|
|
||||||
);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
async mergeResults(sarifFiles, outputFile, {
|
async mergeResults(sarifFiles, outputFile, {
|
||||||
mergeRunsFromEqualCategory = false
|
mergeRunsFromEqualCategory = false
|
||||||
}) {
|
}) {
|
||||||
|
|||||||
45
lib/init-action.js
generated
45
lib/init-action.js
generated
@@ -27627,7 +27627,7 @@ var require_package = __commonJS({
|
|||||||
"package.json"(exports2, module2) {
|
"package.json"(exports2, module2) {
|
||||||
module2.exports = {
|
module2.exports = {
|
||||||
name: "codeql",
|
name: "codeql",
|
||||||
version: "4.31.9",
|
version: "3.31.7",
|
||||||
private: true,
|
private: true,
|
||||||
description: "CodeQL action",
|
description: "CodeQL action",
|
||||||
scripts: {
|
scripts: {
|
||||||
@@ -85635,8 +85635,8 @@ var path5 = __toESM(require("path"));
|
|||||||
var semver4 = __toESM(require_semver2());
|
var semver4 = __toESM(require_semver2());
|
||||||
|
|
||||||
// src/defaults.json
|
// src/defaults.json
|
||||||
var bundleVersion = "codeql-bundle-v2.23.8";
|
var bundleVersion = "codeql-bundle-v2.23.7";
|
||||||
var cliVersion = "2.23.8";
|
var cliVersion = "2.23.7";
|
||||||
|
|
||||||
// src/overlay-database-utils.ts
|
// src/overlay-database-utils.ts
|
||||||
var fs3 = __toESM(require("fs"));
|
var fs3 = __toESM(require("fs"));
|
||||||
@@ -85914,7 +85914,7 @@ function computeChangedFiles(baseFileOids, overlayFileOids) {
|
|||||||
var CACHE_VERSION = 1;
|
var CACHE_VERSION = 1;
|
||||||
var CACHE_PREFIX = "codeql-overlay-base-database";
|
var CACHE_PREFIX = "codeql-overlay-base-database";
|
||||||
var MAX_CACHE_OPERATION_MS = 6e5;
|
var MAX_CACHE_OPERATION_MS = 6e5;
|
||||||
async function checkOverlayBaseDatabase(codeql, config, logger, warningPrefix) {
|
function checkOverlayBaseDatabase(config, logger, warningPrefix) {
|
||||||
const baseDatabaseOidsFilePath = getBaseDatabaseOidsFilePath(config);
|
const baseDatabaseOidsFilePath = getBaseDatabaseOidsFilePath(config);
|
||||||
if (!fs3.existsSync(baseDatabaseOidsFilePath)) {
|
if (!fs3.existsSync(baseDatabaseOidsFilePath)) {
|
||||||
logger.warning(
|
logger.warning(
|
||||||
@@ -85922,23 +85922,6 @@ async function checkOverlayBaseDatabase(codeql, config, logger, warningPrefix) {
|
|||||||
);
|
);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
for (const language of config.languages) {
|
|
||||||
const dbPath = getCodeQLDatabasePath(config, language);
|
|
||||||
try {
|
|
||||||
const resolveDatabaseOutput = await codeql.resolveDatabase(dbPath);
|
|
||||||
if (resolveDatabaseOutput === void 0 || !("overlayBaseSpecifier" in resolveDatabaseOutput)) {
|
|
||||||
logger.info(`${warningPrefix}: no overlayBaseSpecifier defined`);
|
|
||||||
return false;
|
|
||||||
} else {
|
|
||||||
logger.debug(
|
|
||||||
`Overlay base specifier for ${language} overlay-base database found: ${resolveDatabaseOutput.overlayBaseSpecifier}`
|
|
||||||
);
|
|
||||||
}
|
|
||||||
} catch (e) {
|
|
||||||
logger.warning(`${warningPrefix}: failed to resolve database: ${e}`);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
async function downloadOverlayBaseDatabaseFromCache(codeql, config, logger) {
|
async function downloadOverlayBaseDatabaseFromCache(codeql, config, logger) {
|
||||||
@@ -86026,8 +86009,7 @@ async function downloadOverlayBaseDatabaseFromCache(codeql, config, logger) {
|
|||||||
);
|
);
|
||||||
return void 0;
|
return void 0;
|
||||||
}
|
}
|
||||||
const databaseIsValid = await checkOverlayBaseDatabase(
|
const databaseIsValid = checkOverlayBaseDatabase(
|
||||||
codeql,
|
|
||||||
config,
|
config,
|
||||||
logger,
|
logger,
|
||||||
"Downloaded overlay-base database is invalid"
|
"Downloaded overlay-base database is invalid"
|
||||||
@@ -89165,23 +89147,6 @@ ${output}`
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async resolveDatabase(databasePath) {
|
|
||||||
const codeqlArgs = [
|
|
||||||
"resolve",
|
|
||||||
"database",
|
|
||||||
databasePath,
|
|
||||||
"--format=json",
|
|
||||||
...getExtraOptionsFromEnv(["resolve", "database"])
|
|
||||||
];
|
|
||||||
const output = await runCli(cmd, codeqlArgs, { noStreamStdout: true });
|
|
||||||
try {
|
|
||||||
return JSON.parse(output);
|
|
||||||
} catch (e) {
|
|
||||||
throw new Error(
|
|
||||||
`Unexpected output from codeql resolve database --format=json: ${e}`
|
|
||||||
);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
async mergeResults(sarifFiles, outputFile, {
|
async mergeResults(sarifFiles, outputFile, {
|
||||||
mergeRunsFromEqualCategory = false
|
mergeRunsFromEqualCategory = false
|
||||||
}) {
|
}) {
|
||||||
|
|||||||
19
lib/resolve-environment-action.js
generated
19
lib/resolve-environment-action.js
generated
@@ -27627,7 +27627,7 @@ var require_package = __commonJS({
|
|||||||
"package.json"(exports2, module2) {
|
"package.json"(exports2, module2) {
|
||||||
module2.exports = {
|
module2.exports = {
|
||||||
name: "codeql",
|
name: "codeql",
|
||||||
version: "4.31.9",
|
version: "3.31.7",
|
||||||
private: true,
|
private: true,
|
||||||
description: "CodeQL action",
|
description: "CodeQL action",
|
||||||
scripts: {
|
scripts: {
|
||||||
@@ -84672,23 +84672,6 @@ ${output}`
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async resolveDatabase(databasePath) {
|
|
||||||
const codeqlArgs = [
|
|
||||||
"resolve",
|
|
||||||
"database",
|
|
||||||
databasePath,
|
|
||||||
"--format=json",
|
|
||||||
...getExtraOptionsFromEnv(["resolve", "database"])
|
|
||||||
];
|
|
||||||
const output = await runCli(cmd, codeqlArgs, { noStreamStdout: true });
|
|
||||||
try {
|
|
||||||
return JSON.parse(output);
|
|
||||||
} catch (e) {
|
|
||||||
throw new Error(
|
|
||||||
`Unexpected output from codeql resolve database --format=json: ${e}`
|
|
||||||
);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
async mergeResults(sarifFiles, outputFile, {
|
async mergeResults(sarifFiles, outputFile, {
|
||||||
mergeRunsFromEqualCategory = false
|
mergeRunsFromEqualCategory = false
|
||||||
}) {
|
}) {
|
||||||
|
|||||||
23
lib/setup-codeql-action.js
generated
23
lib/setup-codeql-action.js
generated
@@ -27627,7 +27627,7 @@ var require_package = __commonJS({
|
|||||||
"package.json"(exports2, module2) {
|
"package.json"(exports2, module2) {
|
||||||
module2.exports = {
|
module2.exports = {
|
||||||
name: "codeql",
|
name: "codeql",
|
||||||
version: "4.31.9",
|
version: "3.31.7",
|
||||||
private: true,
|
private: true,
|
||||||
description: "CodeQL action",
|
description: "CodeQL action",
|
||||||
scripts: {
|
scripts: {
|
||||||
@@ -83589,8 +83589,8 @@ var path4 = __toESM(require("path"));
|
|||||||
var semver3 = __toESM(require_semver2());
|
var semver3 = __toESM(require_semver2());
|
||||||
|
|
||||||
// src/defaults.json
|
// src/defaults.json
|
||||||
var bundleVersion = "codeql-bundle-v2.23.8";
|
var bundleVersion = "codeql-bundle-v2.23.7";
|
||||||
var cliVersion = "2.23.8";
|
var cliVersion = "2.23.7";
|
||||||
|
|
||||||
// src/overlay-database-utils.ts
|
// src/overlay-database-utils.ts
|
||||||
var fs3 = __toESM(require("fs"));
|
var fs3 = __toESM(require("fs"));
|
||||||
@@ -85975,23 +85975,6 @@ ${output}`
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async resolveDatabase(databasePath) {
|
|
||||||
const codeqlArgs = [
|
|
||||||
"resolve",
|
|
||||||
"database",
|
|
||||||
databasePath,
|
|
||||||
"--format=json",
|
|
||||||
...getExtraOptionsFromEnv(["resolve", "database"])
|
|
||||||
];
|
|
||||||
const output = await runCli(cmd, codeqlArgs, { noStreamStdout: true });
|
|
||||||
try {
|
|
||||||
return JSON.parse(output);
|
|
||||||
} catch (e) {
|
|
||||||
throw new Error(
|
|
||||||
`Unexpected output from codeql resolve database --format=json: ${e}`
|
|
||||||
);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
async mergeResults(sarifFiles, outputFile, {
|
async mergeResults(sarifFiles, outputFile, {
|
||||||
mergeRunsFromEqualCategory = false
|
mergeRunsFromEqualCategory = false
|
||||||
}) {
|
}) {
|
||||||
|
|||||||
2
lib/start-proxy-action-post.js
generated
2
lib/start-proxy-action-post.js
generated
@@ -27627,7 +27627,7 @@ var require_package = __commonJS({
|
|||||||
"package.json"(exports2, module2) {
|
"package.json"(exports2, module2) {
|
||||||
module2.exports = {
|
module2.exports = {
|
||||||
name: "codeql",
|
name: "codeql",
|
||||||
version: "4.31.9",
|
version: "3.31.7",
|
||||||
private: true,
|
private: true,
|
||||||
description: "CodeQL action",
|
description: "CodeQL action",
|
||||||
scripts: {
|
scripts: {
|
||||||
|
|||||||
6
lib/start-proxy-action.js
generated
6
lib/start-proxy-action.js
generated
@@ -47321,7 +47321,7 @@ var require_package = __commonJS({
|
|||||||
"package.json"(exports2, module2) {
|
"package.json"(exports2, module2) {
|
||||||
module2.exports = {
|
module2.exports = {
|
||||||
name: "codeql",
|
name: "codeql",
|
||||||
version: "4.31.9",
|
version: "3.31.7",
|
||||||
private: true,
|
private: true,
|
||||||
description: "CodeQL action",
|
description: "CodeQL action",
|
||||||
scripts: {
|
scripts: {
|
||||||
@@ -99720,8 +99720,8 @@ function getActionsLogger() {
|
|||||||
var core7 = __toESM(require_core());
|
var core7 = __toESM(require_core());
|
||||||
|
|
||||||
// src/defaults.json
|
// src/defaults.json
|
||||||
var bundleVersion = "codeql-bundle-v2.23.8";
|
var bundleVersion = "codeql-bundle-v2.23.7";
|
||||||
var cliVersion = "2.23.8";
|
var cliVersion = "2.23.7";
|
||||||
|
|
||||||
// src/languages.ts
|
// src/languages.ts
|
||||||
var KnownLanguage = /* @__PURE__ */ ((KnownLanguage2) => {
|
var KnownLanguage = /* @__PURE__ */ ((KnownLanguage2) => {
|
||||||
|
|||||||
23
lib/upload-lib.js
generated
23
lib/upload-lib.js
generated
@@ -28924,7 +28924,7 @@ var require_package = __commonJS({
|
|||||||
"package.json"(exports2, module2) {
|
"package.json"(exports2, module2) {
|
||||||
module2.exports = {
|
module2.exports = {
|
||||||
name: "codeql",
|
name: "codeql",
|
||||||
version: "4.31.9",
|
version: "3.31.7",
|
||||||
private: true,
|
private: true,
|
||||||
description: "CodeQL action",
|
description: "CodeQL action",
|
||||||
scripts: {
|
scripts: {
|
||||||
@@ -86724,8 +86724,8 @@ var path4 = __toESM(require("path"));
|
|||||||
var semver4 = __toESM(require_semver2());
|
var semver4 = __toESM(require_semver2());
|
||||||
|
|
||||||
// src/defaults.json
|
// src/defaults.json
|
||||||
var bundleVersion = "codeql-bundle-v2.23.8";
|
var bundleVersion = "codeql-bundle-v2.23.7";
|
||||||
var cliVersion = "2.23.8";
|
var cliVersion = "2.23.7";
|
||||||
|
|
||||||
// src/overlay-database-utils.ts
|
// src/overlay-database-utils.ts
|
||||||
var fs3 = __toESM(require("fs"));
|
var fs3 = __toESM(require("fs"));
|
||||||
@@ -88697,23 +88697,6 @@ ${output}`
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async resolveDatabase(databasePath) {
|
|
||||||
const codeqlArgs = [
|
|
||||||
"resolve",
|
|
||||||
"database",
|
|
||||||
databasePath,
|
|
||||||
"--format=json",
|
|
||||||
...getExtraOptionsFromEnv(["resolve", "database"])
|
|
||||||
];
|
|
||||||
const output = await runCli(cmd, codeqlArgs, { noStreamStdout: true });
|
|
||||||
try {
|
|
||||||
return JSON.parse(output);
|
|
||||||
} catch (e) {
|
|
||||||
throw new Error(
|
|
||||||
`Unexpected output from codeql resolve database --format=json: ${e}`
|
|
||||||
);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
async mergeResults(sarifFiles, outputFile, {
|
async mergeResults(sarifFiles, outputFile, {
|
||||||
mergeRunsFromEqualCategory = false
|
mergeRunsFromEqualCategory = false
|
||||||
}) {
|
}) {
|
||||||
|
|||||||
2
lib/upload-sarif-action-post.js
generated
2
lib/upload-sarif-action-post.js
generated
@@ -27627,7 +27627,7 @@ var require_package = __commonJS({
|
|||||||
"package.json"(exports2, module2) {
|
"package.json"(exports2, module2) {
|
||||||
module2.exports = {
|
module2.exports = {
|
||||||
name: "codeql",
|
name: "codeql",
|
||||||
version: "4.31.9",
|
version: "3.31.7",
|
||||||
private: true,
|
private: true,
|
||||||
description: "CodeQL action",
|
description: "CodeQL action",
|
||||||
scripts: {
|
scripts: {
|
||||||
|
|||||||
23
lib/upload-sarif-action.js
generated
23
lib/upload-sarif-action.js
generated
@@ -27627,7 +27627,7 @@ var require_package = __commonJS({
|
|||||||
"package.json"(exports2, module2) {
|
"package.json"(exports2, module2) {
|
||||||
module2.exports = {
|
module2.exports = {
|
||||||
name: "codeql",
|
name: "codeql",
|
||||||
version: "4.31.9",
|
version: "3.31.7",
|
||||||
private: true,
|
private: true,
|
||||||
description: "CodeQL action",
|
description: "CodeQL action",
|
||||||
scripts: {
|
scripts: {
|
||||||
@@ -86505,8 +86505,8 @@ var path4 = __toESM(require("path"));
|
|||||||
var semver3 = __toESM(require_semver2());
|
var semver3 = __toESM(require_semver2());
|
||||||
|
|
||||||
// src/defaults.json
|
// src/defaults.json
|
||||||
var bundleVersion = "codeql-bundle-v2.23.8";
|
var bundleVersion = "codeql-bundle-v2.23.7";
|
||||||
var cliVersion = "2.23.8";
|
var cliVersion = "2.23.7";
|
||||||
|
|
||||||
// src/overlay-database-utils.ts
|
// src/overlay-database-utils.ts
|
||||||
var fs3 = __toESM(require("fs"));
|
var fs3 = __toESM(require("fs"));
|
||||||
@@ -89215,23 +89215,6 @@ ${output}`
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async resolveDatabase(databasePath) {
|
|
||||||
const codeqlArgs = [
|
|
||||||
"resolve",
|
|
||||||
"database",
|
|
||||||
databasePath,
|
|
||||||
"--format=json",
|
|
||||||
...getExtraOptionsFromEnv(["resolve", "database"])
|
|
||||||
];
|
|
||||||
const output = await runCli(cmd, codeqlArgs, { noStreamStdout: true });
|
|
||||||
try {
|
|
||||||
return JSON.parse(output);
|
|
||||||
} catch (e) {
|
|
||||||
throw new Error(
|
|
||||||
`Unexpected output from codeql resolve database --format=json: ${e}`
|
|
||||||
);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
async mergeResults(sarifFiles, outputFile, {
|
async mergeResults(sarifFiles, outputFile, {
|
||||||
mergeRunsFromEqualCategory = false
|
mergeRunsFromEqualCategory = false
|
||||||
}) {
|
}) {
|
||||||
|
|||||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "codeql",
|
"name": "codeql",
|
||||||
"version": "4.31.9",
|
"version": "4.31.7",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "codeql",
|
"name": "codeql",
|
||||||
"version": "4.31.9",
|
"version": "4.31.7",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/artifact": "^4.0.0",
|
"@actions/artifact": "^4.0.0",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "codeql",
|
"name": "codeql",
|
||||||
"version": "4.31.9",
|
"version": "3.31.7",
|
||||||
"private": true,
|
"private": true,
|
||||||
"description": "CodeQL action",
|
"description": "CodeQL action",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -21,5 +21,5 @@ outputs:
|
|||||||
environment:
|
environment:
|
||||||
description: The inferred build environment configuration.
|
description: The inferred build environment configuration.
|
||||||
runs:
|
runs:
|
||||||
using: node24
|
using: node20
|
||||||
main: '../lib/resolve-environment-action.js'
|
main: '../lib/resolve-environment-action.js'
|
||||||
|
|||||||
@@ -35,5 +35,5 @@ outputs:
|
|||||||
codeql-version:
|
codeql-version:
|
||||||
description: The version of the CodeQL binary that was installed.
|
description: The version of the CodeQL binary that was installed.
|
||||||
runs:
|
runs:
|
||||||
using: node24
|
using: node20
|
||||||
main: '../lib/setup-codeql-action.js'
|
main: '../lib/setup-codeql-action.js'
|
||||||
|
|||||||
@@ -206,7 +206,6 @@ export interface CodeQL {
|
|||||||
* Run 'codeql resolve queries --format=startingpacks'.
|
* Run 'codeql resolve queries --format=startingpacks'.
|
||||||
*/
|
*/
|
||||||
resolveQueriesStartingPacks(queries: string[]): Promise<string[]>;
|
resolveQueriesStartingPacks(queries: string[]): Promise<string[]>;
|
||||||
resolveDatabase(databasePath: string): Promise<ResolveDatabaseOutput>;
|
|
||||||
/**
|
/**
|
||||||
* Run 'codeql github merge-results'.
|
* Run 'codeql github merge-results'.
|
||||||
*/
|
*/
|
||||||
@@ -231,10 +230,6 @@ export interface VersionInfo {
|
|||||||
overlayVersion?: number;
|
overlayVersion?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ResolveDatabaseOutput {
|
|
||||||
overlayBaseSpecifier?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ResolveLanguagesOutput {
|
export interface ResolveLanguagesOutput {
|
||||||
[language: string]: [string];
|
[language: string]: [string];
|
||||||
}
|
}
|
||||||
@@ -498,7 +493,6 @@ export function createStubCodeQL(partialCodeql: Partial<CodeQL>): CodeQL {
|
|||||||
partialCodeql,
|
partialCodeql,
|
||||||
"resolveQueriesStartingPacks",
|
"resolveQueriesStartingPacks",
|
||||||
),
|
),
|
||||||
resolveDatabase: resolveFunction(partialCodeql, "resolveDatabase"),
|
|
||||||
mergeResults: resolveFunction(partialCodeql, "mergeResults"),
|
mergeResults: resolveFunction(partialCodeql, "mergeResults"),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -1009,26 +1003,6 @@ async function getCodeQLForCmd(
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async resolveDatabase(
|
|
||||||
databasePath: string,
|
|
||||||
): Promise<ResolveDatabaseOutput> {
|
|
||||||
const codeqlArgs = [
|
|
||||||
"resolve",
|
|
||||||
"database",
|
|
||||||
databasePath,
|
|
||||||
"--format=json",
|
|
||||||
...getExtraOptionsFromEnv(["resolve", "database"]),
|
|
||||||
];
|
|
||||||
const output = await runCli(cmd, codeqlArgs, { noStreamStdout: true });
|
|
||||||
|
|
||||||
try {
|
|
||||||
return JSON.parse(output) as ResolveDatabaseOutput;
|
|
||||||
} catch (e) {
|
|
||||||
throw new Error(
|
|
||||||
`Unexpected output from codeql resolve database --format=json: ${e}`,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
async mergeResults(
|
async mergeResults(
|
||||||
sarifFiles: string[],
|
sarifFiles: string[],
|
||||||
outputFile: string,
|
outputFile: string,
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"bundleVersion": "codeql-bundle-v2.23.8",
|
"bundleVersion": "codeql-bundle-v2.23.7",
|
||||||
"cliVersion": "2.23.8",
|
"cliVersion": "2.23.7",
|
||||||
"priorBundleVersion": "codeql-bundle-v2.23.7",
|
"priorBundleVersion": "codeql-bundle-v2.23.6",
|
||||||
"priorCliVersion": "2.23.7"
|
"priorCliVersion": "2.23.6"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,9 +7,7 @@ import * as sinon from "sinon";
|
|||||||
|
|
||||||
import * as actionsUtil from "./actions-util";
|
import * as actionsUtil from "./actions-util";
|
||||||
import * as apiClient from "./api-client";
|
import * as apiClient from "./api-client";
|
||||||
import { ResolveDatabaseOutput } from "./codeql";
|
|
||||||
import * as gitUtils from "./git-utils";
|
import * as gitUtils from "./git-utils";
|
||||||
import { KnownLanguage } from "./languages";
|
|
||||||
import { getRunnerLogger } from "./logging";
|
import { getRunnerLogger } from "./logging";
|
||||||
import {
|
import {
|
||||||
downloadOverlayBaseDatabaseFromCache,
|
downloadOverlayBaseDatabaseFromCache,
|
||||||
@@ -97,7 +95,6 @@ interface DownloadOverlayBaseDatabaseTestCase {
|
|||||||
hasBaseDatabaseOidsFile: boolean;
|
hasBaseDatabaseOidsFile: boolean;
|
||||||
tryGetFolderBytesSucceeds: boolean;
|
tryGetFolderBytesSucceeds: boolean;
|
||||||
codeQLVersion: string;
|
codeQLVersion: string;
|
||||||
resolveDatabaseOutput: ResolveDatabaseOutput | Error;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const defaultDownloadTestCase: DownloadOverlayBaseDatabaseTestCase = {
|
const defaultDownloadTestCase: DownloadOverlayBaseDatabaseTestCase = {
|
||||||
@@ -108,7 +105,6 @@ const defaultDownloadTestCase: DownloadOverlayBaseDatabaseTestCase = {
|
|||||||
hasBaseDatabaseOidsFile: true,
|
hasBaseDatabaseOidsFile: true,
|
||||||
tryGetFolderBytesSucceeds: true,
|
tryGetFolderBytesSucceeds: true,
|
||||||
codeQLVersion: "2.20.5",
|
codeQLVersion: "2.20.5",
|
||||||
resolveDatabaseOutput: { overlayBaseSpecifier: "20250626:XXX" },
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const testDownloadOverlayBaseDatabaseFromCache = test.macro({
|
const testDownloadOverlayBaseDatabaseFromCache = test.macro({
|
||||||
@@ -123,11 +119,9 @@ const testDownloadOverlayBaseDatabaseFromCache = test.macro({
|
|||||||
await fs.promises.mkdir(dbLocation, { recursive: true });
|
await fs.promises.mkdir(dbLocation, { recursive: true });
|
||||||
|
|
||||||
const logger = getRunnerLogger(true);
|
const logger = getRunnerLogger(true);
|
||||||
|
const config = createTestConfig({ dbLocation });
|
||||||
|
|
||||||
const testCase = { ...defaultDownloadTestCase, ...partialTestCase };
|
const testCase = { ...defaultDownloadTestCase, ...partialTestCase };
|
||||||
const config = createTestConfig({
|
|
||||||
dbLocation,
|
|
||||||
languages: [KnownLanguage.java],
|
|
||||||
});
|
|
||||||
|
|
||||||
config.overlayDatabaseMode = testCase.overlayDatabaseMode;
|
config.overlayDatabaseMode = testCase.overlayDatabaseMode;
|
||||||
config.useOverlayDatabaseCaching = testCase.useOverlayDatabaseCaching;
|
config.useOverlayDatabaseCaching = testCase.useOverlayDatabaseCaching;
|
||||||
@@ -169,23 +163,9 @@ const testDownloadOverlayBaseDatabaseFromCache = test.macro({
|
|||||||
.resolves(testCase.tryGetFolderBytesSucceeds ? 1024 * 1024 : undefined);
|
.resolves(testCase.tryGetFolderBytesSucceeds ? 1024 * 1024 : undefined);
|
||||||
stubs.push(tryGetFolderBytesStub);
|
stubs.push(tryGetFolderBytesStub);
|
||||||
|
|
||||||
const codeql = mockCodeQLVersion(testCase.codeQLVersion);
|
|
||||||
|
|
||||||
if (testCase.resolveDatabaseOutput instanceof Error) {
|
|
||||||
const resolveDatabaseStub = sinon
|
|
||||||
.stub(codeql, "resolveDatabase")
|
|
||||||
.rejects(testCase.resolveDatabaseOutput);
|
|
||||||
stubs.push(resolveDatabaseStub);
|
|
||||||
} else {
|
|
||||||
const resolveDatabaseStub = sinon
|
|
||||||
.stub(codeql, "resolveDatabase")
|
|
||||||
.resolves(testCase.resolveDatabaseOutput);
|
|
||||||
stubs.push(resolveDatabaseStub);
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const result = await downloadOverlayBaseDatabaseFromCache(
|
const result = await downloadOverlayBaseDatabaseFromCache(
|
||||||
codeql,
|
mockCodeQLVersion(testCase.codeQLVersion),
|
||||||
config,
|
config,
|
||||||
logger,
|
logger,
|
||||||
);
|
);
|
||||||
@@ -275,24 +255,6 @@ test(
|
|||||||
false,
|
false,
|
||||||
);
|
);
|
||||||
|
|
||||||
test(
|
|
||||||
testDownloadOverlayBaseDatabaseFromCache,
|
|
||||||
"returns undefined when downloaded database doesn't have an overlayBaseSpecifier",
|
|
||||||
{
|
|
||||||
resolveDatabaseOutput: {},
|
|
||||||
},
|
|
||||||
false,
|
|
||||||
);
|
|
||||||
|
|
||||||
test(
|
|
||||||
testDownloadOverlayBaseDatabaseFromCache,
|
|
||||||
"returns undefined when resolving database metadata fails",
|
|
||||||
{
|
|
||||||
resolveDatabaseOutput: new Error("Failed to resolve database metadata"),
|
|
||||||
},
|
|
||||||
false,
|
|
||||||
);
|
|
||||||
|
|
||||||
test(
|
test(
|
||||||
testDownloadOverlayBaseDatabaseFromCache,
|
testDownloadOverlayBaseDatabaseFromCache,
|
||||||
"returns undefined when filesystem error occurs",
|
"returns undefined when filesystem error occurs",
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ import { getCommitOid, getFileOidsUnderPath } from "./git-utils";
|
|||||||
import { Logger, withGroupAsync } from "./logging";
|
import { Logger, withGroupAsync } from "./logging";
|
||||||
import {
|
import {
|
||||||
CleanupLevel,
|
CleanupLevel,
|
||||||
getCodeQLDatabasePath,
|
|
||||||
getErrorMessage,
|
getErrorMessage,
|
||||||
isInTestMode,
|
isInTestMode,
|
||||||
tryGetFolderBytes,
|
tryGetFolderBytes,
|
||||||
@@ -177,12 +176,11 @@ const MAX_CACHE_OPERATION_MS = 600_000;
|
|||||||
* @param warningPrefix Prefix for the check failure warning message
|
* @param warningPrefix Prefix for the check failure warning message
|
||||||
* @returns True if the verification succeeded, false otherwise
|
* @returns True if the verification succeeded, false otherwise
|
||||||
*/
|
*/
|
||||||
async function checkOverlayBaseDatabase(
|
function checkOverlayBaseDatabase(
|
||||||
codeql: CodeQL,
|
|
||||||
config: Config,
|
config: Config,
|
||||||
logger: Logger,
|
logger: Logger,
|
||||||
warningPrefix: string,
|
warningPrefix: string,
|
||||||
): Promise<boolean> {
|
): boolean {
|
||||||
// An overlay-base database should contain the base database OIDs file.
|
// An overlay-base database should contain the base database OIDs file.
|
||||||
const baseDatabaseOidsFilePath = getBaseDatabaseOidsFilePath(config);
|
const baseDatabaseOidsFilePath = getBaseDatabaseOidsFilePath(config);
|
||||||
if (!fs.existsSync(baseDatabaseOidsFilePath)) {
|
if (!fs.existsSync(baseDatabaseOidsFilePath)) {
|
||||||
@@ -191,29 +189,6 @@ async function checkOverlayBaseDatabase(
|
|||||||
);
|
);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const language of config.languages) {
|
|
||||||
const dbPath = getCodeQLDatabasePath(config, language);
|
|
||||||
try {
|
|
||||||
const resolveDatabaseOutput = await codeql.resolveDatabase(dbPath);
|
|
||||||
if (
|
|
||||||
resolveDatabaseOutput === undefined ||
|
|
||||||
!("overlayBaseSpecifier" in resolveDatabaseOutput)
|
|
||||||
) {
|
|
||||||
logger.info(`${warningPrefix}: no overlayBaseSpecifier defined`);
|
|
||||||
return false;
|
|
||||||
} else {
|
|
||||||
logger.debug(
|
|
||||||
`Overlay base specifier for ${language} overlay-base database found: ` +
|
|
||||||
`${resolveDatabaseOutput.overlayBaseSpecifier}`,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
} catch (e) {
|
|
||||||
logger.warning(`${warningPrefix}: failed to resolve database: ${e}`);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -257,8 +232,7 @@ export async function cleanupAndUploadOverlayBaseDatabaseToCache(
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
const databaseIsValid = await checkOverlayBaseDatabase(
|
const databaseIsValid = checkOverlayBaseDatabase(
|
||||||
codeql,
|
|
||||||
config,
|
config,
|
||||||
logger,
|
logger,
|
||||||
"Abort uploading overlay-base database to cache",
|
"Abort uploading overlay-base database to cache",
|
||||||
@@ -441,8 +415,7 @@ export async function downloadOverlayBaseDatabaseFromCache(
|
|||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
const databaseIsValid = await checkOverlayBaseDatabase(
|
const databaseIsValid = checkOverlayBaseDatabase(
|
||||||
codeql,
|
|
||||||
config,
|
config,
|
||||||
logger,
|
logger,
|
||||||
"Downloaded overlay-base database is invalid",
|
"Downloaded overlay-base database is invalid",
|
||||||
|
|||||||
@@ -29,6 +29,6 @@ outputs:
|
|||||||
proxy_urls:
|
proxy_urls:
|
||||||
description: A stringified JSON array of objects containing the types and URLs of the configured registries.
|
description: A stringified JSON array of objects containing the types and URLs of the configured registries.
|
||||||
runs:
|
runs:
|
||||||
using: node24
|
using: node20
|
||||||
main: "../lib/start-proxy-action.js"
|
main: "../lib/start-proxy-action.js"
|
||||||
post: "../lib/start-proxy-action-post.js"
|
post: "../lib/start-proxy-action-post.js"
|
||||||
|
|||||||
@@ -41,6 +41,6 @@ outputs:
|
|||||||
|
|
||||||
{ "code-scanning": "some-id", "code-quality": "some-other-id" }
|
{ "code-scanning": "some-id", "code-quality": "some-other-id" }
|
||||||
runs:
|
runs:
|
||||||
using: node24
|
using: node20
|
||||||
main: '../lib/upload-sarif-action.js'
|
main: '../lib/upload-sarif-action.js'
|
||||||
post: '../lib/upload-sarif-action-post.js'
|
post: '../lib/upload-sarif-action-post.js'
|
||||||
|
|||||||
Reference in New Issue
Block a user