@elizaos/skills 2.0.0-alpha.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +126 -0
- package/dist/formatter.d.ts +44 -0
- package/dist/formatter.d.ts.map +1 -0
- package/dist/formatter.js +182 -0
- package/dist/frontmatter.d.ts +39 -0
- package/dist/frontmatter.d.ts.map +1 -0
- package/dist/frontmatter.js +105 -0
- package/dist/index.d.ts +29 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +31 -0
- package/dist/loader.d.ts +33 -0
- package/dist/loader.d.ts.map +1 -0
- package/dist/loader.js +362 -0
- package/dist/resolver.d.ts +18 -0
- package/dist/resolver.d.ts.map +1 -0
- package/dist/resolver.js +90 -0
- package/dist/types.d.ts +201 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +1 -0
- package/package.json +57 -0
- package/skills/1password/SKILL.md +70 -0
- package/skills/1password/references/cli-examples.md +29 -0
- package/skills/1password/references/get-started.md +17 -0
- package/skills/apple-notes/SKILL.md +77 -0
- package/skills/apple-reminders/SKILL.md +96 -0
- package/skills/bear-notes/SKILL.md +107 -0
- package/skills/bird/SKILL.md +224 -0
- package/skills/blogwatcher/SKILL.md +69 -0
- package/skills/blucli/SKILL.md +47 -0
- package/skills/bluebubbles/SKILL.md +131 -0
- package/skills/camsnap/SKILL.md +45 -0
- package/skills/canvas/SKILL.md +203 -0
- package/skills/clawhub/SKILL.md +77 -0
- package/skills/coding-agent/SKILL.md +284 -0
- package/skills/discord/SKILL.md +578 -0
- package/skills/eightctl/SKILL.md +50 -0
- package/skills/food-order/SKILL.md +48 -0
- package/skills/gemini/SKILL.md +43 -0
- package/skills/gifgrep/SKILL.md +79 -0
- package/skills/github/SKILL.md +77 -0
- package/skills/gog/SKILL.md +116 -0
- package/skills/goplaces/SKILL.md +52 -0
- package/skills/healthcheck/SKILL.md +245 -0
- package/skills/himalaya/SKILL.md +257 -0
- package/skills/himalaya/references/configuration.md +184 -0
- package/skills/himalaya/references/message-composition.md +199 -0
- package/skills/imsg/SKILL.md +74 -0
- package/skills/local-places/SERVER_README.md +101 -0
- package/skills/local-places/SKILL.md +102 -0
- package/skills/local-places/pyproject.toml +21 -0
- package/skills/local-places/src/local_places/__init__.py +2 -0
- package/skills/local-places/src/local_places/google_places.py +314 -0
- package/skills/local-places/src/local_places/main.py +65 -0
- package/skills/local-places/src/local_places/schemas.py +107 -0
- package/skills/mcporter/SKILL.md +61 -0
- package/skills/model-usage/SKILL.md +69 -0
- package/skills/model-usage/references/codexbar-cli.md +33 -0
- package/skills/model-usage/scripts/model_usage.py +310 -0
- package/skills/nano-banana-pro/SKILL.md +58 -0
- package/skills/nano-banana-pro/scripts/generate_image.py +184 -0
- package/skills/nano-pdf/SKILL.md +38 -0
- package/skills/notion/SKILL.md +172 -0
- package/skills/obsidian/SKILL.md +81 -0
- package/skills/openai-image-gen/SKILL.md +89 -0
- package/skills/openai-image-gen/scripts/gen.py +240 -0
- package/skills/openai-whisper/SKILL.md +38 -0
- package/skills/openai-whisper-api/SKILL.md +52 -0
- package/skills/openai-whisper-api/scripts/transcribe.sh +85 -0
- package/skills/openhue/SKILL.md +51 -0
- package/skills/oracle/SKILL.md +125 -0
- package/skills/ordercli/SKILL.md +78 -0
- package/skills/peekaboo/SKILL.md +190 -0
- package/skills/sag/SKILL.md +87 -0
- package/skills/security-ask-questions-if-underspecified/.claude-plugin/plugin.json +10 -0
- package/skills/security-ask-questions-if-underspecified/README.md +24 -0
- package/skills/security-ask-questions-if-underspecified/SKILL.md +85 -0
- package/skills/security-ask-questions-if-underspecified/skills/ask-questions-if-underspecified/SKILL.md +85 -0
- package/skills/security-audit-context-building/.claude-plugin/plugin.json +10 -0
- package/skills/security-audit-context-building/README.md +58 -0
- package/skills/security-audit-context-building/SKILL.md +297 -0
- package/skills/security-audit-context-building/commands/audit-context.md +21 -0
- package/skills/security-audit-context-building/skills/audit-context-building/SKILL.md +297 -0
- package/skills/security-audit-context-building/skills/audit-context-building/resources/COMPLETENESS_CHECKLIST.md +47 -0
- package/skills/security-audit-context-building/skills/audit-context-building/resources/FUNCTION_MICRO_ANALYSIS_EXAMPLE.md +355 -0
- package/skills/security-audit-context-building/skills/audit-context-building/resources/OUTPUT_REQUIREMENTS.md +71 -0
- package/skills/security-building-secure-contracts/.claude-plugin/plugin.json +10 -0
- package/skills/security-building-secure-contracts/README.md +241 -0
- package/skills/security-building-secure-contracts/SKILL.md +67 -0
- package/skills/security-building-secure-contracts/skills/algorand-vulnerability-scanner/SKILL.md +284 -0
- package/skills/security-building-secure-contracts/skills/algorand-vulnerability-scanner/resources/VULNERABILITY_PATTERNS.md +405 -0
- package/skills/security-building-secure-contracts/skills/audit-prep-assistant/SKILL.md +409 -0
- package/skills/security-building-secure-contracts/skills/cairo-vulnerability-scanner/SKILL.md +329 -0
- package/skills/security-building-secure-contracts/skills/cairo-vulnerability-scanner/resources/VULNERABILITY_PATTERNS.md +722 -0
- package/skills/security-building-secure-contracts/skills/code-maturity-assessor/SKILL.md +218 -0
- package/skills/security-building-secure-contracts/skills/code-maturity-assessor/resources/ASSESSMENT_CRITERIA.md +355 -0
- package/skills/security-building-secure-contracts/skills/code-maturity-assessor/resources/EXAMPLE_REPORT.md +248 -0
- package/skills/security-building-secure-contracts/skills/code-maturity-assessor/resources/REPORT_FORMAT.md +33 -0
- package/skills/security-building-secure-contracts/skills/cosmos-vulnerability-scanner/SKILL.md +334 -0
- package/skills/security-building-secure-contracts/skills/cosmos-vulnerability-scanner/resources/VULNERABILITY_PATTERNS.md +740 -0
- package/skills/security-building-secure-contracts/skills/guidelines-advisor/SKILL.md +252 -0
- package/skills/security-building-secure-contracts/skills/guidelines-advisor/resources/ASSESSMENT_AREAS.md +329 -0
- package/skills/security-building-secure-contracts/skills/guidelines-advisor/resources/DELIVERABLES.md +118 -0
- package/skills/security-building-secure-contracts/skills/guidelines-advisor/resources/EXAMPLE_REPORT.md +298 -0
- package/skills/security-building-secure-contracts/skills/secure-workflow-guide/SKILL.md +161 -0
- package/skills/security-building-secure-contracts/skills/secure-workflow-guide/resources/EXAMPLE_REPORT.md +279 -0
- package/skills/security-building-secure-contracts/skills/secure-workflow-guide/resources/WORKFLOW_STEPS.md +132 -0
- package/skills/security-building-secure-contracts/skills/solana-vulnerability-scanner/SKILL.md +389 -0
- package/skills/security-building-secure-contracts/skills/solana-vulnerability-scanner/resources/VULNERABILITY_PATTERNS.md +669 -0
- package/skills/security-building-secure-contracts/skills/substrate-vulnerability-scanner/SKILL.md +298 -0
- package/skills/security-building-secure-contracts/skills/substrate-vulnerability-scanner/resources/VULNERABILITY_PATTERNS.md +791 -0
- package/skills/security-building-secure-contracts/skills/token-integration-analyzer/SKILL.md +362 -0
- package/skills/security-building-secure-contracts/skills/token-integration-analyzer/resources/ASSESSMENT_CATEGORIES.md +571 -0
- package/skills/security-building-secure-contracts/skills/token-integration-analyzer/resources/REPORT_TEMPLATES.md +141 -0
- package/skills/security-building-secure-contracts/skills/ton-vulnerability-scanner/SKILL.md +388 -0
- package/skills/security-building-secure-contracts/skills/ton-vulnerability-scanner/resources/VULNERABILITY_PATTERNS.md +595 -0
- package/skills/security-differential-review/.claude-plugin/plugin.json +10 -0
- package/skills/security-differential-review/README.md +109 -0
- package/skills/security-differential-review/SKILL.md +220 -0
- package/skills/security-differential-review/commands/diff-review.md +21 -0
- package/skills/security-differential-review/skills/differential-review/SKILL.md +220 -0
- package/skills/security-differential-review/skills/differential-review/adversarial.md +203 -0
- package/skills/security-differential-review/skills/differential-review/methodology.md +234 -0
- package/skills/security-differential-review/skills/differential-review/patterns.md +300 -0
- package/skills/security-differential-review/skills/differential-review/reporting.md +369 -0
- package/skills/security-entry-point-analyzer/.claude-plugin/plugin.json +10 -0
- package/skills/security-entry-point-analyzer/README.md +74 -0
- package/skills/security-entry-point-analyzer/SKILL.md +251 -0
- package/skills/security-entry-point-analyzer/commands/entry-points.md +18 -0
- package/skills/security-entry-point-analyzer/skills/entry-point-analyzer/SKILL.md +251 -0
- package/skills/security-entry-point-analyzer/skills/entry-point-analyzer/references/cosmwasm.md +182 -0
- package/skills/security-entry-point-analyzer/skills/entry-point-analyzer/references/move-aptos.md +107 -0
- package/skills/security-entry-point-analyzer/skills/entry-point-analyzer/references/move-sui.md +87 -0
- package/skills/security-entry-point-analyzer/skills/entry-point-analyzer/references/solana.md +155 -0
- package/skills/security-entry-point-analyzer/skills/entry-point-analyzer/references/solidity.md +135 -0
- package/skills/security-entry-point-analyzer/skills/entry-point-analyzer/references/ton.md +185 -0
- package/skills/security-entry-point-analyzer/skills/entry-point-analyzer/references/vyper.md +141 -0
- package/skills/security-fix-review/.claude-plugin/plugin.json +13 -0
- package/skills/security-fix-review/README.md +118 -0
- package/skills/security-fix-review/SKILL.md +264 -0
- package/skills/security-fix-review/commands/fix-review.md +24 -0
- package/skills/security-fix-review/skills/fix-review/SKILL.md +264 -0
- package/skills/security-fix-review/skills/fix-review/references/bug-detection.md +408 -0
- package/skills/security-fix-review/skills/fix-review/references/finding-matching.md +298 -0
- package/skills/security-fix-review/skills/fix-review/references/report-parsing.md +398 -0
- package/skills/security-insecure-defaults/.claude-plugin/plugin.json +10 -0
- package/skills/security-insecure-defaults/README.md +45 -0
- package/skills/security-insecure-defaults/SKILL.md +117 -0
- package/skills/security-insecure-defaults/skills/insecure-defaults/SKILL.md +117 -0
- package/skills/security-insecure-defaults/skills/insecure-defaults/references/examples.md +409 -0
- package/skills/security-modern-python/.claude-plugin/plugin.json +10 -0
- package/skills/security-modern-python/README.md +58 -0
- package/skills/security-modern-python/SKILL.md +333 -0
- package/skills/security-modern-python/hooks/hooks.json +16 -0
- package/skills/security-modern-python/hooks/intercept-legacy-python.bats +388 -0
- package/skills/security-modern-python/hooks/intercept-legacy-python.sh +109 -0
- package/skills/security-modern-python/hooks/test_helper.bash +75 -0
- package/skills/security-modern-python/skills/modern-python/SKILL.md +333 -0
- package/skills/security-modern-python/skills/modern-python/references/dependabot.md +43 -0
- package/skills/security-modern-python/skills/modern-python/references/migration-checklist.md +141 -0
- package/skills/security-modern-python/skills/modern-python/references/pep723-scripts.md +259 -0
- package/skills/security-modern-python/skills/modern-python/references/prek.md +211 -0
- package/skills/security-modern-python/skills/modern-python/references/pyproject.md +254 -0
- package/skills/security-modern-python/skills/modern-python/references/ruff-config.md +240 -0
- package/skills/security-modern-python/skills/modern-python/references/security-setup.md +255 -0
- package/skills/security-modern-python/skills/modern-python/references/testing.md +284 -0
- package/skills/security-modern-python/skills/modern-python/references/uv-commands.md +200 -0
- package/skills/security-modern-python/skills/modern-python/templates/dependabot.yml +36 -0
- package/skills/security-modern-python/skills/modern-python/templates/pre-commit-config.yaml +66 -0
- package/skills/security-property-based-testing/.claude-plugin/plugin.json +9 -0
- package/skills/security-property-based-testing/README.md +47 -0
- package/skills/security-property-based-testing/SKILL.md +109 -0
- package/skills/security-property-based-testing/skills/property-based-testing/README.md +88 -0
- package/skills/security-property-based-testing/skills/property-based-testing/SKILL.md +109 -0
- package/skills/security-property-based-testing/skills/property-based-testing/references/design.md +191 -0
- package/skills/security-property-based-testing/skills/property-based-testing/references/generating.md +200 -0
- package/skills/security-property-based-testing/skills/property-based-testing/references/libraries.md +130 -0
- package/skills/security-property-based-testing/skills/property-based-testing/references/refactoring.md +181 -0
- package/skills/security-property-based-testing/skills/property-based-testing/references/reviewing.md +209 -0
- package/skills/security-property-based-testing/skills/property-based-testing/references/strategies.md +124 -0
- package/skills/semgrep-rule-creator/.claude-plugin/plugin.json +8 -0
- package/skills/semgrep-rule-creator/README.md +43 -0
- package/skills/semgrep-rule-creator/SKILL.md +168 -0
- package/skills/semgrep-rule-creator/commands/semgrep-rule.md +26 -0
- package/skills/semgrep-rule-creator/skills/semgrep-rule-creator/SKILL.md +168 -0
- package/skills/semgrep-rule-creator/skills/semgrep-rule-creator/references/quick-reference.md +203 -0
- package/skills/semgrep-rule-creator/skills/semgrep-rule-creator/references/workflow.md +240 -0
- package/skills/session-logs/SKILL.md +115 -0
- package/skills/sharp-edges/.claude-plugin/plugin.json +10 -0
- package/skills/sharp-edges/README.md +48 -0
- package/skills/sharp-edges/SKILL.md +292 -0
- package/skills/sharp-edges/skills/sharp-edges/SKILL.md +292 -0
- package/skills/sharp-edges/skills/sharp-edges/references/auth-patterns.md +252 -0
- package/skills/sharp-edges/skills/sharp-edges/references/case-studies.md +274 -0
- package/skills/sharp-edges/skills/sharp-edges/references/config-patterns.md +333 -0
- package/skills/sharp-edges/skills/sharp-edges/references/crypto-apis.md +190 -0
- package/skills/sharp-edges/skills/sharp-edges/references/lang-c.md +205 -0
- package/skills/sharp-edges/skills/sharp-edges/references/lang-csharp.md +285 -0
- package/skills/sharp-edges/skills/sharp-edges/references/lang-go.md +270 -0
- package/skills/sharp-edges/skills/sharp-edges/references/lang-java.md +263 -0
- package/skills/sharp-edges/skills/sharp-edges/references/lang-javascript.md +269 -0
- package/skills/sharp-edges/skills/sharp-edges/references/lang-kotlin.md +265 -0
- package/skills/sharp-edges/skills/sharp-edges/references/lang-php.md +245 -0
- package/skills/sharp-edges/skills/sharp-edges/references/lang-python.md +274 -0
- package/skills/sharp-edges/skills/sharp-edges/references/lang-ruby.md +273 -0
- package/skills/sharp-edges/skills/sharp-edges/references/lang-rust.md +272 -0
- package/skills/sharp-edges/skills/sharp-edges/references/lang-swift.md +287 -0
- package/skills/sharp-edges/skills/sharp-edges/references/language-specific.md +588 -0
- package/skills/sherpa-onnx-tts/SKILL.md +103 -0
- package/skills/sherpa-onnx-tts/bin/sherpa-onnx-tts +178 -0
- package/skills/skill-creator/SKILL.md +370 -0
- package/skills/skill-creator/license.txt +202 -0
- package/skills/skill-creator/scripts/init_skill.py +378 -0
- package/skills/skill-creator/scripts/package_skill.py +111 -0
- package/skills/skill-creator/scripts/quick_validate.py +101 -0
- package/skills/slack/SKILL.md +144 -0
- package/skills/songsee/SKILL.md +49 -0
- package/skills/sonoscli/SKILL.md +46 -0
- package/skills/spec-to-code-compliance/.claude-plugin/plugin.json +10 -0
- package/skills/spec-to-code-compliance/README.md +67 -0
- package/skills/spec-to-code-compliance/SKILL.md +349 -0
- package/skills/spec-to-code-compliance/commands/spec-compliance.md +22 -0
- package/skills/spec-to-code-compliance/skills/spec-to-code-compliance/SKILL.md +349 -0
- package/skills/spec-to-code-compliance/skills/spec-to-code-compliance/resources/COMPLETENESS_CHECKLIST.md +69 -0
- package/skills/spec-to-code-compliance/skills/spec-to-code-compliance/resources/IR_EXAMPLES.md +417 -0
- package/skills/spec-to-code-compliance/skills/spec-to-code-compliance/resources/OUTPUT_REQUIREMENTS.md +105 -0
- package/skills/spotify-player/SKILL.md +64 -0
- package/skills/static-analysis/.claude-plugin/plugin.json +8 -0
- package/skills/static-analysis/README.md +59 -0
- package/skills/static-analysis/SKILL.md +91 -0
- package/skills/static-analysis/skills/codeql/SKILL.md +315 -0
- package/skills/static-analysis/skills/sarif-parsing/SKILL.md +479 -0
- package/skills/static-analysis/skills/sarif-parsing/resources/jq-queries.md +162 -0
- package/skills/static-analysis/skills/sarif-parsing/resources/sarif_helpers.py +331 -0
- package/skills/static-analysis/skills/semgrep/SKILL.md +337 -0
- package/skills/summarize/SKILL.md +87 -0
- package/skills/testing-handbook-skills/.claude-plugin/plugin.json +8 -0
- package/skills/testing-handbook-skills/README.md +241 -0
- package/skills/testing-handbook-skills/SKILL.md +104 -0
- package/skills/testing-handbook-skills/scripts/pyproject.toml +8 -0
- package/skills/testing-handbook-skills/scripts/validate-skills.py +657 -0
- package/skills/testing-handbook-skills/skills/address-sanitizer/SKILL.md +341 -0
- package/skills/testing-handbook-skills/skills/aflpp/SKILL.md +640 -0
- package/skills/testing-handbook-skills/skills/atheris/SKILL.md +515 -0
- package/skills/testing-handbook-skills/skills/cargo-fuzz/SKILL.md +454 -0
- package/skills/testing-handbook-skills/skills/codeql/SKILL.md +549 -0
- package/skills/testing-handbook-skills/skills/constant-time-testing/SKILL.md +507 -0
- package/skills/testing-handbook-skills/skills/coverage-analysis/SKILL.md +607 -0
- package/skills/testing-handbook-skills/skills/fuzzing-dictionary/SKILL.md +297 -0
- package/skills/testing-handbook-skills/skills/fuzzing-obstacles/SKILL.md +426 -0
- package/skills/testing-handbook-skills/skills/harness-writing/SKILL.md +614 -0
- package/skills/testing-handbook-skills/skills/libafl/SKILL.md +625 -0
- package/skills/testing-handbook-skills/skills/libfuzzer/SKILL.md +795 -0
- package/skills/testing-handbook-skills/skills/ossfuzz/SKILL.md +426 -0
- package/skills/testing-handbook-skills/skills/ruzzy/SKILL.md +443 -0
- package/skills/testing-handbook-skills/skills/semgrep/SKILL.md +601 -0
- package/skills/testing-handbook-skills/skills/testing-handbook-generator/SKILL.md +372 -0
- package/skills/testing-handbook-skills/skills/testing-handbook-generator/agent-prompt.md +280 -0
- package/skills/testing-handbook-skills/skills/testing-handbook-generator/discovery.md +452 -0
- package/skills/testing-handbook-skills/skills/testing-handbook-generator/templates/domain-skill.md +504 -0
- package/skills/testing-handbook-skills/skills/testing-handbook-generator/templates/fuzzer-skill.md +454 -0
- package/skills/testing-handbook-skills/skills/testing-handbook-generator/templates/technique-skill.md +527 -0
- package/skills/testing-handbook-skills/skills/testing-handbook-generator/templates/tool-skill.md +366 -0
- package/skills/testing-handbook-skills/skills/testing-handbook-generator/testing.md +482 -0
- package/skills/testing-handbook-skills/skills/wycheproof/SKILL.md +533 -0
- package/skills/things-mac/SKILL.md +86 -0
- package/skills/tmux/SKILL.md +135 -0
- package/skills/tmux/scripts/find-sessions.sh +112 -0
- package/skills/tmux/scripts/wait-for-text.sh +83 -0
- package/skills/trello/SKILL.md +95 -0
- package/skills/variant-analysis/.claude-plugin/plugin.json +8 -0
- package/skills/variant-analysis/README.md +41 -0
- package/skills/variant-analysis/SKILL.md +142 -0
- package/skills/variant-analysis/commands/variants.md +23 -0
- package/skills/variant-analysis/skills/variant-analysis/METHODOLOGY.md +327 -0
- package/skills/variant-analysis/skills/variant-analysis/SKILL.md +142 -0
- package/skills/variant-analysis/skills/variant-analysis/resources/codeql/cpp.ql +119 -0
- package/skills/variant-analysis/skills/variant-analysis/resources/codeql/go.ql +69 -0
- package/skills/variant-analysis/skills/variant-analysis/resources/codeql/java.ql +71 -0
- package/skills/variant-analysis/skills/variant-analysis/resources/codeql/javascript.ql +63 -0
- package/skills/variant-analysis/skills/variant-analysis/resources/codeql/python.ql +80 -0
- package/skills/variant-analysis/skills/variant-analysis/resources/semgrep/cpp.yaml +98 -0
- package/skills/variant-analysis/skills/variant-analysis/resources/semgrep/go.yaml +63 -0
- package/skills/variant-analysis/skills/variant-analysis/resources/semgrep/java.yaml +61 -0
- package/skills/variant-analysis/skills/variant-analysis/resources/semgrep/javascript.yaml +60 -0
- package/skills/variant-analysis/skills/variant-analysis/resources/semgrep/python.yaml +72 -0
- package/skills/variant-analysis/skills/variant-analysis/resources/variant-report-template.md +75 -0
- package/skills/video-frames/SKILL.md +46 -0
- package/skills/video-frames/scripts/frame.sh +81 -0
- package/skills/voice-call/SKILL.md +45 -0
- package/skills/wacli/SKILL.md +72 -0
- package/skills/weather/SKILL.md +54 -0
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Static Analysis
|
|
2
|
+
|
|
3
|
+
A comprehensive static analysis toolkit with CodeQL, Semgrep, and SARIF parsing for security vulnerability detection.
|
|
4
|
+
|
|
5
|
+
CodeQL and Semgrep skills are based on the Trail of Bits Testing Handbook:
|
|
6
|
+
|
|
7
|
+
- [CodeQL Testing Handbook](https://appsec.guide/docs/static-analysis/codeql/)
|
|
8
|
+
- [Semgrep Testing Handbook](https://appsec.guide/docs/static-analysis/semgrep/)
|
|
9
|
+
|
|
10
|
+
**Author:** Axel Mierczuk
|
|
11
|
+
|
|
12
|
+
## Skills Included
|
|
13
|
+
|
|
14
|
+
| Skill | Purpose |
|
|
15
|
+
|-----------------|----------------------------------------------------------|
|
|
16
|
+
| `codeql` | Deep security analysis with taint tracking and data flow |
|
|
17
|
+
| `semgrep` | Fast pattern-based security scanning |
|
|
18
|
+
| `sarif-parsing` | Parse and process results from static analysis tools |
|
|
19
|
+
|
|
20
|
+
## When to Use
|
|
21
|
+
|
|
22
|
+
Use this plugin when you need to:
|
|
23
|
+
- Perform security vulnerability detection on codebases
|
|
24
|
+
- Run CodeQL for interprocedural taint tracking and data flow analysis
|
|
25
|
+
- Use Semgrep for fast pattern-based bug detection
|
|
26
|
+
- Parse SARIF output from security scanners
|
|
27
|
+
- Set up static analysis in CI/CD pipelines
|
|
28
|
+
- Aggregate and deduplicate findings from multiple tools
|
|
29
|
+
|
|
30
|
+
## What It Does
|
|
31
|
+
|
|
32
|
+
### CodeQL
|
|
33
|
+
- Create databases for Python, JavaScript, Go, Java, C/C++, and more
|
|
34
|
+
- Run security queries with SARIF/CSV output
|
|
35
|
+
- Write custom QL queries with taint tracking
|
|
36
|
+
- Integrate with GitHub Actions
|
|
37
|
+
|
|
38
|
+
### Semgrep
|
|
39
|
+
- Quick security scans using built-in rulesets (OWASP, CWE, Trail of Bits)
|
|
40
|
+
- Write custom YAML rules with pattern matching
|
|
41
|
+
- Taint mode for tracking data flow from sources to sinks
|
|
42
|
+
- CI/CD integration with baseline scanning
|
|
43
|
+
|
|
44
|
+
### SARIF Parsing
|
|
45
|
+
- Understand SARIF 2.1.0 structure
|
|
46
|
+
- Quick analysis using jq for CLI queries
|
|
47
|
+
- Python scripting with pysarif and sarif-tools
|
|
48
|
+
- Aggregate and deduplicate results from multiple files
|
|
49
|
+
- CI/CD integration patterns
|
|
50
|
+
|
|
51
|
+
## Installation
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
/plugin install trailofbits/skills/plugins/static-analysis
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Related Skills
|
|
58
|
+
|
|
59
|
+
- `variant-analysis` - Use CodeQL/Semgrep patterns to find bug variants
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: static-analysis
|
|
3
|
+
description: "Static analysis toolkit with CodeQL, Semgrep, and SARIF parsing for security vulnerability detection. Use when running static analysis scans, writing custom detection rules, or processing analysis results."
|
|
4
|
+
allowed-tools:
|
|
5
|
+
- Bash
|
|
6
|
+
- Read
|
|
7
|
+
- Write
|
|
8
|
+
- Glob
|
|
9
|
+
- Grep
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Static Analysis
|
|
13
|
+
|
|
14
|
+
Comprehensive static analysis toolkit for security vulnerability detection, based on the [Trail of Bits Application Security Testing Handbook](https://appsec.guide/).
|
|
15
|
+
|
|
16
|
+
## When to Use
|
|
17
|
+
|
|
18
|
+
- Running security scans on codebases (any language)
|
|
19
|
+
- Writing custom CodeQL queries or Semgrep rules
|
|
20
|
+
- Processing and triaging SARIF output files from analysis tools
|
|
21
|
+
- Setting up static analysis in CI/CD pipelines
|
|
22
|
+
- Comparing and aggregating results from multiple tools
|
|
23
|
+
|
|
24
|
+
## When NOT to Use
|
|
25
|
+
|
|
26
|
+
- Writing Semgrep rules from scratch (use semgrep-rule-creator skill instead)
|
|
27
|
+
- Dynamic analysis or fuzzing (use testing-handbook-skills)
|
|
28
|
+
- Smart contract auditing (use security-building-secure-contracts)
|
|
29
|
+
|
|
30
|
+
## Sub-Skills
|
|
31
|
+
|
|
32
|
+
| Tool | Purpose | Best For | Skill Path |
|
|
33
|
+
|------|---------|----------|------------|
|
|
34
|
+
| **CodeQL** | Semantic code analysis with database queries | Deep data flow tracking, taint analysis, cross-function analysis | [skills/codeql/SKILL.md](skills/codeql/SKILL.md) |
|
|
35
|
+
| **Semgrep** | Fast pattern-matching static analysis | Quick scans, custom rules, CI integration, lightweight checks | [skills/semgrep/SKILL.md](skills/semgrep/SKILL.md) |
|
|
36
|
+
| **SARIF Parsing** | Parse and process SARIF result files | Aggregating results, CI/CD integration, multi-tool triage | [skills/sarif-parsing/SKILL.md](skills/sarif-parsing/SKILL.md) |
|
|
37
|
+
|
|
38
|
+
## Tool Selection Guide
|
|
39
|
+
|
|
40
|
+
| Scenario | Recommended Tool |
|
|
41
|
+
|----------|-----------------|
|
|
42
|
+
| Quick security scan | Semgrep |
|
|
43
|
+
| Deep vulnerability analysis | CodeQL |
|
|
44
|
+
| Data flow / taint tracking | CodeQL (best) or Semgrep taint mode |
|
|
45
|
+
| Custom pattern detection | Semgrep (simpler) or CodeQL (more powerful) |
|
|
46
|
+
| CI/CD integration | Semgrep (fastest) + CodeQL (thorough) |
|
|
47
|
+
| Processing scan results | SARIF Parsing |
|
|
48
|
+
| Non-building codebase | Semgrep (works on incomplete code) |
|
|
49
|
+
|
|
50
|
+
## Quick Start
|
|
51
|
+
|
|
52
|
+
### Semgrep (fast scan)
|
|
53
|
+
```bash
|
|
54
|
+
# Install
|
|
55
|
+
pip install semgrep
|
|
56
|
+
|
|
57
|
+
# Run with recommended rulesets
|
|
58
|
+
semgrep --config=auto .
|
|
59
|
+
|
|
60
|
+
# Run specific ruleset
|
|
61
|
+
semgrep --config=p/security-audit .
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### CodeQL (deep analysis)
|
|
65
|
+
```bash
|
|
66
|
+
# Create database
|
|
67
|
+
codeql database create mydb --language=python --source-root=.
|
|
68
|
+
|
|
69
|
+
# Run security queries
|
|
70
|
+
codeql database analyze mydb codeql/python-queries:codeql-suites/python-security-extended.qls --format=sarif-latest --output=results.sarif
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### SARIF Processing
|
|
74
|
+
```bash
|
|
75
|
+
# Parse results with jq
|
|
76
|
+
jq '.runs[].results[] | {ruleId, message: .message.text, location: .locations[0].physicalLocation.artifactLocation.uri}' results.sarif
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## Workflow
|
|
80
|
+
|
|
81
|
+
1. **Quick scan** with Semgrep for fast results
|
|
82
|
+
2. **Deep analysis** with CodeQL for thorough coverage
|
|
83
|
+
3. **Aggregate results** using SARIF parsing
|
|
84
|
+
4. **Triage findings** by severity and exploitability
|
|
85
|
+
5. **Custom rules** for project-specific patterns
|
|
86
|
+
|
|
87
|
+
## Related Skills
|
|
88
|
+
|
|
89
|
+
- **semgrep-rule-creator** - Dedicated skill for writing production-quality Semgrep rules
|
|
90
|
+
- **variant-analysis** - Find similar vulnerabilities using CodeQL/Semgrep patterns
|
|
91
|
+
- **security-differential-review** - Security-focused code review using static analysis findings
|
|
@@ -0,0 +1,315 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: codeql
|
|
3
|
+
description: Run CodeQL static analysis for security vulnerability detection, taint tracking, and data flow analysis. Use when asked to analyze code with CodeQL, create CodeQL databases, write custom QL queries, perform security audits, or set up CodeQL in CI/CD pipelines.
|
|
4
|
+
allowed-tools:
|
|
5
|
+
- Bash
|
|
6
|
+
- Read
|
|
7
|
+
- Glob
|
|
8
|
+
- Grep
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# CodeQL Static Analysis
|
|
12
|
+
|
|
13
|
+
## When to Use CodeQL
|
|
14
|
+
|
|
15
|
+
**Ideal scenarios:**
|
|
16
|
+
- Source code access with ability to build (for compiled languages)
|
|
17
|
+
- Open-source projects or GitHub Advanced Security license
|
|
18
|
+
- Need for interprocedural data flow and taint tracking
|
|
19
|
+
- Finding complex vulnerabilities requiring AST/CFG analysis
|
|
20
|
+
- Comprehensive security audits where analysis time is not critical
|
|
21
|
+
|
|
22
|
+
**Consider Semgrep instead when:**
|
|
23
|
+
- No build capability for compiled languages
|
|
24
|
+
- Licensing constraints
|
|
25
|
+
- Need fast, lightweight pattern matching
|
|
26
|
+
- Simple, single-file analysis is sufficient
|
|
27
|
+
|
|
28
|
+
### Why Interprocedural Analysis Matters
|
|
29
|
+
|
|
30
|
+
Simple grep/pattern tools only see one function at a time. Real vulnerabilities often span multiple functions:
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
HTTP Handler → Input Parser → Business Logic → Database Query
|
|
34
|
+
↓ ↓ ↓ ↓
|
|
35
|
+
source transforms passes sink (SQL)
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
CodeQL tracks data flow across all these steps. A tainted input in the handler can be traced through 5+ function calls to find where it reaches a dangerous sink.
|
|
39
|
+
|
|
40
|
+
Pattern-based tools miss this because they can't connect `request.param` in file A to `db.execute(query)` in file B.
|
|
41
|
+
|
|
42
|
+
## When NOT to Use
|
|
43
|
+
|
|
44
|
+
Do NOT use this skill for:
|
|
45
|
+
- Projects that cannot be built (CodeQL requires successful compilation for compiled languages)
|
|
46
|
+
- Quick pattern searches (use Semgrep or grep for speed)
|
|
47
|
+
- Non-security code quality checks (use linters instead)
|
|
48
|
+
- Projects without source code access
|
|
49
|
+
|
|
50
|
+
## Environment Check
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
# Check if CodeQL is installed
|
|
54
|
+
command -v codeql >/dev/null 2>&1 && echo "CodeQL: installed" || echo "CodeQL: NOT installed (run install steps below)"
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Installation
|
|
58
|
+
|
|
59
|
+
### CodeQL CLI
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
# macOS/Linux (Homebrew)
|
|
63
|
+
brew install --cask codeql
|
|
64
|
+
|
|
65
|
+
# Update
|
|
66
|
+
brew upgrade codeql
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Manual: Download bundle from https://github.com/github/codeql-action/releases
|
|
70
|
+
|
|
71
|
+
### Trail of Bits Queries (Optional)
|
|
72
|
+
|
|
73
|
+
Install public ToB security queries for additional coverage:
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
# Download ToB query packs
|
|
77
|
+
codeql pack download trailofbits/cpp-queries trailofbits/go-queries
|
|
78
|
+
|
|
79
|
+
# Verify installation
|
|
80
|
+
codeql resolve qlpacks | grep trailofbits
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## Core Workflow
|
|
84
|
+
|
|
85
|
+
### 1. Create Database
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
codeql database create codeql.db --language=<LANG> [--command='<BUILD>'] --source-root=.
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
| Language | `--language=` | Build Required |
|
|
92
|
+
|----------|---------------|----------------|
|
|
93
|
+
| Python | `python` | No |
|
|
94
|
+
| JavaScript/TypeScript | `javascript` | No |
|
|
95
|
+
| Go | `go` | No |
|
|
96
|
+
| Ruby | `ruby` | No |
|
|
97
|
+
| Rust | `rust` | Yes (`--command='cargo build'`) |
|
|
98
|
+
| Java/Kotlin | `java` | Yes (`--command='./gradlew build'`) |
|
|
99
|
+
| C/C++ | `cpp` | Yes (`--command='make -j8'`) |
|
|
100
|
+
| C# | `csharp` | Yes (`--command='dotnet build'`) |
|
|
101
|
+
| Swift | `swift` | Yes (macOS only) |
|
|
102
|
+
|
|
103
|
+
### 2. Run Analysis
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
# List available query packs
|
|
107
|
+
codeql resolve qlpacks
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
**Run security queries:**
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
# SARIF output (recommended)
|
|
114
|
+
codeql database analyze codeql.db \
|
|
115
|
+
--format=sarif-latest \
|
|
116
|
+
--output=results.sarif \
|
|
117
|
+
-- codeql/python-queries:codeql-suites/python-security-extended.qls
|
|
118
|
+
|
|
119
|
+
# CSV output
|
|
120
|
+
codeql database analyze codeql.db \
|
|
121
|
+
--format=csv \
|
|
122
|
+
--output=results.csv \
|
|
123
|
+
-- codeql/javascript-queries
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
**With Trail of Bits queries (if installed):**
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
codeql database analyze codeql.db \
|
|
130
|
+
--format=sarif-latest \
|
|
131
|
+
--output=results.sarif \
|
|
132
|
+
-- trailofbits/go-queries
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
## Writing Custom Queries
|
|
136
|
+
|
|
137
|
+
### Query Structure
|
|
138
|
+
|
|
139
|
+
CodeQL uses SQL-like syntax: `from Type x where P(x) select f(x)`
|
|
140
|
+
|
|
141
|
+
### Basic Template
|
|
142
|
+
|
|
143
|
+
```ql
|
|
144
|
+
/**
|
|
145
|
+
* @name Find SQL injection vulnerabilities
|
|
146
|
+
* @description Identifies potential SQL injection from user input
|
|
147
|
+
* @kind path-problem
|
|
148
|
+
* @problem.severity error
|
|
149
|
+
* @security-severity 9.0
|
|
150
|
+
* @precision high
|
|
151
|
+
* @id py/sql-injection
|
|
152
|
+
* @tags security
|
|
153
|
+
* external/cwe/cwe-089
|
|
154
|
+
*/
|
|
155
|
+
|
|
156
|
+
import python
|
|
157
|
+
import semmle.python.dataflow.new.DataFlow
|
|
158
|
+
import semmle.python.dataflow.new.TaintTracking
|
|
159
|
+
|
|
160
|
+
module SqlInjectionConfig implements DataFlow::ConfigSig {
|
|
161
|
+
predicate isSource(DataFlow::Node source) {
|
|
162
|
+
// Define taint sources (user input)
|
|
163
|
+
exists(source)
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
predicate isSink(DataFlow::Node sink) {
|
|
167
|
+
// Define dangerous sinks (SQL execution)
|
|
168
|
+
exists(sink)
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
module SqlInjectionFlow = TaintTracking::Global<SqlInjectionConfig>;
|
|
173
|
+
|
|
174
|
+
from SqlInjectionFlow::PathNode source, SqlInjectionFlow::PathNode sink
|
|
175
|
+
where SqlInjectionFlow::flowPath(source, sink)
|
|
176
|
+
select sink.getNode(), source, sink, "SQL injection from $@.", source.getNode(), "user input"
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
### Query Metadata
|
|
180
|
+
|
|
181
|
+
| Field | Description | Values |
|
|
182
|
+
|-------|-------------|--------|
|
|
183
|
+
| `@kind` | Query type | `problem`, `path-problem` |
|
|
184
|
+
| `@problem.severity` | Issue severity | `error`, `warning`, `recommendation` |
|
|
185
|
+
| `@security-severity` | CVSS score | `0.0` - `10.0` |
|
|
186
|
+
| `@precision` | Confidence | `very-high`, `high`, `medium`, `low` |
|
|
187
|
+
|
|
188
|
+
### Key Language Features
|
|
189
|
+
|
|
190
|
+
```ql
|
|
191
|
+
// Predicates
|
|
192
|
+
predicate isUserInput(DataFlow::Node node) {
|
|
193
|
+
exists(Call c | c.getFunc().(Attribute).getName() = "get" and node.asExpr() = c)
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
// Transitive closure: + (one or more), * (zero or more)
|
|
197
|
+
node.getASuccessor+()
|
|
198
|
+
|
|
199
|
+
// Quantification
|
|
200
|
+
exists(Variable v | v.getName() = "password")
|
|
201
|
+
forall(Call c | c.getTarget().hasName("dangerous") | hasCheck(c))
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
## Creating Query Packs
|
|
205
|
+
|
|
206
|
+
```bash
|
|
207
|
+
codeql pack init myorg/security-queries
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
Structure:
|
|
211
|
+
```
|
|
212
|
+
myorg-security-queries/
|
|
213
|
+
├── qlpack.yml
|
|
214
|
+
├── src/
|
|
215
|
+
│ └── SqlInjection.ql
|
|
216
|
+
└── test/
|
|
217
|
+
└── SqlInjectionTest.expected
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
**qlpack.yml:**
|
|
221
|
+
```yaml
|
|
222
|
+
name: myorg/security-queries
|
|
223
|
+
version: 1.0.0
|
|
224
|
+
dependencies:
|
|
225
|
+
codeql/python-all: "*"
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
## CI/CD Integration (GitHub Actions)
|
|
229
|
+
|
|
230
|
+
```yaml
|
|
231
|
+
name: CodeQL Analysis
|
|
232
|
+
|
|
233
|
+
on:
|
|
234
|
+
push:
|
|
235
|
+
branches: [main]
|
|
236
|
+
pull_request:
|
|
237
|
+
branches: [main]
|
|
238
|
+
schedule:
|
|
239
|
+
- cron: '0 0 * * 1' # Weekly
|
|
240
|
+
|
|
241
|
+
jobs:
|
|
242
|
+
analyze:
|
|
243
|
+
runs-on: ubuntu-latest
|
|
244
|
+
permissions:
|
|
245
|
+
actions: read
|
|
246
|
+
contents: read
|
|
247
|
+
security-events: write
|
|
248
|
+
|
|
249
|
+
strategy:
|
|
250
|
+
matrix:
|
|
251
|
+
language: ['python', 'javascript']
|
|
252
|
+
|
|
253
|
+
steps:
|
|
254
|
+
- uses: actions/checkout@v4
|
|
255
|
+
|
|
256
|
+
- name: Initialize CodeQL
|
|
257
|
+
uses: github/codeql-action/init@v3
|
|
258
|
+
with:
|
|
259
|
+
languages: ${{ matrix.language }}
|
|
260
|
+
queries: security-extended,security-and-quality
|
|
261
|
+
# Add custom queries/packs:
|
|
262
|
+
# queries: security-extended,./codeql/custom-queries
|
|
263
|
+
# packs: trailofbits/python-queries
|
|
264
|
+
|
|
265
|
+
- uses: github/codeql-action/autobuild@v3
|
|
266
|
+
|
|
267
|
+
- uses: github/codeql-action/analyze@v3
|
|
268
|
+
with:
|
|
269
|
+
category: "/language:${{ matrix.language }}"
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
## Testing Queries
|
|
273
|
+
|
|
274
|
+
```bash
|
|
275
|
+
codeql test run test/
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
Test file format:
|
|
279
|
+
```python
|
|
280
|
+
def vulnerable():
|
|
281
|
+
user_input = request.args.get("q") # Source
|
|
282
|
+
cursor.execute("SELECT * FROM users WHERE id = " + user_input) # Alert: sql-injection
|
|
283
|
+
|
|
284
|
+
def safe():
|
|
285
|
+
user_input = request.args.get("q")
|
|
286
|
+
cursor.execute("SELECT * FROM users WHERE id = ?", (user_input,)) # OK
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
## Troubleshooting
|
|
290
|
+
|
|
291
|
+
| Issue | Solution |
|
|
292
|
+
|-------|----------|
|
|
293
|
+
| Database creation fails | Clean build environment, verify build command works independently |
|
|
294
|
+
| Slow analysis | Use `--threads`, narrow query scope, check query complexity |
|
|
295
|
+
| Missing results | Check file exclusions, verify source files were parsed |
|
|
296
|
+
| Out of memory | Set `CODEQL_RAM=48000` environment variable (48GB) |
|
|
297
|
+
| CMake source path issues | Adjust `--source-root` to point to actual source location |
|
|
298
|
+
|
|
299
|
+
## Rationalizations to Reject
|
|
300
|
+
|
|
301
|
+
| Shortcut | Why It's Wrong |
|
|
302
|
+
|----------|----------------|
|
|
303
|
+
| "No findings means the code is secure" | CodeQL only finds patterns it has queries for; novel vulnerabilities won't be detected |
|
|
304
|
+
| "This code path looks safe" | Complex data flow can hide vulnerabilities across 5+ function calls; trace the full path |
|
|
305
|
+
| "Small change, low risk" | Small changes can introduce critical bugs; run full analysis on every change |
|
|
306
|
+
| "Tests pass so it's safe" | Tests prove behavior, not absence of vulnerabilities; they test expected paths, not attacker paths |
|
|
307
|
+
| "The query didn't flag it" | Default query suites don't cover everything; check if custom queries are needed for your domain |
|
|
308
|
+
|
|
309
|
+
## Resources
|
|
310
|
+
|
|
311
|
+
- Docs: https://codeql.github.com/docs/
|
|
312
|
+
- Query Help: https://codeql.github.com/codeql-query-help/
|
|
313
|
+
- Security Lab: https://securitylab.github.com/
|
|
314
|
+
- Trail of Bits Queries: https://github.com/trailofbits/codeql-queries
|
|
315
|
+
- VSCode Extension: "CodeQL" for query development
|