Add JavaScript support to code scanning workflow#2157
Conversation
|
This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation. |
There was a problem hiding this comment.
Pull request overview
Adds JavaScript to the existing CodeQL code-scanning workflow so the repository’s UI/TypeScript code is included in code scanning alongside the current Go/Actions scans.
Changes:
- Extend the CodeQL job matrix to include
javascript. - Update the Node.js setup step condition to run for both Go and JavaScript scans.
| - language: javascript | ||
| category: /language:javascript | ||
| build-mode: none | ||
| runner: '["ubuntu-22.04"]' |
There was a problem hiding this comment.
The matrix adds javascript with build-mode: none, but the workflow still runs the github/codeql-action/autobuild@v4 step unconditionally. This means the new JavaScript job will execute an unnecessary (and potentially flaky) autobuild phase even though the job declares no build. Consider either (a) gating the Autobuild step on matrix.build-mode == 'autobuild', or (b) switching the JavaScript entry to build-mode: autobuild and adding explicit npm install/build steps so the build behavior is intentional and consistent.
All supported langauges should be scanned with code scanning.