mirror of
https://github.com/github/codeql-action.git
synced 2026-08-05 13:02:04 -05:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 12e8528a59 | |||
| 489516c0b0 |
@@ -16,12 +16,9 @@ updates:
|
||||
- dependency-name: "eslint-plugin-import"
|
||||
versions: [">=2.30.0"]
|
||||
groups:
|
||||
npm-minor:
|
||||
npm:
|
||||
patterns:
|
||||
- "*"
|
||||
update-types:
|
||||
- "minor"
|
||||
- "patch"
|
||||
- package-ecosystem: github-actions
|
||||
directories:
|
||||
- "/.github/workflows"
|
||||
@@ -31,9 +28,6 @@ updates:
|
||||
labels:
|
||||
- Rebuild
|
||||
groups:
|
||||
actions-minor:
|
||||
actions:
|
||||
patterns:
|
||||
- "*"
|
||||
update-types:
|
||||
- "minor"
|
||||
- "patch"
|
||||
|
||||
@@ -29,14 +29,13 @@ For internal use only. Please select the risk level of this change:
|
||||
|
||||
#### How did/will you validate this change?
|
||||
|
||||
<!-- Delete options that don't apply. Be explicit about test coverage. -->
|
||||
<!-- Delete options that don't apply. -->
|
||||
|
||||
- **Test repository** - This change will be tested on a test repository before merging.
|
||||
- **Unit tests** - I am depending on existing unit test coverage (i.e. tests in `.test.ts` files).
|
||||
- **Unit tests** - I am depending on unit test coverage (i.e. tests in `.test.ts` files).
|
||||
- **End-to-end tests** - I am depending on PR checks (i.e. tests in `pr-checks`).
|
||||
- **New / updated tests** - I have added or updated tests (summarize below).
|
||||
- **Other** - Please provide details.
|
||||
- **None** - I am not validating these changes (provide justification below).
|
||||
- **None** - I am not validating these changes.
|
||||
|
||||
#### If something goes wrong after this change is released, what are the mitigation and rollback strategies?
|
||||
|
||||
@@ -58,6 +57,5 @@ For internal use only. Please select the risk level of this change:
|
||||
### Merge / deployment checklist
|
||||
|
||||
- Confirm this change is backwards compatible with existing workflows.
|
||||
- Confirm that tests have been added/updated or are not needed.
|
||||
- Consider adding a [changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) entry for this change.
|
||||
- Confirm the [readme](https://github.com/github/codeql-action/blob/main/README.md) and docs have been updated if necessary.
|
||||
|
||||
@@ -371,10 +371,10 @@ def main():
|
||||
# releases.
|
||||
run_git('revert', vOlder_update_commits[0], '--no-edit')
|
||||
|
||||
# Also revert the "Rebuild" commit created by Actions.
|
||||
rebuild_commit = run_git('log', '--grep', '^Rebuild$', '--format=%H').split()[0]
|
||||
print(f' Reverting {rebuild_commit}')
|
||||
run_git('revert', rebuild_commit, '--no-edit')
|
||||
# Also revert the "Update checked-in dependencies" commit created by Actions.
|
||||
update_dependencies_commit = run_git('log', '--grep', '^Update checked-in dependencies', '--format=%H').split()[0]
|
||||
print(f' Reverting {update_dependencies_commit}')
|
||||
run_git('revert', update_dependencies_commit, '--no-edit')
|
||||
|
||||
else:
|
||||
print(' Nothing to revert.')
|
||||
|
||||
+1
-1
@@ -56,7 +56,7 @@ jobs:
|
||||
use-all-platform-bundle: 'false'
|
||||
setup-kotlin: 'true'
|
||||
- name: Set up Ruby
|
||||
uses: ruby/setup-ruby@ab177d40ee5483edb974554986f56b33477e21d0 # v1.265.0
|
||||
uses: ruby/setup-ruby@0481980f17b760ef6bca5e8c55809102a0af1e5a # v1.263.0
|
||||
with:
|
||||
ruby-version: 2.6
|
||||
- name: Install Code Scanning integration
|
||||
|
||||
@@ -146,7 +146,6 @@ jobs:
|
||||
private-key: ${{ secrets.AUTOMATION_PRIVATE_KEY }}
|
||||
|
||||
- name: Create the GitHub release
|
||||
if: steps.check.outputs.exists != 'true'
|
||||
env:
|
||||
PARTIAL_CHANGELOG: "${{ runner.temp }}/partial_changelog.md"
|
||||
VERSION: "${{ steps.getVersion.outputs.version }}"
|
||||
|
||||
@@ -73,7 +73,7 @@ jobs:
|
||||
run: npm run lint-ci
|
||||
|
||||
- name: Upload sarif
|
||||
uses: github/codeql-action/upload-sarif@v4
|
||||
uses: github/codeql-action/upload-sarif@v3
|
||||
if: matrix.os == 'ubuntu-latest' && matrix.node-version == 24
|
||||
with:
|
||||
sarif_file: eslint.sarif
|
||||
|
||||
@@ -6,10 +6,6 @@ See the [releases page](https://github.com/github/codeql-action/releases) for th
|
||||
|
||||
No user facing changes.
|
||||
|
||||
## 4.30.8 - 10 Oct 2025
|
||||
|
||||
No user facing changes.
|
||||
|
||||
## 4.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)
|
||||
|
||||
Generated
+6
-33
@@ -24680,9 +24680,6 @@ var require_identifiers = __commonJS({
|
||||
"use strict";
|
||||
var numeric = /^[0-9]+$/;
|
||||
var compareIdentifiers = (a, b) => {
|
||||
if (typeof a === "number" && typeof b === "number") {
|
||||
return a === b ? 0 : a < b ? -1 : 1;
|
||||
}
|
||||
const anum = numeric.test(a);
|
||||
const bnum = numeric.test(b);
|
||||
if (anum && bnum) {
|
||||
@@ -24789,25 +24786,7 @@ var require_semver = __commonJS({
|
||||
if (!(other instanceof _SemVer)) {
|
||||
other = new _SemVer(other, this.options);
|
||||
}
|
||||
if (this.major < other.major) {
|
||||
return -1;
|
||||
}
|
||||
if (this.major > other.major) {
|
||||
return 1;
|
||||
}
|
||||
if (this.minor < other.minor) {
|
||||
return -1;
|
||||
}
|
||||
if (this.minor > other.minor) {
|
||||
return 1;
|
||||
}
|
||||
if (this.patch < other.patch) {
|
||||
return -1;
|
||||
}
|
||||
if (this.patch > other.patch) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch);
|
||||
}
|
||||
comparePre(other) {
|
||||
if (!(other instanceof _SemVer)) {
|
||||
@@ -25568,7 +25547,6 @@ var require_range = __commonJS({
|
||||
return result;
|
||||
};
|
||||
var parseComparator = (comp, options) => {
|
||||
comp = comp.replace(re[t.BUILD], "");
|
||||
debug2("comp", comp, options);
|
||||
comp = replaceCarets(comp, options);
|
||||
debug2("caret", comp);
|
||||
@@ -26460,7 +26438,7 @@ var require_package = __commonJS({
|
||||
"package.json"(exports2, module2) {
|
||||
module2.exports = {
|
||||
name: "codeql",
|
||||
version: "4.30.9",
|
||||
version: "4.30.8",
|
||||
private: true,
|
||||
description: "CodeQL action",
|
||||
scripts: {
|
||||
@@ -26509,7 +26487,7 @@ var require_package = __commonJS({
|
||||
long: "^5.3.2",
|
||||
"node-forge": "^1.3.1",
|
||||
octokit: "^5.0.3",
|
||||
semver: "^7.7.3",
|
||||
semver: "^7.7.2",
|
||||
uuid: "^13.0.0"
|
||||
},
|
||||
devDependencies: {
|
||||
@@ -26527,7 +26505,7 @@ var require_package = __commonJS({
|
||||
"@types/node-forge": "^1.3.14",
|
||||
"@types/semver": "^7.7.1",
|
||||
"@types/sinon": "^17.0.4",
|
||||
"@typescript-eslint/eslint-plugin": "^8.46.0",
|
||||
"@typescript-eslint/eslint-plugin": "^8.45.0",
|
||||
"@typescript-eslint/parser": "^8.41.0",
|
||||
ava: "^6.4.1",
|
||||
esbuild: "^0.25.10",
|
||||
@@ -117828,11 +117806,6 @@ function isSafeArtifactUpload(codeQlVersion) {
|
||||
|
||||
// src/feature-flags.ts
|
||||
var featureConfig = {
|
||||
["allow_toolcache_input" /* AllowToolcacheInput */]: {
|
||||
defaultValue: false,
|
||||
envVar: "CODEQL_ACTION_ALLOW_TOOLCACHE_INPUT",
|
||||
minimumVersion: void 0
|
||||
},
|
||||
["cleanup_trap_caches" /* CleanupTrapCaches */]: {
|
||||
defaultValue: false,
|
||||
envVar: "CODEQL_ACTION_CLEANUP_TRAP_CACHES",
|
||||
@@ -118510,14 +118483,14 @@ ${output}`
|
||||
return JSON.parse(extractorPath);
|
||||
},
|
||||
async resolveQueriesStartingPacks(queries) {
|
||||
const codeqlArgs = [
|
||||
const zcodeqlArgs = [
|
||||
"resolve",
|
||||
"queries",
|
||||
"--format=startingpacks",
|
||||
...getExtraOptionsFromEnv(["resolve", "queries"]),
|
||||
...queries
|
||||
];
|
||||
const output = await runCli(cmd, codeqlArgs, { noStreamStdout: true });
|
||||
const output = await runCli(cmd, zcodeqlArgs, { noStreamStdout: true });
|
||||
try {
|
||||
return JSON.parse(output);
|
||||
} catch (e) {
|
||||
|
||||
Generated
+14
-54
@@ -30529,9 +30529,6 @@ var require_identifiers = __commonJS({
|
||||
"use strict";
|
||||
var numeric = /^[0-9]+$/;
|
||||
var compareIdentifiers = (a, b) => {
|
||||
if (typeof a === "number" && typeof b === "number") {
|
||||
return a === b ? 0 : a < b ? -1 : 1;
|
||||
}
|
||||
const anum = numeric.test(a);
|
||||
const bnum = numeric.test(b);
|
||||
if (anum && bnum) {
|
||||
@@ -30638,25 +30635,7 @@ var require_semver = __commonJS({
|
||||
if (!(other instanceof _SemVer)) {
|
||||
other = new _SemVer(other, this.options);
|
||||
}
|
||||
if (this.major < other.major) {
|
||||
return -1;
|
||||
}
|
||||
if (this.major > other.major) {
|
||||
return 1;
|
||||
}
|
||||
if (this.minor < other.minor) {
|
||||
return -1;
|
||||
}
|
||||
if (this.minor > other.minor) {
|
||||
return 1;
|
||||
}
|
||||
if (this.patch < other.patch) {
|
||||
return -1;
|
||||
}
|
||||
if (this.patch > other.patch) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch);
|
||||
}
|
||||
comparePre(other) {
|
||||
if (!(other instanceof _SemVer)) {
|
||||
@@ -31417,7 +31396,6 @@ var require_range = __commonJS({
|
||||
return result;
|
||||
};
|
||||
var parseComparator = (comp, options) => {
|
||||
comp = comp.replace(re[t.BUILD], "");
|
||||
debug3("comp", comp, options);
|
||||
comp = replaceCarets(comp, options);
|
||||
debug3("caret", comp);
|
||||
@@ -32309,7 +32287,7 @@ var require_package = __commonJS({
|
||||
"package.json"(exports2, module2) {
|
||||
module2.exports = {
|
||||
name: "codeql",
|
||||
version: "4.30.9",
|
||||
version: "4.30.8",
|
||||
private: true,
|
||||
description: "CodeQL action",
|
||||
scripts: {
|
||||
@@ -32358,7 +32336,7 @@ var require_package = __commonJS({
|
||||
long: "^5.3.2",
|
||||
"node-forge": "^1.3.1",
|
||||
octokit: "^5.0.3",
|
||||
semver: "^7.7.3",
|
||||
semver: "^7.7.2",
|
||||
uuid: "^13.0.0"
|
||||
},
|
||||
devDependencies: {
|
||||
@@ -32376,7 +32354,7 @@ var require_package = __commonJS({
|
||||
"@types/node-forge": "^1.3.14",
|
||||
"@types/semver": "^7.7.1",
|
||||
"@types/sinon": "^17.0.4",
|
||||
"@typescript-eslint/eslint-plugin": "^8.46.0",
|
||||
"@typescript-eslint/eslint-plugin": "^8.45.0",
|
||||
"@typescript-eslint/parser": "^8.41.0",
|
||||
ava: "^6.4.1",
|
||||
esbuild: "^0.25.10",
|
||||
@@ -91117,11 +91095,6 @@ var DEFAULT_VERSION_FEATURE_FLAG_PREFIX = "default_codeql_version_";
|
||||
var DEFAULT_VERSION_FEATURE_FLAG_SUFFIX = "_enabled";
|
||||
var CODEQL_VERSION_ZSTD_BUNDLE = "2.19.0";
|
||||
var featureConfig = {
|
||||
["allow_toolcache_input" /* AllowToolcacheInput */]: {
|
||||
defaultValue: false,
|
||||
envVar: "CODEQL_ACTION_ALLOW_TOOLCACHE_INPUT",
|
||||
minimumVersion: void 0
|
||||
},
|
||||
["cleanup_trap_caches" /* CleanupTrapCaches */]: {
|
||||
defaultValue: false,
|
||||
envVar: "CODEQL_ACTION_CLEANUP_TRAP_CACHES",
|
||||
@@ -92326,7 +92299,7 @@ async function findOverridingToolsInCache(humanReadableVersion, logger) {
|
||||
}
|
||||
return void 0;
|
||||
}
|
||||
async function getCodeQLSource(toolsInput, defaultCliVersion, apiDetails, variant, tarSupportsZstd, features, logger) {
|
||||
async function getCodeQLSource(toolsInput, defaultCliVersion, apiDetails, variant, tarSupportsZstd, logger) {
|
||||
if (toolsInput && !isReservedToolsValue(toolsInput) && !toolsInput.startsWith("http")) {
|
||||
logger.info(`Using CodeQL CLI from local path ${toolsInput}`);
|
||||
const compressionMethod2 = inferCompressionMethod(toolsInput);
|
||||
@@ -92365,10 +92338,7 @@ async function getCodeQLSource(toolsInput, defaultCliVersion, apiDetails, varian
|
||||
}
|
||||
} else if (toolsInput !== void 0 && toolsInput === CODEQL_TOOLCACHE_INPUT) {
|
||||
let latestToolcacheVersion;
|
||||
const allowToolcacheValueFF = await features.getValue(
|
||||
"allow_toolcache_input" /* AllowToolcacheInput */
|
||||
);
|
||||
const allowToolcacheValue = allowToolcacheValueFF && (isDynamicWorkflow() || isInTestMode());
|
||||
const allowToolcacheValue = isDynamicWorkflow() || isInTestMode();
|
||||
if (allowToolcacheValue) {
|
||||
logger.info(
|
||||
`Attempting to use the latest CodeQL CLI version in the toolcache, as requested by 'tools: ${toolsInput}'.`
|
||||
@@ -92384,15 +92354,9 @@ async function getCodeQLSource(toolsInput, defaultCliVersion, apiDetails, varian
|
||||
`Found no CodeQL CLI in the toolcache, ignoring 'tools: ${toolsInput}'...`
|
||||
);
|
||||
} else {
|
||||
if (allowToolcacheValueFF) {
|
||||
logger.warning(
|
||||
`Ignoring 'tools: ${toolsInput}' because the workflow was not triggered dynamically.`
|
||||
);
|
||||
} else {
|
||||
logger.info(
|
||||
`Ignoring 'tools: ${toolsInput}' because the feature is not enabled.`
|
||||
);
|
||||
}
|
||||
logger.warning(
|
||||
`Ignoring 'tools: ${toolsInput}' because the workflow was not triggered dynamically.`
|
||||
);
|
||||
}
|
||||
cliVersion2 = defaultCliVersion.cliVersion;
|
||||
tagName = defaultCliVersion.tagName;
|
||||
@@ -92605,7 +92569,7 @@ function getCanonicalToolcacheVersion(cliVersion2, bundleVersion2, logger) {
|
||||
}
|
||||
return cliVersion2;
|
||||
}
|
||||
async function setupCodeQLBundle(toolsInput, apiDetails, tempDir, variant, defaultCliVersion, features, logger) {
|
||||
async function setupCodeQLBundle(toolsInput, apiDetails, tempDir, variant, defaultCliVersion, logger) {
|
||||
if (!await isBinaryAccessible("tar", logger)) {
|
||||
throw new ConfigurationError(
|
||||
"Could not find tar in PATH, so unable to extract CodeQL bundle."
|
||||
@@ -92618,7 +92582,6 @@ async function setupCodeQLBundle(toolsInput, apiDetails, tempDir, variant, defau
|
||||
apiDetails,
|
||||
variant,
|
||||
zstdAvailability.available,
|
||||
features,
|
||||
logger
|
||||
);
|
||||
let codeqlFolder;
|
||||
@@ -92776,7 +92739,7 @@ var GHES_VERSION_MOST_RECENTLY_DEPRECATED = "3.13";
|
||||
var GHES_MOST_RECENT_DEPRECATION_DATE = "2025-06-19";
|
||||
var EXTRACTION_DEBUG_MODE_VERBOSITY = "progress++";
|
||||
var CODEQL_VERSION_CACHE_CLEANUP = "2.17.1";
|
||||
async function setupCodeQL(toolsInput, apiDetails, tempDir, variant, defaultCliVersion, features, logger, checkVersion) {
|
||||
async function setupCodeQL(toolsInput, apiDetails, tempDir, variant, defaultCliVersion, logger, checkVersion) {
|
||||
try {
|
||||
const {
|
||||
codeqlFolder,
|
||||
@@ -92790,7 +92753,6 @@ async function setupCodeQL(toolsInput, apiDetails, tempDir, variant, defaultCliV
|
||||
tempDir,
|
||||
variant,
|
||||
defaultCliVersion,
|
||||
features,
|
||||
logger
|
||||
);
|
||||
logger.debug(
|
||||
@@ -93218,14 +93180,14 @@ ${output}`
|
||||
return JSON.parse(extractorPath);
|
||||
},
|
||||
async resolveQueriesStartingPacks(queries) {
|
||||
const codeqlArgs = [
|
||||
const zcodeqlArgs = [
|
||||
"resolve",
|
||||
"queries",
|
||||
"--format=startingpacks",
|
||||
...getExtraOptionsFromEnv(["resolve", "queries"]),
|
||||
...queries
|
||||
];
|
||||
const output = await runCli(cmd, codeqlArgs, { noStreamStdout: true });
|
||||
const output = await runCli(cmd, zcodeqlArgs, { noStreamStdout: true });
|
||||
try {
|
||||
return JSON.parse(output);
|
||||
} catch (e) {
|
||||
@@ -95442,7 +95404,7 @@ async function addFingerprints(sarif, sourceRoot, logger) {
|
||||
// src/init.ts
|
||||
var toolrunner4 = __toESM(require_toolrunner());
|
||||
var io6 = __toESM(require_io());
|
||||
async function initCodeQL(toolsInput, apiDetails, tempDir, variant, defaultCliVersion, features, logger) {
|
||||
async function initCodeQL(toolsInput, apiDetails, tempDir, variant, defaultCliVersion, logger) {
|
||||
logger.startGroup("Setup CodeQL tools");
|
||||
const {
|
||||
codeql,
|
||||
@@ -95456,7 +95418,6 @@ async function initCodeQL(toolsInput, apiDetails, tempDir, variant, defaultCliVe
|
||||
tempDir,
|
||||
variant,
|
||||
defaultCliVersion,
|
||||
features,
|
||||
logger,
|
||||
true
|
||||
);
|
||||
@@ -95603,7 +95564,6 @@ async function combineSarifFilesUsingCLI(sarifFiles, gitHubVersion, features, lo
|
||||
tempDir,
|
||||
gitHubVersion.type,
|
||||
codeQLDefaultVersionInfo,
|
||||
features,
|
||||
logger
|
||||
);
|
||||
codeQL = initCodeQLResult.codeql;
|
||||
|
||||
Generated
+6
-33
@@ -24680,9 +24680,6 @@ var require_identifiers = __commonJS({
|
||||
"use strict";
|
||||
var numeric = /^[0-9]+$/;
|
||||
var compareIdentifiers = (a, b) => {
|
||||
if (typeof a === "number" && typeof b === "number") {
|
||||
return a === b ? 0 : a < b ? -1 : 1;
|
||||
}
|
||||
const anum = numeric.test(a);
|
||||
const bnum = numeric.test(b);
|
||||
if (anum && bnum) {
|
||||
@@ -24789,25 +24786,7 @@ var require_semver = __commonJS({
|
||||
if (!(other instanceof _SemVer)) {
|
||||
other = new _SemVer(other, this.options);
|
||||
}
|
||||
if (this.major < other.major) {
|
||||
return -1;
|
||||
}
|
||||
if (this.major > other.major) {
|
||||
return 1;
|
||||
}
|
||||
if (this.minor < other.minor) {
|
||||
return -1;
|
||||
}
|
||||
if (this.minor > other.minor) {
|
||||
return 1;
|
||||
}
|
||||
if (this.patch < other.patch) {
|
||||
return -1;
|
||||
}
|
||||
if (this.patch > other.patch) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch);
|
||||
}
|
||||
comparePre(other) {
|
||||
if (!(other instanceof _SemVer)) {
|
||||
@@ -25568,7 +25547,6 @@ var require_range = __commonJS({
|
||||
return result;
|
||||
};
|
||||
var parseComparator = (comp, options) => {
|
||||
comp = comp.replace(re[t.BUILD], "");
|
||||
debug3("comp", comp, options);
|
||||
comp = replaceCarets(comp, options);
|
||||
debug3("caret", comp);
|
||||
@@ -26460,7 +26438,7 @@ var require_package = __commonJS({
|
||||
"package.json"(exports2, module2) {
|
||||
module2.exports = {
|
||||
name: "codeql",
|
||||
version: "4.30.9",
|
||||
version: "4.30.8",
|
||||
private: true,
|
||||
description: "CodeQL action",
|
||||
scripts: {
|
||||
@@ -26509,7 +26487,7 @@ var require_package = __commonJS({
|
||||
long: "^5.3.2",
|
||||
"node-forge": "^1.3.1",
|
||||
octokit: "^5.0.3",
|
||||
semver: "^7.7.3",
|
||||
semver: "^7.7.2",
|
||||
uuid: "^13.0.0"
|
||||
},
|
||||
devDependencies: {
|
||||
@@ -26527,7 +26505,7 @@ var require_package = __commonJS({
|
||||
"@types/node-forge": "^1.3.14",
|
||||
"@types/semver": "^7.7.1",
|
||||
"@types/sinon": "^17.0.4",
|
||||
"@typescript-eslint/eslint-plugin": "^8.46.0",
|
||||
"@typescript-eslint/eslint-plugin": "^8.45.0",
|
||||
"@typescript-eslint/parser": "^8.41.0",
|
||||
ava: "^6.4.1",
|
||||
esbuild: "^0.25.10",
|
||||
@@ -78566,11 +78544,6 @@ function isSupportedToolsFeature(versionInfo, feature) {
|
||||
var DEFAULT_VERSION_FEATURE_FLAG_PREFIX = "default_codeql_version_";
|
||||
var DEFAULT_VERSION_FEATURE_FLAG_SUFFIX = "_enabled";
|
||||
var featureConfig = {
|
||||
["allow_toolcache_input" /* AllowToolcacheInput */]: {
|
||||
defaultValue: false,
|
||||
envVar: "CODEQL_ACTION_ALLOW_TOOLCACHE_INPUT",
|
||||
minimumVersion: void 0
|
||||
},
|
||||
["cleanup_trap_caches" /* CleanupTrapCaches */]: {
|
||||
defaultValue: false,
|
||||
envVar: "CODEQL_ACTION_CLEANUP_TRAP_CACHES",
|
||||
@@ -79545,14 +79518,14 @@ ${output}`
|
||||
return JSON.parse(extractorPath);
|
||||
},
|
||||
async resolveQueriesStartingPacks(queries) {
|
||||
const codeqlArgs = [
|
||||
const zcodeqlArgs = [
|
||||
"resolve",
|
||||
"queries",
|
||||
"--format=startingpacks",
|
||||
...getExtraOptionsFromEnv(["resolve", "queries"]),
|
||||
...queries
|
||||
];
|
||||
const output = await runCli(cmd, codeqlArgs, { noStreamStdout: true });
|
||||
const output = await runCli(cmd, zcodeqlArgs, { noStreamStdout: true });
|
||||
try {
|
||||
return JSON.parse(output);
|
||||
} catch (e) {
|
||||
|
||||
Generated
+14
-62
@@ -30529,9 +30529,6 @@ var require_identifiers = __commonJS({
|
||||
"use strict";
|
||||
var numeric = /^[0-9]+$/;
|
||||
var compareIdentifiers = (a, b) => {
|
||||
if (typeof a === "number" && typeof b === "number") {
|
||||
return a === b ? 0 : a < b ? -1 : 1;
|
||||
}
|
||||
const anum = numeric.test(a);
|
||||
const bnum = numeric.test(b);
|
||||
if (anum && bnum) {
|
||||
@@ -30638,25 +30635,7 @@ var require_semver = __commonJS({
|
||||
if (!(other instanceof _SemVer)) {
|
||||
other = new _SemVer(other, this.options);
|
||||
}
|
||||
if (this.major < other.major) {
|
||||
return -1;
|
||||
}
|
||||
if (this.major > other.major) {
|
||||
return 1;
|
||||
}
|
||||
if (this.minor < other.minor) {
|
||||
return -1;
|
||||
}
|
||||
if (this.minor > other.minor) {
|
||||
return 1;
|
||||
}
|
||||
if (this.patch < other.patch) {
|
||||
return -1;
|
||||
}
|
||||
if (this.patch > other.patch) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch);
|
||||
}
|
||||
comparePre(other) {
|
||||
if (!(other instanceof _SemVer)) {
|
||||
@@ -31417,7 +31396,6 @@ var require_range = __commonJS({
|
||||
return result;
|
||||
};
|
||||
var parseComparator = (comp, options) => {
|
||||
comp = comp.replace(re[t.BUILD], "");
|
||||
debug3("comp", comp, options);
|
||||
comp = replaceCarets(comp, options);
|
||||
debug3("caret", comp);
|
||||
@@ -32309,7 +32287,7 @@ var require_package = __commonJS({
|
||||
"package.json"(exports2, module2) {
|
||||
module2.exports = {
|
||||
name: "codeql",
|
||||
version: "4.30.9",
|
||||
version: "4.30.8",
|
||||
private: true,
|
||||
description: "CodeQL action",
|
||||
scripts: {
|
||||
@@ -32358,7 +32336,7 @@ var require_package = __commonJS({
|
||||
long: "^5.3.2",
|
||||
"node-forge": "^1.3.1",
|
||||
octokit: "^5.0.3",
|
||||
semver: "^7.7.3",
|
||||
semver: "^7.7.2",
|
||||
uuid: "^13.0.0"
|
||||
},
|
||||
devDependencies: {
|
||||
@@ -32376,7 +32354,7 @@ var require_package = __commonJS({
|
||||
"@types/node-forge": "^1.3.14",
|
||||
"@types/semver": "^7.7.1",
|
||||
"@types/sinon": "^17.0.4",
|
||||
"@typescript-eslint/eslint-plugin": "^8.46.0",
|
||||
"@typescript-eslint/eslint-plugin": "^8.45.0",
|
||||
"@typescript-eslint/parser": "^8.41.0",
|
||||
ava: "^6.4.1",
|
||||
esbuild: "^0.25.10",
|
||||
@@ -129255,11 +129233,6 @@ var DEFAULT_VERSION_FEATURE_FLAG_PREFIX = "default_codeql_version_";
|
||||
var DEFAULT_VERSION_FEATURE_FLAG_SUFFIX = "_enabled";
|
||||
var CODEQL_VERSION_ZSTD_BUNDLE = "2.19.0";
|
||||
var featureConfig = {
|
||||
["allow_toolcache_input" /* AllowToolcacheInput */]: {
|
||||
defaultValue: false,
|
||||
envVar: "CODEQL_ACTION_ALLOW_TOOLCACHE_INPUT",
|
||||
minimumVersion: void 0
|
||||
},
|
||||
["cleanup_trap_caches" /* CleanupTrapCaches */]: {
|
||||
defaultValue: false,
|
||||
envVar: "CODEQL_ACTION_CLEANUP_TRAP_CACHES",
|
||||
@@ -129786,9 +129759,6 @@ function appendExtraQueryExclusions(extraQueryExclusions, cliConfig) {
|
||||
}
|
||||
return augmentedConfig;
|
||||
}
|
||||
function isCodeScanningEnabled(config) {
|
||||
return config.analysisKinds.includes("code-scanning" /* CodeScanning */);
|
||||
}
|
||||
|
||||
// src/setup-codeql.ts
|
||||
var fs12 = __toESM(require("fs"));
|
||||
@@ -130311,7 +130281,7 @@ async function findOverridingToolsInCache(humanReadableVersion, logger) {
|
||||
}
|
||||
return void 0;
|
||||
}
|
||||
async function getCodeQLSource(toolsInput, defaultCliVersion, apiDetails, variant, tarSupportsZstd, features, logger) {
|
||||
async function getCodeQLSource(toolsInput, defaultCliVersion, apiDetails, variant, tarSupportsZstd, logger) {
|
||||
if (toolsInput && !isReservedToolsValue(toolsInput) && !toolsInput.startsWith("http")) {
|
||||
logger.info(`Using CodeQL CLI from local path ${toolsInput}`);
|
||||
const compressionMethod2 = inferCompressionMethod(toolsInput);
|
||||
@@ -130350,10 +130320,7 @@ async function getCodeQLSource(toolsInput, defaultCliVersion, apiDetails, varian
|
||||
}
|
||||
} else if (toolsInput !== void 0 && toolsInput === CODEQL_TOOLCACHE_INPUT) {
|
||||
let latestToolcacheVersion;
|
||||
const allowToolcacheValueFF = await features.getValue(
|
||||
"allow_toolcache_input" /* AllowToolcacheInput */
|
||||
);
|
||||
const allowToolcacheValue = allowToolcacheValueFF && (isDynamicWorkflow() || isInTestMode());
|
||||
const allowToolcacheValue = isDynamicWorkflow() || isInTestMode();
|
||||
if (allowToolcacheValue) {
|
||||
logger.info(
|
||||
`Attempting to use the latest CodeQL CLI version in the toolcache, as requested by 'tools: ${toolsInput}'.`
|
||||
@@ -130369,15 +130336,9 @@ async function getCodeQLSource(toolsInput, defaultCliVersion, apiDetails, varian
|
||||
`Found no CodeQL CLI in the toolcache, ignoring 'tools: ${toolsInput}'...`
|
||||
);
|
||||
} else {
|
||||
if (allowToolcacheValueFF) {
|
||||
logger.warning(
|
||||
`Ignoring 'tools: ${toolsInput}' because the workflow was not triggered dynamically.`
|
||||
);
|
||||
} else {
|
||||
logger.info(
|
||||
`Ignoring 'tools: ${toolsInput}' because the feature is not enabled.`
|
||||
);
|
||||
}
|
||||
logger.warning(
|
||||
`Ignoring 'tools: ${toolsInput}' because the workflow was not triggered dynamically.`
|
||||
);
|
||||
}
|
||||
cliVersion2 = defaultCliVersion.cliVersion;
|
||||
tagName = defaultCliVersion.tagName;
|
||||
@@ -130590,7 +130551,7 @@ function getCanonicalToolcacheVersion(cliVersion2, bundleVersion2, logger) {
|
||||
}
|
||||
return cliVersion2;
|
||||
}
|
||||
async function setupCodeQLBundle(toolsInput, apiDetails, tempDir, variant, defaultCliVersion, features, logger) {
|
||||
async function setupCodeQLBundle(toolsInput, apiDetails, tempDir, variant, defaultCliVersion, logger) {
|
||||
if (!await isBinaryAccessible("tar", logger)) {
|
||||
throw new ConfigurationError(
|
||||
"Could not find tar in PATH, so unable to extract CodeQL bundle."
|
||||
@@ -130603,7 +130564,6 @@ async function setupCodeQLBundle(toolsInput, apiDetails, tempDir, variant, defau
|
||||
apiDetails,
|
||||
variant,
|
||||
zstdAvailability.available,
|
||||
features,
|
||||
logger
|
||||
);
|
||||
let codeqlFolder;
|
||||
@@ -130728,7 +130688,7 @@ var GHES_VERSION_MOST_RECENTLY_DEPRECATED = "3.13";
|
||||
var GHES_MOST_RECENT_DEPRECATION_DATE = "2025-06-19";
|
||||
var EXTRACTION_DEBUG_MODE_VERBOSITY = "progress++";
|
||||
var CODEQL_VERSION_CACHE_CLEANUP = "2.17.1";
|
||||
async function setupCodeQL(toolsInput, apiDetails, tempDir, variant, defaultCliVersion, features, logger, checkVersion) {
|
||||
async function setupCodeQL(toolsInput, apiDetails, tempDir, variant, defaultCliVersion, logger, checkVersion) {
|
||||
try {
|
||||
const {
|
||||
codeqlFolder,
|
||||
@@ -130742,7 +130702,6 @@ async function setupCodeQL(toolsInput, apiDetails, tempDir, variant, defaultCliV
|
||||
tempDir,
|
||||
variant,
|
||||
defaultCliVersion,
|
||||
features,
|
||||
logger
|
||||
);
|
||||
logger.debug(
|
||||
@@ -131170,14 +131129,14 @@ ${output}`
|
||||
return JSON.parse(extractorPath);
|
||||
},
|
||||
async resolveQueriesStartingPacks(queries) {
|
||||
const codeqlArgs = [
|
||||
const zcodeqlArgs = [
|
||||
"resolve",
|
||||
"queries",
|
||||
"--format=startingpacks",
|
||||
...getExtraOptionsFromEnv(["resolve", "queries"]),
|
||||
...queries
|
||||
];
|
||||
const output = await runCli(cmd, codeqlArgs, { noStreamStdout: true });
|
||||
const output = await runCli(cmd, zcodeqlArgs, { noStreamStdout: true });
|
||||
try {
|
||||
return JSON.parse(output);
|
||||
} catch (e) {
|
||||
@@ -132921,7 +132880,7 @@ async function addFingerprints(sarif, sourceRoot, logger) {
|
||||
// src/init.ts
|
||||
var toolrunner4 = __toESM(require_toolrunner());
|
||||
var io6 = __toESM(require_io());
|
||||
async function initCodeQL(toolsInput, apiDetails, tempDir, variant, defaultCliVersion, features, logger) {
|
||||
async function initCodeQL(toolsInput, apiDetails, tempDir, variant, defaultCliVersion, logger) {
|
||||
logger.startGroup("Setup CodeQL tools");
|
||||
const {
|
||||
codeql,
|
||||
@@ -132935,7 +132894,6 @@ async function initCodeQL(toolsInput, apiDetails, tempDir, variant, defaultCliVe
|
||||
tempDir,
|
||||
variant,
|
||||
defaultCliVersion,
|
||||
features,
|
||||
logger,
|
||||
true
|
||||
);
|
||||
@@ -133082,7 +133040,6 @@ async function combineSarifFilesUsingCLI(sarifFiles, gitHubVersion, features, lo
|
||||
tempDir,
|
||||
gitHubVersion.type,
|
||||
codeQLDefaultVersionInfo,
|
||||
features,
|
||||
logger
|
||||
);
|
||||
codeQL = initCodeQLResult.codeql;
|
||||
@@ -133753,11 +133710,6 @@ async function tryUploadSarifIfRunFailed(config, repositoryNwo, features, logger
|
||||
"CODEQL_ACTION_JOB_STATUS" /* JOB_STATUS */,
|
||||
process.env["CODEQL_ACTION_JOB_STATUS" /* JOB_STATUS */] ?? "JOB_STATUS_CONFIGURATION_ERROR" /* ConfigErrorStatus */
|
||||
);
|
||||
if (!isCodeScanningEnabled(config)) {
|
||||
return {
|
||||
upload_failed_run_skipped_because: "Code Scanning is not enabled."
|
||||
};
|
||||
}
|
||||
try {
|
||||
return await maybeUploadFailedSarif(
|
||||
config,
|
||||
|
||||
Generated
+14
-54
@@ -19971,9 +19971,6 @@ var require_identifiers = __commonJS({
|
||||
"use strict";
|
||||
var numeric = /^[0-9]+$/;
|
||||
var compareIdentifiers = (a, b) => {
|
||||
if (typeof a === "number" && typeof b === "number") {
|
||||
return a === b ? 0 : a < b ? -1 : 1;
|
||||
}
|
||||
const anum = numeric.test(a);
|
||||
const bnum = numeric.test(b);
|
||||
if (anum && bnum) {
|
||||
@@ -20080,25 +20077,7 @@ var require_semver = __commonJS({
|
||||
if (!(other instanceof _SemVer)) {
|
||||
other = new _SemVer(other, this.options);
|
||||
}
|
||||
if (this.major < other.major) {
|
||||
return -1;
|
||||
}
|
||||
if (this.major > other.major) {
|
||||
return 1;
|
||||
}
|
||||
if (this.minor < other.minor) {
|
||||
return -1;
|
||||
}
|
||||
if (this.minor > other.minor) {
|
||||
return 1;
|
||||
}
|
||||
if (this.patch < other.patch) {
|
||||
return -1;
|
||||
}
|
||||
if (this.patch > other.patch) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch);
|
||||
}
|
||||
comparePre(other) {
|
||||
if (!(other instanceof _SemVer)) {
|
||||
@@ -20859,7 +20838,6 @@ var require_range = __commonJS({
|
||||
return result;
|
||||
};
|
||||
var parseComparator = (comp, options) => {
|
||||
comp = comp.replace(re[t.BUILD], "");
|
||||
debug3("comp", comp, options);
|
||||
comp = replaceCarets(comp, options);
|
||||
debug3("caret", comp);
|
||||
@@ -32309,7 +32287,7 @@ var require_package = __commonJS({
|
||||
"package.json"(exports2, module2) {
|
||||
module2.exports = {
|
||||
name: "codeql",
|
||||
version: "4.30.9",
|
||||
version: "4.30.8",
|
||||
private: true,
|
||||
description: "CodeQL action",
|
||||
scripts: {
|
||||
@@ -32358,7 +32336,7 @@ var require_package = __commonJS({
|
||||
long: "^5.3.2",
|
||||
"node-forge": "^1.3.1",
|
||||
octokit: "^5.0.3",
|
||||
semver: "^7.7.3",
|
||||
semver: "^7.7.2",
|
||||
uuid: "^13.0.0"
|
||||
},
|
||||
devDependencies: {
|
||||
@@ -32376,7 +32354,7 @@ var require_package = __commonJS({
|
||||
"@types/node-forge": "^1.3.14",
|
||||
"@types/semver": "^7.7.1",
|
||||
"@types/sinon": "^17.0.4",
|
||||
"@typescript-eslint/eslint-plugin": "^8.46.0",
|
||||
"@typescript-eslint/eslint-plugin": "^8.45.0",
|
||||
"@typescript-eslint/parser": "^8.41.0",
|
||||
ava: "^6.4.1",
|
||||
esbuild: "^0.25.10",
|
||||
@@ -87003,11 +86981,6 @@ var DEFAULT_VERSION_FEATURE_FLAG_PREFIX = "default_codeql_version_";
|
||||
var DEFAULT_VERSION_FEATURE_FLAG_SUFFIX = "_enabled";
|
||||
var CODEQL_VERSION_ZSTD_BUNDLE = "2.19.0";
|
||||
var featureConfig = {
|
||||
["allow_toolcache_input" /* AllowToolcacheInput */]: {
|
||||
defaultValue: false,
|
||||
envVar: "CODEQL_ACTION_ALLOW_TOOLCACHE_INPUT",
|
||||
minimumVersion: void 0
|
||||
},
|
||||
["cleanup_trap_caches" /* CleanupTrapCaches */]: {
|
||||
defaultValue: false,
|
||||
envVar: "CODEQL_ACTION_CLEANUP_TRAP_CACHES",
|
||||
@@ -89104,7 +89077,7 @@ async function findOverridingToolsInCache(humanReadableVersion, logger) {
|
||||
}
|
||||
return void 0;
|
||||
}
|
||||
async function getCodeQLSource(toolsInput, defaultCliVersion, apiDetails, variant, tarSupportsZstd, features, logger) {
|
||||
async function getCodeQLSource(toolsInput, defaultCliVersion, apiDetails, variant, tarSupportsZstd, logger) {
|
||||
if (toolsInput && !isReservedToolsValue(toolsInput) && !toolsInput.startsWith("http")) {
|
||||
logger.info(`Using CodeQL CLI from local path ${toolsInput}`);
|
||||
const compressionMethod2 = inferCompressionMethod(toolsInput);
|
||||
@@ -89143,10 +89116,7 @@ async function getCodeQLSource(toolsInput, defaultCliVersion, apiDetails, varian
|
||||
}
|
||||
} else if (toolsInput !== void 0 && toolsInput === CODEQL_TOOLCACHE_INPUT) {
|
||||
let latestToolcacheVersion;
|
||||
const allowToolcacheValueFF = await features.getValue(
|
||||
"allow_toolcache_input" /* AllowToolcacheInput */
|
||||
);
|
||||
const allowToolcacheValue = allowToolcacheValueFF && (isDynamicWorkflow() || isInTestMode());
|
||||
const allowToolcacheValue = isDynamicWorkflow() || isInTestMode();
|
||||
if (allowToolcacheValue) {
|
||||
logger.info(
|
||||
`Attempting to use the latest CodeQL CLI version in the toolcache, as requested by 'tools: ${toolsInput}'.`
|
||||
@@ -89162,15 +89132,9 @@ async function getCodeQLSource(toolsInput, defaultCliVersion, apiDetails, varian
|
||||
`Found no CodeQL CLI in the toolcache, ignoring 'tools: ${toolsInput}'...`
|
||||
);
|
||||
} else {
|
||||
if (allowToolcacheValueFF) {
|
||||
logger.warning(
|
||||
`Ignoring 'tools: ${toolsInput}' because the workflow was not triggered dynamically.`
|
||||
);
|
||||
} else {
|
||||
logger.info(
|
||||
`Ignoring 'tools: ${toolsInput}' because the feature is not enabled.`
|
||||
);
|
||||
}
|
||||
logger.warning(
|
||||
`Ignoring 'tools: ${toolsInput}' because the workflow was not triggered dynamically.`
|
||||
);
|
||||
}
|
||||
cliVersion2 = defaultCliVersion.cliVersion;
|
||||
tagName = defaultCliVersion.tagName;
|
||||
@@ -89383,7 +89347,7 @@ function getCanonicalToolcacheVersion(cliVersion2, bundleVersion2, logger) {
|
||||
}
|
||||
return cliVersion2;
|
||||
}
|
||||
async function setupCodeQLBundle(toolsInput, apiDetails, tempDir, variant, defaultCliVersion, features, logger) {
|
||||
async function setupCodeQLBundle(toolsInput, apiDetails, tempDir, variant, defaultCliVersion, logger) {
|
||||
if (!await isBinaryAccessible("tar", logger)) {
|
||||
throw new ConfigurationError(
|
||||
"Could not find tar in PATH, so unable to extract CodeQL bundle."
|
||||
@@ -89396,7 +89360,6 @@ async function setupCodeQLBundle(toolsInput, apiDetails, tempDir, variant, defau
|
||||
apiDetails,
|
||||
variant,
|
||||
zstdAvailability.available,
|
||||
features,
|
||||
logger
|
||||
);
|
||||
let codeqlFolder;
|
||||
@@ -89543,7 +89506,7 @@ var GHES_VERSION_MOST_RECENTLY_DEPRECATED = "3.13";
|
||||
var GHES_MOST_RECENT_DEPRECATION_DATE = "2025-06-19";
|
||||
var EXTRACTION_DEBUG_MODE_VERBOSITY = "progress++";
|
||||
var CODEQL_VERSION_CACHE_CLEANUP = "2.17.1";
|
||||
async function setupCodeQL(toolsInput, apiDetails, tempDir, variant, defaultCliVersion, features, logger, checkVersion) {
|
||||
async function setupCodeQL(toolsInput, apiDetails, tempDir, variant, defaultCliVersion, logger, checkVersion) {
|
||||
try {
|
||||
const {
|
||||
codeqlFolder,
|
||||
@@ -89557,7 +89520,6 @@ async function setupCodeQL(toolsInput, apiDetails, tempDir, variant, defaultCliV
|
||||
tempDir,
|
||||
variant,
|
||||
defaultCliVersion,
|
||||
features,
|
||||
logger
|
||||
);
|
||||
logger.debug(
|
||||
@@ -89979,14 +89941,14 @@ ${output}`
|
||||
return JSON.parse(extractorPath);
|
||||
},
|
||||
async resolveQueriesStartingPacks(queries) {
|
||||
const codeqlArgs = [
|
||||
const zcodeqlArgs = [
|
||||
"resolve",
|
||||
"queries",
|
||||
"--format=startingpacks",
|
||||
...getExtraOptionsFromEnv(["resolve", "queries"]),
|
||||
...queries
|
||||
];
|
||||
const output = await runCli(cmd, codeqlArgs, { noStreamStdout: true });
|
||||
const output = await runCli(cmd, zcodeqlArgs, { noStreamStdout: true });
|
||||
try {
|
||||
return JSON.parse(output);
|
||||
} catch (e) {
|
||||
@@ -90131,7 +90093,7 @@ async function getJobRunUuidSarifOptions(codeql) {
|
||||
}
|
||||
|
||||
// src/init.ts
|
||||
async function initCodeQL(toolsInput, apiDetails, tempDir, variant, defaultCliVersion, features, logger) {
|
||||
async function initCodeQL(toolsInput, apiDetails, tempDir, variant, defaultCliVersion, logger) {
|
||||
logger.startGroup("Setup CodeQL tools");
|
||||
const {
|
||||
codeql,
|
||||
@@ -90145,7 +90107,6 @@ async function initCodeQL(toolsInput, apiDetails, tempDir, variant, defaultCliVe
|
||||
tempDir,
|
||||
variant,
|
||||
defaultCliVersion,
|
||||
features,
|
||||
logger,
|
||||
true
|
||||
);
|
||||
@@ -90794,7 +90755,6 @@ async function run() {
|
||||
getTemporaryDirectory(),
|
||||
gitHubVersion.type,
|
||||
codeQLDefaultVersionInfo,
|
||||
features,
|
||||
logger
|
||||
);
|
||||
codeql = initCodeQLResult.codeql;
|
||||
|
||||
Generated
+6
-33
@@ -24680,9 +24680,6 @@ var require_identifiers = __commonJS({
|
||||
"use strict";
|
||||
var numeric = /^[0-9]+$/;
|
||||
var compareIdentifiers = (a, b) => {
|
||||
if (typeof a === "number" && typeof b === "number") {
|
||||
return a === b ? 0 : a < b ? -1 : 1;
|
||||
}
|
||||
const anum = numeric.test(a);
|
||||
const bnum = numeric.test(b);
|
||||
if (anum && bnum) {
|
||||
@@ -24789,25 +24786,7 @@ var require_semver = __commonJS({
|
||||
if (!(other instanceof _SemVer)) {
|
||||
other = new _SemVer(other, this.options);
|
||||
}
|
||||
if (this.major < other.major) {
|
||||
return -1;
|
||||
}
|
||||
if (this.major > other.major) {
|
||||
return 1;
|
||||
}
|
||||
if (this.minor < other.minor) {
|
||||
return -1;
|
||||
}
|
||||
if (this.minor > other.minor) {
|
||||
return 1;
|
||||
}
|
||||
if (this.patch < other.patch) {
|
||||
return -1;
|
||||
}
|
||||
if (this.patch > other.patch) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch);
|
||||
}
|
||||
comparePre(other) {
|
||||
if (!(other instanceof _SemVer)) {
|
||||
@@ -25568,7 +25547,6 @@ var require_range = __commonJS({
|
||||
return result;
|
||||
};
|
||||
var parseComparator = (comp, options) => {
|
||||
comp = comp.replace(re[t.BUILD], "");
|
||||
debug3("comp", comp, options);
|
||||
comp = replaceCarets(comp, options);
|
||||
debug3("caret", comp);
|
||||
@@ -26460,7 +26438,7 @@ var require_package = __commonJS({
|
||||
"package.json"(exports2, module2) {
|
||||
module2.exports = {
|
||||
name: "codeql",
|
||||
version: "4.30.9",
|
||||
version: "4.30.8",
|
||||
private: true,
|
||||
description: "CodeQL action",
|
||||
scripts: {
|
||||
@@ -26509,7 +26487,7 @@ var require_package = __commonJS({
|
||||
long: "^5.3.2",
|
||||
"node-forge": "^1.3.1",
|
||||
octokit: "^5.0.3",
|
||||
semver: "^7.7.3",
|
||||
semver: "^7.7.2",
|
||||
uuid: "^13.0.0"
|
||||
},
|
||||
devDependencies: {
|
||||
@@ -26527,7 +26505,7 @@ var require_package = __commonJS({
|
||||
"@types/node-forge": "^1.3.14",
|
||||
"@types/semver": "^7.7.1",
|
||||
"@types/sinon": "^17.0.4",
|
||||
"@typescript-eslint/eslint-plugin": "^8.46.0",
|
||||
"@typescript-eslint/eslint-plugin": "^8.45.0",
|
||||
"@typescript-eslint/parser": "^8.41.0",
|
||||
ava: "^6.4.1",
|
||||
esbuild: "^0.25.10",
|
||||
@@ -78557,11 +78535,6 @@ function isSupportedToolsFeature(versionInfo, feature) {
|
||||
|
||||
// src/feature-flags.ts
|
||||
var featureConfig = {
|
||||
["allow_toolcache_input" /* AllowToolcacheInput */]: {
|
||||
defaultValue: false,
|
||||
envVar: "CODEQL_ACTION_ALLOW_TOOLCACHE_INPUT",
|
||||
minimumVersion: void 0
|
||||
},
|
||||
["cleanup_trap_caches" /* CleanupTrapCaches */]: {
|
||||
defaultValue: false,
|
||||
envVar: "CODEQL_ACTION_CLEANUP_TRAP_CACHES",
|
||||
@@ -79245,14 +79218,14 @@ ${output}`
|
||||
return JSON.parse(extractorPath);
|
||||
},
|
||||
async resolveQueriesStartingPacks(queries) {
|
||||
const codeqlArgs = [
|
||||
const zcodeqlArgs = [
|
||||
"resolve",
|
||||
"queries",
|
||||
"--format=startingpacks",
|
||||
...getExtraOptionsFromEnv(["resolve", "queries"]),
|
||||
...queries
|
||||
];
|
||||
const output = await runCli(cmd, codeqlArgs, { noStreamStdout: true });
|
||||
const output = await runCli(cmd, zcodeqlArgs, { noStreamStdout: true });
|
||||
try {
|
||||
return JSON.parse(output);
|
||||
} catch (e) {
|
||||
|
||||
Generated
+4
-31
@@ -24680,9 +24680,6 @@ var require_identifiers = __commonJS({
|
||||
"use strict";
|
||||
var numeric = /^[0-9]+$/;
|
||||
var compareIdentifiers = (a, b) => {
|
||||
if (typeof a === "number" && typeof b === "number") {
|
||||
return a === b ? 0 : a < b ? -1 : 1;
|
||||
}
|
||||
const anum = numeric.test(a);
|
||||
const bnum = numeric.test(b);
|
||||
if (anum && bnum) {
|
||||
@@ -24789,25 +24786,7 @@ var require_semver = __commonJS({
|
||||
if (!(other instanceof _SemVer)) {
|
||||
other = new _SemVer(other, this.options);
|
||||
}
|
||||
if (this.major < other.major) {
|
||||
return -1;
|
||||
}
|
||||
if (this.major > other.major) {
|
||||
return 1;
|
||||
}
|
||||
if (this.minor < other.minor) {
|
||||
return -1;
|
||||
}
|
||||
if (this.minor > other.minor) {
|
||||
return 1;
|
||||
}
|
||||
if (this.patch < other.patch) {
|
||||
return -1;
|
||||
}
|
||||
if (this.patch > other.patch) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch);
|
||||
}
|
||||
comparePre(other) {
|
||||
if (!(other instanceof _SemVer)) {
|
||||
@@ -25568,7 +25547,6 @@ var require_range = __commonJS({
|
||||
return result;
|
||||
};
|
||||
var parseComparator = (comp, options) => {
|
||||
comp = comp.replace(re[t.BUILD], "");
|
||||
debug2("comp", comp, options);
|
||||
comp = replaceCarets(comp, options);
|
||||
debug2("caret", comp);
|
||||
@@ -26460,7 +26438,7 @@ var require_package = __commonJS({
|
||||
"package.json"(exports2, module2) {
|
||||
module2.exports = {
|
||||
name: "codeql",
|
||||
version: "4.30.9",
|
||||
version: "4.30.8",
|
||||
private: true,
|
||||
description: "CodeQL action",
|
||||
scripts: {
|
||||
@@ -26509,7 +26487,7 @@ var require_package = __commonJS({
|
||||
long: "^5.3.2",
|
||||
"node-forge": "^1.3.1",
|
||||
octokit: "^5.0.3",
|
||||
semver: "^7.7.3",
|
||||
semver: "^7.7.2",
|
||||
uuid: "^13.0.0"
|
||||
},
|
||||
devDependencies: {
|
||||
@@ -26527,7 +26505,7 @@ var require_package = __commonJS({
|
||||
"@types/node-forge": "^1.3.14",
|
||||
"@types/semver": "^7.7.1",
|
||||
"@types/sinon": "^17.0.4",
|
||||
"@typescript-eslint/eslint-plugin": "^8.46.0",
|
||||
"@typescript-eslint/eslint-plugin": "^8.45.0",
|
||||
"@typescript-eslint/parser": "^8.41.0",
|
||||
ava: "^6.4.1",
|
||||
esbuild: "^0.25.10",
|
||||
@@ -117237,11 +117215,6 @@ var semver3 = __toESM(require_semver2());
|
||||
|
||||
// src/feature-flags.ts
|
||||
var featureConfig = {
|
||||
["allow_toolcache_input" /* AllowToolcacheInput */]: {
|
||||
defaultValue: false,
|
||||
envVar: "CODEQL_ACTION_ALLOW_TOOLCACHE_INPUT",
|
||||
minimumVersion: void 0
|
||||
},
|
||||
["cleanup_trap_caches" /* CleanupTrapCaches */]: {
|
||||
defaultValue: false,
|
||||
envVar: "CODEQL_ACTION_CLEANUP_TRAP_CACHES",
|
||||
|
||||
Generated
+4
-31
@@ -19971,9 +19971,6 @@ var require_identifiers = __commonJS({
|
||||
"use strict";
|
||||
var numeric = /^[0-9]+$/;
|
||||
var compareIdentifiers = (a, b) => {
|
||||
if (typeof a === "number" && typeof b === "number") {
|
||||
return a === b ? 0 : a < b ? -1 : 1;
|
||||
}
|
||||
const anum = numeric.test(a);
|
||||
const bnum = numeric.test(b);
|
||||
if (anum && bnum) {
|
||||
@@ -20080,25 +20077,7 @@ var require_semver = __commonJS({
|
||||
if (!(other instanceof _SemVer)) {
|
||||
other = new _SemVer(other, this.options);
|
||||
}
|
||||
if (this.major < other.major) {
|
||||
return -1;
|
||||
}
|
||||
if (this.major > other.major) {
|
||||
return 1;
|
||||
}
|
||||
if (this.minor < other.minor) {
|
||||
return -1;
|
||||
}
|
||||
if (this.minor > other.minor) {
|
||||
return 1;
|
||||
}
|
||||
if (this.patch < other.patch) {
|
||||
return -1;
|
||||
}
|
||||
if (this.patch > other.patch) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch);
|
||||
}
|
||||
comparePre(other) {
|
||||
if (!(other instanceof _SemVer)) {
|
||||
@@ -20859,7 +20838,6 @@ var require_range = __commonJS({
|
||||
return result;
|
||||
};
|
||||
var parseComparator = (comp, options) => {
|
||||
comp = comp.replace(re[t.BUILD], "");
|
||||
debug3("comp", comp, options);
|
||||
comp = replaceCarets(comp, options);
|
||||
debug3("caret", comp);
|
||||
@@ -44996,7 +44974,7 @@ var require_package = __commonJS({
|
||||
"package.json"(exports2, module2) {
|
||||
module2.exports = {
|
||||
name: "codeql",
|
||||
version: "4.30.9",
|
||||
version: "4.30.8",
|
||||
private: true,
|
||||
description: "CodeQL action",
|
||||
scripts: {
|
||||
@@ -45045,7 +45023,7 @@ var require_package = __commonJS({
|
||||
long: "^5.3.2",
|
||||
"node-forge": "^1.3.1",
|
||||
octokit: "^5.0.3",
|
||||
semver: "^7.7.3",
|
||||
semver: "^7.7.2",
|
||||
uuid: "^13.0.0"
|
||||
},
|
||||
devDependencies: {
|
||||
@@ -45063,7 +45041,7 @@ var require_package = __commonJS({
|
||||
"@types/node-forge": "^1.3.14",
|
||||
"@types/semver": "^7.7.1",
|
||||
"@types/sinon": "^17.0.4",
|
||||
"@typescript-eslint/eslint-plugin": "^8.46.0",
|
||||
"@typescript-eslint/eslint-plugin": "^8.45.0",
|
||||
"@typescript-eslint/parser": "^8.41.0",
|
||||
ava: "^6.4.1",
|
||||
esbuild: "^0.25.10",
|
||||
@@ -95351,11 +95329,6 @@ var semver3 = __toESM(require_semver2());
|
||||
|
||||
// src/feature-flags.ts
|
||||
var featureConfig = {
|
||||
["allow_toolcache_input" /* AllowToolcacheInput */]: {
|
||||
defaultValue: false,
|
||||
envVar: "CODEQL_ACTION_ALLOW_TOOLCACHE_INPUT",
|
||||
minimumVersion: void 0
|
||||
},
|
||||
["cleanup_trap_caches" /* CleanupTrapCaches */]: {
|
||||
defaultValue: false,
|
||||
envVar: "CODEQL_ACTION_CLEANUP_TRAP_CACHES",
|
||||
|
||||
Generated
+14
-56
@@ -31826,9 +31826,6 @@ var require_identifiers = __commonJS({
|
||||
"use strict";
|
||||
var numeric = /^[0-9]+$/;
|
||||
var compareIdentifiers = (a, b) => {
|
||||
if (typeof a === "number" && typeof b === "number") {
|
||||
return a === b ? 0 : a < b ? -1 : 1;
|
||||
}
|
||||
const anum = numeric.test(a);
|
||||
const bnum = numeric.test(b);
|
||||
if (anum && bnum) {
|
||||
@@ -31935,25 +31932,7 @@ var require_semver = __commonJS({
|
||||
if (!(other instanceof _SemVer)) {
|
||||
other = new _SemVer(other, this.options);
|
||||
}
|
||||
if (this.major < other.major) {
|
||||
return -1;
|
||||
}
|
||||
if (this.major > other.major) {
|
||||
return 1;
|
||||
}
|
||||
if (this.minor < other.minor) {
|
||||
return -1;
|
||||
}
|
||||
if (this.minor > other.minor) {
|
||||
return 1;
|
||||
}
|
||||
if (this.patch < other.patch) {
|
||||
return -1;
|
||||
}
|
||||
if (this.patch > other.patch) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch);
|
||||
}
|
||||
comparePre(other) {
|
||||
if (!(other instanceof _SemVer)) {
|
||||
@@ -32714,7 +32693,6 @@ var require_range = __commonJS({
|
||||
return result;
|
||||
};
|
||||
var parseComparator = (comp, options) => {
|
||||
comp = comp.replace(re[t.BUILD], "");
|
||||
debug2("comp", comp, options);
|
||||
comp = replaceCarets(comp, options);
|
||||
debug2("caret", comp);
|
||||
@@ -33606,7 +33584,7 @@ var require_package = __commonJS({
|
||||
"package.json"(exports2, module2) {
|
||||
module2.exports = {
|
||||
name: "codeql",
|
||||
version: "4.30.9",
|
||||
version: "4.30.8",
|
||||
private: true,
|
||||
description: "CodeQL action",
|
||||
scripts: {
|
||||
@@ -33655,7 +33633,7 @@ var require_package = __commonJS({
|
||||
long: "^5.3.2",
|
||||
"node-forge": "^1.3.1",
|
||||
octokit: "^5.0.3",
|
||||
semver: "^7.7.3",
|
||||
semver: "^7.7.2",
|
||||
uuid: "^13.0.0"
|
||||
},
|
||||
devDependencies: {
|
||||
@@ -33673,7 +33651,7 @@ var require_package = __commonJS({
|
||||
"@types/node-forge": "^1.3.14",
|
||||
"@types/semver": "^7.7.1",
|
||||
"@types/sinon": "^17.0.4",
|
||||
"@typescript-eslint/eslint-plugin": "^8.46.0",
|
||||
"@typescript-eslint/eslint-plugin": "^8.45.0",
|
||||
"@typescript-eslint/parser": "^8.41.0",
|
||||
ava: "^6.4.1",
|
||||
esbuild: "^0.25.10",
|
||||
@@ -84853,7 +84831,6 @@ __export(upload_lib_exports, {
|
||||
shouldShowCombineSarifFilesDeprecationWarning: () => shouldShowCombineSarifFilesDeprecationWarning,
|
||||
throwIfCombineSarifFilesDisabled: () => throwIfCombineSarifFilesDisabled,
|
||||
uploadFiles: () => uploadFiles,
|
||||
uploadPayload: () => uploadPayload,
|
||||
uploadSpecifiedFiles: () => uploadSpecifiedFiles,
|
||||
validateSarifFileSchema: () => validateSarifFileSchema,
|
||||
validateUniqueCategory: () => validateUniqueCategory,
|
||||
@@ -89354,11 +89331,6 @@ function isSupportedToolsFeature(versionInfo, feature) {
|
||||
// src/feature-flags.ts
|
||||
var CODEQL_VERSION_ZSTD_BUNDLE = "2.19.0";
|
||||
var featureConfig = {
|
||||
["allow_toolcache_input" /* AllowToolcacheInput */]: {
|
||||
defaultValue: false,
|
||||
envVar: "CODEQL_ACTION_ALLOW_TOOLCACHE_INPUT",
|
||||
minimumVersion: void 0
|
||||
},
|
||||
["cleanup_trap_caches" /* CleanupTrapCaches */]: {
|
||||
defaultValue: false,
|
||||
envVar: "CODEQL_ACTION_CLEANUP_TRAP_CACHES",
|
||||
@@ -90143,7 +90115,7 @@ async function findOverridingToolsInCache(humanReadableVersion, logger) {
|
||||
}
|
||||
return void 0;
|
||||
}
|
||||
async function getCodeQLSource(toolsInput, defaultCliVersion, apiDetails, variant, tarSupportsZstd, features, logger) {
|
||||
async function getCodeQLSource(toolsInput, defaultCliVersion, apiDetails, variant, tarSupportsZstd, logger) {
|
||||
if (toolsInput && !isReservedToolsValue(toolsInput) && !toolsInput.startsWith("http")) {
|
||||
logger.info(`Using CodeQL CLI from local path ${toolsInput}`);
|
||||
const compressionMethod2 = inferCompressionMethod(toolsInput);
|
||||
@@ -90182,10 +90154,7 @@ async function getCodeQLSource(toolsInput, defaultCliVersion, apiDetails, varian
|
||||
}
|
||||
} else if (toolsInput !== void 0 && toolsInput === CODEQL_TOOLCACHE_INPUT) {
|
||||
let latestToolcacheVersion;
|
||||
const allowToolcacheValueFF = await features.getValue(
|
||||
"allow_toolcache_input" /* AllowToolcacheInput */
|
||||
);
|
||||
const allowToolcacheValue = allowToolcacheValueFF && (isDynamicWorkflow() || isInTestMode());
|
||||
const allowToolcacheValue = isDynamicWorkflow() || isInTestMode();
|
||||
if (allowToolcacheValue) {
|
||||
logger.info(
|
||||
`Attempting to use the latest CodeQL CLI version in the toolcache, as requested by 'tools: ${toolsInput}'.`
|
||||
@@ -90201,15 +90170,9 @@ async function getCodeQLSource(toolsInput, defaultCliVersion, apiDetails, varian
|
||||
`Found no CodeQL CLI in the toolcache, ignoring 'tools: ${toolsInput}'...`
|
||||
);
|
||||
} else {
|
||||
if (allowToolcacheValueFF) {
|
||||
logger.warning(
|
||||
`Ignoring 'tools: ${toolsInput}' because the workflow was not triggered dynamically.`
|
||||
);
|
||||
} else {
|
||||
logger.info(
|
||||
`Ignoring 'tools: ${toolsInput}' because the feature is not enabled.`
|
||||
);
|
||||
}
|
||||
logger.warning(
|
||||
`Ignoring 'tools: ${toolsInput}' because the workflow was not triggered dynamically.`
|
||||
);
|
||||
}
|
||||
cliVersion2 = defaultCliVersion.cliVersion;
|
||||
tagName = defaultCliVersion.tagName;
|
||||
@@ -90422,7 +90385,7 @@ function getCanonicalToolcacheVersion(cliVersion2, bundleVersion2, logger) {
|
||||
}
|
||||
return cliVersion2;
|
||||
}
|
||||
async function setupCodeQLBundle(toolsInput, apiDetails, tempDir, variant, defaultCliVersion, features, logger) {
|
||||
async function setupCodeQLBundle(toolsInput, apiDetails, tempDir, variant, defaultCliVersion, logger) {
|
||||
if (!await isBinaryAccessible("tar", logger)) {
|
||||
throw new ConfigurationError(
|
||||
"Could not find tar in PATH, so unable to extract CodeQL bundle."
|
||||
@@ -90435,7 +90398,6 @@ async function setupCodeQLBundle(toolsInput, apiDetails, tempDir, variant, defau
|
||||
apiDetails,
|
||||
variant,
|
||||
zstdAvailability.available,
|
||||
features,
|
||||
logger
|
||||
);
|
||||
let codeqlFolder;
|
||||
@@ -90560,7 +90522,7 @@ var GHES_VERSION_MOST_RECENTLY_DEPRECATED = "3.13";
|
||||
var GHES_MOST_RECENT_DEPRECATION_DATE = "2025-06-19";
|
||||
var EXTRACTION_DEBUG_MODE_VERBOSITY = "progress++";
|
||||
var CODEQL_VERSION_CACHE_CLEANUP = "2.17.1";
|
||||
async function setupCodeQL(toolsInput, apiDetails, tempDir, variant, defaultCliVersion, features, logger, checkVersion) {
|
||||
async function setupCodeQL(toolsInput, apiDetails, tempDir, variant, defaultCliVersion, logger, checkVersion) {
|
||||
try {
|
||||
const {
|
||||
codeqlFolder,
|
||||
@@ -90574,7 +90536,6 @@ async function setupCodeQL(toolsInput, apiDetails, tempDir, variant, defaultCliV
|
||||
tempDir,
|
||||
variant,
|
||||
defaultCliVersion,
|
||||
features,
|
||||
logger
|
||||
);
|
||||
logger.debug(
|
||||
@@ -91002,14 +90963,14 @@ ${output}`
|
||||
return JSON.parse(extractorPath);
|
||||
},
|
||||
async resolveQueriesStartingPacks(queries) {
|
||||
const codeqlArgs = [
|
||||
const zcodeqlArgs = [
|
||||
"resolve",
|
||||
"queries",
|
||||
"--format=startingpacks",
|
||||
...getExtraOptionsFromEnv(["resolve", "queries"]),
|
||||
...queries
|
||||
];
|
||||
const output = await runCli(cmd, codeqlArgs, { noStreamStdout: true });
|
||||
const output = await runCli(cmd, zcodeqlArgs, { noStreamStdout: true });
|
||||
try {
|
||||
return JSON.parse(output);
|
||||
} catch (e) {
|
||||
@@ -92278,7 +92239,7 @@ async function addFingerprints(sarif, sourceRoot, logger) {
|
||||
// src/init.ts
|
||||
var toolrunner4 = __toESM(require_toolrunner());
|
||||
var io5 = __toESM(require_io());
|
||||
async function initCodeQL(toolsInput, apiDetails, tempDir, variant, defaultCliVersion, features, logger) {
|
||||
async function initCodeQL(toolsInput, apiDetails, tempDir, variant, defaultCliVersion, logger) {
|
||||
logger.startGroup("Setup CodeQL tools");
|
||||
const {
|
||||
codeql,
|
||||
@@ -92292,7 +92253,6 @@ async function initCodeQL(toolsInput, apiDetails, tempDir, variant, defaultCliVe
|
||||
tempDir,
|
||||
variant,
|
||||
defaultCliVersion,
|
||||
features,
|
||||
logger,
|
||||
true
|
||||
);
|
||||
@@ -92439,7 +92399,6 @@ async function combineSarifFilesUsingCLI(sarifFiles, gitHubVersion, features, lo
|
||||
tempDir,
|
||||
gitHubVersion.type,
|
||||
codeQLDefaultVersionInfo,
|
||||
features,
|
||||
logger
|
||||
);
|
||||
codeQL = initCodeQLResult.codeql;
|
||||
@@ -92985,7 +92944,6 @@ function filterAlertsByDiffRange(logger, sarif) {
|
||||
shouldShowCombineSarifFilesDeprecationWarning,
|
||||
throwIfCombineSarifFilesDisabled,
|
||||
uploadFiles,
|
||||
uploadPayload,
|
||||
uploadSpecifiedFiles,
|
||||
validateSarifFileSchema,
|
||||
validateUniqueCategory,
|
||||
|
||||
Generated
+4
-31
@@ -24680,9 +24680,6 @@ var require_identifiers = __commonJS({
|
||||
"use strict";
|
||||
var numeric = /^[0-9]+$/;
|
||||
var compareIdentifiers = (a, b) => {
|
||||
if (typeof a === "number" && typeof b === "number") {
|
||||
return a === b ? 0 : a < b ? -1 : 1;
|
||||
}
|
||||
const anum = numeric.test(a);
|
||||
const bnum = numeric.test(b);
|
||||
if (anum && bnum) {
|
||||
@@ -24789,25 +24786,7 @@ var require_semver = __commonJS({
|
||||
if (!(other instanceof _SemVer)) {
|
||||
other = new _SemVer(other, this.options);
|
||||
}
|
||||
if (this.major < other.major) {
|
||||
return -1;
|
||||
}
|
||||
if (this.major > other.major) {
|
||||
return 1;
|
||||
}
|
||||
if (this.minor < other.minor) {
|
||||
return -1;
|
||||
}
|
||||
if (this.minor > other.minor) {
|
||||
return 1;
|
||||
}
|
||||
if (this.patch < other.patch) {
|
||||
return -1;
|
||||
}
|
||||
if (this.patch > other.patch) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch);
|
||||
}
|
||||
comparePre(other) {
|
||||
if (!(other instanceof _SemVer)) {
|
||||
@@ -25568,7 +25547,6 @@ var require_range = __commonJS({
|
||||
return result;
|
||||
};
|
||||
var parseComparator = (comp, options) => {
|
||||
comp = comp.replace(re[t.BUILD], "");
|
||||
debug2("comp", comp, options);
|
||||
comp = replaceCarets(comp, options);
|
||||
debug2("caret", comp);
|
||||
@@ -26460,7 +26438,7 @@ var require_package = __commonJS({
|
||||
"package.json"(exports2, module2) {
|
||||
module2.exports = {
|
||||
name: "codeql",
|
||||
version: "4.30.9",
|
||||
version: "4.30.8",
|
||||
private: true,
|
||||
description: "CodeQL action",
|
||||
scripts: {
|
||||
@@ -26509,7 +26487,7 @@ var require_package = __commonJS({
|
||||
long: "^5.3.2",
|
||||
"node-forge": "^1.3.1",
|
||||
octokit: "^5.0.3",
|
||||
semver: "^7.7.3",
|
||||
semver: "^7.7.2",
|
||||
uuid: "^13.0.0"
|
||||
},
|
||||
devDependencies: {
|
||||
@@ -26527,7 +26505,7 @@ var require_package = __commonJS({
|
||||
"@types/node-forge": "^1.3.14",
|
||||
"@types/semver": "^7.7.1",
|
||||
"@types/sinon": "^17.0.4",
|
||||
"@typescript-eslint/eslint-plugin": "^8.46.0",
|
||||
"@typescript-eslint/eslint-plugin": "^8.45.0",
|
||||
"@typescript-eslint/parser": "^8.41.0",
|
||||
ava: "^6.4.1",
|
||||
esbuild: "^0.25.10",
|
||||
@@ -117400,11 +117378,6 @@ function isSafeArtifactUpload(codeQlVersion) {
|
||||
|
||||
// src/feature-flags.ts
|
||||
var featureConfig = {
|
||||
["allow_toolcache_input" /* AllowToolcacheInput */]: {
|
||||
defaultValue: false,
|
||||
envVar: "CODEQL_ACTION_ALLOW_TOOLCACHE_INPUT",
|
||||
minimumVersion: void 0
|
||||
},
|
||||
["cleanup_trap_caches" /* CleanupTrapCaches */]: {
|
||||
defaultValue: false,
|
||||
envVar: "CODEQL_ACTION_CLEANUP_TRAP_CACHES",
|
||||
|
||||
Generated
+14
-54
@@ -30529,9 +30529,6 @@ var require_identifiers = __commonJS({
|
||||
"use strict";
|
||||
var numeric = /^[0-9]+$/;
|
||||
var compareIdentifiers = (a, b) => {
|
||||
if (typeof a === "number" && typeof b === "number") {
|
||||
return a === b ? 0 : a < b ? -1 : 1;
|
||||
}
|
||||
const anum = numeric.test(a);
|
||||
const bnum = numeric.test(b);
|
||||
if (anum && bnum) {
|
||||
@@ -30638,25 +30635,7 @@ var require_semver = __commonJS({
|
||||
if (!(other instanceof _SemVer)) {
|
||||
other = new _SemVer(other, this.options);
|
||||
}
|
||||
if (this.major < other.major) {
|
||||
return -1;
|
||||
}
|
||||
if (this.major > other.major) {
|
||||
return 1;
|
||||
}
|
||||
if (this.minor < other.minor) {
|
||||
return -1;
|
||||
}
|
||||
if (this.minor > other.minor) {
|
||||
return 1;
|
||||
}
|
||||
if (this.patch < other.patch) {
|
||||
return -1;
|
||||
}
|
||||
if (this.patch > other.patch) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch);
|
||||
}
|
||||
comparePre(other) {
|
||||
if (!(other instanceof _SemVer)) {
|
||||
@@ -31417,7 +31396,6 @@ var require_range = __commonJS({
|
||||
return result;
|
||||
};
|
||||
var parseComparator = (comp, options) => {
|
||||
comp = comp.replace(re[t.BUILD], "");
|
||||
debug4("comp", comp, options);
|
||||
comp = replaceCarets(comp, options);
|
||||
debug4("caret", comp);
|
||||
@@ -32309,7 +32287,7 @@ var require_package = __commonJS({
|
||||
"package.json"(exports2, module2) {
|
||||
module2.exports = {
|
||||
name: "codeql",
|
||||
version: "4.30.9",
|
||||
version: "4.30.8",
|
||||
private: true,
|
||||
description: "CodeQL action",
|
||||
scripts: {
|
||||
@@ -32358,7 +32336,7 @@ var require_package = __commonJS({
|
||||
long: "^5.3.2",
|
||||
"node-forge": "^1.3.1",
|
||||
octokit: "^5.0.3",
|
||||
semver: "^7.7.3",
|
||||
semver: "^7.7.2",
|
||||
uuid: "^13.0.0"
|
||||
},
|
||||
devDependencies: {
|
||||
@@ -32376,7 +32354,7 @@ var require_package = __commonJS({
|
||||
"@types/node-forge": "^1.3.14",
|
||||
"@types/semver": "^7.7.1",
|
||||
"@types/sinon": "^17.0.4",
|
||||
"@typescript-eslint/eslint-plugin": "^8.46.0",
|
||||
"@typescript-eslint/eslint-plugin": "^8.45.0",
|
||||
"@typescript-eslint/parser": "^8.41.0",
|
||||
ava: "^6.4.1",
|
||||
esbuild: "^0.25.10",
|
||||
@@ -89270,11 +89248,6 @@ var DEFAULT_VERSION_FEATURE_FLAG_PREFIX = "default_codeql_version_";
|
||||
var DEFAULT_VERSION_FEATURE_FLAG_SUFFIX = "_enabled";
|
||||
var CODEQL_VERSION_ZSTD_BUNDLE = "2.19.0";
|
||||
var featureConfig = {
|
||||
["allow_toolcache_input" /* AllowToolcacheInput */]: {
|
||||
defaultValue: false,
|
||||
envVar: "CODEQL_ACTION_ALLOW_TOOLCACHE_INPUT",
|
||||
minimumVersion: void 0
|
||||
},
|
||||
["cleanup_trap_caches" /* CleanupTrapCaches */]: {
|
||||
defaultValue: false,
|
||||
envVar: "CODEQL_ACTION_CLEANUP_TRAP_CACHES",
|
||||
@@ -90814,7 +90787,7 @@ async function findOverridingToolsInCache(humanReadableVersion, logger) {
|
||||
}
|
||||
return void 0;
|
||||
}
|
||||
async function getCodeQLSource(toolsInput, defaultCliVersion, apiDetails, variant, tarSupportsZstd, features, logger) {
|
||||
async function getCodeQLSource(toolsInput, defaultCliVersion, apiDetails, variant, tarSupportsZstd, logger) {
|
||||
if (toolsInput && !isReservedToolsValue(toolsInput) && !toolsInput.startsWith("http")) {
|
||||
logger.info(`Using CodeQL CLI from local path ${toolsInput}`);
|
||||
const compressionMethod2 = inferCompressionMethod(toolsInput);
|
||||
@@ -90853,10 +90826,7 @@ async function getCodeQLSource(toolsInput, defaultCliVersion, apiDetails, varian
|
||||
}
|
||||
} else if (toolsInput !== void 0 && toolsInput === CODEQL_TOOLCACHE_INPUT) {
|
||||
let latestToolcacheVersion;
|
||||
const allowToolcacheValueFF = await features.getValue(
|
||||
"allow_toolcache_input" /* AllowToolcacheInput */
|
||||
);
|
||||
const allowToolcacheValue = allowToolcacheValueFF && (isDynamicWorkflow() || isInTestMode());
|
||||
const allowToolcacheValue = isDynamicWorkflow() || isInTestMode();
|
||||
if (allowToolcacheValue) {
|
||||
logger.info(
|
||||
`Attempting to use the latest CodeQL CLI version in the toolcache, as requested by 'tools: ${toolsInput}'.`
|
||||
@@ -90872,15 +90842,9 @@ async function getCodeQLSource(toolsInput, defaultCliVersion, apiDetails, varian
|
||||
`Found no CodeQL CLI in the toolcache, ignoring 'tools: ${toolsInput}'...`
|
||||
);
|
||||
} else {
|
||||
if (allowToolcacheValueFF) {
|
||||
logger.warning(
|
||||
`Ignoring 'tools: ${toolsInput}' because the workflow was not triggered dynamically.`
|
||||
);
|
||||
} else {
|
||||
logger.info(
|
||||
`Ignoring 'tools: ${toolsInput}' because the feature is not enabled.`
|
||||
);
|
||||
}
|
||||
logger.warning(
|
||||
`Ignoring 'tools: ${toolsInput}' because the workflow was not triggered dynamically.`
|
||||
);
|
||||
}
|
||||
cliVersion2 = defaultCliVersion.cliVersion;
|
||||
tagName = defaultCliVersion.tagName;
|
||||
@@ -91093,7 +91057,7 @@ function getCanonicalToolcacheVersion(cliVersion2, bundleVersion2, logger) {
|
||||
}
|
||||
return cliVersion2;
|
||||
}
|
||||
async function setupCodeQLBundle(toolsInput, apiDetails, tempDir, variant, defaultCliVersion, features, logger) {
|
||||
async function setupCodeQLBundle(toolsInput, apiDetails, tempDir, variant, defaultCliVersion, logger) {
|
||||
if (!await isBinaryAccessible("tar", logger)) {
|
||||
throw new ConfigurationError(
|
||||
"Could not find tar in PATH, so unable to extract CodeQL bundle."
|
||||
@@ -91106,7 +91070,6 @@ async function setupCodeQLBundle(toolsInput, apiDetails, tempDir, variant, defau
|
||||
apiDetails,
|
||||
variant,
|
||||
zstdAvailability.available,
|
||||
features,
|
||||
logger
|
||||
);
|
||||
let codeqlFolder;
|
||||
@@ -91231,7 +91194,7 @@ var GHES_VERSION_MOST_RECENTLY_DEPRECATED = "3.13";
|
||||
var GHES_MOST_RECENT_DEPRECATION_DATE = "2025-06-19";
|
||||
var EXTRACTION_DEBUG_MODE_VERBOSITY = "progress++";
|
||||
var CODEQL_VERSION_CACHE_CLEANUP = "2.17.1";
|
||||
async function setupCodeQL(toolsInput, apiDetails, tempDir, variant, defaultCliVersion, features, logger, checkVersion) {
|
||||
async function setupCodeQL(toolsInput, apiDetails, tempDir, variant, defaultCliVersion, logger, checkVersion) {
|
||||
try {
|
||||
const {
|
||||
codeqlFolder,
|
||||
@@ -91245,7 +91208,6 @@ async function setupCodeQL(toolsInput, apiDetails, tempDir, variant, defaultCliV
|
||||
tempDir,
|
||||
variant,
|
||||
defaultCliVersion,
|
||||
features,
|
||||
logger
|
||||
);
|
||||
logger.debug(
|
||||
@@ -91673,14 +91635,14 @@ ${output}`
|
||||
return JSON.parse(extractorPath);
|
||||
},
|
||||
async resolveQueriesStartingPacks(queries) {
|
||||
const codeqlArgs = [
|
||||
const zcodeqlArgs = [
|
||||
"resolve",
|
||||
"queries",
|
||||
"--format=startingpacks",
|
||||
...getExtraOptionsFromEnv(["resolve", "queries"]),
|
||||
...queries
|
||||
];
|
||||
const output = await runCli(cmd, codeqlArgs, { noStreamStdout: true });
|
||||
const output = await runCli(cmd, zcodeqlArgs, { noStreamStdout: true });
|
||||
try {
|
||||
return JSON.parse(output);
|
||||
} catch (e) {
|
||||
@@ -92949,7 +92911,7 @@ async function addFingerprints(sarif, sourceRoot, logger) {
|
||||
// src/init.ts
|
||||
var toolrunner4 = __toESM(require_toolrunner());
|
||||
var io5 = __toESM(require_io());
|
||||
async function initCodeQL(toolsInput, apiDetails, tempDir, variant, defaultCliVersion, features, logger) {
|
||||
async function initCodeQL(toolsInput, apiDetails, tempDir, variant, defaultCliVersion, logger) {
|
||||
logger.startGroup("Setup CodeQL tools");
|
||||
const {
|
||||
codeql,
|
||||
@@ -92963,7 +92925,6 @@ async function initCodeQL(toolsInput, apiDetails, tempDir, variant, defaultCliVe
|
||||
tempDir,
|
||||
variant,
|
||||
defaultCliVersion,
|
||||
features,
|
||||
logger,
|
||||
true
|
||||
);
|
||||
@@ -93110,7 +93071,6 @@ async function combineSarifFilesUsingCLI(sarifFiles, gitHubVersion, features, lo
|
||||
tempDir,
|
||||
gitHubVersion.type,
|
||||
codeQLDefaultVersionInfo,
|
||||
features,
|
||||
logger
|
||||
);
|
||||
codeQL = initCodeQLResult.codeql;
|
||||
|
||||
Generated
+108
-109
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "codeql",
|
||||
"version": "4.30.9",
|
||||
"version": "4.30.8",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "codeql",
|
||||
"version": "4.30.9",
|
||||
"version": "4.30.8",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@actions/artifact": "^2.3.1",
|
||||
@@ -34,7 +34,7 @@
|
||||
"long": "^5.3.2",
|
||||
"node-forge": "^1.3.1",
|
||||
"octokit": "^5.0.3",
|
||||
"semver": "^7.7.3",
|
||||
"semver": "^7.7.2",
|
||||
"uuid": "^13.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
@@ -52,7 +52,7 @@
|
||||
"@types/node-forge": "^1.3.14",
|
||||
"@types/semver": "^7.7.1",
|
||||
"@types/sinon": "^17.0.4",
|
||||
"@typescript-eslint/eslint-plugin": "^8.46.0",
|
||||
"@typescript-eslint/eslint-plugin": "^8.45.0",
|
||||
"@typescript-eslint/parser": "^8.41.0",
|
||||
"ava": "^6.4.1",
|
||||
"esbuild": "^0.25.10",
|
||||
@@ -2697,17 +2697,17 @@
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@typescript-eslint/eslint-plugin": {
|
||||
"version": "8.46.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.46.0.tgz",
|
||||
"integrity": "sha512-hA8gxBq4ukonVXPy0OKhiaUh/68D0E88GSmtC1iAEnGaieuDi38LhS7jdCHRLi6ErJBNDGCzvh5EnzdPwUc0DA==",
|
||||
"version": "8.45.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.45.0.tgz",
|
||||
"integrity": "sha512-HC3y9CVuevvWCl/oyZuI47dOeDF9ztdMEfMH8/DW/Mhwa9cCLnK1oD7JoTVGW/u7kFzNZUKUoyJEqkaJh5y3Wg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@eslint-community/regexpp": "^4.10.0",
|
||||
"@typescript-eslint/scope-manager": "8.46.0",
|
||||
"@typescript-eslint/type-utils": "8.46.0",
|
||||
"@typescript-eslint/utils": "8.46.0",
|
||||
"@typescript-eslint/visitor-keys": "8.46.0",
|
||||
"@typescript-eslint/scope-manager": "8.45.0",
|
||||
"@typescript-eslint/type-utils": "8.45.0",
|
||||
"@typescript-eslint/utils": "8.45.0",
|
||||
"@typescript-eslint/visitor-keys": "8.45.0",
|
||||
"graphemer": "^1.4.0",
|
||||
"ignore": "^7.0.0",
|
||||
"natural-compare": "^1.4.0",
|
||||
@@ -2721,20 +2721,20 @@
|
||||
"url": "https://opencollective.com/typescript-eslint"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@typescript-eslint/parser": "^8.46.0",
|
||||
"@typescript-eslint/parser": "^8.45.0",
|
||||
"eslint": "^8.57.0 || ^9.0.0",
|
||||
"typescript": ">=4.8.4 <6.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/scope-manager": {
|
||||
"version": "8.46.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.46.0.tgz",
|
||||
"integrity": "sha512-lWETPa9XGcBes4jqAMYD9fW0j4n6hrPtTJwWDmtqgFO/4HF4jmdH/Q6wggTw5qIT5TXjKzbt7GsZUBnWoO3dqw==",
|
||||
"version": "8.45.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.45.0.tgz",
|
||||
"integrity": "sha512-clmm8XSNj/1dGvJeO6VGH7EUSeA0FMs+5au/u3lrA3KfG8iJ4u8ym9/j2tTEoacAffdW1TVUzXO30W1JTJS7dA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "8.46.0",
|
||||
"@typescript-eslint/visitor-keys": "8.46.0"
|
||||
"@typescript-eslint/types": "8.45.0",
|
||||
"@typescript-eslint/visitor-keys": "8.45.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||
@@ -2745,9 +2745,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/types": {
|
||||
"version": "8.46.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.46.0.tgz",
|
||||
"integrity": "sha512-bHGGJyVjSE4dJJIO5yyEWt/cHyNwga/zXGJbJJ8TiO01aVREK6gCTu3L+5wrkb1FbDkQ+TKjMNe9R/QQQP9+rA==",
|
||||
"version": "8.45.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.45.0.tgz",
|
||||
"integrity": "sha512-WugXLuOIq67BMgQInIxxnsSyRLFxdkJEJu8r4ngLR56q/4Q5LrbfkFRH27vMTjxEK8Pyz7QfzuZe/G15qQnVRA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
@@ -2759,16 +2759,16 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/typescript-estree": {
|
||||
"version": "8.46.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.46.0.tgz",
|
||||
"integrity": "sha512-ekDCUfVpAKWJbRfm8T1YRrCot1KFxZn21oV76v5Fj4tr7ELyk84OS+ouvYdcDAwZL89WpEkEj2DKQ+qg//+ucg==",
|
||||
"version": "8.45.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.45.0.tgz",
|
||||
"integrity": "sha512-GfE1NfVbLam6XQ0LcERKwdTTPlLvHvXXhOeUGC1OXi4eQBoyy1iVsW+uzJ/J9jtCz6/7GCQ9MtrQ0fml/jWCnA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/project-service": "8.46.0",
|
||||
"@typescript-eslint/tsconfig-utils": "8.46.0",
|
||||
"@typescript-eslint/types": "8.46.0",
|
||||
"@typescript-eslint/visitor-keys": "8.46.0",
|
||||
"@typescript-eslint/project-service": "8.45.0",
|
||||
"@typescript-eslint/tsconfig-utils": "8.45.0",
|
||||
"@typescript-eslint/types": "8.45.0",
|
||||
"@typescript-eslint/visitor-keys": "8.45.0",
|
||||
"debug": "^4.3.4",
|
||||
"fast-glob": "^3.3.2",
|
||||
"is-glob": "^4.0.3",
|
||||
@@ -2788,16 +2788,16 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/utils": {
|
||||
"version": "8.46.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.46.0.tgz",
|
||||
"integrity": "sha512-nD6yGWPj1xiOm4Gk0k6hLSZz2XkNXhuYmyIrOWcHoPuAhjT9i5bAG+xbWPgFeNR8HPHHtpNKdYUXJl/D3x7f5g==",
|
||||
"version": "8.45.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.45.0.tgz",
|
||||
"integrity": "sha512-bxi1ht+tLYg4+XV2knz/F7RVhU0k6VrSMc9sb8DQ6fyCTrGQLHfo7lDtN0QJjZjKkLA2ThrKuCdHEvLReqtIGg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@eslint-community/eslint-utils": "^4.7.0",
|
||||
"@typescript-eslint/scope-manager": "8.46.0",
|
||||
"@typescript-eslint/types": "8.46.0",
|
||||
"@typescript-eslint/typescript-estree": "8.46.0"
|
||||
"@typescript-eslint/scope-manager": "8.45.0",
|
||||
"@typescript-eslint/types": "8.45.0",
|
||||
"@typescript-eslint/typescript-estree": "8.45.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||
@@ -2812,13 +2812,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/visitor-keys": {
|
||||
"version": "8.46.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.46.0.tgz",
|
||||
"integrity": "sha512-FrvMpAK+hTbFy7vH5j1+tMYHMSKLE6RzluFJlkFNKD0p9YsUT75JlBSmr5so3QRzvMwU5/bIEdeNrxm8du8l3Q==",
|
||||
"version": "8.45.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.45.0.tgz",
|
||||
"integrity": "sha512-qsaFBA3e09MIDAGFUrTk+dzqtfv1XPVz8t8d1f0ybTzrCY7BKiMC5cjrl1O/P7UmHsNyW90EYSkU/ZWpmXelag==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "8.46.0",
|
||||
"@typescript-eslint/types": "8.45.0",
|
||||
"eslint-visitor-keys": "^4.2.1"
|
||||
},
|
||||
"engines": {
|
||||
@@ -2891,16 +2891,16 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/parser": {
|
||||
"version": "8.46.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.46.0.tgz",
|
||||
"integrity": "sha512-n1H6IcDhmmUEG7TNVSspGmiHHutt7iVKtZwRppD7e04wha5MrkV1h3pti9xQLcCMt6YWsncpoT0HMjkH1FNwWQ==",
|
||||
"version": "8.45.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.45.0.tgz",
|
||||
"integrity": "sha512-TGf22kon8KW+DeKaUmOibKWktRY8b2NSAZNdtWh798COm1NWx8+xJ6iFBtk3IvLdv6+LGLJLRlyhrhEDZWargQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/scope-manager": "8.46.0",
|
||||
"@typescript-eslint/types": "8.46.0",
|
||||
"@typescript-eslint/typescript-estree": "8.46.0",
|
||||
"@typescript-eslint/visitor-keys": "8.46.0",
|
||||
"@typescript-eslint/scope-manager": "8.45.0",
|
||||
"@typescript-eslint/types": "8.45.0",
|
||||
"@typescript-eslint/typescript-estree": "8.45.0",
|
||||
"@typescript-eslint/visitor-keys": "8.45.0",
|
||||
"debug": "^4.3.4"
|
||||
},
|
||||
"engines": {
|
||||
@@ -2916,14 +2916,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager": {
|
||||
"version": "8.46.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.46.0.tgz",
|
||||
"integrity": "sha512-lWETPa9XGcBes4jqAMYD9fW0j4n6hrPtTJwWDmtqgFO/4HF4jmdH/Q6wggTw5qIT5TXjKzbt7GsZUBnWoO3dqw==",
|
||||
"version": "8.45.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.45.0.tgz",
|
||||
"integrity": "sha512-clmm8XSNj/1dGvJeO6VGH7EUSeA0FMs+5au/u3lrA3KfG8iJ4u8ym9/j2tTEoacAffdW1TVUzXO30W1JTJS7dA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "8.46.0",
|
||||
"@typescript-eslint/visitor-keys": "8.46.0"
|
||||
"@typescript-eslint/types": "8.45.0",
|
||||
"@typescript-eslint/visitor-keys": "8.45.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||
@@ -2934,9 +2934,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types": {
|
||||
"version": "8.46.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.46.0.tgz",
|
||||
"integrity": "sha512-bHGGJyVjSE4dJJIO5yyEWt/cHyNwga/zXGJbJJ8TiO01aVREK6gCTu3L+5wrkb1FbDkQ+TKjMNe9R/QQQP9+rA==",
|
||||
"version": "8.45.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.45.0.tgz",
|
||||
"integrity": "sha512-WugXLuOIq67BMgQInIxxnsSyRLFxdkJEJu8r4ngLR56q/4Q5LrbfkFRH27vMTjxEK8Pyz7QfzuZe/G15qQnVRA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
@@ -2948,16 +2948,16 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree": {
|
||||
"version": "8.46.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.46.0.tgz",
|
||||
"integrity": "sha512-ekDCUfVpAKWJbRfm8T1YRrCot1KFxZn21oV76v5Fj4tr7ELyk84OS+ouvYdcDAwZL89WpEkEj2DKQ+qg//+ucg==",
|
||||
"version": "8.45.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.45.0.tgz",
|
||||
"integrity": "sha512-GfE1NfVbLam6XQ0LcERKwdTTPlLvHvXXhOeUGC1OXi4eQBoyy1iVsW+uzJ/J9jtCz6/7GCQ9MtrQ0fml/jWCnA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/project-service": "8.46.0",
|
||||
"@typescript-eslint/tsconfig-utils": "8.46.0",
|
||||
"@typescript-eslint/types": "8.46.0",
|
||||
"@typescript-eslint/visitor-keys": "8.46.0",
|
||||
"@typescript-eslint/project-service": "8.45.0",
|
||||
"@typescript-eslint/tsconfig-utils": "8.45.0",
|
||||
"@typescript-eslint/types": "8.45.0",
|
||||
"@typescript-eslint/visitor-keys": "8.45.0",
|
||||
"debug": "^4.3.4",
|
||||
"fast-glob": "^3.3.2",
|
||||
"is-glob": "^4.0.3",
|
||||
@@ -2977,13 +2977,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys": {
|
||||
"version": "8.46.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.46.0.tgz",
|
||||
"integrity": "sha512-FrvMpAK+hTbFy7vH5j1+tMYHMSKLE6RzluFJlkFNKD0p9YsUT75JlBSmr5so3QRzvMwU5/bIEdeNrxm8du8l3Q==",
|
||||
"version": "8.45.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.45.0.tgz",
|
||||
"integrity": "sha512-qsaFBA3e09MIDAGFUrTk+dzqtfv1XPVz8t8d1f0ybTzrCY7BKiMC5cjrl1O/P7UmHsNyW90EYSkU/ZWpmXelag==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "8.46.0",
|
||||
"@typescript-eslint/types": "8.45.0",
|
||||
"eslint-visitor-keys": "^4.2.1"
|
||||
},
|
||||
"engines": {
|
||||
@@ -3047,14 +3047,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/project-service": {
|
||||
"version": "8.46.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.46.0.tgz",
|
||||
"integrity": "sha512-OEhec0mH+U5Je2NZOeK1AbVCdm0ChyapAyTeXVIYTPXDJ3F07+cu87PPXcGoYqZ7M9YJVvFnfpGg1UmCIqM+QQ==",
|
||||
"version": "8.45.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.45.0.tgz",
|
||||
"integrity": "sha512-3pcVHwMG/iA8afdGLMuTibGR7pDsn9RjDev6CCB+naRsSYs2pns5QbinF4Xqw6YC/Sj3lMrm/Im0eMfaa61WUg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/tsconfig-utils": "^8.46.0",
|
||||
"@typescript-eslint/types": "^8.46.0",
|
||||
"@typescript-eslint/tsconfig-utils": "^8.45.0",
|
||||
"@typescript-eslint/types": "^8.45.0",
|
||||
"debug": "^4.3.4"
|
||||
},
|
||||
"engines": {
|
||||
@@ -3069,9 +3069,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/project-service/node_modules/@typescript-eslint/types": {
|
||||
"version": "8.46.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.46.0.tgz",
|
||||
"integrity": "sha512-bHGGJyVjSE4dJJIO5yyEWt/cHyNwga/zXGJbJJ8TiO01aVREK6gCTu3L+5wrkb1FbDkQ+TKjMNe9R/QQQP9+rA==",
|
||||
"version": "8.45.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.45.0.tgz",
|
||||
"integrity": "sha512-WugXLuOIq67BMgQInIxxnsSyRLFxdkJEJu8r4ngLR56q/4Q5LrbfkFRH27vMTjxEK8Pyz7QfzuZe/G15qQnVRA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
@@ -3101,9 +3101,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/tsconfig-utils": {
|
||||
"version": "8.46.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.46.0.tgz",
|
||||
"integrity": "sha512-WrYXKGAHY836/N7zoK/kzi6p8tXFhasHh8ocFL9VZSAkvH956gfeRfcnhs3xzRy8qQ/dq3q44v1jvQieMFg2cw==",
|
||||
"version": "8.45.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.45.0.tgz",
|
||||
"integrity": "sha512-aFdr+c37sc+jqNMGhH+ajxPXwjv9UtFZk79k8pLoJ6p4y0snmYpPA52GuWHgt2ZF4gRRW6odsEj41uZLojDt5w==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
@@ -3118,15 +3118,15 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/type-utils": {
|
||||
"version": "8.46.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.46.0.tgz",
|
||||
"integrity": "sha512-hy+lvYV1lZpVs2jRaEYvgCblZxUoJiPyCemwbQZ+NGulWkQRy0HRPYAoef/CNSzaLt+MLvMptZsHXHlkEilaeg==",
|
||||
"version": "8.45.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.45.0.tgz",
|
||||
"integrity": "sha512-bpjepLlHceKgyMEPglAeULX1vixJDgaKocp0RVJ5u4wLJIMNuKtUXIczpJCPcn2waII0yuvks/5m5/h3ZQKs0A==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "8.46.0",
|
||||
"@typescript-eslint/typescript-estree": "8.46.0",
|
||||
"@typescript-eslint/utils": "8.46.0",
|
||||
"@typescript-eslint/types": "8.45.0",
|
||||
"@typescript-eslint/typescript-estree": "8.45.0",
|
||||
"@typescript-eslint/utils": "8.45.0",
|
||||
"debug": "^4.3.4",
|
||||
"ts-api-utils": "^2.1.0"
|
||||
},
|
||||
@@ -3143,14 +3143,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/scope-manager": {
|
||||
"version": "8.46.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.46.0.tgz",
|
||||
"integrity": "sha512-lWETPa9XGcBes4jqAMYD9fW0j4n6hrPtTJwWDmtqgFO/4HF4jmdH/Q6wggTw5qIT5TXjKzbt7GsZUBnWoO3dqw==",
|
||||
"version": "8.45.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.45.0.tgz",
|
||||
"integrity": "sha512-clmm8XSNj/1dGvJeO6VGH7EUSeA0FMs+5au/u3lrA3KfG8iJ4u8ym9/j2tTEoacAffdW1TVUzXO30W1JTJS7dA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "8.46.0",
|
||||
"@typescript-eslint/visitor-keys": "8.46.0"
|
||||
"@typescript-eslint/types": "8.45.0",
|
||||
"@typescript-eslint/visitor-keys": "8.45.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||
@@ -3161,9 +3161,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/types": {
|
||||
"version": "8.46.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.46.0.tgz",
|
||||
"integrity": "sha512-bHGGJyVjSE4dJJIO5yyEWt/cHyNwga/zXGJbJJ8TiO01aVREK6gCTu3L+5wrkb1FbDkQ+TKjMNe9R/QQQP9+rA==",
|
||||
"version": "8.45.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.45.0.tgz",
|
||||
"integrity": "sha512-WugXLuOIq67BMgQInIxxnsSyRLFxdkJEJu8r4ngLR56q/4Q5LrbfkFRH27vMTjxEK8Pyz7QfzuZe/G15qQnVRA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
@@ -3175,16 +3175,16 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/typescript-estree": {
|
||||
"version": "8.46.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.46.0.tgz",
|
||||
"integrity": "sha512-ekDCUfVpAKWJbRfm8T1YRrCot1KFxZn21oV76v5Fj4tr7ELyk84OS+ouvYdcDAwZL89WpEkEj2DKQ+qg//+ucg==",
|
||||
"version": "8.45.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.45.0.tgz",
|
||||
"integrity": "sha512-GfE1NfVbLam6XQ0LcERKwdTTPlLvHvXXhOeUGC1OXi4eQBoyy1iVsW+uzJ/J9jtCz6/7GCQ9MtrQ0fml/jWCnA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/project-service": "8.46.0",
|
||||
"@typescript-eslint/tsconfig-utils": "8.46.0",
|
||||
"@typescript-eslint/types": "8.46.0",
|
||||
"@typescript-eslint/visitor-keys": "8.46.0",
|
||||
"@typescript-eslint/project-service": "8.45.0",
|
||||
"@typescript-eslint/tsconfig-utils": "8.45.0",
|
||||
"@typescript-eslint/types": "8.45.0",
|
||||
"@typescript-eslint/visitor-keys": "8.45.0",
|
||||
"debug": "^4.3.4",
|
||||
"fast-glob": "^3.3.2",
|
||||
"is-glob": "^4.0.3",
|
||||
@@ -3204,16 +3204,16 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/utils": {
|
||||
"version": "8.46.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.46.0.tgz",
|
||||
"integrity": "sha512-nD6yGWPj1xiOm4Gk0k6hLSZz2XkNXhuYmyIrOWcHoPuAhjT9i5bAG+xbWPgFeNR8HPHHtpNKdYUXJl/D3x7f5g==",
|
||||
"version": "8.45.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.45.0.tgz",
|
||||
"integrity": "sha512-bxi1ht+tLYg4+XV2knz/F7RVhU0k6VrSMc9sb8DQ6fyCTrGQLHfo7lDtN0QJjZjKkLA2ThrKuCdHEvLReqtIGg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@eslint-community/eslint-utils": "^4.7.0",
|
||||
"@typescript-eslint/scope-manager": "8.46.0",
|
||||
"@typescript-eslint/types": "8.46.0",
|
||||
"@typescript-eslint/typescript-estree": "8.46.0"
|
||||
"@typescript-eslint/scope-manager": "8.45.0",
|
||||
"@typescript-eslint/types": "8.45.0",
|
||||
"@typescript-eslint/typescript-estree": "8.45.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||
@@ -3228,13 +3228,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/visitor-keys": {
|
||||
"version": "8.46.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.46.0.tgz",
|
||||
"integrity": "sha512-FrvMpAK+hTbFy7vH5j1+tMYHMSKLE6RzluFJlkFNKD0p9YsUT75JlBSmr5so3QRzvMwU5/bIEdeNrxm8du8l3Q==",
|
||||
"version": "8.45.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.45.0.tgz",
|
||||
"integrity": "sha512-qsaFBA3e09MIDAGFUrTk+dzqtfv1XPVz8t8d1f0ybTzrCY7BKiMC5cjrl1O/P7UmHsNyW90EYSkU/ZWpmXelag==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "8.46.0",
|
||||
"@typescript-eslint/types": "8.45.0",
|
||||
"eslint-visitor-keys": "^4.2.1"
|
||||
},
|
||||
"engines": {
|
||||
@@ -8210,10 +8210,9 @@
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/semver": {
|
||||
"version": "7.7.3",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz",
|
||||
"integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==",
|
||||
"license": "ISC",
|
||||
"version": "7.7.2",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz",
|
||||
"integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==",
|
||||
"bin": {
|
||||
"semver": "bin/semver.js"
|
||||
},
|
||||
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "codeql",
|
||||
"version": "4.30.9",
|
||||
"version": "4.30.8",
|
||||
"private": true,
|
||||
"description": "CodeQL action",
|
||||
"scripts": {
|
||||
@@ -49,7 +49,7 @@
|
||||
"long": "^5.3.2",
|
||||
"node-forge": "^1.3.1",
|
||||
"octokit": "^5.0.3",
|
||||
"semver": "^7.7.3",
|
||||
"semver": "^7.7.2",
|
||||
"uuid": "^13.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
@@ -67,7 +67,7 @@
|
||||
"@types/node-forge": "^1.3.14",
|
||||
"@types/semver": "^7.7.1",
|
||||
"@types/sinon": "^17.0.4",
|
||||
"@typescript-eslint/eslint-plugin": "^8.46.0",
|
||||
"@typescript-eslint/eslint-plugin": "^8.45.0",
|
||||
"@typescript-eslint/parser": "^8.41.0",
|
||||
"ava": "^6.4.1",
|
||||
"esbuild": "^0.25.10",
|
||||
|
||||
@@ -4,7 +4,7 @@ description: "Tests using RuboCop to analyze a multi-language repository and the
|
||||
versions: ["default"]
|
||||
steps:
|
||||
- name: Set up Ruby
|
||||
uses: ruby/setup-ruby@ab177d40ee5483edb974554986f56b33477e21d0 # v1.265.0
|
||||
uses: ruby/setup-ruby@0481980f17b760ef6bca5e8c55809102a0af1e5a # v1.263.0
|
||||
with:
|
||||
ruby-version: 2.6
|
||||
- name: Install Code Scanning integration
|
||||
|
||||
@@ -74,7 +74,6 @@ async function installIntoToolcache({
|
||||
cliVersion !== undefined
|
||||
? { cliVersion, tagName }
|
||||
: SAMPLE_DEFAULT_CLI_VERSION,
|
||||
createFeatures([]),
|
||||
getRunnerLogger(true),
|
||||
false,
|
||||
);
|
||||
@@ -123,8 +122,6 @@ async function stubCodeql(): Promise<codeql.CodeQL> {
|
||||
}
|
||||
|
||||
test("downloads and caches explicitly requested bundles that aren't in the toolcache", async (t) => {
|
||||
const features = createFeatures([]);
|
||||
|
||||
await util.withTmpDir(async (tmpDir) => {
|
||||
setupActionsVars(tmpDir, tmpDir);
|
||||
|
||||
@@ -143,7 +140,6 @@ test("downloads and caches explicitly requested bundles that aren't in the toolc
|
||||
tmpDir,
|
||||
util.GitHubVariant.DOTCOM,
|
||||
SAMPLE_DEFAULT_CLI_VERSION,
|
||||
features,
|
||||
getRunnerLogger(true),
|
||||
false,
|
||||
);
|
||||
@@ -158,8 +154,6 @@ test("downloads and caches explicitly requested bundles that aren't in the toolc
|
||||
});
|
||||
|
||||
test("caches semantically versioned bundles using their semantic version number", async (t) => {
|
||||
const features = createFeatures([]);
|
||||
|
||||
await util.withTmpDir(async (tmpDir) => {
|
||||
setupActionsVars(tmpDir, tmpDir);
|
||||
const url = mockBundleDownloadApi({
|
||||
@@ -172,7 +166,6 @@ test("caches semantically versioned bundles using their semantic version number"
|
||||
tmpDir,
|
||||
util.GitHubVariant.DOTCOM,
|
||||
SAMPLE_DEFAULT_CLI_VERSION,
|
||||
features,
|
||||
getRunnerLogger(true),
|
||||
false,
|
||||
);
|
||||
@@ -188,8 +181,6 @@ test("caches semantically versioned bundles using their semantic version number"
|
||||
});
|
||||
|
||||
test("downloads an explicitly requested bundle even if a different version is cached", async (t) => {
|
||||
const features = createFeatures([]);
|
||||
|
||||
await util.withTmpDir(async (tmpDir) => {
|
||||
setupActionsVars(tmpDir, tmpDir);
|
||||
|
||||
@@ -208,7 +199,6 @@ test("downloads an explicitly requested bundle even if a different version is ca
|
||||
tmpDir,
|
||||
util.GitHubVariant.DOTCOM,
|
||||
SAMPLE_DEFAULT_CLI_VERSION,
|
||||
features,
|
||||
getRunnerLogger(true),
|
||||
false,
|
||||
);
|
||||
@@ -237,8 +227,6 @@ for (const {
|
||||
expectedToolcacheVersion,
|
||||
} of EXPLICITLY_REQUESTED_BUNDLE_TEST_CASES) {
|
||||
test(`caches explicitly requested bundle ${tagName} as ${expectedToolcacheVersion}`, async (t) => {
|
||||
const features = createFeatures([]);
|
||||
|
||||
await util.withTmpDir(async (tmpDir) => {
|
||||
setupActionsVars(tmpDir, tmpDir);
|
||||
|
||||
@@ -255,7 +243,6 @@ for (const {
|
||||
tmpDir,
|
||||
util.GitHubVariant.DOTCOM,
|
||||
SAMPLE_DEFAULT_CLI_VERSION,
|
||||
features,
|
||||
getRunnerLogger(true),
|
||||
false,
|
||||
);
|
||||
@@ -279,8 +266,6 @@ for (const toolcacheVersion of [
|
||||
`uses tools from toolcache when ${SAMPLE_DEFAULT_CLI_VERSION.cliVersion} is requested and ` +
|
||||
`${toolcacheVersion} is installed`,
|
||||
async (t) => {
|
||||
const features = createFeatures([]);
|
||||
|
||||
await util.withTmpDir(async (tmpDir) => {
|
||||
setupActionsVars(tmpDir, tmpDir);
|
||||
|
||||
@@ -296,7 +281,6 @@ for (const toolcacheVersion of [
|
||||
tmpDir,
|
||||
util.GitHubVariant.DOTCOM,
|
||||
SAMPLE_DEFAULT_CLI_VERSION,
|
||||
features,
|
||||
getRunnerLogger(true),
|
||||
false,
|
||||
);
|
||||
@@ -311,8 +295,6 @@ for (const toolcacheVersion of [
|
||||
}
|
||||
|
||||
test(`uses a cached bundle when no tools input is given on GHES`, async (t) => {
|
||||
const features = createFeatures([]);
|
||||
|
||||
await util.withTmpDir(async (tmpDir) => {
|
||||
setupActionsVars(tmpDir, tmpDir);
|
||||
|
||||
@@ -331,7 +313,6 @@ test(`uses a cached bundle when no tools input is given on GHES`, async (t) => {
|
||||
cliVersion: defaults.cliVersion,
|
||||
tagName: defaults.bundleVersion,
|
||||
},
|
||||
features,
|
||||
getRunnerLogger(true),
|
||||
false,
|
||||
);
|
||||
@@ -347,8 +328,6 @@ test(`uses a cached bundle when no tools input is given on GHES`, async (t) => {
|
||||
});
|
||||
|
||||
test(`downloads bundle if only an unpinned version is cached on GHES`, async (t) => {
|
||||
const features = createFeatures([]);
|
||||
|
||||
await util.withTmpDir(async (tmpDir) => {
|
||||
setupActionsVars(tmpDir, tmpDir);
|
||||
|
||||
@@ -370,7 +349,6 @@ test(`downloads bundle if only an unpinned version is cached on GHES`, async (t)
|
||||
cliVersion: defaults.cliVersion,
|
||||
tagName: defaults.bundleVersion,
|
||||
},
|
||||
features,
|
||||
getRunnerLogger(true),
|
||||
false,
|
||||
);
|
||||
@@ -386,8 +364,6 @@ test(`downloads bundle if only an unpinned version is cached on GHES`, async (t)
|
||||
});
|
||||
|
||||
test('downloads bundle if "latest" tools specified but not cached', async (t) => {
|
||||
const features = createFeatures([]);
|
||||
|
||||
await util.withTmpDir(async (tmpDir) => {
|
||||
setupActionsVars(tmpDir, tmpDir);
|
||||
|
||||
@@ -406,7 +382,6 @@ test('downloads bundle if "latest" tools specified but not cached', async (t) =>
|
||||
tmpDir,
|
||||
util.GitHubVariant.DOTCOM,
|
||||
SAMPLE_DEFAULT_CLI_VERSION,
|
||||
features,
|
||||
getRunnerLogger(true),
|
||||
false,
|
||||
);
|
||||
@@ -422,8 +397,6 @@ test('downloads bundle if "latest" tools specified but not cached', async (t) =>
|
||||
});
|
||||
|
||||
test("bundle URL from another repo is cached as 0.0.0-bundleVersion", async (t) => {
|
||||
const features = createFeatures([]);
|
||||
|
||||
await util.withTmpDir(async (tmpDir) => {
|
||||
setupActionsVars(tmpDir, tmpDir);
|
||||
|
||||
@@ -444,7 +417,6 @@ test("bundle URL from another repo is cached as 0.0.0-bundleVersion", async (t)
|
||||
tmpDir,
|
||||
util.GitHubVariant.DOTCOM,
|
||||
SAMPLE_DEFAULT_CLI_VERSION,
|
||||
features,
|
||||
getRunnerLogger(true),
|
||||
false,
|
||||
);
|
||||
|
||||
+2
-5
@@ -309,7 +309,6 @@ const CODEQL_VERSION_CACHE_CLEANUP = "2.17.1";
|
||||
* @param tempDir
|
||||
* @param variant
|
||||
* @param defaultCliVersion
|
||||
* @param features Information about the features that are enabled.
|
||||
* @param logger
|
||||
* @param checkVersion Whether to check that CodeQL CLI meets the minimum
|
||||
* version requirement. Must be set to true outside tests.
|
||||
@@ -321,7 +320,6 @@ export async function setupCodeQL(
|
||||
tempDir: string,
|
||||
variant: util.GitHubVariant,
|
||||
defaultCliVersion: CodeQLDefaultVersionInfo,
|
||||
features: FeatureEnablement,
|
||||
logger: Logger,
|
||||
checkVersion: boolean,
|
||||
): Promise<{
|
||||
@@ -344,7 +342,6 @@ export async function setupCodeQL(
|
||||
tempDir,
|
||||
variant,
|
||||
defaultCliVersion,
|
||||
features,
|
||||
logger,
|
||||
);
|
||||
|
||||
@@ -995,14 +992,14 @@ export async function getCodeQLForCmd(
|
||||
return JSON.parse(extractorPath) as string;
|
||||
},
|
||||
async resolveQueriesStartingPacks(queries: string[]): Promise<string[]> {
|
||||
const codeqlArgs = [
|
||||
const zcodeqlArgs = [
|
||||
"resolve",
|
||||
"queries",
|
||||
"--format=startingpacks",
|
||||
...getExtraOptionsFromEnv(["resolve", "queries"]),
|
||||
...queries,
|
||||
];
|
||||
const output = await runCli(cmd, codeqlArgs, { noStreamStdout: true });
|
||||
const output = await runCli(cmd, zcodeqlArgs, { noStreamStdout: true });
|
||||
|
||||
try {
|
||||
return JSON.parse(output) as string[];
|
||||
|
||||
@@ -43,7 +43,6 @@ export interface FeatureEnablement {
|
||||
* Legacy features should end with `_enabled`.
|
||||
*/
|
||||
export enum Feature {
|
||||
AllowToolcacheInput = "allow_toolcache_input",
|
||||
CleanupTrapCaches = "cleanup_trap_caches",
|
||||
CppDependencyInstallation = "cpp_dependency_installation_enabled",
|
||||
DiffInformedQueries = "diff_informed_queries",
|
||||
@@ -74,9 +73,9 @@ export enum Feature {
|
||||
OverlayAnalysisRust = "overlay_analysis_rust",
|
||||
OverlayAnalysisSwift = "overlay_analysis_swift",
|
||||
PythonDefaultIsToNotExtractStdlib = "python_default_is_to_not_extract_stdlib",
|
||||
UseRepositoryProperties = "use_repository_properties",
|
||||
QaTelemetryEnabled = "qa_telemetry_enabled",
|
||||
ResolveSupportedLanguagesUsingCli = "resolve_supported_languages_using_cli",
|
||||
UseRepositoryProperties = "use_repository_properties",
|
||||
}
|
||||
|
||||
export const featureConfig: Record<
|
||||
@@ -110,11 +109,6 @@ export const featureConfig: Record<
|
||||
toolsFeature?: ToolsFeature;
|
||||
}
|
||||
> = {
|
||||
[Feature.AllowToolcacheInput]: {
|
||||
defaultValue: false,
|
||||
envVar: "CODEQL_ACTION_ALLOW_TOOLCACHE_INPUT",
|
||||
minimumVersion: undefined,
|
||||
},
|
||||
[Feature.CleanupTrapCaches]: {
|
||||
defaultValue: false,
|
||||
envVar: "CODEQL_ACTION_CLEANUP_TRAP_CACHES",
|
||||
|
||||
@@ -2,7 +2,6 @@ import test, { ExecutionContext } from "ava";
|
||||
import * as sinon from "sinon";
|
||||
|
||||
import * as actionsUtil from "./actions-util";
|
||||
import { AnalysisKind } from "./analyses";
|
||||
import * as codeql from "./codeql";
|
||||
import * as configUtils from "./config-utils";
|
||||
import { Feature } from "./feature-flags";
|
||||
@@ -29,13 +28,12 @@ test("post: init action with debug mode off", async (t) => {
|
||||
const gitHubVersion: util.GitHubVersion = {
|
||||
type: util.GitHubVariant.DOTCOM,
|
||||
};
|
||||
sinon.stub(configUtils, "getConfig").resolves(
|
||||
createTestConfig({
|
||||
debugMode: false,
|
||||
gitHubVersion,
|
||||
languages: [],
|
||||
}),
|
||||
);
|
||||
sinon.stub(configUtils, "getConfig").resolves({
|
||||
debugMode: false,
|
||||
gitHubVersion,
|
||||
languages: [],
|
||||
packs: [],
|
||||
} as unknown as configUtils.Config);
|
||||
|
||||
const uploadAllAvailableDebugArtifactsSpy = sinon.spy();
|
||||
const printDebugLogsSpy = sinon.spy();
|
||||
@@ -297,17 +295,6 @@ test("uploading failed SARIF run fails when workflow does not reference github/c
|
||||
t.truthy(result.upload_failed_run_stack_trace);
|
||||
});
|
||||
|
||||
test("not uploading failed SARIF when `code-scanning` is not an enabled analysis kind", async (t) => {
|
||||
const result = await testFailedSarifUpload(t, createTestWorkflow([]), {
|
||||
analysisKinds: [AnalysisKind.CodeQuality],
|
||||
expectUpload: false,
|
||||
});
|
||||
t.is(
|
||||
result.upload_failed_run_skipped_because,
|
||||
"Code Scanning is not enabled.",
|
||||
);
|
||||
});
|
||||
|
||||
function createTestWorkflow(
|
||||
steps: workflow.WorkflowJobStep[],
|
||||
): workflow.Workflow {
|
||||
@@ -340,22 +327,20 @@ async function testFailedSarifUpload(
|
||||
expectUpload = true,
|
||||
exportDiagnosticsEnabled = false,
|
||||
matrix = {},
|
||||
analysisKinds = [AnalysisKind.CodeScanning],
|
||||
}: {
|
||||
category?: string;
|
||||
databaseExists?: boolean;
|
||||
expectUpload?: boolean;
|
||||
exportDiagnosticsEnabled?: boolean;
|
||||
matrix?: { [key: string]: string };
|
||||
analysisKinds?: AnalysisKind[];
|
||||
} = {},
|
||||
): Promise<initActionPostHelper.UploadFailedSarifResult> {
|
||||
const config = createTestConfig({
|
||||
analysisKinds,
|
||||
const config = {
|
||||
codeQLCmd: "codeql",
|
||||
debugMode: true,
|
||||
languages: [],
|
||||
});
|
||||
packs: [],
|
||||
} as unknown as configUtils.Config;
|
||||
if (databaseExists) {
|
||||
config.dbLocation = "path/to/database";
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ import * as actionsUtil from "./actions-util";
|
||||
import { CodeScanning } from "./analyses";
|
||||
import { getApiClient } from "./api-client";
|
||||
import { CodeQL, getCodeQL } from "./codeql";
|
||||
import { Config, isCodeScanningEnabled } from "./config-utils";
|
||||
import { Config } from "./config-utils";
|
||||
import * as dependencyCaching from "./dependency-caching";
|
||||
import { EnvVar } from "./environment";
|
||||
import { Feature, FeatureEnablement } from "./feature-flags";
|
||||
@@ -139,15 +139,6 @@ export async function tryUploadSarifIfRunFailed(
|
||||
EnvVar.JOB_STATUS,
|
||||
process.env[EnvVar.JOB_STATUS] ?? JobStatus.ConfigErrorStatus,
|
||||
);
|
||||
|
||||
// If the only enabled analysis kind is `code-quality`, then we shouldn't
|
||||
// upload the failed SARIF to Code Scanning.
|
||||
if (!isCodeScanningEnabled(config)) {
|
||||
return {
|
||||
upload_failed_run_skipped_because: "Code Scanning is not enabled.",
|
||||
};
|
||||
}
|
||||
|
||||
try {
|
||||
return await maybeUploadFailedSarif(
|
||||
config,
|
||||
|
||||
@@ -248,7 +248,6 @@ async function run() {
|
||||
getTemporaryDirectory(),
|
||||
gitHubVersion.type,
|
||||
codeQLDefaultVersionInfo,
|
||||
features,
|
||||
logger,
|
||||
);
|
||||
codeql = initCodeQLResult.codeql;
|
||||
|
||||
+1
-3
@@ -9,7 +9,7 @@ import { getOptionalInput, isSelfHostedRunner } from "./actions-util";
|
||||
import { GitHubApiDetails } from "./api-client";
|
||||
import { CodeQL, setupCodeQL } from "./codeql";
|
||||
import * as configUtils from "./config-utils";
|
||||
import { CodeQLDefaultVersionInfo, FeatureEnablement } from "./feature-flags";
|
||||
import { CodeQLDefaultVersionInfo } from "./feature-flags";
|
||||
import { KnownLanguage, Language } from "./languages";
|
||||
import { Logger, withGroupAsync } from "./logging";
|
||||
import { ToolsSource } from "./setup-codeql";
|
||||
@@ -23,7 +23,6 @@ export async function initCodeQL(
|
||||
tempDir: string,
|
||||
variant: util.GitHubVariant,
|
||||
defaultCliVersion: CodeQLDefaultVersionInfo,
|
||||
features: FeatureEnablement,
|
||||
logger: Logger,
|
||||
): Promise<{
|
||||
codeql: CodeQL;
|
||||
@@ -45,7 +44,6 @@ export async function initCodeQL(
|
||||
tempDir,
|
||||
variant,
|
||||
defaultCliVersion,
|
||||
features,
|
||||
logger,
|
||||
true,
|
||||
);
|
||||
|
||||
+44
-100
@@ -1,7 +1,7 @@
|
||||
import * as path from "path";
|
||||
|
||||
import * as toolcache from "@actions/tool-cache";
|
||||
import test, { ExecutionContext } from "ava";
|
||||
import test from "ava";
|
||||
import * as sinon from "sinon";
|
||||
|
||||
import * as actionsUtil from "./actions-util";
|
||||
@@ -13,7 +13,6 @@ import {
|
||||
LoggedMessage,
|
||||
SAMPLE_DEFAULT_CLI_VERSION,
|
||||
SAMPLE_DOTCOM_API_DETAILS,
|
||||
createFeatures,
|
||||
getRecordingLogger,
|
||||
initializeFeatures,
|
||||
mockBundleDownloadApi,
|
||||
@@ -92,8 +91,6 @@ test("getCodeQLActionRepository", (t) => {
|
||||
});
|
||||
|
||||
test("getCodeQLSource sets CLI version for a semver tagged bundle", async (t) => {
|
||||
const features = createFeatures([]);
|
||||
|
||||
await withTmpDir(async (tmpDir) => {
|
||||
setupActionsVars(tmpDir, tmpDir);
|
||||
const tagName = "codeql-bundle-v1.2.3";
|
||||
@@ -104,7 +101,6 @@ test("getCodeQLSource sets CLI version for a semver tagged bundle", async (t) =>
|
||||
SAMPLE_DOTCOM_API_DETAILS,
|
||||
GitHubVariant.DOTCOM,
|
||||
false,
|
||||
features,
|
||||
getRunnerLogger(true),
|
||||
);
|
||||
|
||||
@@ -114,8 +110,6 @@ test("getCodeQLSource sets CLI version for a semver tagged bundle", async (t) =>
|
||||
});
|
||||
|
||||
test("getCodeQLSource correctly returns bundled CLI version when tools == linked", async (t) => {
|
||||
const features = createFeatures([]);
|
||||
|
||||
await withTmpDir(async (tmpDir) => {
|
||||
setupActionsVars(tmpDir, tmpDir);
|
||||
const source = await setupCodeql.getCodeQLSource(
|
||||
@@ -124,7 +118,6 @@ test("getCodeQLSource correctly returns bundled CLI version when tools == linked
|
||||
SAMPLE_DOTCOM_API_DETAILS,
|
||||
GitHubVariant.DOTCOM,
|
||||
false,
|
||||
features,
|
||||
getRunnerLogger(true),
|
||||
);
|
||||
|
||||
@@ -136,7 +129,6 @@ test("getCodeQLSource correctly returns bundled CLI version when tools == linked
|
||||
test("getCodeQLSource correctly returns bundled CLI version when tools == latest", async (t) => {
|
||||
const loggedMessages: LoggedMessage[] = [];
|
||||
const logger = getRecordingLogger(loggedMessages);
|
||||
const features = createFeatures([]);
|
||||
|
||||
await withTmpDir(async (tmpDir) => {
|
||||
setupActionsVars(tmpDir, tmpDir);
|
||||
@@ -146,7 +138,6 @@ test("getCodeQLSource correctly returns bundled CLI version when tools == latest
|
||||
SAMPLE_DOTCOM_API_DETAILS,
|
||||
GitHubVariant.DOTCOM,
|
||||
false,
|
||||
features,
|
||||
logger,
|
||||
);
|
||||
|
||||
@@ -171,7 +162,6 @@ test("getCodeQLSource correctly returns bundled CLI version when tools == latest
|
||||
test("setupCodeQLBundle logs the CodeQL CLI version being used when asked to use linked tools", async (t) => {
|
||||
const loggedMessages: LoggedMessage[] = [];
|
||||
const logger = getRecordingLogger(loggedMessages);
|
||||
const features = createFeatures([]);
|
||||
|
||||
// Stub the downloadCodeQL function to prevent downloading artefacts
|
||||
// during testing from being called.
|
||||
@@ -196,7 +186,6 @@ test("setupCodeQLBundle logs the CodeQL CLI version being used when asked to use
|
||||
"tmp/codeql_action_test/",
|
||||
GitHubVariant.DOTCOM,
|
||||
SAMPLE_DEFAULT_CLI_VERSION,
|
||||
features,
|
||||
logger,
|
||||
);
|
||||
|
||||
@@ -219,7 +208,6 @@ test("setupCodeQLBundle logs the CodeQL CLI version being used when asked to use
|
||||
test("setupCodeQLBundle logs the CodeQL CLI version being used when asked to download a non-default bundle", async (t) => {
|
||||
const loggedMessages: LoggedMessage[] = [];
|
||||
const logger = getRecordingLogger(loggedMessages);
|
||||
const features = createFeatures([]);
|
||||
|
||||
const bundleUrl =
|
||||
"https://github.com/github/codeql-action/releases/download/codeql-bundle-v2.16.0/codeql-bundle-linux64.tar.gz";
|
||||
@@ -248,7 +236,6 @@ test("setupCodeQLBundle logs the CodeQL CLI version being used when asked to dow
|
||||
"tmp/codeql_action_test/",
|
||||
GitHubVariant.DOTCOM,
|
||||
SAMPLE_DEFAULT_CLI_VERSION,
|
||||
features,
|
||||
logger,
|
||||
);
|
||||
|
||||
@@ -271,7 +258,6 @@ test("setupCodeQLBundle logs the CodeQL CLI version being used when asked to dow
|
||||
test("getCodeQLSource correctly returns latest version from toolcache when tools == toolcache", async (t) => {
|
||||
const loggedMessages: LoggedMessage[] = [];
|
||||
const logger = getRecordingLogger(loggedMessages);
|
||||
const features = createFeatures([Feature.AllowToolcacheInput]);
|
||||
|
||||
process.env["GITHUB_EVENT_NAME"] = "dynamic";
|
||||
|
||||
@@ -294,7 +280,6 @@ test("getCodeQLSource correctly returns latest version from toolcache when tools
|
||||
SAMPLE_DOTCOM_API_DETAILS,
|
||||
GitHubVariant.DOTCOM,
|
||||
false,
|
||||
features,
|
||||
logger,
|
||||
);
|
||||
|
||||
@@ -325,103 +310,62 @@ test("getCodeQLSource correctly returns latest version from toolcache when tools
|
||||
typeof msg.message === "string" &&
|
||||
msg.message.includes(expectedMessage),
|
||||
),
|
||||
`Expected '${expectedMessage}' in the logger output, but didn't find it in:\n ${loggedMessages.map((m) => ` - '${m.message}'`).join("\n")}`,
|
||||
`Expected '${expectedMessage}' in the logger output, but didn't find it.`,
|
||||
);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
const toolcacheInputFallbackMacro = test.macro({
|
||||
exec: async (
|
||||
t: ExecutionContext<unknown>,
|
||||
featureList: Feature[],
|
||||
environment: Record<string, string>,
|
||||
testVersions: string[],
|
||||
expectedMessages: string[],
|
||||
) => {
|
||||
const loggedMessages: LoggedMessage[] = [];
|
||||
const logger = getRecordingLogger(loggedMessages);
|
||||
const features = createFeatures(featureList);
|
||||
test("getCodeQLSource falls back to downloading the CLI if the toolcache doesn't have a CodeQL CLI when tools == toolcache", async (t) => {
|
||||
const loggedMessages: LoggedMessage[] = [];
|
||||
const logger = getRecordingLogger(loggedMessages);
|
||||
|
||||
for (const [k, v] of Object.entries(environment)) {
|
||||
process.env[k] = v;
|
||||
}
|
||||
process.env["GITHUB_EVENT_NAME"] = "dynamic";
|
||||
|
||||
const findAllVersionsStub = sinon
|
||||
.stub(toolcache, "findAllVersions")
|
||||
.returns(testVersions);
|
||||
const testVersions = [];
|
||||
const findAllVersionsStub = sinon
|
||||
.stub(toolcache, "findAllVersions")
|
||||
.returns(testVersions);
|
||||
|
||||
await withTmpDir(async (tmpDir) => {
|
||||
setupActionsVars(tmpDir, tmpDir);
|
||||
const source = await setupCodeql.getCodeQLSource(
|
||||
"toolcache",
|
||||
SAMPLE_DEFAULT_CLI_VERSION,
|
||||
SAMPLE_DOTCOM_API_DETAILS,
|
||||
GitHubVariant.DOTCOM,
|
||||
false,
|
||||
features,
|
||||
logger,
|
||||
);
|
||||
await withTmpDir(async (tmpDir) => {
|
||||
setupActionsVars(tmpDir, tmpDir);
|
||||
const source = await setupCodeql.getCodeQLSource(
|
||||
"toolcache",
|
||||
SAMPLE_DEFAULT_CLI_VERSION,
|
||||
SAMPLE_DOTCOM_API_DETAILS,
|
||||
GitHubVariant.DOTCOM,
|
||||
false,
|
||||
logger,
|
||||
);
|
||||
|
||||
// Check that the toolcache functions were called with the expected arguments
|
||||
// Check that the toolcache functions were called with the expected arguments
|
||||
t.assert(
|
||||
findAllVersionsStub.calledWith("CodeQL"),
|
||||
`toolcache.findAllVersions("CodeQL") wasn't called`,
|
||||
);
|
||||
|
||||
// Check that `sourceType` and `toolsVersion` match expectations.
|
||||
t.is(source.sourceType, "download");
|
||||
t.is(source.toolsVersion, SAMPLE_DEFAULT_CLI_VERSION.cliVersion);
|
||||
|
||||
// Check that key messages we would expect to find in the log are present.
|
||||
const expectedMessages: string[] = [
|
||||
`Attempting to use the latest CodeQL CLI version in the toolcache, as requested by 'tools: toolcache'.`,
|
||||
`Found no CodeQL CLI in the toolcache, ignoring 'tools: toolcache'...`,
|
||||
];
|
||||
for (const expectedMessage of expectedMessages) {
|
||||
t.assert(
|
||||
findAllVersionsStub.calledWith("CodeQL"),
|
||||
`toolcache.findAllVersions("CodeQL") wasn't called`,
|
||||
loggedMessages.some(
|
||||
(msg) =>
|
||||
typeof msg.message === "string" &&
|
||||
msg.message.includes(expectedMessage),
|
||||
),
|
||||
`Expected '${expectedMessage}' in the logger output, but didn't find it.`,
|
||||
);
|
||||
|
||||
// Check that `sourceType` and `toolsVersion` match expectations.
|
||||
t.is(source.sourceType, "download");
|
||||
t.is(source.toolsVersion, SAMPLE_DEFAULT_CLI_VERSION.cliVersion);
|
||||
|
||||
// Check that key messages we would expect to find in the log are present.
|
||||
for (const expectedMessage of expectedMessages) {
|
||||
t.assert(
|
||||
loggedMessages.some(
|
||||
(msg) =>
|
||||
typeof msg.message === "string" &&
|
||||
msg.message.includes(expectedMessage),
|
||||
),
|
||||
`Expected '${expectedMessage}' in the logger output, but didn't find it in:\n ${loggedMessages.map((m) => ` - '${m.message}'`).join("\n")}`,
|
||||
);
|
||||
}
|
||||
});
|
||||
},
|
||||
title: (providedTitle = "") =>
|
||||
`getCodeQLSource falls back to downloading the CLI if ${providedTitle}`,
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
test(
|
||||
"the toolcache doesn't have a CodeQL CLI when tools == toolcache",
|
||||
toolcacheInputFallbackMacro,
|
||||
[Feature.AllowToolcacheInput],
|
||||
{ GITHUB_EVENT_NAME: "dynamic" },
|
||||
[],
|
||||
[
|
||||
`Attempting to use the latest CodeQL CLI version in the toolcache, as requested by 'tools: toolcache'.`,
|
||||
`Found no CodeQL CLI in the toolcache, ignoring 'tools: toolcache'...`,
|
||||
],
|
||||
);
|
||||
|
||||
test(
|
||||
"the workflow trigger is not `dynamic`",
|
||||
toolcacheInputFallbackMacro,
|
||||
[Feature.AllowToolcacheInput],
|
||||
{ GITHUB_EVENT_NAME: "pull_request" },
|
||||
[],
|
||||
[
|
||||
`Ignoring 'tools: toolcache' because the workflow was not triggered dynamically.`,
|
||||
],
|
||||
);
|
||||
|
||||
test(
|
||||
"the feature flag is not enabled",
|
||||
toolcacheInputFallbackMacro,
|
||||
[],
|
||||
{ GITHUB_EVENT_NAME: "dynamic" },
|
||||
[],
|
||||
[`Ignoring 'tools: toolcache' because the feature is not enabled.`],
|
||||
);
|
||||
|
||||
test('tryGetTagNameFromUrl extracts the right tag name for a repo name containing "codeql-bundle"', (t) => {
|
||||
t.is(
|
||||
setupCodeql.tryGetTagNameFromUrl(
|
||||
|
||||
+4
-19
@@ -13,8 +13,6 @@ import * as defaults from "./defaults.json";
|
||||
import {
|
||||
CODEQL_VERSION_ZSTD_BUNDLE,
|
||||
CodeQLDefaultVersionInfo,
|
||||
Feature,
|
||||
FeatureEnablement,
|
||||
} from "./feature-flags";
|
||||
import { Logger } from "./logging";
|
||||
import * as tar from "./tar";
|
||||
@@ -278,7 +276,6 @@ export async function getCodeQLSource(
|
||||
apiDetails: api.GitHubApiDetails,
|
||||
variant: util.GitHubVariant,
|
||||
tarSupportsZstd: boolean,
|
||||
features: FeatureEnablement,
|
||||
logger: Logger,
|
||||
): Promise<CodeQLToolsSource> {
|
||||
if (
|
||||
@@ -359,11 +356,7 @@ export async function getCodeQLSource(
|
||||
// We only allow `toolsInput === "toolcache"` for `dynamic` events. In general, using `toolsInput === "toolcache"`
|
||||
// can lead to alert wobble and so it shouldn't be used for an analysis where results are intended to be uploaded.
|
||||
// We also allow this in test mode.
|
||||
const allowToolcacheValueFF = await features.getValue(
|
||||
Feature.AllowToolcacheInput,
|
||||
);
|
||||
const allowToolcacheValue =
|
||||
allowToolcacheValueFF && (isDynamicWorkflow() || util.isInTestMode());
|
||||
const allowToolcacheValue = isDynamicWorkflow() || util.isInTestMode();
|
||||
if (allowToolcacheValue) {
|
||||
// If `toolsInput === "toolcache"`, try to find the latest version of the CLI that's available in the toolcache
|
||||
// and use that. We perform this check here since we can set `cliVersion` directly and don't want to default to
|
||||
@@ -384,15 +377,9 @@ export async function getCodeQLSource(
|
||||
`Found no CodeQL CLI in the toolcache, ignoring 'tools: ${toolsInput}'...`,
|
||||
);
|
||||
} else {
|
||||
if (allowToolcacheValueFF) {
|
||||
logger.warning(
|
||||
`Ignoring 'tools: ${toolsInput}' because the workflow was not triggered dynamically.`,
|
||||
);
|
||||
} else {
|
||||
logger.info(
|
||||
`Ignoring 'tools: ${toolsInput}' because the feature is not enabled.`,
|
||||
);
|
||||
}
|
||||
logger.warning(
|
||||
`Ignoring 'tools: ${toolsInput}' because the workflow was not triggered dynamically.`,
|
||||
);
|
||||
}
|
||||
|
||||
cliVersion = defaultCliVersion.cliVersion;
|
||||
@@ -748,7 +735,6 @@ export async function setupCodeQLBundle(
|
||||
tempDir: string,
|
||||
variant: util.GitHubVariant,
|
||||
defaultCliVersion: CodeQLDefaultVersionInfo,
|
||||
features: FeatureEnablement,
|
||||
logger: Logger,
|
||||
) {
|
||||
if (!(await util.isBinaryAccessible("tar", logger))) {
|
||||
@@ -764,7 +750,6 @@ export async function setupCodeQLBundle(
|
||||
apiDetails,
|
||||
variant,
|
||||
zstdAvailability.available,
|
||||
features,
|
||||
logger,
|
||||
);
|
||||
|
||||
|
||||
@@ -1,14 +1,9 @@
|
||||
import * as fs from "fs";
|
||||
import * as path from "path";
|
||||
|
||||
import * as github from "@actions/github";
|
||||
import { HTTPError } from "@actions/tool-cache";
|
||||
import test from "ava";
|
||||
import * as sinon from "sinon";
|
||||
|
||||
import * as analyses from "./analyses";
|
||||
import { AnalysisKind, CodeQuality, CodeScanning } from "./analyses";
|
||||
import * as api from "./api-client";
|
||||
import { getRunnerLogger, Logger } from "./logging";
|
||||
import { setupTests } from "./testing-utils";
|
||||
import * as uploadLib from "./upload-lib";
|
||||
@@ -872,91 +867,3 @@ function createMockSarif(id?: string, tool?: string) {
|
||||
],
|
||||
};
|
||||
}
|
||||
|
||||
function uploadPayloadFixtures(analysis: analyses.AnalysisConfig) {
|
||||
const mockData = {
|
||||
payload: { sarif: "base64data", commit_sha: "abc123" },
|
||||
owner: "test-owner",
|
||||
repo: "test-repo",
|
||||
response: {
|
||||
status: 200,
|
||||
data: { id: "uploaded-sarif-id" },
|
||||
headers: {},
|
||||
url: analysis.target,
|
||||
},
|
||||
};
|
||||
const client = github.getOctokit("123");
|
||||
sinon.stub(api, "getApiClient").value(() => client);
|
||||
const requestStub = sinon.stub(client, "request");
|
||||
|
||||
const upload = async () =>
|
||||
uploadLib.uploadPayload(
|
||||
mockData.payload,
|
||||
{
|
||||
owner: mockData.owner,
|
||||
repo: mockData.repo,
|
||||
},
|
||||
getRunnerLogger(true),
|
||||
analysis,
|
||||
);
|
||||
|
||||
return {
|
||||
upload,
|
||||
requestStub,
|
||||
mockData,
|
||||
};
|
||||
}
|
||||
|
||||
for (const analysis of [CodeScanning, CodeQuality]) {
|
||||
test(`uploadPayload on ${analysis.name} uploads successfully`, async (t) => {
|
||||
const { upload, requestStub, mockData } = uploadPayloadFixtures(analysis);
|
||||
requestStub
|
||||
.withArgs(analysis.target, {
|
||||
owner: mockData.owner,
|
||||
repo: mockData.repo,
|
||||
data: mockData.payload,
|
||||
})
|
||||
.onFirstCall()
|
||||
.returns(Promise.resolve(mockData.response));
|
||||
const result = await upload();
|
||||
t.is(result, mockData.response.data.id);
|
||||
t.true(requestStub.calledOnce);
|
||||
});
|
||||
|
||||
for (const envVar of [
|
||||
"CODEQL_ACTION_SKIP_SARIF_UPLOAD",
|
||||
"CODEQL_ACTION_TEST_MODE",
|
||||
]) {
|
||||
test(`uploadPayload on ${analysis.name} skips upload when ${envVar} is set`, async (t) => {
|
||||
const { upload, requestStub, mockData } = uploadPayloadFixtures(analysis);
|
||||
await withTmpDir(async (tmpDir) => {
|
||||
process.env.RUNNER_TEMP = tmpDir;
|
||||
process.env[envVar] = "true";
|
||||
const result = await upload();
|
||||
t.is(result, "dummy-sarif-id");
|
||||
t.false(requestStub.called);
|
||||
|
||||
const payloadFile = path.join(tmpDir, `payload-${analysis.kind}.json`);
|
||||
t.true(fs.existsSync(payloadFile));
|
||||
|
||||
const savedPayload = JSON.parse(fs.readFileSync(payloadFile, "utf8"));
|
||||
t.deepEqual(savedPayload, mockData.payload);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
test(`uploadPayload on ${analysis.name} wraps request errors using wrapApiConfigurationError`, async (t) => {
|
||||
const { upload, requestStub } = uploadPayloadFixtures(analysis);
|
||||
const wrapApiConfigurationErrorStub = sinon.stub(
|
||||
api,
|
||||
"wrapApiConfigurationError",
|
||||
);
|
||||
const originalError = new HTTPError(404);
|
||||
const wrappedError = new Error("Wrapped error message");
|
||||
requestStub.rejects(originalError);
|
||||
wrapApiConfigurationErrorStub.withArgs(originalError).returns(wrappedError);
|
||||
await t.throwsAsync(upload, {
|
||||
is: wrappedError,
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
+3
-7
@@ -262,7 +262,6 @@ async function combineSarifFilesUsingCLI(
|
||||
tempDir,
|
||||
gitHubVersion.type,
|
||||
codeQLDefaultVersionInfo,
|
||||
features,
|
||||
logger,
|
||||
);
|
||||
|
||||
@@ -347,12 +346,9 @@ function getAutomationID(
|
||||
return api.computeAutomationID(analysis_key, environment);
|
||||
}
|
||||
|
||||
/**
|
||||
* Upload the given payload.
|
||||
* If the request fails then this will retry a small number of times.
|
||||
* This is exported for testing purposes only.
|
||||
*/
|
||||
export async function uploadPayload(
|
||||
// Upload the given payload.
|
||||
// If the request fails then this will retry a small number of times.
|
||||
async function uploadPayload(
|
||||
payload: any,
|
||||
repositoryNwo: RepositoryNwo,
|
||||
logger: Logger,
|
||||
|
||||
Reference in New Issue
Block a user