Ensure accessibility in UI components including semantic HTML, ARIA attributes, keyboard navigation, and WCAG 2.2 AA compliance.
日本語の概要は準備中です。原文の説明を表示しています。
Run CodeQL and Semgrep static analysis with SARIF output for vulnerability detection, code quality assessment, and security compliance scanning across multiple languages.
インストールする前に、エージェントに与えられる指示の中身を確認できます。
AUTHORIZED USE ONLY: These skills are for DEFENSIVE security analysis and authorized research:
NEVER use for:
Before running any analysis, assess the target:
# Identify languages in the project
find . -type f -name "*.js" -o -name "*.ts" -o -name "*.py" -o -name "*.java" -o -name "*.go" -o -name "*.c" -o -name "*.cpp" -o -name "*.cs" -o -name "*.rb" | head -20
# Check for existing CodeQL database
ls -la .codeql/ 2>/dev/null || echo "No CodeQL database found"
# Check for existing Semgrep config
ls -la .semgrep.yml .semgrep/ 2>/dev/null || echo "No Semgrep config found"
# Check for SARIF output directory
ls -la sarif/ results/ 2>/dev/null || echo "No SARIF output directory"
# Create CodeQL database for JavaScript/TypeScript
codeql database create codeql-db --language=javascript --source-root=.
# Create CodeQL database for Python
codeql database create codeql-db --language=python --source-root=.
# Multi-language database
codeql database create codeql-db --language=javascript,python --source-root=.
# Run standard security queries
codeql database analyze codeql-db \
--format=sarifv2.1.0 \
--output=results.sarif \
codeql/javascript-queries:Security
# Run specific query suite
codeql database analyze codeql-db \
--format=sarifv2.1.0 \
--output=results.sarif \
codeql/javascript-queries:codeql-suites/javascript-security-and-quality.qls
# Run custom query
codeql database analyze codeql-db \
--format=sarifv2.1.0 \
--output=results.sarif \
./custom-queries/
| Language | Security Pack | Quality Pack |
|---|---|---|
| JavaScript | codeql/javascript-queries:Security | codeql/javascript-queries:Maintainability |
| Python | codeql/python-queries:Security | codeql/python-queries:Maintainability |
| Java | codeql/java-queries:Security | codeql/java-queries:Maintainability |
| Go | codeql/go-queries:Security | codeql/go-queries:Maintainability |
| C/C++ | codeql/cpp-queries:Security | codeql/cpp-queries:Maintainability |
# Run with default rules (auto-detect language)
semgrep scan --config=auto --sarif --output=semgrep-results.sarif
# Run with specific rule sets
semgrep scan --config=p/security-audit --sarif --output=semgrep-results.sarif
# Run with OWASP Top 10 rules
semgrep scan --config=p/owasp-top-ten --sarif --output=semgrep-results.sarif
# Run with multiple rule sets
semgrep scan \
--config=p/security-audit \
--config=p/owasp-top-ten \
--config=p/secrets \
--sarif --output=semgrep-results.sarif
# Run with custom rules
semgrep scan --config=./semgrep-rules/ --sarif --output=semgrep-results.sarif
| Rule Set | Purpose |
|---|---|
p/security-audit | Comprehensive security checks |
p/owasp-top-ten | OWASP Top 10 vulnerability checks |
p/secrets | Hardcoded secrets detection |
p/ci | CI-optimized rule set |
p/default | General-purpose rules |
p/r2c-security-audit | Trail of Bits security rules |
p/javascript | JavaScript-specific rules |
p/typescript | TypeScript-specific rules |
p/python | Python-specific rules |
p/golang | Go-specific rules |
{
"$schema": "https://raw.githubusercontent.com/oasis-tcs/sarif-spec/main/sarif-2.1/schema/sarif-schema-2.1.0.json",
"version": "2.1.0",
"runs": [{
"tool": {
"driver": {
"name": "CodeQL",
"rules": [...]
}
},
"results": [{
"ruleId": "js/sql-injection",
"level": "error",
"message": {
"text": "This query depends on a user-provided value."
},
"locations": [{
"physicalLocation": {
"artifactLocation": { "uri": "src/api/users.js" },
"region": { "startLine": 42, "startColumn": 5 }
}
}]
}]
}]
}
# Count findings by severity
jq '[.runs[].results[] | .level] | group_by(.) | map({level: .[0], count: length})' results.sarif
# List critical/error findings
jq '.runs[].results[] | select(.level == "error") | {rule: .ruleId, file: .locations[0].physicalLocation.artifactLocation.uri, line: .locations[0].physicalLocation.region.startLine, message: .message.text}' results.sarif
# Export findings to CSV
jq -r '.runs[].results[] | [.ruleId, .level, .locations[0].physicalLocation.artifactLocation.uri, .locations[0].physicalLocation.region.startLine, .message.text] | @csv' results.sarif > findings.csv
| SARIF Level | Severity | Action Required |
|---|---|---|
error | CRITICAL/HIGH | Immediate fix before merge |
warning | MEDIUM | Fix within sprint |
note | LOW | Track and fix when convenient |
none | INFORMATIONAL | Review and acknowledge |
For each finding, evaluate:
## Static Analysis Report
**Date**: YYYY-MM-DD
**Tools**: CodeQL vX.X, Semgrep vX.X
**Scope**: [project/directory]
### Summary
| Severity | Count | Fixed | False Positive | Remaining |
| -------- | ----- | ----- | -------------- | --------- |
| CRITICAL | X | X | X | X |
| HIGH | X | X | X | X |
| MEDIUM | X | X | X | X |
| LOW | X | X | X | X |
### Critical Findings
1. **[Rule ID]**: [Description]
- File: [path:line]
- Impact: [description]
- Remediation: [code fix]
### Recommendations
- [Prioritized list of actions]
name: Static Analysis
on: [push, pull_request]
jobs:
codeql:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: github/codeql-action/init@v3
with:
languages: javascript
- uses: github/codeql-action/analyze@v3
with:
output: sarif-results
upload: true
semgrep:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: returntocorp/semgrep-action@v1
with:
config: >-
p/security-audit
p/owasp-top-ten
generateSarif: '1'
- uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: semgrep.sarif
</instructions>
| OWASP Category | CodeQL Queries | Semgrep Rules |
|---|---|---|
| A01: Broken Access Control | Security/CWE-284 | p/owasp-top-ten |
| A02: Cryptographic Failures | Security/CWE-327 | p/secrets |
| A03: Injection | Security/CWE-089, CWE-078 | p/security-audit |
| A07: Auth Failures | Security/CWE-287 | p/owasp-top-ten |
| A09: Logging Failures | Security/CWE-117 | p/security-audit |
| A10: SSRF | Security/CWE-918 | p/owasp-top-ten |
variant-analysis - Pattern-based vulnerability discovery across codebasessemgrep-rule-creator - Custom Semgrep rule developmentdifferential-review - Security-focused diff analysisinsecure-defaults - Hardcoded credentials and fail-open detectionsecurity-architect - STRIDE threat modeling and OWASP Top 10code-analyzer - Code metrics and complexity analysis| Anti-Pattern | Why It Fails | Correct Approach |
|---|---|---|
| Using outdated CodeQL database | Analysis misses code added since last build | Always create a fresh database before each analysis run |
| Using generic rule suites | Generic rules miss language-specific security patterns | Use language-specific security suites (e.g., codeql/javascript-queries:Security) |
| Suppressing findings without rationale | Creates silent security debt and audit gaps | Document false positive reason in code comment before suppressing |
| Scanning test/fixture code | False positives from intentionally vulnerable test code | Exclude test/ and fixture/ directories from all scans |
| Not re-running after fixes | Remediation not confirmed; same finding recurs | Always re-run analysis after each fix to verify resolution |
Before starting:
Read .claude/context/memory/learnings.md
After completing:
.claude/context/memory/learnings.md.claude/context/memory/issues.md.claude/context/memory/decisions.mdASSUME INTERRUPTION: If it's not in memory, it didn't happen.
When Snyk MCP server is configured, call directly:
snyk_test_project — dependency vulnerability report with CVSS scoressnyk_code_test — SAST scan (OWASP Top 10 patterns)snyk_iac_test — IaC security issues (Terraform, K8s, Helm)snyk_monitor — enroll project for continuous monitoringWhen semgrep/mcp server is configured:
semgrep_scan — run rule registry against codebasesemgrep_search — semantic code pattern searchsemgrep scan --config=auto --json > .claude/context/tmp/semgrep.json
snyk test --json > .claude/context/tmp/snyk.json
まだレビューはありません。使ってみた感想をお寄せください。
概要と使いどころ
Ensure accessibility in UI components including semantic HTML, ARIA attributes, keyboard navigation, and WCAG 2.2 AA compliance.
日本語の概要は準備中です。原文の説明を表示しています。
Use when you want to improve response quality through meta-cognitive reasoning. Applies 15+ reasoning methods to reconsider and refine initial outputs.
日本語の概要は準備中です。原文の説明を表示しています。
N-round opposing-stance debates for trade-off analysis. Assigns pro/con roles to agents, runs structured debate rounds with quality scoring, and produces a moderator synthesis with confidence-rated recommendation. Generalizable to architecture, technology, security, and design decisions.
日本語の概要は準備中です。原文の説明を表示しています。
Force adversarial code review stance that eliminates confirmation bias — reviewer must find issues or re-analyze
日本語の概要は準備中です。原文の説明を表示しています。
Creates specialized AI agents on-demand when no existing agent matches a request. Use when the Router cannot find a suitable agent for a task. Enables self-evolution by generating persistent agents.
日本語の概要は準備中です。原文の説明を表示しています。
LLM-as-judge evaluation framework with 5-dimension rubric (accuracy, groundedness, coherence, completeness, helpfulness) for scoring AI-generated content quality with weighted composite scores and evidence citations
日本語の概要は準備中です。原文の説明を表示しています。