Add CodeQL analysis workflow configuration#3654
Merged
Conversation
The default configuration is reporting a syntax error on the file, but the file is 'invisible' because we're running in default CodeQL configuration. So I'm switching to Advanced mode to get an concrete file to operate on.
Contributor
There was a problem hiding this comment.
Pull request overview
Adds an explicit CodeQL Advanced workflow so the repository’s code scanning uses a concrete, configurable CodeQL setup (instead of the default configuration where the problematic file was not directly addressable).
Changes:
- Introduces a new
.github/workflows/codeql.ymlworkflow using CodeQL Advanced. - Configures a language matrix (actions, javascript-typescript, ruby) and scheduled runs.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/codeql.yml | Adds CodeQL Advanced workflow configuration for multi-language scanning. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comments suppressed due to low confidence (2)
.github/workflows/codeql.yml:62
steps:is followed by list items that are not indented under it (lines 60-62). This is invalid YAML/workflow syntax; the- name:entries need to be indented beneathsteps:so GitHub Actions recognizes them as the job's step list.
steps:
- name: Checkout repository
uses: actions/checkout@v4
.github/workflows/codeql.yml:73
- Other workflows in this repo pin GitHub Actions to specific release versions (e.g.,
actions/checkout@v6.0.2,actions/stale@v10.2.0) rather than major tags. To stay consistent (and reduce supply-chain risk), consider pinningactions/checkoutandgithub/codeql-action/*to specific versions here too instead of@v4.
- name: Checkout repository
uses: actions/checkout@v4
# Add any setup steps before running the `github/codeql-action/init` action.
# This includes steps like installing compilers or runtimes (`actions/setup-node`
# or others). This is typically only required for manual builds.
# - name: Setup runtime (example)
# uses: actions/setup-example@v1
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
- Files reviewed: 1/1 changed files
- Comments generated: 2
- trim comments and run yaml validator on codeql.yaml - change stale reference to `master` branch in tests to `main`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The default configuration is reporting a syntax error on the file, but the file is 'invisible' because we're running in default CodeQL configuration. So I'm switching to Advanced mode to get an concrete file to operate on.
Please note: we will close your PR without comment if you do not check the boxes above and provide ALL requested information.