Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: github/codeql-action
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v3.25.9
Choose a base ref
...
head repository: github/codeql-action
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v3.25.10
Choose a head ref

Commits on Jun 11, 2024

  1. Update default bundle to codeql-bundle-v2.17.5

    github-actions[bot] committed Jun 11, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    crazy-max CrazyMax
    Copy the full SHA
    e8100b1 View commit details
  2. Add changelog note

    github-actions[bot] committed Jun 11, 2024
    Copy the full SHA
    28d4d51 View commit details
  3. Merge branch 'main' into update-bundle/codeql-bundle-v2.17.5

    henrymercer authored Jun 11, 2024
    Copy the full SHA
    8d778e7 View commit details
  4. Bump the feature flag version for direct tracing autobuild

    To avoid re-enabling the flag for old Action versions.
    henrymercer committed Jun 11, 2024
    Copy the full SHA
    599f279 View commit details
  5. Copy the full SHA
    6d62742 View commit details
  6. Add PR check for direct tracing with custom working directory

    henrymercer committed Jun 11, 2024
    Copy the full SHA
    b004bb4 View commit details
  7. Add rollback mechanism for C# buildless

    henrymercer committed Jun 11, 2024
    Copy the full SHA
    0c392c4 View commit details
  8. Disable database upload in test mode

    henrymercer committed Jun 11, 2024
    Copy the full SHA
    12243c7 View commit details
  9. Update upload-sarif ref/sha input test

    We are already testing the analyze Action in a separate check.
    henrymercer committed Jun 11, 2024
    Copy the full SHA
    485d096 View commit details
  10. Update checkout_path test

    Just call `analyze`, since `upload: never` skips most of the functionality we want to test anyway.
    henrymercer committed Jun 11, 2024
    Copy the full SHA
    ba4e487 View commit details
  11. Upload SARIF with ref/sha inputs: Generate SARIF with analyze Action

    henrymercer committed Jun 11, 2024
    Copy the full SHA
    94acfdc View commit details

Commits on Jun 12, 2024

  1. Merge branch 'main' into henrymercer/direct-tracing-fix

    henrymercer committed Jun 12, 2024
    Copy the full SHA
    f2ea211 View commit details
  2. Update changelog and version after v3.25.9

    github-actions[bot] committed Jun 12, 2024
    Copy the full SHA
    385808c View commit details
  3. Update checked-in dependencies

    github-actions[bot] committed Jun 12, 2024
    Copy the full SHA
    356bee4 View commit details
  4. Merge pull request #2335 from github/mergeback/v3.25.9-to-main-530d4fea

    Mergeback v3.25.9 refs/heads/releases/v3 into main
    henrymercer authored Jun 12, 2024
    Copy the full SHA
    1fc6e20 View commit details
  5. Merge branch 'main' into update-bundle/codeql-bundle-v2.17.5

    smowton authored Jun 12, 2024
    Copy the full SHA
    b3642aa View commit details
  6. Merge pull request #2327 from github/update-bundle/codeql-bundle-v2.17.5

    Update default bundle to 2.17.5
    smowton authored Jun 12, 2024
    Copy the full SHA
    c36b5fc View commit details

Commits on Jun 13, 2024

  1. Merge pull request #2328 from github/henrymercer/direct-tracing-fix

    Fix incompatibility between direct tracing in the `autobuild` Action and specifying a custom working directory
    henrymercer authored Jun 13, 2024
    Copy the full SHA
    789b5f8 View commit details
  2. Merge branch 'main' into henrymercer/csharp-buildless-rollback-mechanism

    henrymercer committed Jun 13, 2024
    Copy the full SHA
    feec81c View commit details
  3. Merge pull request #2329 from github/henrymercer/csharp-buildless-rol…

    …lback-mechanism
    
    Add rollback mechanism for C# buildless
    henrymercer authored Jun 13, 2024
    Copy the full SHA
    5bf6dad View commit details
  4. Update changelog for v3.25.10

    github-actions[bot] committed Jun 13, 2024
    Copy the full SHA
    9b72dbd View commit details
  5. Merge pull request #2337 from github/update-v3.25.10-5bf6dad35

    Merge main into releases/v3
    smowton authored Jun 13, 2024
    Copy the full SHA
    23acc5c View commit details
Showing with 280 additions and 153 deletions.
  1. +0 −1 .github/actions/query-filter-test/action.yml
  2. +0 −2 .github/workflows/__all-platform-bundle.yml
  3. +0 −1 .github/workflows/__analyze-ref-input.yml
  4. +0 −2 .github/workflows/__autobuild-action.yml
  5. +92 −0 .github/workflows/__autobuild-direct-tracing-with-working-dir.yml
  6. +0 −2 .github/workflows/__go-custom-queries.yml
  7. +0 −2 .github/workflows/__go-indirect-tracing-workaround.yml
  8. +0 −2 .github/workflows/__go-tracing-autobuilder.yml
  9. +0 −2 .github/workflows/__go-tracing-custom-build-steps.yml
  10. +0 −2 .github/workflows/__go-tracing-legacy-workflow.yml
  11. +0 −2 .github/workflows/__javascript-source-root.yml
  12. +0 −2 .github/workflows/__test-autobuild-working-dir.yml
  13. +0 −2 .github/workflows/__test-local-codeql.yml
  14. +0 −2 .github/workflows/__test-proxy.yml
  15. +1 −1 .github/workflows/__upload-ref-sha-input.yml
  16. +0 −8 .github/workflows/__with-checkout-path.yml
  17. +0 −2 .github/workflows/expected-queries-runs.yml
  18. +2 −3 .github/workflows/python312-windows.yml
  19. +0 −2 .github/workflows/test-codeql-bundle-all.yml
  20. +4 −0 CHANGELOG.md
  21. +2 −0 lib/codeql.js
  22. +1 −1 lib/codeql.js.map
  23. +5 −0 lib/config-utils.js
  24. +1 −1 lib/config-utils.js.map
  25. +36 −23 lib/config-utils.test.js
  26. +1 −1 lib/config-utils.test.js.map
  27. +4 −0 lib/database-upload.js
  28. +1 −1 lib/database-upload.js.map
  29. +4 −4 lib/defaults.json
  30. +7 −1 lib/feature-flags.js
  31. +1 −1 lib/feature-flags.js.map
  32. +1 −1 node_modules/.package-lock.json
  33. +2 −2 package-lock.json
  34. +1 −1 package.json
  35. +0 −2 pr-checks/checks/all-platform-bundle.yml
  36. +0 −1 pr-checks/checks/analyze-ref-input.yml
  37. +0 −2 pr-checks/checks/autobuild-action.yml
  38. +34 −0 pr-checks/checks/autobuild-direct-tracing-with-working-dir.yml
  39. +0 −2 pr-checks/checks/go-custom-queries.yml
  40. +0 −2 pr-checks/checks/go-indirect-tracing-workaround.yml
  41. +0 −2 pr-checks/checks/go-tracing-autobuilder.yml
  42. +0 −2 pr-checks/checks/go-tracing-custom-build-steps.yml
  43. +0 −2 pr-checks/checks/go-tracing-legacy-workflow.yml
  44. +0 −2 pr-checks/checks/javascript-source-root.yml
  45. +0 −2 pr-checks/checks/test-autobuild-working-dir.yml
  46. +0 −2 pr-checks/checks/test-local-codeql.yml
  47. +0 −2 pr-checks/checks/test-proxy.yml
  48. +1 −1 pr-checks/checks/upload-ref-sha-input.yml
  49. +0 −8 pr-checks/checks/with-checkout-path.yml
  50. +2 −0 src/codeql.ts
  51. +51 −39 src/config-utils.test.ts
  52. +10 −0 src/config-utils.ts
  53. +5 −0 src/database-upload.ts
  54. +4 −4 src/defaults.json
  55. +7 −1 src/feature-flags.ts
1 change: 0 additions & 1 deletion .github/actions/query-filter-test/action.yml
Original file line number Diff line number Diff line change
@@ -48,7 +48,6 @@ runs:
- uses: ./../action/analyze
with:
output: ${{ runner.temp }}/results
upload-database: false
upload: never
env:
CODEQL_ACTION_TEST_MODE: "true"
2 changes: 0 additions & 2 deletions .github/workflows/__all-platform-bundle.yml

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

1 change: 0 additions & 1 deletion .github/workflows/__analyze-ref-input.yml

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

2 changes: 0 additions & 2 deletions .github/workflows/__autobuild-action.yml

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

92 changes: 92 additions & 0 deletions .github/workflows/__autobuild-direct-tracing-with-working-dir.yml

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

2 changes: 0 additions & 2 deletions .github/workflows/__go-custom-queries.yml

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

2 changes: 0 additions & 2 deletions .github/workflows/__go-indirect-tracing-workaround.yml

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

2 changes: 0 additions & 2 deletions .github/workflows/__go-tracing-autobuilder.yml

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

2 changes: 0 additions & 2 deletions .github/workflows/__go-tracing-custom-build-steps.yml

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

2 changes: 0 additions & 2 deletions .github/workflows/__go-tracing-legacy-workflow.yml

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

2 changes: 0 additions & 2 deletions .github/workflows/__javascript-source-root.yml

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

2 changes: 0 additions & 2 deletions .github/workflows/__test-autobuild-working-dir.yml

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

2 changes: 0 additions & 2 deletions .github/workflows/__test-local-codeql.yml

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

2 changes: 0 additions & 2 deletions .github/workflows/__test-proxy.yml

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

2 changes: 1 addition & 1 deletion .github/workflows/__upload-ref-sha-input.yml

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

8 changes: 0 additions & 8 deletions .github/workflows/__with-checkout-path.yml

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

2 changes: 0 additions & 2 deletions .github/workflows/expected-queries-runs.yml
Original file line number Diff line number Diff line change
@@ -37,8 +37,6 @@ jobs:
- uses: ./../action/analyze
with:
output: ${{ runner.temp }}/results
upload-database: false
upload: never

- name: Check Sarif
uses: ./../action/.github/actions/check-sarif
5 changes: 2 additions & 3 deletions .github/workflows/python312-windows.yml
Original file line number Diff line number Diff line change
@@ -14,6 +14,8 @@ on:

jobs:
test-setup-python-scripts:
env:
CODEQL_ACTION_TEST_MODE: true
timeout-minutes: 45
runs-on: windows-latest

@@ -37,6 +39,3 @@ jobs:

- name: Analyze
uses: ./../action/analyze
with:
upload: false
upload-database: false
2 changes: 0 additions & 2 deletions .github/workflows/test-codeql-bundle-all.yml
Original file line number Diff line number Diff line change
@@ -53,7 +53,5 @@ jobs:
shell: bash
run: ./build.sh
- uses: ./../action/analyze
with:
upload-database: false
env:
CODEQL_ACTION_TEST_MODE: true
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -4,6 +4,10 @@ See the [releases page](https://github.com/github/codeql-action/releases) for th

Note that the only difference between `v2` and `v3` of the CodeQL Action is the node version they support, with `v3` running on node 20 while we continue to release `v2` to support running on node 16. For example `3.22.11` was the first `v3` release and is functionally identical to `2.22.11`. This approach ensures an easy way to track exactly which features are included in different versions, indicated by the minor and patch version numbers.

## 3.25.10 - 13 Jun 2024

- Update default CodeQL bundle version to 2.17.5. [#2327](https://github.com/github/codeql-action/pull/2327)

## 3.25.9 - 12 Jun 2024

- Avoid failing database creation if the database folder already exists and contains some unexpected files. Requires CodeQL 2.18.0 or higher. [#2330](https://github.com/github/codeql-action/pull/2330)
2 changes: 2 additions & 0 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.

5 changes: 5 additions & 0 deletions lib/config-utils.js
2 changes: 1 addition & 1 deletion lib/config-utils.js.map

Large diffs are not rendered by default.

59 changes: 36 additions & 23 deletions lib/config-utils.test.js
2 changes: 1 addition & 1 deletion lib/config-utils.test.js.map

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions lib/database-upload.js
2 changes: 1 addition & 1 deletion lib/database-upload.js.map
8 changes: 4 additions & 4 deletions lib/defaults.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"bundleVersion": "codeql-bundle-v2.17.4",
"cliVersion": "2.17.4",
"priorBundleVersion": "codeql-bundle-v2.17.3",
"priorCliVersion": "2.17.3"
"bundleVersion": "codeql-bundle-v2.17.5",
"cliVersion": "2.17.5",
"priorBundleVersion": "codeql-bundle-v2.17.4",
"priorCliVersion": "2.17.4"
}
8 changes: 7 additions & 1 deletion lib/feature-flags.js
2 changes: 1 addition & 1 deletion lib/feature-flags.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion node_modules/.package-lock.json
4 changes: 2 additions & 2 deletions package-lock.json
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "codeql",
"version": "3.25.9",
"version": "3.25.10",
"private": true,
"description": "CodeQL action",
"scripts": {
2 changes: 0 additions & 2 deletions pr-checks/checks/all-platform-bundle.yml
Original file line number Diff line number Diff line change
@@ -15,5 +15,3 @@ steps:
shell: bash
run: ./build.sh
- uses: ./../action/analyze
with:
upload-database: false
1 change: 0 additions & 1 deletion pr-checks/checks/analyze-ref-input.yml
Original file line number Diff line number Diff line change
@@ -12,6 +12,5 @@ steps:
run: ./build.sh
- uses: ./../action/analyze
with:
upload-database: false
ref: 'refs/heads/main'
sha: '5e235361806c361d4d3f8859e3c897658025a9a2'
2 changes: 0 additions & 2 deletions pr-checks/checks/autobuild-action.yml
Original file line number Diff line number Diff line change
@@ -16,8 +16,6 @@ steps:
CORECLR_PROFILER: ""
CORECLR_PROFILER_PATH_64: ""
- uses: ./../action/analyze
with:
upload-database: false
- name: Check database
shell: bash
run: |
34 changes: 34 additions & 0 deletions pr-checks/checks/autobuild-direct-tracing-with-working-dir.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: "Autobuild direct tracing (custom working directory)"
description: >
An end-to-end integration test of a Java repository built using 'build-mode: autobuild',
with direct tracing enabled and a custom working directory specified as the input to the
autobuild Action.
operatingSystems: ["ubuntu", "windows"]
versions: ["linked", "nightly-latest"]
env:
CODEQL_ACTION_AUTOBUILD_BUILD_MODE_DIRECT_TRACING: true
steps:
- name: Test setup
shell: bash
run: |
# Make sure that Gradle build succeeds in autobuild-dir ...
cp -a ../action/tests/java-repo autobuild-dir
# ... and fails if attempted in the current directory
echo > build.gradle
- uses: ./../action/init
with:
build-mode: autobuild
languages: java
tools: ${{ steps.prepare-test.outputs.tools-url }}
- name: Check that indirect tracing is disabled
shell: bash
run: |
if [[ ! -z "${CODEQL_RUNNER}" ]]; then
echo "Expected indirect tracing to be disabled, but the" \
"CODEQL_RUNNER environment variable is set."
exit 1
fi
- uses: ./../action/autobuild
with:
working-directory: autobuild-dir
- uses: ./../action/analyze
2 changes: 0 additions & 2 deletions pr-checks/checks/go-custom-queries.yml
Original file line number Diff line number Diff line change
@@ -15,5 +15,3 @@ steps:
shell: bash
run: ./build.sh
- uses: ./../action/analyze
with:
upload-database: false
2 changes: 0 additions & 2 deletions pr-checks/checks/go-indirect-tracing-workaround.yml
Original file line number Diff line number Diff line change
@@ -17,8 +17,6 @@ steps:
shell: bash
run: go build main.go
- uses: ./../action/analyze
with:
upload-database: false
- shell: bash
run: |
if [[ -z "${CODEQL_ACTION_GO_BINARY}" ]]; then
2 changes: 0 additions & 2 deletions pr-checks/checks/go-tracing-autobuilder.yml
Original file line number Diff line number Diff line change
@@ -16,8 +16,6 @@ steps:
tools: ${{ steps.prepare-test.outputs.tools-url }}
- uses: ./../action/autobuild
- uses: ./../action/analyze
with:
upload-database: false
- shell: bash
run: |
if [[ "${CODEQL_ACTION_DID_AUTOBUILD_GOLANG}" != true ]]; then
2 changes: 0 additions & 2 deletions pr-checks/checks/go-tracing-custom-build-steps.yml
Original file line number Diff line number Diff line change
@@ -16,8 +16,6 @@ steps:
shell: bash
run: go build main.go
- uses: ./../action/analyze
with:
upload-database: false
- shell: bash
run: |
# Once we start running Bash 4.2 in all environments, we can replace the
2 changes: 0 additions & 2 deletions pr-checks/checks/go-tracing-legacy-workflow.yml
Original file line number Diff line number Diff line change
@@ -15,8 +15,6 @@ steps:
languages: go
tools: ${{ steps.prepare-test.outputs.tools-url }}
- uses: ./../action/analyze
with:
upload-database: false
- shell: bash
run: |
cd "$RUNNER_TEMP/codeql_databases"
2 changes: 0 additions & 2 deletions pr-checks/checks/javascript-source-root.yml
Original file line number Diff line number Diff line change
@@ -15,9 +15,7 @@ steps:
tools: ${{ steps.prepare-test.outputs.tools-url }}
- uses: ./../action/analyze
with:
upload-database: false
skip-queries: true
upload: never
- name: Assert database exists
shell: bash
run: |
2 changes: 0 additions & 2 deletions pr-checks/checks/test-autobuild-working-dir.yml
Original file line number Diff line number Diff line change
@@ -18,8 +18,6 @@ steps:
with:
working-directory: autobuild-dir
- uses: ./../action/analyze
with:
upload-database: false
- name: Check database
shell: bash
run: |
2 changes: 0 additions & 2 deletions pr-checks/checks/test-local-codeql.yml
Original file line number Diff line number Diff line change
@@ -20,5 +20,3 @@ steps:
shell: bash
run: ./build.sh
- uses: ./../action/analyze
with:
upload-database: false
2 changes: 0 additions & 2 deletions pr-checks/checks/test-proxy.yml
Original file line number Diff line number Diff line change
@@ -18,5 +18,3 @@ steps:
languages: javascript
tools: ${{ steps.prepare-test.outputs.tools-url }}
- uses: ./../action/analyze
with:
upload-database: false
2 changes: 1 addition & 1 deletion pr-checks/checks/upload-ref-sha-input.yml
Original file line number Diff line number Diff line change
@@ -10,9 +10,9 @@ steps:
- name: Build code
shell: bash
run: ./build.sh
# Generate some SARIF we can upload with the upload-sarif step
- uses: ./../action/analyze
with:
upload-database: false
ref: 'refs/heads/main'
sha: '5e235361806c361d4d3f8859e3c897658025a9a2'
upload: never
8 changes: 0 additions & 8 deletions pr-checks/checks/with-checkout-path.yml
Original file line number Diff line number Diff line change
@@ -35,14 +35,6 @@ steps:
checkout_path: x/y/z/some-path/tests/multi-language-repo
ref: v1.1.0
sha: 474bbf07f9247ffe1856c6a0f94aeeb10e7afee6
upload: never
upload-database: false

- uses: ./../action/upload-sarif
with:
ref: v1.1.0
sha: 474bbf07f9247ffe1856c6a0f94aeeb10e7afee6
checkout_path: x/y/z/some-path/tests/multi-language-repo

- name: Verify SARIF after upload
shell: bash
2 changes: 2 additions & 0 deletions src/codeql.ts
Original file line number Diff line number Diff line change
@@ -688,6 +688,8 @@ export async function getCodeQLForCmd(
"database",
"trace-command",
"--use-build-mode",
"--working-dir",
process.cwd(),
...(await getTrapCachingExtractorConfigArgsForLang(config, language)),
...getExtractionVerbosityArguments(config.debugMode),
...getExtraOptionsFromEnv(["database", "trace-command"]),
90 changes: 51 additions & 39 deletions src/config-utils.test.ts
Original file line number Diff line number Diff line change
@@ -1086,44 +1086,56 @@ const mockRepositoryNwo = parseRepositoryNwo("owner/repo");
});
});

test("Build mode not overridden when disable Java buildless feature flag disabled", async (t) => {
const messages: LoggedMessage[] = [];
const buildMode = await configUtils.parseBuildModeInput(
"none",
[Language.java],
createFeatures([]),
getRecordingLogger(messages),
);
t.is(buildMode, BuildMode.None);
t.deepEqual(messages, []);
});
for (const { displayName, language, feature } of [
{
displayName: "Java",
language: Language.java,
feature: Feature.DisableJavaBuildlessEnabled,
},
{
displayName: "C#",
language: Language.csharp,
feature: Feature.DisableCsharpBuildless,
},
]) {
test(`Build mode not overridden when disable ${displayName} buildless feature flag disabled`, async (t) => {
const messages: LoggedMessage[] = [];
const buildMode = await configUtils.parseBuildModeInput(
"none",
[language],
createFeatures([]),
getRecordingLogger(messages),
);
t.is(buildMode, BuildMode.None);
t.deepEqual(messages, []);
});

test("Build mode not overridden for other languages", async (t) => {
const messages: LoggedMessage[] = [];
const buildMode = await configUtils.parseBuildModeInput(
"none",
[Language.python],
createFeatures([Feature.DisableJavaBuildlessEnabled]),
getRecordingLogger(messages),
);
t.is(buildMode, BuildMode.None);
t.deepEqual(messages, []);
});
test(`Build mode not overridden for other languages when disable ${displayName} buildless feature flag enabled`, async (t) => {
const messages: LoggedMessage[] = [];
const buildMode = await configUtils.parseBuildModeInput(
"none",
[Language.python],
createFeatures([feature]),
getRecordingLogger(messages),
);
t.is(buildMode, BuildMode.None);
t.deepEqual(messages, []);
});

test("Build mode overridden when analyzing Java and disable Java buildless feature flag enabled", async (t) => {
const messages: LoggedMessage[] = [];
const buildMode = await configUtils.parseBuildModeInput(
"none",
[Language.java],
createFeatures([Feature.DisableJavaBuildlessEnabled]),
getRecordingLogger(messages),
);
t.is(buildMode, BuildMode.Autobuild);
t.deepEqual(messages, [
{
message:
"Scanning Java code without a build is temporarily unavailable. Falling back to 'autobuild' build mode.",
type: "warning",
},
]);
});
test(`Build mode overridden when analyzing ${displayName} and disable ${displayName} buildless feature flag enabled`, async (t) => {
const messages: LoggedMessage[] = [];
const buildMode = await configUtils.parseBuildModeInput(
"none",
[language],
createFeatures([feature]),
getRecordingLogger(messages),
);
t.is(buildMode, BuildMode.Autobuild);
t.deepEqual(messages, [
{
message: `Scanning ${displayName} code without a build is temporarily unavailable. Falling back to 'autobuild' build mode.`,
type: "warning",
},
]);
});
}
10 changes: 10 additions & 0 deletions src/config-utils.ts
Original file line number Diff line number Diff line change
@@ -1108,6 +1108,16 @@ export async function parseBuildModeInput(
);
}

if (
languages.includes(Language.csharp) &&
(await features.getValue(Feature.DisableCsharpBuildless))
) {
logger.warning(
"Scanning C# code without a build is temporarily unavailable. Falling back to 'autobuild' build mode.",
);
return BuildMode.Autobuild;
}

if (
languages.includes(Language.java) &&
(await features.getValue(Feature.DisableJavaBuildlessEnabled))
5 changes: 5 additions & 0 deletions src/database-upload.ts
Original file line number Diff line number Diff line change
@@ -20,6 +20,11 @@ export async function uploadDatabases(
return;
}

if (util.isInTestMode()) {
logger.debug("In test mode. Skipping database upload.");
return;
}

// Do nothing when not running against github.com
if (
config.gitHubVersion.type !== util.GitHubVariant.DOTCOM &&
8 changes: 4 additions & 4 deletions src/defaults.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"bundleVersion": "codeql-bundle-v2.17.4",
"cliVersion": "2.17.4",
"priorBundleVersion": "codeql-bundle-v2.17.3",
"priorCliVersion": "2.17.3"
"bundleVersion": "codeql-bundle-v2.17.5",
"cliVersion": "2.17.5",
"priorBundleVersion": "codeql-bundle-v2.17.4",
"priorCliVersion": "2.17.4"
}
8 changes: 7 additions & 1 deletion src/feature-flags.ts
Original file line number Diff line number Diff line change
@@ -45,10 +45,11 @@ export interface FeatureEnablement {
* Legacy features should end with `_enabled`.
*/
export enum Feature {
AutobuildDirectTracing = "autobuild_direct_tracing",
AutobuildDirectTracing = "autobuild_direct_tracing_v2",
CleanupTrapCaches = "cleanup_trap_caches",
CppDependencyInstallation = "cpp_dependency_installation_enabled",
CppTrapCachingEnabled = "cpp_trap_caching_enabled",
DisableCsharpBuildless = "disable_csharp_buildless",
DisableJavaBuildlessEnabled = "disable_java_buildless_enabled",
DisableKotlinAnalysisEnabled = "disable_kotlin_analysis_enabled",
ExportDiagnosticsEnabled = "export_diagnostics_enabled",
@@ -109,6 +110,11 @@ export const featureConfig: Record<
legacyApi: true,
minimumVersion: "2.16.1",
},
[Feature.DisableCsharpBuildless]: {
defaultValue: false,
envVar: "CODEQL_ACTION_DISABLE_CSHARP_BUILDLESS",
minimumVersion: undefined,
},
[Feature.DisableJavaBuildlessEnabled]: {
defaultValue: false,
envVar: "CODEQL_ACTION_DISABLE_JAVA_BUILDLESS",