Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge releases/v3 into releases/v2 #2228

Merged
merged 52 commits into from
Apr 5, 2024
Merged
Changes from 6 commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
7cdd972
Update changelog and version after v3.24.9
github-actions[bot] Mar 22, 2024
ca4079b
Update checked-in dependencies
github-actions[bot] Mar 22, 2024
3d81734
Merge pull request #2209 from github/mergeback/v3.24.9-to-main-1b1aada4
aibaars Mar 22, 2024
a12b868
Create feature flag for merging SARIF files using the CLI
koesie10 Mar 15, 2024
ccc609b
Use github merge-results command when feature flag is enabled
koesie10 Mar 15, 2024
7e30c62
Use subdirectory for combined SARIF file
koesie10 Mar 18, 2024
2bbafcd
Upload debug artifacts for upload-sarif
koesie10 Mar 18, 2024
e20c273
Use supportsFeature check for merging SARIF files
koesie10 Mar 22, 2024
6ac5753
Use options object instead of boolean for mergeResults
koesie10 Mar 25, 2024
70aa50b
Use runTool for mergeResults
koesie10 Mar 25, 2024
3bd271c
Introduce areAllRunsProducedByCodeQL function
koesie10 Mar 25, 2024
a0a63a2
Do not try merging a single SARIF file
koesie10 Mar 25, 2024
3c4b8bc
Change log levels
koesie10 Mar 25, 2024
82b82e5
Only upload combined SARIF files when env var is set
koesie10 Mar 25, 2024
155888c
Bump the npm group with 3 updates
dependabot[bot] Mar 25, 2024
a99c623
Update checked-in dependencies
github-actions[bot] Mar 25, 2024
956f09c
Merge pull request #2211 from github/dependabot/npm_and_yarn/npm-2d63…
angelapwen Mar 25, 2024
58194bf
Do not require debug mode for debugging uploads
koesie10 Mar 26, 2024
f835435
Rename run to uploadArtifacts
koesie10 Mar 26, 2024
016720d
Refactor areAllRunsProducedByCodeQL to use Array.every
koesie10 Mar 26, 2024
84ba7fb
Merge pull request #2199 from github/koesie10/cli-sarif-merge
koesie10 Mar 27, 2024
048b508
Bump the npm group with 2 updates
dependabot[bot] Apr 1, 2024
d7c4cc3
Update checked-in dependencies
github-actions[bot] Apr 1, 2024
99c9897
Merge pull request #2217 from github/dependabot/npm_and_yarn/npm-eb3e…
angelapwen Apr 1, 2024
f4936c4
Update default bundle to codeql-bundle-v2.17.0
github-actions[bot] Apr 2, 2024
ec214df
Add changelog note
github-actions[bot] Apr 2, 2024
eeaea14
Update supported GitHub Enterprise Server versions
github-actions[bot] Apr 3, 2024
eda4878
Only pass `--new-analysis-summary` if it is not default behavior
henrymercer Apr 3, 2024
f06c933
Update soon to be deprecated CodeQL version
henrymercer Apr 3, 2024
6514cbb
improve logging coverage when uploaing sarif files
nickfyson Apr 3, 2024
f8dd543
Add changelog note
henrymercer Apr 3, 2024
dcf00b3
Account for varying major version number in error message
henrymercer Apr 3, 2024
3bd9c3e
Merge pull request #2220 from github/update-supported-enterprise-serv…
henrymercer Apr 3, 2024
2cc8bbd
Apply suggestions from code review
nickfyson Apr 3, 2024
978bdd6
fix test that runs flakily locally
nickfyson Apr 3, 2024
d325762
fix linting error
nickfyson Apr 3, 2024
2654062
Merge branch 'main' into nickfyson/upload-logging
nickfyson Apr 3, 2024
d3c32a8
fix test to respect updated logging behaviour
nickfyson Apr 3, 2024
c037115
clarify logging in response to pr review comments
nickfyson Apr 3, 2024
65e69c8
Merge branch 'main' into update-bundle/codeql-bundle-v2.17.0
cklin Apr 4, 2024
278465c
Merge pull request #2219 from github/update-bundle/codeql-bundle-v2.17.0
cklin Apr 4, 2024
5f535de
Merge pull request #2221 from github/nickfyson/upload-logging
nickfyson Apr 4, 2024
f421cda
Run integration test PR checks nightly (#2222)
angelapwen Apr 4, 2024
7df281f
Gracefully continue if `createStatusReportBase` throws (#2225)
angelapwen Apr 4, 2024
3f041c5
Update changelog for v3.24.10
github-actions[bot] Apr 5, 2024
4355270
Merge pull request #2226 from github/update-v3.24.10-7df281f2f
cklin Apr 5, 2024
a1559aa
Revert "Update version and changelog for v2.24.9"
github-actions[bot] Apr 5, 2024
794eacf
Revert "Update checked-in dependencies"
github-actions[bot] Apr 5, 2024
a023017
Merge remote-tracking branch 'origin/releases/v3' into backport-v2.24…
github-actions[bot] Apr 5, 2024
93075ce
Update version and changelog for v2.24.10
github-actions[bot] Apr 5, 2024
2a96432
Resolve conflicts in codeql.ts
cklin Apr 5, 2024
82478fb
Update checked-in dependencies
github-actions[bot] Apr 5, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -6,7 +6,9 @@ Note that the only difference between `v2` and `v3` of the CodeQL Action is the

## [UNRELEASED]

No user facing changes.
- Add a deprecation warning for customers using CodeQL version 2.12.5 and earlier. These versions of CodeQL were discontinued on 26 March 2024 alongside GitHub Enterprise Server 3.8, and will be unsupported by CodeQL Action versions 3.25.0 and later and versions 2.25.0 and later. [#2220](https://github.com/github/codeql-action/pull/2220)
- If you are using one of these versions, please update to CodeQL CLI version 2.12.6 or later. For instance, if you have specified a custom version of the CLI using the 'tools' input to the 'init' Action, you can remove this input to use the default version.
- Alternatively, if you want to continue using a version of the CodeQL CLI between 2.11.6 and 2.12.5, you can replace `github/codeql-action/*@v3` by `github/codeql-action/*@v3.24.10` and `github/codeql-action/*@v2` by `github/codeql-action/*@v2.24.10` in your code scanning workflow to ensure you continue using this version of the CodeQL Action.

## 3.24.9 - 22 Mar 2024

2 changes: 1 addition & 1 deletion lib/api-compatibility.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{ "maximumVersion": "3.13", "minimumVersion": "3.8" }
{ "maximumVersion": "3.13", "minimumVersion": "3.9" }
20 changes: 6 additions & 14 deletions lib/codeql.js

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

2 changes: 1 addition & 1 deletion lib/codeql.js.map

Large diffs are not rendered by default.

28 changes: 14 additions & 14 deletions lib/codeql.test.js

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

2 changes: 1 addition & 1 deletion lib/codeql.test.js.map

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions lib/tools-features.js

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

2 changes: 1 addition & 1 deletion lib/tools-features.js.map

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

2 changes: 1 addition & 1 deletion src/api-compatibility.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"maximumVersion": "3.13", "minimumVersion": "3.8"}
{"maximumVersion": "3.13", "minimumVersion": "3.9"}
28 changes: 14 additions & 14 deletions src/codeql.test.ts
Original file line number Diff line number Diff line change
@@ -29,6 +29,7 @@ import {
makeVersionInfo,
createTestConfig,
} from "./testing-utils";
import { ToolsFeature } from "./tools-features";
import * as util from "./util";
import { initializeEnvironment } from "./util";

@@ -772,33 +773,34 @@ test("does not pass a qlconfig to the CLI when it is undefined", async (t: Execu

const NEW_ANALYSIS_SUMMARY_TEST_CASES = [
{
codeqlVersion: "2.15.0",
codeqlVersion: makeVersionInfo("2.15.0", {
[ToolsFeature.AnalysisSummaryV2IsDefault]: true,
}),
githubVersion: {
type: util.GitHubVariant.DOTCOM,
},
flagPassed: true,
flagPassed: false,
negativeFlagPassed: false,
},
{
codeqlVersion: "2.15.0",
codeqlVersion: makeVersionInfo("2.15.0"),
githubVersion: {
type: util.GitHubVariant.GHES,
version: "3.9.0",
type: util.GitHubVariant.DOTCOM,
},
flagPassed: true,
negativeFlagPassed: false,
},
{
codeqlVersion: "2.15.0",
codeqlVersion: makeVersionInfo("2.15.0"),
githubVersion: {
type: util.GitHubVariant.GHES,
version: "3.8.6",
version: "3.9.0",
},
flagPassed: false,
negativeFlagPassed: true,
flagPassed: true,
negativeFlagPassed: false,
},
{
codeqlVersion: "2.14.6",
codeqlVersion: makeVersionInfo("2.14.6"),
githubVersion: {
type: util.GitHubVariant.DOTCOM,
},
@@ -819,14 +821,12 @@ for (const {
: negativeFlagPassed
? "--no-new-analysis-summary"
: "nothing"
} for CodeQL CLI v${codeqlVersion} and ${
} 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(makeVersionInfo(codeqlVersion));
sinon.stub(codeqlObject, "getVersion").resolves(codeqlVersion);
// safeWhich throws because of the test CodeQL object.
sinon.stub(safeWhich, "safeWhich").resolves("");
await codeqlObject.databaseInterpretResults(
25 changes: 11 additions & 14 deletions src/codeql.ts
Original file line number Diff line number Diff line change
@@ -280,17 +280,17 @@ const CODEQL_MINIMUM_VERSION = "2.11.6";
/**
* This version will shortly become the oldest version of CodeQL that the Action will run with.
*/
const CODEQL_NEXT_MINIMUM_VERSION = "2.11.6";
const CODEQL_NEXT_MINIMUM_VERSION = "2.12.6";

/**
* This is the version of GHES that was most recently deprecated.
*/
const GHES_VERSION_MOST_RECENTLY_DEPRECATED = "3.7";
const GHES_VERSION_MOST_RECENTLY_DEPRECATED = "3.8";

/**
* This is the deprecation date for the version of GHES that was most recently deprecated.
*/
const GHES_MOST_RECENT_DEPRECATION_DATE = "2023-11-08";
const GHES_MOST_RECENT_DEPRECATION_DATE = "2024-03-26";

/** The CLI verbosity level to use for extraction in debug mode. */
const EXTRACTION_DEBUG_MODE_VERBOSITY = "progress++";
@@ -890,20 +890,16 @@ export async function getCodeQLForCmd(
codeqlArgs.push("--no-sarif-include-diagnostics");
}
if (
// Analysis summary v2 links to the status page, so check the GHES version we're running on
// supports the status page.
(config.gitHubVersion.type !== util.GitHubVariant.GHES ||
semver.gte(config.gitHubVersion.version, "3.9.0")) &&
(await util.codeQlVersionAbove(
this,
CODEQL_VERSION_ANALYSIS_SUMMARY_V2,
))
)) &&
!isSupportedToolsFeature(
await this.getVersion(),
ToolsFeature.AnalysisSummaryV2IsDefault,
)
) {
codeqlArgs.push("--new-analysis-summary");
} else if (
await util.codeQlVersionAbove(this, CODEQL_VERSION_ANALYSIS_SUMMARY_V2)
) {
codeqlArgs.push("--no-new-analysis-summary");
}
codeqlArgs.push(databasePath);
if (querySuitePaths) {
@@ -1148,8 +1144,9 @@ export async function getCodeQLForCmd(
"version of the CLI using the 'tools' input to the 'init' Action, you can remove this " +
"input to use the default version.\n\n" +
"Alternatively, if you want to continue using CodeQL CLI version " +
`${result.version}, you can replace 'github/codeql-action/*@v3' by ` +
`'github/codeql-action/*@v${getActionVersion()}' in your code scanning workflow to ` +
`${result.version}, you can replace 'github/codeql-action/*@v${
getActionVersion().split(".")[0]
}' by 'github/codeql-action/*@v${getActionVersion()}' in your code scanning workflow to ` +
"continue using this version of the CodeQL Action.",
);
core.exportVariable(EnvVar.SUPPRESS_DEPRECATED_SOON_WARNING, "true");
1 change: 1 addition & 0 deletions src/tools-features.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { VersionInfo } from "./codeql";

export enum ToolsFeature {
AnalysisSummaryV2IsDefault = "analysisSummaryV2Default",
BuildModeOption = "buildModeOption",
IndirectTracingSupportsStaticBinaries = "indirectTracingSupportsStaticBinaries",
InformsAboutUnsupportedPathFilters = "informsAboutUnsupportedPathFilters",