ci(codeql): analyze only actions + javascript-typescript - #24
Merged
Merged
Conversation
PR #23 removed the last Python file (scripts/generate-docs-frames.py), so the CodeQL language matrix still listing `python` fails the run with "CodeQL could not process any code written in Python" (no-source-code-seen-during-build). Add an explicit advanced-setup workflow so the matrix is pinned in the repo instead of derived from repository settings: `actions` and `javascript-typescript`, the two languages the site actually contains. The comment in the matrix records why `python` is absent and what to do before adding it back.
Contributor
Author
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
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.
What this is
Fixes the CodeQL failure on
mainafter #23 merged (f80d0f8). The docs site has no Python source, so theAnalyze (python)job fails withCodeQL could not process any code written in Python/no-source-code-seen-during-build. CI-only change: one new workflow file, no page or product code touched.Why it was failing
PR #23 deleted the last Python file in the tree (
scripts/generate-docs-frames.py, 541 lines), which made the tracked Python count zero:CodeQL for this repository is not configured by a file in the tree. It runs from GitHub's dynamic default-setup workflow (
dynamic/github-code-scanning/codeql), whose language matrix lives in repository settings and still listspython. With no Python files left, that job cannot build a database and fails at finalize:The same run shows the other two languages are fine, so only the empty language is the problem:
Analyze (actions)Analyze (javascript-typescript)Analyze (python)Note this is not a one-off: the identical failure shape hit
mainat 10:31 (Analyze (javascript-typescript)failed then, becausescripts/*.mjshad been removed in an earlier state and only the workflow YAML was left). The matrix tracks the tree, and the tree changed.The fix
Add
.github/workflows/codeql.yml— an explicit advanced-setup workflow whose matrix is pinned in the repository instead of derived from settings:actionsandjavascript-typescriptare the two languages the tree actually contains (.github/workflows/*.ymlandscripts/**/*.mjs).pythonis deliberately absent, with a comment in the matrix recording why and what to do before adding it back.build-mode: none, matching the generated configuration the repository was already running.permissionsare least-privilege (contents: read,security-events: write), and checkout usespersist-credentials: falselike the existingci.yml.ci.yml(push/pull_requestonmain) plus the weekly CodeQL schedule.Committing a CodeQL workflow is the documented way to take ownership of the language list: GitHub disables default setup when an advanced-setup workflow for CodeQL is detected, so the settings-side matrix that still lists
pythonstops driving the run.Verification
The workflow YAML parses, and the parsed matrix contains exactly
['actions', 'javascript-typescript'].Test plan
Docs siteCI job passes on this PRCodeQLruns on this PR with jobsAnalyze (actions)andAnalyze (javascript-typescript)only, both green, and noAnalyze (python)jobpushrun onmainis green