/application-security:codeqlfrom application-security
Configures and runs CodeQL code scanning via GitHub Actions or CLI: workflows, databases, SARIF uploads, custom query packs, monorepo categories, build modes, and alert triage.
Ships in application-security. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Set up, run, and troubleshoot CodeQL analysis through GitHub Actions or the CodeQL CLI, producing a working workflow, local commands, SARIF upload path, and alert triage guidance.
.github/workflows/codeql.yml and may use .github/codeql/codeql-config.yml.GITHUB_TOKEN with security-events: write plus repository, ref, and commit metadata.| Language | Standard identifier | Alternatives | Build notes |
|---|---|---|---|
| C/C++ | c-cpp | c, cpp | compiled; choose none, autobuild, or manual. |
| C# | csharp | — | compiled; watch /p:EmitCompilerGeneratedFiles=true conflicts with .sqlproj or legacy projects. |
| Go | go | — | usually autobuilds through standard Go tooling. |
| Java/Kotlin | java-kotlin | java, kotlin | Kotlin no-build mode may need default setup disabled and re-enabled to switch to autobuild. |
| JavaScript/TypeScript | javascript-typescript | javascript, typescript | alternative identifiers still analyze both JS and TS. |
| Python | python | — | no build mode required. |
| Ruby | ruby | — | no build mode required. |
| Rust | rust | — | build mode can matter for extraction completeness. |
| Swift | swift | — | compiled; runner and build environment matter. |
| GitHub Actions | actions | — | analyzes workflow code. |
none build mode for most languages..github/workflows/codeql.yml for full control over triggers, build modes, query suites, path filters, custom packs, and monorepos. Disable default setup before switching to advanced.push, pull_request, schedule, and merge_group when merge queues are enabled. paths-ignore controls whether the workflow runs, not which files are analyzed.security-events: write, contents: read, and actions: read for private repositories using codeql-action.fail-fast: false and one row per language/build-mode pair.category such as /language:${{ matrix.language }} or /language:${{ matrix.language }}/component:frontend.name: CodeQL
on:
push:
branches: [main, protected]
pull_request:
branches: [main]
schedule:
- cron: '30 6 * * 1'
merge_group:
permissions:
security-events: write
contents: read
actions: read
jobs:
analyze:
name: Analyze (${{ matrix.language }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- language: javascript-typescript
build-mode: none
- language: python
build-mode: none
steps:
- uses: actions/checkout@v4
- uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
queries: security-extended
dependency-caching: true
- if: matrix.build-mode == 'manual'
run: |
make bootstrap
make release
- uses: github/codeql-action/analyze@v4
with:
category: "/language:${{ matrix.language }}"
| Need | Configuration |
|---|---|
| Broader security coverage | queries: security-extended. |
| Security plus quality checks | queries: security-and-quality. |
| Custom query packs | packs: my-org/[email protected] or codeql/javascript-queries:AlertSuppression.ql. |
| Monorepo component isolation | Distinct category values and .github/codeql/codeql-config.yml. |
| Analyze only selected paths | paths: and paths-ignore: in .github/codeql/codeql-config.yml. |
| Dependency reuse | dependency-caching: true on github/codeql-action/init@v4. |
| Version stability | Pin github/codeql-action/init@v4, github/codeql-action/autobuild@v4, and github/codeql-action/analyze@v4; pin full commit SHAs for maximum security. |
paths:
- apps/
- services/
paths-ignore:
- '**/test/**'
- node_modules/
queries:
- uses: security-extended
packs:
javascript-typescript:
- my-org/my-custom-queries
export PATH="$HOME/codeql:$PATH"
codeql resolve packs
codeql resolve languages
codeql database create codeql-db \
--language=javascript-typescript \
--source-root=src
codeql database create codeql-dbs \
--db-cluster \
--language=java,python \
--command=./build.sh \
--source-root=src
codeql database analyze codeql-db \
javascript-code-scanning.qls \
--format=sarif-latest \
--sarif-category=javascript \
--output=results.sarif
codeql github upload-results \
--repository=owner/repo \
--ref=refs/heads/main \
--commit=<commit-sha> \
--sarif=results.sarif
codeql execute cli-server
Common suites are <language>-code-scanning.qls, <language>-security-extended.qls, and <language>-security-and-quality.qls. Use --command for compiled-language database creation. Use --verbosity=progress++ and --logdir=codeql-logs for local debug logs.
| Topic | Guidance |
|---|---|
| Severity | Standard severity is Error, Warning, or Note; security severity is Critical, High, Medium, or Low from CVSS and takes display precedence. |
| PR alerts | Alerts appear as check annotations on changed lines; checks fail by default for error, critical, or high. |
| False positives | Dismiss only with a documented reason for audit history. |
| GitHub Copilot Autofix | Review generated fixes carefully before committing; no Copilot subscription is required for CodeQL alert suggestions in PRs. |
| Logs | Review lines of code in codebase, lines extracted, extraction errors/warnings, and debug logging from workflow reruns. |
| SARIF | Use --sarif-category to split results; SARIF uploads have a 10 MB file size limit. |
| Runners | Small codebases need about 8 GB RAM and 2 cores; medium 16 GB and 4–8 cores; large 64 GB and 8 cores. All need SSD storage with at least 14 GB free. |
| Problem | Resolution |
|---|---|
| Workflow not triggering | Verify on: event, branches, paths filters, and that the workflow exists on the target branch. |
Resource not accessible | Add security-events: write and contents: read; add actions: read for private repos using codeql-action. |
| Autobuild failure | Switch to build-mode: manual and add explicit build commands between init and analyze. |
| No source code seen | Verify --source-root, language identifier, path config, and build command. |
| Fewer lines scanned than expected | Switch from none to autobuild or manual; verify the build compiles all source. |
| Cache miss every run | Confirm dependency-caching: true on init. |
| Out of disk or memory | Use larger runners, reduce scope with paths, or use build-mode: none where safe. |
| SARIF upload fails | Check security-events: write, GITHUB_TOKEN, SARIF size, --sarif-category, repository, ref, and commit SHA. |
| Two CodeQL workflows | Disable default setup or remove the old advanced workflow. |
| Slow analysis | Enable dependency caching, use --threads=0, reduce query suite scope, or split monorepo categories. |
Read bundled references only when the main skill is insufficient for the current task.
references/workflow-configuration.md: triggers, schedules, paths-ignore, db-location, model packs, alert severity, merge protection, concurrency, config files.references/cli-commands.md: database create, database analyze, upload-results, resolve packs, cli-server, installation, CI integration.references/sarif-output.md: sarifLog, result, location, region, codeFlow, fingerprint, suppression, upload limits, third-party support, precision, security-severity.references/compiled-languages.md: C/C++, C#, Java, Go, Rust, Swift, autobuild, build-mode, hardware, dependency caching.references/troubleshooting.md: no source code, out of disk, out of memory, 403, C# compiler, analysis too long, fewer lines, Kotlin, extraction errors, debug logging, SARIF upload, SARIF limits.references/alert-management.md: severity, security severity, CVSS, GitHub Copilot Autofix, dismissals, triage, PR alerts, data flow, merge protection, REST API.Preserve these CodeQL reference search terms, commands, and troubleshooting labels when narrowing the workflow: codeql.yml, codeql database create, github upload-results, config-file, packs:, my-org/my-queries, my-queries, per-component, per-language, documentation-only, auto-generated, re-run, re-enable, disk/memory, branches, trigger, analyze, installation, CI integration, concurrency, config file, dependency caching, hardware, model packs, merge protection, alert severity, security severity, severity, triage, dismiss, PR alerts, data flow, REST API, Copilot Autofix, C# compiler, Kotlin, debug logging, extraction errors, errors/warnings**, fewer lines, no source code, out of disk, out of memory, analysis too long, SARIF upload, SARIF limits, and upload limits.
## CodeQL setup result
**Status:** configured | commands provided | blocked
**Mode:** default setup | advanced setup | CLI
**Languages:** <language identifiers>
### Files or commands
- `.github/workflows/codeql.yml`: <created/updated/not needed>
- `.github/codeql/codeql-config.yml`: <created/updated/not needed>
- CLI command: `<codeql ...>`
### Key settings
| Setting | Value | Reason |
| --- | --- | --- |
| `build-mode` | `<none/autobuild/manual>` | <why> |
| `queries` | `<suite or packs>` | <why> |
| `category` | `<category>` | <why> |
### Validation
- Workflow syntax: <checked/not checked>
- CodeQL init/analyze or CLI run: <pass/fail/not run>
- SARIF upload readiness: <pass/fail/not applicable>
build-mode and manual commands when needed.security-events: write.GITHUB_TOKEN.references/alert-management.md (opens in a new tab)references/cli-commands.md (opens in a new tab)references/compiled-languages.md (opens in a new tab)references/sarif-output.md (opens in a new tab)references/troubleshooting.md (opens in a new tab)references/workflow-configuration.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
7 skills in this plugin
/data-breach-blast-radiusPre-breach impact analysis: inventories sensitive data (PII, PHI, PCI-DSS, credentials), traces data flows, scores exposure vectors, and produces a regulatory blast radius report with fine ranges sourced verbatim from GDPR Art. 83, CCPA § 1798.155(a), and HIPAA 45 CFR § 160.404. Cost benchmarks from IBM Cost of a Data Breach Report (annually updated). All citations in references/SOURCES.md for verification. Use when asked: "assess breach impact", "what data could be exposed", "calculate blast radius", "data exposure analysis", "how bad would a breach be", "quantify data risk", "sensitive data inventory", "data flow security audit", "pre-breach assessment", "worst-case breach scenario", "breach readiness", "data risk report", "/data-breach-blast-radius". For any stack handling user data, health records, or financial information. Output labels law-sourced figures (exact) vs heuristic estimates (planning only). Does not replace legal counsel./gdpr-compliantApply GDPR-compliant engineering practices across code, APIs, data models, authentication, logging, retention, deletion jobs, cloud infrastructure, and pull requests. Use this skill when handling personal data, user accounts, cookies, analytics, emails, audit logs, encryption, pseudonymization, anonymization, data exports, breach response, CI/CD pipelines with real data, or questions asking whether a design is GDPR-compliant./secret-scanningConfigure and manage GitHub secret scanning, push protection, custom patterns, exclusions, alert triage, remediation, bypass workflows, and pre-commit secret scans through the Advanced Security plugin. Use this skill when enabling secret scanning, resolving blocked pushes, writing secret_scanning.yml, creating regex patterns, triaging alerts, or scanning code before committing./security-reviewScan codebases and files for exploitable security vulnerabilities by tracing data flows, dependencies, secrets, authentication, authorization, injection, cryptography, and business logic issues. Use when asked to scan code, review for security issues, audit a codebase, check vulnerabilities, find SQL injection, XSS, command injection, exposed API keys, hardcoded secrets, insecure dependencies, or run /security-review./threat-model-analystProduce full or incremental STRIDE-A threat models for repositories and systems, including architecture overviews, DFD diagrams, findings, STRIDE heatmaps, and executive assessment. Use when the user asks to threat model a repo, refresh an existing threat-model-* report, compare commits or reports, identify trust boundary risks, or map findings to CVSS 4.0, CWE, and OWASP./tm7-threat-modelCreates valid Microsoft Threat Modeling Tool (.tm7) files compatible with the Microsoft Threat Modeling Tool v7.3+. Use when asked to create, generate, or modify a .tm7 threat model file, or when performing STRIDE threat modeling that should output a .tm7 file that opens cleanly in the Microsoft Threat Modeling Tool.npx claudepluginhub gbb-acelerators/awesome-harness-primitives --plugin application-securityOther plugins' skills for the same job