fix(repo): move codeql to yml based config s.t. it runs properly on forks#32659
fix(repo): move codeql to yml based config s.t. it runs properly on forks#32659FrozenPandaz merged 2 commits intomasterfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
View your CI Pipeline Execution ↗ for commit 4a028f4
☁️ Nx Cloud last updated this comment at |
8c16e74 to
a28a263
Compare
a28a263 to
b13ef03
Compare
b13ef03 to
cac87c7
Compare
cac87c7 to
4209614
Compare
4209614 to
f9a53ea
Compare
.github/workflows/codeql-pr.yml
Outdated
| - language: java-kotlin | ||
| build-mode: autobuild |
There was a problem hiding this comment.
Logic inconsistency bug: java-kotlin analysis is enabled in PR workflow but commented out in master workflow. The master workflow comments out java-kotlin (lines 47-49) with a note that 'its currently failing', but the PR workflow enables it with 'autobuild' mode. This will cause the PR workflow to fail when it tries to analyze java-kotlin code, since the same build issues that caused it to be disabled in master still exist. Either enable java-kotlin in both workflows or disable it in both for consistency.
| - language: java-kotlin | |
| build-mode: autobuild | |
| # - language: java-kotlin | |
| # build-mode: autobuild | |
Spotted by Diamond
Is this helpful? React 👍 or 👎 to let us know.
9988f71 to
4a028f4
Compare
| - if: matrix.build-mode == 'manual' | ||
| shell: bash | ||
| run: | | ||
| echo 'If you are using a "manual" build mode for one or more of the' \ | ||
| 'languages you are analyzing, replace this with the commands to build' \ | ||
| 'your code, for example:' | ||
| echo ' make bootstrap' | ||
| echo ' make release' | ||
| exit 1 |
There was a problem hiding this comment.
The exit 1 command in this conditional block will cause the workflow to fail whenever a language with build-mode: 'manual' is added to the matrix. Since this appears to be template code that might be used in the future, consider either:
- Removing the
exit 1command to prevent future failures, or - Adding a comment explaining that this code needs to be updated before adding any manual build modes to the matrix
This way, the configuration will be ready for future language additions without requiring immediate changes to the build commands.
| - if: matrix.build-mode == 'manual' | |
| shell: bash | |
| run: | | |
| echo 'If you are using a "manual" build mode for one or more of the' \ | |
| 'languages you are analyzing, replace this with the commands to build' \ | |
| 'your code, for example:' | |
| echo ' make bootstrap' | |
| echo ' make release' | |
| exit 1 | |
| - if: matrix.build-mode == 'manual' | |
| shell: bash | |
| run: | | |
| echo 'If you are using a "manual" build mode for one or more of the' \ | |
| 'languages you are analyzing, replace this with the commands to build' \ | |
| 'your code, for example:' | |
| echo ' make bootstrap' | |
| echo ' make release' | |
| echo 'IMPORTANT: Update this section with your actual build commands before adding any' \ | |
| 'languages with build-mode: manual to the matrix, otherwise the workflow will fail.' |
Spotted by Diamond
Is this helpful? React 👍 or 👎 to let us know.
| - if: matrix.build-mode == 'manual' | ||
| shell: bash | ||
| run: | | ||
| echo 'If you are using a "manual" build mode for one or more of the' \ | ||
| 'languages you are analyzing, replace this with the commands to build' \ | ||
| 'your code, for example:' | ||
| echo ' make bootstrap' | ||
| echo ' make release' | ||
| exit 1 |
There was a problem hiding this comment.
The exit 1 command in this conditional block will cause the workflow to fail whenever a language with build-mode: 'manual' is processed. Currently this is not an issue since no languages in the matrix are configured with manual build mode, but this creates a potential problem if the matrix is updated in the future.
Consider either:
- Removing the
exit 1command to prevent future failures, or - Adding a comment explaining that this is intentional to force developers to implement proper build commands when manual mode is selected
This appears to be boilerplate code from the GitHub CodeQL template, but it should be adjusted to avoid unexpected failures when the configuration changes.
| - if: matrix.build-mode == 'manual' | |
| shell: bash | |
| run: | | |
| echo 'If you are using a "manual" build mode for one or more of the' \ | |
| 'languages you are analyzing, replace this with the commands to build' \ | |
| 'your code, for example:' | |
| echo ' make bootstrap' | |
| echo ' make release' | |
| exit 1 | |
| - if: matrix.build-mode == 'manual' | |
| shell: bash | |
| run: | | |
| # NOTE: If you are using manual build mode, replace the echo statements below | |
| # with the actual commands needed to build your code | |
| echo 'If you are using a "manual" build mode for one or more of the' \ | |
| 'languages you are analyzing, replace this with the commands to build' \ | |
| 'your code, for example:' | |
| echo ' make bootstrap' | |
| echo ' make release' |
Spotted by Diamond
Is this helpful? React 👍 or 👎 to let us know.
|
This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request. |
Current Behavior
We are using the default codeql setup, which refuses to run on PRs from forks
Expected Behavior
We use the yml based codeql setup, which should run correctly
Important
This is only the first half of this effort. After this is merged, PRs will need to be rebased and the repo will need a settings update from @FrozenPandaz