codeql
Skill4 starsChanged 6 months agoMITView on GitHub
Configure and execute CodeQL code scanning analysis via GitHub Actions workflows and the CodeQL CLI.
- Reads credentials
12 other projects use a version of this, 3 of them edited.
Adopted by
Most recently taken up by
- Lu1sDV/skillsmdtheir own version, first seen Nov 4, 2026
- github/awesome-copilotedited, first seen Oct 25, 2026
- davidanthonyn/claude-skillstheir own version, first seen Oct 20, 2026
- allanninal/claude-code-skillstheir own version, first seen Oct 17, 2026
- waybarrios/opencode-power-packtheir own version, first seen Oct 13, 2026
- Samueladewole/claude-skillstheir own version, first seen Oct 13, 2026
Other versions12 projects use a version of this.
Word for word · 0
None found.
Edited · 3
- github/awesome-copilot★ 41k17% same
- Adhamxon/claude-code-skills★ 217% same
- ReaperOAK/ForgeOS★ 017% same
Wrote their own version · 9
- elastic/kibana★ 21ksame name
- waybarrios/opencode-power-pack★ 547same name
- ulises-jeremias/agent-toolkit★ 19same name
- Lu1sDV/skillsmd★ 2same name
- allanninal/claude-code-skills★ 1same name
- romaintoso78/claude-skills★ 1same name
- davidanthonyn/claude-skills★ 0same name
- Samueladewole/claude-skills★ 0same name
- TheWatcher01/skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository124 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .github/AGENTS.mdAGENTS.md
- .github/workflows/AGENTS.mdAGENTS.md
- .vscode/AGENTS.mdAGENTS.md
- .github/copilot-instructions.mdCopilot instructions
- agent-log-analysisSkill
- agent-mdSkill
- agent-md-writerSkill
- agent-skill-md-writerSkill
- agentskillsSkill
- agents-md-writerSkill
- ai-prompt-writerSkill
- ansibleSkill
- apache-airflow-apiSkill
- apache-airflow-dagsSkill
- astro-cliSkill
- astronomer-docsSkill
- awesome-copilotSkill
- brainstorm-agent-runsSkill
- brainstorm-github-prSkill
- brainstormSkill
- catSkill
- chrome-devtoolsSkill
- claude-docsSkill
- code-reviewSkill
- code-tourSkill
- coding-standard-writerSkill
- context-aware-opsSkill
- copilot-cliSkill
- copilot-docsSkill
- critical-thinkingSkill
- datadog-agentSkill
- datadog-apiSkill
- datadog-mcpSkill
- datadog-monitorsSkill
- datadog-pulumiSkill
- devcontainerSkill
- dictationSkill
- direnvSkill
- dockerfileSkill
- dockerSkill
- docs-reviewSkill
- docs-writerSkill
- dot-claudeSkill
- dotfilesSkill
- dot-githubSkill
- editorconfigSkill
- fact-writerSkill
- gdpr-compliantSkill
- gh-agent-taskSkill
- gh-apiSkill
- gh-aw-compileSkill
- gh-aw-firewall-debugSkill
- gh-aw-firewallSkill
- gh-aw-newSkill
- gh-awSkill
- gh-aw-troubleshootingSkill
- gh-codespaceSkill
- gh-issueSkill
- gh-modelsSkill
- The first 60 shown.
The file
Show its rules and text
We split this skill into the rules it gives an agent
13 rules. 0 are common, 4 are distinctive, and 9 are very specific to this project.
0
Common
Most of the 12 edited versions we read keep these.
4
Distinctive
This author's own choices. Worth a look.
9
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 15
When configuring advanced CodeQL security scanning via GitHub Actions (.github/workflows/codeql.yml).
- Distinctive: line 17
When troubleshooting CodeQL autobuild failures for compiled languages like C++ or Java.
- Distinctive: line 21
When running standard linters (like ESLint or Ruff) that do not use CodeQL's semantic analysis.
- Distinctive: line 23
If the repository has explicitly disabled CodeQL in favor of a different enterprise SAST tool.
- Very specific: line 35
Set Permissions: Ensure security-events: write and contents: read permissions.
- Very specific: line 37
Initialize CodeQL: Use github/codeql-action/init@v4 specifying build-mode (none, autobuild, manual).
- Very specific: line 39
Analyze: Use github/codeql-action/analyze@v4 to perform analysis and upload SARIF results.
- Very specific: line 87
Out of disk/memory: Use larger runners, reduce scope via paths config, or use build-mode: none.
- Very specific: line 88
Resource not accessible: Verify security-events: write permission is granted.
- Very specific: line 89
SARIF upload fails: Check if SARIF file exceeds 10 MB limit.
- Very specific: line 109
Use security-extended or security-and-quality for comprehensive vulnerability coverage.
- Distinctive: line 116
Avoid using the standalone CodeQL CLI download.
- Very specific: line 117
Avoid using autobuild for complex compiled language setups where a custom build is required.
“Common” is measured: kept by at least 6 in 10 of the 12 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Skill: codeql
<!-- markdownlint-disable MD013 MD023 MD031 MD032 -->This skill provides procedural guidance for configuring and running CodeQL code scanning — both through GitHub Actions workflows and the standalone CodeQL CLI.
When to Use
- When configuring advanced CodeQL security scanning via GitHub Actions (
.github/workflows/codeql.yml). - To manually build CodeQL databases and run queries using the standalone CodeQL CLI.
- When troubleshooting CodeQL autobuild failures for compiled languages like C++ or Java.
When Not to Use
- When running standard linters (like ESLint or Ruff) that do not use CodeQL's semantic analysis.
- For managing third-party dependency vulnerabilities (use Dependabot or the
sbomskill). - If the repository has explicitly disabled CodeQL in favor of a different enterprise SAST tool.
Common Pitfalls
- Autobuilding Complex Projects: Relying on
build-mode: autobuildfor compiled languages with complex, non-standard build scripts, resulting in empty databases. - Missing Write Permissions: Forgetting to add
security-events: writeto the GitHub Actions job, causing the SARIF upload step to fail with HTTP 403. - Disk Space Exhaustion: Running CodeQL on massive monorepos without filtering paths or using caching, exhausting the GitHub Actions runner's disk space.
Core Process
- Choose Setup Type: Select between Default setup or Advanced setup (
.github/workflows/codeql.yml). - Configure Triggers: Define
push,pull_request,schedule, ormerge_groupworkflow triggers. - Set Permissions: Ensure
security-events: writeandcontents: readpermissions. - Configure Language Matrix: Specify languages (e.g.,
c-cpp,javascript-typescript,python). - Initialize CodeQL: Use
github/codeql-action/init@v4specifyingbuild-mode(none,autobuild,manual). - Build (if needed): Provide explicit manual build steps for compiled languages lacking autobuild support.
- Analyze: Use
github/codeql-action/analyze@v4to perform analysis and upload SARIF results.
Quick Start (Advanced Setup)
name: "CodeQL Advanced"
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
analyze:
name: Analyze (${{ matrix.language }})
runs-on: ubuntu-latest
permissions:
security-events: write
contents: read
strategy:
fail-fast: false
matrix:
include:
- language: javascript-typescript
build-mode: none
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
queries: security-extended
dependency-caching: true
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4Commands / Usage Patterns (CodeQL CLI)
- Create Database:
codeql database create codeql-db --language=javascript-typescript --source-root=src - Create DB with Build Command:
codeql database create codeql-db --language=c-cpp --command="make build" - Analyze Database:
codeql database analyze codeql-db javascript-code-scanning.qls --format=sarif-latest --output=results.sarif - Upload Results:
codeql github upload-results --repository=owner/repo --ref=refs/heads/main --commit=<commit-sha> --sarif=results.sarif
Diagnostics and Troubleshooting
- Autobuild failure: Switch
build-modetomanualand add explicit build commands. - Out of disk/memory: Use larger runners, reduce scope via
pathsconfig, or usebuild-mode: none. - Resource not accessible: Verify
security-events: writepermission is granted. - SARIF upload fails: Check if SARIF file exceeds 10 MB limit; ensure
GITHUB_TOKENis valid.
| Problem | Solution |
| Workflow not triggering | Verify on: triggers match event; check paths/branches filters; ensure workflow exists on target branch |
Resource not accessible error | Add security-events: write and contents: read permissions |
| Autobuild failure | Switch to build-mode: manual and add explicit build commands |
| No source code seen | Verify --source-root, build command, and language identifier |
| C# compiler failure | Check for /p:EmitCompilerGeneratedFiles=true conflicts with .sqlproj or legacy projects |
| Fewer lines scanned than expected | Switch from none to autobuild/manual; verify build compiles all source |
| Kotlin in no-build mode | Disable and re-enable default setup to switch to autobuild |
| Cache miss every run | Verify dependency-caching: true on init action |
| Out of disk/memory | Use larger runners; reduce analysis scope via paths config; use build-mode: none |
| SARIF upload fails | Ensure token has security-events: write; check 10 MB file size limit |
| SARIF results exceed limits | Split across multiple uploads with different --sarif-category; reduce query scope |
| Two CodeQL workflows | Disable default setup if using advanced setup, or remove old workflow file |
| Slow analysis | Enable dependency caching; use --threads=0; reduce query suite scope |
Best Practices
- Use
security-extendedorsecurity-and-qualityfor comprehensive vulnerability coverage. - Set
dependency-caching: trueon theinitaction to optimize run times. - For monorepos, use the
categoryparameter in theanalyzestep to separate component results. - Pin GitHub actions to specific major versions (e.g.,
@v4) or commit SHAs for better security.
What to Avoid
- Avoid using the standalone CodeQL CLI download; always use the CodeQL bundle which includes precompiled queries.
- Avoid using
autobuildfor complex compiled language setups where a custom build is required.
References
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

