Add incremental analysis documentation for the CodeQL CLI#44272
Add incremental analysis documentation for the CodeQL CLI#44272coadaflorin wants to merge 1 commit into
Conversation
Add a new article covering diff-informed analysis and overlay analysis, two complementary features that speed up CodeQL analysis for pull requests when using the CodeQL CLI in CI systems. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
How to review these changes 👓Thank you for your contribution. To review these changes, choose one of the following options: A Hubber will need to deploy your changes internally to review. Table of review linksNote: Please update the URL for your staging server or codespace. The table shows the files in the
Key: fpt: Free, Pro, Team; ghec: GitHub Enterprise Cloud; ghes: GitHub Enterprise Server 🤖 This comment is automatically generated. |
There was a problem hiding this comment.
Pull request overview
Adds a new “Incremental analysis” how-to under the CodeQL CLI “Scan from the command line” section, documenting diff-informed analysis and overlay analysis to speed up pull request scanning workflows.
Changes:
- Added a new article describing diff-informed analysis (diff range extension pack + SARIF filtering) and overlay analysis (overlay-base + overlay mode).
- Updated the section index to include the new incremental analysis article.
Show a summary per file
| File | Description |
|---|---|
| content/code-security/how-tos/find-and-fix-code-vulnerabilities/scan-from-the-command-line/index.md | Adds the new incremental analysis page to the navigation children list. |
| content/code-security/how-tos/find-and-fix-code-vulnerabilities/scan-from-the-command-line/incremental-analysis.md | New documentation page covering incremental analysis techniques (diff-informed and overlay) with steps, flags, and guidance. |
Copilot's findings
- Files reviewed: 2/2 changed files
- Comments generated: 1
| 1. For lines starting with `@@`, parse the hunk header `@@ -X,Y +Z,W @@` to find `Z` (the starting line number in the new file). Set `currentLine = Z`. | ||
| 1. For lines starting with `+` (additions), record the start of a new range if one isn't in progress. Increment `currentLine`. | ||
| 1. For lines starting with `-` (deletions), skip the line. Deletions don't affect new-file line numbers. | ||
| 1. For context lines (starting with a space), close any in-progress range and increment `currentLine`. |
Summary
This PR adds a new article to the "Scan from the command line" section covering incremental analysis with the CodeQL CLI. The article documents two complementary features for speeding up CodeQL analysis on pull requests:
Changes
content/code-security/.../scan-from-the-command-line/incremental-analysis.md— comprehensive how-to guide covering both features with step-by-step instructions, CLI flags, requirements, and a decision matrix.index.md— added the new article to the children list.Source
Content adapted from the internal CI integrator guide at
github/semmle-code(documentation/markdown-internal/incremental-codeql-ci.md), rewritten to match the GitHub Docs style and conventions.Article structure