-
-
Notifications
You must be signed in to change notification settings - Fork 488
Add CodeQL analysis workflow configuration #308
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,101 @@ | ||||||
| # For most projects, this workflow file will not need changing; you simply need | ||||||
| # to commit it to your repository. | ||||||
| # | ||||||
| # You may wish to alter this file to override the set of languages analyzed, | ||||||
| # or to provide custom queries or build logic. | ||||||
| # | ||||||
| # ******** NOTE ******** | ||||||
| # We have attempted to detect the languages in your repository. Please check | ||||||
| # the `language` matrix defined below to confirm you have the correct set of | ||||||
| # supported CodeQL languages. | ||||||
| # | ||||||
| name: "CodeQL Advanced" | ||||||
|
|
||||||
| on: | ||||||
| push: | ||||||
| branches: [ "master" ] | ||||||
| pull_request: | ||||||
| branches: [ "master" ] | ||||||
| schedule: | ||||||
| - cron: '44 22 * * 0' | ||||||
|
|
||||||
| jobs: | ||||||
| analyze: | ||||||
| name: Analyze (${{ matrix.language }}) | ||||||
| # Runner size impacts CodeQL analysis time. To learn more, please see: | ||||||
| # - https://gh.io/recommended-hardware-resources-for-running-codeql | ||||||
| # - https://gh.io/supported-runners-and-hardware-resources | ||||||
| # - https://gh.io/using-larger-runners (GitHub.com only) | ||||||
| # Consider using larger runners or machines with greater resources for possible analysis time improvements. | ||||||
| runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }} | ||||||
|
||||||
| runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }} | |
| runs-on: ubuntu-latest |
Copilot
AI
Feb 1, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The 'actions' language is configured for analysis, but this repository does not contain any composite actions (action.yml files). The 'actions' language in CodeQL is specifically for scanning GitHub Actions workflow definitions and composite action files. Since this repository only has workflow files that consume actions (not define them), the 'actions' language analysis is unnecessary and should be removed from the matrix.
| - language: actions | |
| build-mode: none |
Copilot
AI
Feb 1, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The 'javascript-typescript' language is configured, but this repository contains only JavaScript files (no TypeScript). While CodeQL's 'javascript-typescript' language can analyze pure JavaScript projects, it's worth verifying this is the intended configuration. The repository structure shows .js files in lib/, doctoc.js, and test files, but no .ts or .tsx files. Consider whether this is appropriate for your needs, as it may add unnecessary overhead for TypeScript-specific analysis rules.
Copilot
AI
Feb 1, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The manual build step (lines 87-96) will cause the workflow to fail with 'exit 1' if a manual build mode is ever configured. While this is intentional placeholder behavior to force users to replace it with actual build commands, it creates a maintenance risk. Consider either removing this step entirely (since both current languages use 'build-mode: none') or changing the exit code to a warning message without failing the workflow. The current implementation will break the workflow if someone adds a compiled language without updating this step.
| exit 1 | |
| echo 'WARNING: Manual build mode is configured but no build commands have been provided in this workflow step.' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The workflow name is set to "CodeQL Advanced" which may be confusing since this is a standard CodeQL workflow template, not necessarily an "advanced" configuration. Consider using a simpler name like "CodeQL Analysis" or "CodeQL" to better reflect the actual functionality, especially since the workflow uses default settings without custom queries or advanced configurations.