mirror of
https://github.com/github/codeql-action.git
synced 2026-10-03 09:14:58 +00:00
Merge pull request #3223 from github/henrymercer/bump-minimum
Bump minimum CodeQL Bundle version to 2.17.6
This commit is contained in:
@@ -4,7 +4,7 @@ See the [releases page](https://github.com/github/codeql-action/releases) for th
|
||||
|
||||
## [UNRELEASED]
|
||||
|
||||
No user facing changes.
|
||||
- Bump minimum CodeQL bundle version to 2.17.6. [#3223](https://github.com/github/codeql-action/pull/3223)
|
||||
|
||||
## 4.30.9 - 17 Oct 2025
|
||||
|
||||
|
||||
10
lib/analyze-action-post.js
generated
10
lib/analyze-action-post.js
generated
@@ -26460,7 +26460,7 @@ var require_package = __commonJS({
|
||||
"package.json"(exports2, module2) {
|
||||
module2.exports = {
|
||||
name: "codeql",
|
||||
version: "4.30.10",
|
||||
version: "4.31.0",
|
||||
private: true,
|
||||
description: "CodeQL action",
|
||||
scripts: {
|
||||
@@ -119421,7 +119421,7 @@ async function shouldEnableIndirectTracing(codeql, config) {
|
||||
|
||||
// src/codeql.ts
|
||||
var cachedCodeQL = void 0;
|
||||
var CODEQL_MINIMUM_VERSION = "2.16.6";
|
||||
var CODEQL_MINIMUM_VERSION = "2.17.6";
|
||||
var CODEQL_NEXT_MINIMUM_VERSION = "2.17.6";
|
||||
var GHES_VERSION_MOST_RECENTLY_DEPRECATED = "3.13";
|
||||
var GHES_MOST_RECENT_DEPRECATION_DATE = "2025-06-19";
|
||||
@@ -119708,12 +119708,6 @@ ${output}`
|
||||
} else {
|
||||
codeqlArgs.push("--no-sarif-include-diagnostics");
|
||||
}
|
||||
if (!isSupportedToolsFeature(
|
||||
await this.getVersion(),
|
||||
"analysisSummaryV2Default" /* AnalysisSummaryV2IsDefault */
|
||||
)) {
|
||||
codeqlArgs.push("--new-analysis-summary");
|
||||
}
|
||||
codeqlArgs.push(databasePath);
|
||||
if (querySuitePaths) {
|
||||
codeqlArgs.push(...querySuitePaths);
|
||||
|
||||
28
lib/analyze-action.js
generated
28
lib/analyze-action.js
generated
@@ -32309,7 +32309,7 @@ var require_package = __commonJS({
|
||||
"package.json"(exports2, module2) {
|
||||
module2.exports = {
|
||||
name: "codeql",
|
||||
version: "4.30.10",
|
||||
version: "4.31.0",
|
||||
private: true,
|
||||
description: "CodeQL action",
|
||||
scripts: {
|
||||
@@ -92785,7 +92785,7 @@ async function endTracingForCluster(codeql, config, logger) {
|
||||
|
||||
// src/codeql.ts
|
||||
var cachedCodeQL = void 0;
|
||||
var CODEQL_MINIMUM_VERSION = "2.16.6";
|
||||
var CODEQL_MINIMUM_VERSION = "2.17.6";
|
||||
var CODEQL_NEXT_MINIMUM_VERSION = "2.17.6";
|
||||
var GHES_VERSION_MOST_RECENTLY_DEPRECATED = "3.13";
|
||||
var GHES_MOST_RECENT_DEPRECATION_DATE = "2025-06-19";
|
||||
@@ -93120,12 +93120,6 @@ ${output}`
|
||||
} else {
|
||||
codeqlArgs.push("--no-sarif-include-diagnostics");
|
||||
}
|
||||
if (!isSupportedToolsFeature(
|
||||
await this.getVersion(),
|
||||
"analysisSummaryV2Default" /* AnalysisSummaryV2IsDefault */
|
||||
)) {
|
||||
codeqlArgs.push("--new-analysis-summary");
|
||||
}
|
||||
codeqlArgs.push(databasePath);
|
||||
if (querySuitePaths) {
|
||||
codeqlArgs.push(...querySuitePaths);
|
||||
@@ -95632,24 +95626,6 @@ async function combineSarifFilesUsingCLI(sarifFiles, gitHubVersion, features, lo
|
||||
);
|
||||
codeQL = initCodeQLResult.codeql;
|
||||
}
|
||||
if (!await codeQL.supportsFeature(
|
||||
"sarifMergeRunsFromEqualCategory" /* SarifMergeRunsFromEqualCategory */
|
||||
)) {
|
||||
await throwIfCombineSarifFilesDisabled(sarifObjects, gitHubVersion);
|
||||
logger.warning(
|
||||
"The CodeQL CLI does not support merging SARIF files. Merging files in the action."
|
||||
);
|
||||
if (await shouldShowCombineSarifFilesDeprecationWarning(
|
||||
sarifObjects,
|
||||
gitHubVersion
|
||||
)) {
|
||||
logger.warning(
|
||||
`Uploading multiple CodeQL runs with the same category is deprecated ${deprecationWarningMessage} for CodeQL CLI 2.16.6 and earlier. Please update your CodeQL CLI version or update your workflow to set a distinct category for each CodeQL run. ${deprecationMoreInformationMessage}`
|
||||
);
|
||||
core13.exportVariable("CODEQL_MERGE_SARIF_DEPRECATION_WARNING", "true");
|
||||
}
|
||||
return combineSarifFiles(sarifFiles, logger);
|
||||
}
|
||||
const baseTempDir = path18.resolve(tempDir, "combined-sarif");
|
||||
fs18.mkdirSync(baseTempDir, { recursive: true });
|
||||
const outputDirectory = fs18.mkdtempSync(path18.resolve(baseTempDir, "output-"));
|
||||
|
||||
10
lib/autobuild-action.js
generated
10
lib/autobuild-action.js
generated
@@ -26460,7 +26460,7 @@ var require_package = __commonJS({
|
||||
"package.json"(exports2, module2) {
|
||||
module2.exports = {
|
||||
name: "codeql",
|
||||
version: "4.30.10",
|
||||
version: "4.31.0",
|
||||
private: true,
|
||||
description: "CodeQL action",
|
||||
scripts: {
|
||||
@@ -80472,7 +80472,7 @@ async function endTracingForCluster(codeql, config, logger) {
|
||||
|
||||
// src/codeql.ts
|
||||
var cachedCodeQL = void 0;
|
||||
var CODEQL_MINIMUM_VERSION = "2.16.6";
|
||||
var CODEQL_MINIMUM_VERSION = "2.17.6";
|
||||
var CODEQL_NEXT_MINIMUM_VERSION = "2.17.6";
|
||||
var GHES_VERSION_MOST_RECENTLY_DEPRECATED = "3.13";
|
||||
var GHES_MOST_RECENT_DEPRECATION_DATE = "2025-06-19";
|
||||
@@ -80759,12 +80759,6 @@ ${output}`
|
||||
} else {
|
||||
codeqlArgs.push("--no-sarif-include-diagnostics");
|
||||
}
|
||||
if (!isSupportedToolsFeature(
|
||||
await this.getVersion(),
|
||||
"analysisSummaryV2Default" /* AnalysisSummaryV2IsDefault */
|
||||
)) {
|
||||
codeqlArgs.push("--new-analysis-summary");
|
||||
}
|
||||
codeqlArgs.push(databasePath);
|
||||
if (querySuitePaths) {
|
||||
codeqlArgs.push(...querySuitePaths);
|
||||
|
||||
28
lib/init-action-post.js
generated
28
lib/init-action-post.js
generated
@@ -32309,7 +32309,7 @@ var require_package = __commonJS({
|
||||
"package.json"(exports2, module2) {
|
||||
module2.exports = {
|
||||
name: "codeql",
|
||||
version: "4.30.10",
|
||||
version: "4.31.0",
|
||||
private: true,
|
||||
description: "CodeQL action",
|
||||
scripts: {
|
||||
@@ -130723,7 +130723,7 @@ async function shouldEnableIndirectTracing(codeql, config) {
|
||||
|
||||
// src/codeql.ts
|
||||
var cachedCodeQL = void 0;
|
||||
var CODEQL_MINIMUM_VERSION = "2.16.6";
|
||||
var CODEQL_MINIMUM_VERSION = "2.17.6";
|
||||
var CODEQL_NEXT_MINIMUM_VERSION = "2.17.6";
|
||||
var GHES_VERSION_MOST_RECENTLY_DEPRECATED = "3.13";
|
||||
var GHES_MOST_RECENT_DEPRECATION_DATE = "2025-06-19";
|
||||
@@ -131058,12 +131058,6 @@ ${output}`
|
||||
} else {
|
||||
codeqlArgs.push("--no-sarif-include-diagnostics");
|
||||
}
|
||||
if (!isSupportedToolsFeature(
|
||||
await this.getVersion(),
|
||||
"analysisSummaryV2Default" /* AnalysisSummaryV2IsDefault */
|
||||
)) {
|
||||
codeqlArgs.push("--new-analysis-summary");
|
||||
}
|
||||
codeqlArgs.push(databasePath);
|
||||
if (querySuitePaths) {
|
||||
codeqlArgs.push(...querySuitePaths);
|
||||
@@ -133091,24 +133085,6 @@ async function combineSarifFilesUsingCLI(sarifFiles, gitHubVersion, features, lo
|
||||
);
|
||||
codeQL = initCodeQLResult.codeql;
|
||||
}
|
||||
if (!await codeQL.supportsFeature(
|
||||
"sarifMergeRunsFromEqualCategory" /* SarifMergeRunsFromEqualCategory */
|
||||
)) {
|
||||
await throwIfCombineSarifFilesDisabled(sarifObjects, gitHubVersion);
|
||||
logger.warning(
|
||||
"The CodeQL CLI does not support merging SARIF files. Merging files in the action."
|
||||
);
|
||||
if (await shouldShowCombineSarifFilesDeprecationWarning(
|
||||
sarifObjects,
|
||||
gitHubVersion
|
||||
)) {
|
||||
logger.warning(
|
||||
`Uploading multiple CodeQL runs with the same category is deprecated ${deprecationWarningMessage} for CodeQL CLI 2.16.6 and earlier. Please update your CodeQL CLI version or update your workflow to set a distinct category for each CodeQL run. ${deprecationMoreInformationMessage}`
|
||||
);
|
||||
core14.exportVariable("CODEQL_MERGE_SARIF_DEPRECATION_WARNING", "true");
|
||||
}
|
||||
return combineSarifFiles(sarifFiles, logger);
|
||||
}
|
||||
const baseTempDir = path17.resolve(tempDir, "combined-sarif");
|
||||
fs17.mkdirSync(baseTempDir, { recursive: true });
|
||||
const outputDirectory = fs17.mkdtempSync(path17.resolve(baseTempDir, "output-"));
|
||||
|
||||
10
lib/init-action.js
generated
10
lib/init-action.js
generated
@@ -32309,7 +32309,7 @@ var require_package = __commonJS({
|
||||
"package.json"(exports2, module2) {
|
||||
module2.exports = {
|
||||
name: "codeql",
|
||||
version: "4.30.10",
|
||||
version: "4.31.0",
|
||||
private: true,
|
||||
description: "CodeQL action",
|
||||
scripts: {
|
||||
@@ -91067,7 +91067,7 @@ async function getCombinedTracerConfig(codeql, config) {
|
||||
|
||||
// src/codeql.ts
|
||||
var cachedCodeQL = void 0;
|
||||
var CODEQL_MINIMUM_VERSION = "2.16.6";
|
||||
var CODEQL_MINIMUM_VERSION = "2.17.6";
|
||||
var CODEQL_NEXT_MINIMUM_VERSION = "2.17.6";
|
||||
var GHES_VERSION_MOST_RECENTLY_DEPRECATED = "3.13";
|
||||
var GHES_MOST_RECENT_DEPRECATION_DATE = "2025-06-19";
|
||||
@@ -91396,12 +91396,6 @@ ${output}`
|
||||
} else {
|
||||
codeqlArgs.push("--no-sarif-include-diagnostics");
|
||||
}
|
||||
if (!isSupportedToolsFeature(
|
||||
await this.getVersion(),
|
||||
"analysisSummaryV2Default" /* AnalysisSummaryV2IsDefault */
|
||||
)) {
|
||||
codeqlArgs.push("--new-analysis-summary");
|
||||
}
|
||||
codeqlArgs.push(databasePath);
|
||||
if (querySuitePaths) {
|
||||
codeqlArgs.push(...querySuitePaths);
|
||||
|
||||
10
lib/resolve-environment-action.js
generated
10
lib/resolve-environment-action.js
generated
@@ -26460,7 +26460,7 @@ var require_package = __commonJS({
|
||||
"package.json"(exports2, module2) {
|
||||
module2.exports = {
|
||||
name: "codeql",
|
||||
version: "4.30.10",
|
||||
version: "4.31.0",
|
||||
private: true,
|
||||
description: "CodeQL action",
|
||||
scripts: {
|
||||
@@ -80171,7 +80171,7 @@ async function shouldEnableIndirectTracing(codeql, config) {
|
||||
|
||||
// src/codeql.ts
|
||||
var cachedCodeQL = void 0;
|
||||
var CODEQL_MINIMUM_VERSION = "2.16.6";
|
||||
var CODEQL_MINIMUM_VERSION = "2.17.6";
|
||||
var CODEQL_NEXT_MINIMUM_VERSION = "2.17.6";
|
||||
var GHES_VERSION_MOST_RECENTLY_DEPRECATED = "3.13";
|
||||
var GHES_MOST_RECENT_DEPRECATION_DATE = "2025-06-19";
|
||||
@@ -80458,12 +80458,6 @@ ${output}`
|
||||
} else {
|
||||
codeqlArgs.push("--no-sarif-include-diagnostics");
|
||||
}
|
||||
if (!isSupportedToolsFeature(
|
||||
await this.getVersion(),
|
||||
"analysisSummaryV2Default" /* AnalysisSummaryV2IsDefault */
|
||||
)) {
|
||||
codeqlArgs.push("--new-analysis-summary");
|
||||
}
|
||||
codeqlArgs.push(databasePath);
|
||||
if (querySuitePaths) {
|
||||
codeqlArgs.push(...querySuitePaths);
|
||||
|
||||
10
lib/setup-codeql-action.js
generated
10
lib/setup-codeql-action.js
generated
@@ -32309,7 +32309,7 @@ var require_package = __commonJS({
|
||||
"package.json"(exports2, module2) {
|
||||
module2.exports = {
|
||||
name: "codeql",
|
||||
version: "4.30.10",
|
||||
version: "4.31.0",
|
||||
private: true,
|
||||
description: "CodeQL action",
|
||||
scripts: {
|
||||
@@ -88002,7 +88002,7 @@ async function shouldEnableIndirectTracing(codeql, config) {
|
||||
|
||||
// src/codeql.ts
|
||||
var cachedCodeQL = void 0;
|
||||
var CODEQL_MINIMUM_VERSION = "2.16.6";
|
||||
var CODEQL_MINIMUM_VERSION = "2.17.6";
|
||||
var CODEQL_NEXT_MINIMUM_VERSION = "2.17.6";
|
||||
var GHES_VERSION_MOST_RECENTLY_DEPRECATED = "3.13";
|
||||
var GHES_MOST_RECENT_DEPRECATION_DATE = "2025-06-19";
|
||||
@@ -88331,12 +88331,6 @@ ${output}`
|
||||
} else {
|
||||
codeqlArgs.push("--no-sarif-include-diagnostics");
|
||||
}
|
||||
if (!isSupportedToolsFeature(
|
||||
await this.getVersion(),
|
||||
"analysisSummaryV2Default" /* AnalysisSummaryV2IsDefault */
|
||||
)) {
|
||||
codeqlArgs.push("--new-analysis-summary");
|
||||
}
|
||||
codeqlArgs.push(databasePath);
|
||||
if (querySuitePaths) {
|
||||
codeqlArgs.push(...querySuitePaths);
|
||||
|
||||
2
lib/start-proxy-action-post.js
generated
2
lib/start-proxy-action-post.js
generated
@@ -26460,7 +26460,7 @@ var require_package = __commonJS({
|
||||
"package.json"(exports2, module2) {
|
||||
module2.exports = {
|
||||
name: "codeql",
|
||||
version: "4.30.10",
|
||||
version: "4.31.0",
|
||||
private: true,
|
||||
description: "CodeQL action",
|
||||
scripts: {
|
||||
|
||||
2
lib/start-proxy-action.js
generated
2
lib/start-proxy-action.js
generated
@@ -44996,7 +44996,7 @@ var require_package = __commonJS({
|
||||
"package.json"(exports2, module2) {
|
||||
module2.exports = {
|
||||
name: "codeql",
|
||||
version: "4.30.10",
|
||||
version: "4.31.0",
|
||||
private: true,
|
||||
description: "CodeQL action",
|
||||
scripts: {
|
||||
|
||||
28
lib/upload-lib.js
generated
28
lib/upload-lib.js
generated
@@ -33606,7 +33606,7 @@ var require_package = __commonJS({
|
||||
"package.json"(exports2, module2) {
|
||||
module2.exports = {
|
||||
name: "codeql",
|
||||
version: "4.30.10",
|
||||
version: "4.31.0",
|
||||
private: true,
|
||||
description: "CodeQL action",
|
||||
scripts: {
|
||||
@@ -90556,7 +90556,7 @@ async function shouldEnableIndirectTracing(codeql, config) {
|
||||
|
||||
// src/codeql.ts
|
||||
var cachedCodeQL = void 0;
|
||||
var CODEQL_MINIMUM_VERSION = "2.16.6";
|
||||
var CODEQL_MINIMUM_VERSION = "2.17.6";
|
||||
var CODEQL_NEXT_MINIMUM_VERSION = "2.17.6";
|
||||
var GHES_VERSION_MOST_RECENTLY_DEPRECATED = "3.13";
|
||||
var GHES_MOST_RECENT_DEPRECATION_DATE = "2025-06-19";
|
||||
@@ -90891,12 +90891,6 @@ ${output}`
|
||||
} else {
|
||||
codeqlArgs.push("--no-sarif-include-diagnostics");
|
||||
}
|
||||
if (!isSupportedToolsFeature(
|
||||
await this.getVersion(),
|
||||
"analysisSummaryV2Default" /* AnalysisSummaryV2IsDefault */
|
||||
)) {
|
||||
codeqlArgs.push("--new-analysis-summary");
|
||||
}
|
||||
codeqlArgs.push(databasePath);
|
||||
if (querySuitePaths) {
|
||||
codeqlArgs.push(...querySuitePaths);
|
||||
@@ -92446,24 +92440,6 @@ async function combineSarifFilesUsingCLI(sarifFiles, gitHubVersion, features, lo
|
||||
);
|
||||
codeQL = initCodeQLResult.codeql;
|
||||
}
|
||||
if (!await codeQL.supportsFeature(
|
||||
"sarifMergeRunsFromEqualCategory" /* SarifMergeRunsFromEqualCategory */
|
||||
)) {
|
||||
await throwIfCombineSarifFilesDisabled(sarifObjects, gitHubVersion);
|
||||
logger.warning(
|
||||
"The CodeQL CLI does not support merging SARIF files. Merging files in the action."
|
||||
);
|
||||
if (await shouldShowCombineSarifFilesDeprecationWarning(
|
||||
sarifObjects,
|
||||
gitHubVersion
|
||||
)) {
|
||||
logger.warning(
|
||||
`Uploading multiple CodeQL runs with the same category is deprecated ${deprecationWarningMessage} for CodeQL CLI 2.16.6 and earlier. Please update your CodeQL CLI version or update your workflow to set a distinct category for each CodeQL run. ${deprecationMoreInformationMessage}`
|
||||
);
|
||||
core11.exportVariable("CODEQL_MERGE_SARIF_DEPRECATION_WARNING", "true");
|
||||
}
|
||||
return combineSarifFiles(sarifFiles, logger);
|
||||
}
|
||||
const baseTempDir = path14.resolve(tempDir, "combined-sarif");
|
||||
fs13.mkdirSync(baseTempDir, { recursive: true });
|
||||
const outputDirectory = fs13.mkdtempSync(path14.resolve(baseTempDir, "output-"));
|
||||
|
||||
2
lib/upload-sarif-action-post.js
generated
2
lib/upload-sarif-action-post.js
generated
@@ -26460,7 +26460,7 @@ var require_package = __commonJS({
|
||||
"package.json"(exports2, module2) {
|
||||
module2.exports = {
|
||||
name: "codeql",
|
||||
version: "4.30.10",
|
||||
version: "4.31.0",
|
||||
private: true,
|
||||
description: "CodeQL action",
|
||||
scripts: {
|
||||
|
||||
28
lib/upload-sarif-action.js
generated
28
lib/upload-sarif-action.js
generated
@@ -32309,7 +32309,7 @@ var require_package = __commonJS({
|
||||
"package.json"(exports2, module2) {
|
||||
module2.exports = {
|
||||
name: "codeql",
|
||||
version: "4.30.10",
|
||||
version: "4.31.0",
|
||||
private: true,
|
||||
description: "CodeQL action",
|
||||
scripts: {
|
||||
@@ -91229,7 +91229,7 @@ async function shouldEnableIndirectTracing(codeql, config) {
|
||||
|
||||
// src/codeql.ts
|
||||
var cachedCodeQL = void 0;
|
||||
var CODEQL_MINIMUM_VERSION = "2.16.6";
|
||||
var CODEQL_MINIMUM_VERSION = "2.17.6";
|
||||
var CODEQL_NEXT_MINIMUM_VERSION = "2.17.6";
|
||||
var GHES_VERSION_MOST_RECENTLY_DEPRECATED = "3.13";
|
||||
var GHES_MOST_RECENT_DEPRECATION_DATE = "2025-06-19";
|
||||
@@ -91564,12 +91564,6 @@ ${output}`
|
||||
} else {
|
||||
codeqlArgs.push("--no-sarif-include-diagnostics");
|
||||
}
|
||||
if (!isSupportedToolsFeature(
|
||||
await this.getVersion(),
|
||||
"analysisSummaryV2Default" /* AnalysisSummaryV2IsDefault */
|
||||
)) {
|
||||
codeqlArgs.push("--new-analysis-summary");
|
||||
}
|
||||
codeqlArgs.push(databasePath);
|
||||
if (querySuitePaths) {
|
||||
codeqlArgs.push(...querySuitePaths);
|
||||
@@ -93119,24 +93113,6 @@ async function combineSarifFilesUsingCLI(sarifFiles, gitHubVersion, features, lo
|
||||
);
|
||||
codeQL = initCodeQLResult.codeql;
|
||||
}
|
||||
if (!await codeQL.supportsFeature(
|
||||
"sarifMergeRunsFromEqualCategory" /* SarifMergeRunsFromEqualCategory */
|
||||
)) {
|
||||
await throwIfCombineSarifFilesDisabled(sarifObjects, gitHubVersion);
|
||||
logger.warning(
|
||||
"The CodeQL CLI does not support merging SARIF files. Merging files in the action."
|
||||
);
|
||||
if (await shouldShowCombineSarifFilesDeprecationWarning(
|
||||
sarifObjects,
|
||||
gitHubVersion
|
||||
)) {
|
||||
logger.warning(
|
||||
`Uploading multiple CodeQL runs with the same category is deprecated ${deprecationWarningMessage} for CodeQL CLI 2.16.6 and earlier. Please update your CodeQL CLI version or update your workflow to set a distinct category for each CodeQL run. ${deprecationMoreInformationMessage}`
|
||||
);
|
||||
core12.exportVariable("CODEQL_MERGE_SARIF_DEPRECATION_WARNING", "true");
|
||||
}
|
||||
return combineSarifFiles(sarifFiles, logger);
|
||||
}
|
||||
const baseTempDir = path15.resolve(tempDir, "combined-sarif");
|
||||
fs14.mkdirSync(baseTempDir, { recursive: true });
|
||||
const outputDirectory = fs14.mkdtempSync(path15.resolve(baseTempDir, "output-"));
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "codeql",
|
||||
"version": "4.30.10",
|
||||
"version": "4.31.0",
|
||||
"private": true,
|
||||
"description": "CodeQL action",
|
||||
"scripts": {
|
||||
|
||||
@@ -36,7 +36,6 @@ import {
|
||||
createTestConfig,
|
||||
} from "./testing-utils";
|
||||
import { ToolsDownloadStatusReport } from "./tools-download";
|
||||
import { ToolsFeature } from "./tools-features";
|
||||
import * as util from "./util";
|
||||
import { initializeEnvironment } from "./util";
|
||||
|
||||
@@ -870,84 +869,6 @@ test("does not pass a qlconfig to the CLI when it is undefined", async (t: Execu
|
||||
});
|
||||
});
|
||||
|
||||
const NEW_ANALYSIS_SUMMARY_TEST_CASES = [
|
||||
{
|
||||
codeqlVersion: makeVersionInfo("2.15.0", {
|
||||
[ToolsFeature.AnalysisSummaryV2IsDefault]: true,
|
||||
}),
|
||||
githubVersion: {
|
||||
type: util.GitHubVariant.DOTCOM,
|
||||
},
|
||||
flagPassed: false,
|
||||
negativeFlagPassed: false,
|
||||
},
|
||||
{
|
||||
codeqlVersion: makeVersionInfo("2.15.0"),
|
||||
githubVersion: {
|
||||
type: util.GitHubVariant.DOTCOM,
|
||||
},
|
||||
flagPassed: true,
|
||||
negativeFlagPassed: false,
|
||||
},
|
||||
{
|
||||
codeqlVersion: makeVersionInfo("2.15.0"),
|
||||
githubVersion: {
|
||||
type: util.GitHubVariant.GHES,
|
||||
version: "3.10.0",
|
||||
},
|
||||
flagPassed: true,
|
||||
negativeFlagPassed: false,
|
||||
},
|
||||
];
|
||||
|
||||
for (const {
|
||||
codeqlVersion,
|
||||
flagPassed,
|
||||
githubVersion,
|
||||
negativeFlagPassed,
|
||||
} of NEW_ANALYSIS_SUMMARY_TEST_CASES) {
|
||||
test(`database interpret-results passes ${
|
||||
flagPassed
|
||||
? "--new-analysis-summary"
|
||||
: negativeFlagPassed
|
||||
? "--no-new-analysis-summary"
|
||||
: "nothing"
|
||||
} for CodeQL version ${JSON.stringify(codeqlVersion)} and ${
|
||||
util.GitHubVariant[githubVersion.type]
|
||||
} ${githubVersion.version ? ` ${githubVersion.version}` : ""}`, async (t) => {
|
||||
const runnerConstructorStub = stubToolRunnerConstructor();
|
||||
const codeqlObject = await codeql.getCodeQLForTesting();
|
||||
sinon.stub(codeqlObject, "getVersion").resolves(codeqlVersion);
|
||||
// io throws because of the test CodeQL object.
|
||||
sinon.stub(io, "which").resolves("");
|
||||
await codeqlObject.databaseInterpretResults(
|
||||
"",
|
||||
[],
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"-v",
|
||||
undefined,
|
||||
"",
|
||||
Object.assign({}, stubConfig, { gitHubVersion: githubVersion }),
|
||||
createFeatures([]),
|
||||
);
|
||||
const actualArgs = runnerConstructorStub.firstCall.args[1] as string[];
|
||||
t.is(
|
||||
actualArgs.includes("--new-analysis-summary"),
|
||||
flagPassed,
|
||||
`--new-analysis-summary should${flagPassed ? "" : "n't"} be passed`,
|
||||
);
|
||||
t.is(
|
||||
actualArgs.includes("--no-new-analysis-summary"),
|
||||
negativeFlagPassed,
|
||||
`--no-new-analysis-summary should${
|
||||
negativeFlagPassed ? "" : "n't"
|
||||
} be passed`,
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
test("runTool summarizes several fatal errors", async (t) => {
|
||||
const heapError =
|
||||
"A fatal error occurred: Evaluator heap must be at least 384.00 MiB";
|
||||
|
||||
@@ -267,7 +267,7 @@ let cachedCodeQL: CodeQL | undefined = undefined;
|
||||
* The version flags below can be used to conditionally enable certain features
|
||||
* on versions newer than this.
|
||||
*/
|
||||
const CODEQL_MINIMUM_VERSION = "2.16.6";
|
||||
const CODEQL_MINIMUM_VERSION = "2.17.6";
|
||||
|
||||
/**
|
||||
* This version will shortly become the oldest version of CodeQL that the Action will run with.
|
||||
@@ -860,14 +860,6 @@ export async function getCodeQLForCmd(
|
||||
} else {
|
||||
codeqlArgs.push("--no-sarif-include-diagnostics");
|
||||
}
|
||||
if (
|
||||
!isSupportedToolsFeature(
|
||||
await this.getVersion(),
|
||||
ToolsFeature.AnalysisSummaryV2IsDefault,
|
||||
)
|
||||
) {
|
||||
codeqlArgs.push("--new-analysis-summary");
|
||||
}
|
||||
codeqlArgs.push(databasePath);
|
||||
if (querySuitePaths) {
|
||||
codeqlArgs.push(...querySuitePaths);
|
||||
|
||||
@@ -3,13 +3,11 @@ import * as semver from "semver";
|
||||
import type { VersionInfo } from "./codeql";
|
||||
|
||||
export enum ToolsFeature {
|
||||
AnalysisSummaryV2IsDefault = "analysisSummaryV2Default",
|
||||
BuiltinExtractorsSpecifyDefaultQueries = "builtinExtractorsSpecifyDefaultQueries",
|
||||
DatabaseInterpretResultsSupportsSarifRunProperty = "databaseInterpretResultsSupportsSarifRunProperty",
|
||||
ForceOverwrite = "forceOverwrite",
|
||||
IndirectTracingSupportsStaticBinaries = "indirectTracingSupportsStaticBinaries",
|
||||
PythonDefaultIsToNotExtractStdlib = "pythonDefaultIsToNotExtractStdlib",
|
||||
SarifMergeRunsFromEqualCategory = "sarifMergeRunsFromEqualCategory",
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -21,7 +21,6 @@ import * as gitUtils from "./git-utils";
|
||||
import { initCodeQL } from "./init";
|
||||
import { Logger } from "./logging";
|
||||
import { getRepositoryNwo, RepositoryNwo } from "./repository";
|
||||
import { ToolsFeature } from "./tools-features";
|
||||
import * as util from "./util";
|
||||
import {
|
||||
ConfigurationError,
|
||||
@@ -269,32 +268,6 @@ async function combineSarifFilesUsingCLI(
|
||||
codeQL = initCodeQLResult.codeql;
|
||||
}
|
||||
|
||||
if (
|
||||
!(await codeQL.supportsFeature(
|
||||
ToolsFeature.SarifMergeRunsFromEqualCategory,
|
||||
))
|
||||
) {
|
||||
await throwIfCombineSarifFilesDisabled(sarifObjects, gitHubVersion);
|
||||
|
||||
logger.warning(
|
||||
"The CodeQL CLI does not support merging SARIF files. Merging files in the action.",
|
||||
);
|
||||
|
||||
if (
|
||||
await shouldShowCombineSarifFilesDeprecationWarning(
|
||||
sarifObjects,
|
||||
gitHubVersion,
|
||||
)
|
||||
) {
|
||||
logger.warning(
|
||||
`Uploading multiple CodeQL runs with the same category is deprecated ${deprecationWarningMessage} for CodeQL CLI 2.16.6 and earlier. Please update your CodeQL CLI version or update your workflow to set a distinct category for each CodeQL run. ${deprecationMoreInformationMessage}`,
|
||||
);
|
||||
core.exportVariable("CODEQL_MERGE_SARIF_DEPRECATION_WARNING", "true");
|
||||
}
|
||||
|
||||
return combineSarifFiles(sarifFiles, logger);
|
||||
}
|
||||
|
||||
const baseTempDir = path.resolve(tempDir, "combined-sarif");
|
||||
fs.mkdirSync(baseTempDir, { recursive: true });
|
||||
const outputDirectory = fs.mkdtempSync(path.resolve(baseTempDir, "output-"));
|
||||
|
||||
Reference in New Issue
Block a user