@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,369 @@
|
|
|
1
|
+
# Report Generation (Phase 6)
|
|
2
|
+
|
|
3
|
+
Comprehensive markdown report structure and formatting guidelines.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Report Structure
|
|
8
|
+
|
|
9
|
+
Generate markdown report with these mandatory sections:
|
|
10
|
+
|
|
11
|
+
### 1. Executive Summary
|
|
12
|
+
|
|
13
|
+
- Severity distribution table
|
|
14
|
+
- Risk assessment (CRITICAL/HIGH/MEDIUM/LOW)
|
|
15
|
+
- Final recommendation (APPROVE/REJECT/CONDITIONAL)
|
|
16
|
+
- Key metrics (test gaps, blast radius, red flags)
|
|
17
|
+
|
|
18
|
+
**Template:**
|
|
19
|
+
```markdown
|
|
20
|
+
# Executive Summary
|
|
21
|
+
|
|
22
|
+
| Severity | Count |
|
|
23
|
+
|----------|-------|
|
|
24
|
+
| 🔴 CRITICAL | X |
|
|
25
|
+
| 🟠 HIGH | Y |
|
|
26
|
+
| 🟡 MEDIUM | Z |
|
|
27
|
+
| 🟢 LOW | W |
|
|
28
|
+
|
|
29
|
+
**Overall Risk:** CRITICAL/HIGH/MEDIUM/LOW
|
|
30
|
+
**Recommendation:** APPROVE/REJECT/CONDITIONAL
|
|
31
|
+
|
|
32
|
+
**Key Metrics:**
|
|
33
|
+
- Files analyzed: X/Y (Z%)
|
|
34
|
+
- Test coverage gaps: N functions
|
|
35
|
+
- High blast radius changes: M functions
|
|
36
|
+
- Security regressions detected: P
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
### 2. What Changed
|
|
42
|
+
|
|
43
|
+
- Commit timeline with visual
|
|
44
|
+
- File summary table
|
|
45
|
+
- Lines changed stats
|
|
46
|
+
|
|
47
|
+
**Template:**
|
|
48
|
+
```markdown
|
|
49
|
+
## What Changed
|
|
50
|
+
|
|
51
|
+
**Commit Range:** `base..head`
|
|
52
|
+
**Commits:** X
|
|
53
|
+
**Timeline:** YYYY-MM-DD to YYYY-MM-DD
|
|
54
|
+
|
|
55
|
+
| File | +Lines | -Lines | Risk | Blast Radius |
|
|
56
|
+
|------|--------|--------|------|--------------|
|
|
57
|
+
| file1.sol | +50 | -20 | HIGH | CRITICAL |
|
|
58
|
+
| file2.sol | +10 | -5 | MEDIUM | LOW |
|
|
59
|
+
|
|
60
|
+
**Total:** +N, -M lines across K files
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
### 3. Critical Findings
|
|
66
|
+
|
|
67
|
+
For each HIGH/CRITICAL issue:
|
|
68
|
+
|
|
69
|
+
```markdown
|
|
70
|
+
### [SEVERITY] Title
|
|
71
|
+
|
|
72
|
+
**File**: path/to/file.ext:lineNumber
|
|
73
|
+
**Commit**: hash
|
|
74
|
+
**Blast Radius**: N callers (HIGH/MEDIUM/LOW)
|
|
75
|
+
**Test Coverage**: YES/NO/PARTIAL
|
|
76
|
+
|
|
77
|
+
**Description**: [clear explanation]
|
|
78
|
+
|
|
79
|
+
**Historical Context**:
|
|
80
|
+
- Git blame: Added in commit X (date)
|
|
81
|
+
- Message: "[original commit message]"
|
|
82
|
+
- [Why this code existed]
|
|
83
|
+
|
|
84
|
+
**Attack Scenario**:
|
|
85
|
+
[Concrete exploitation steps from adversarial.md]
|
|
86
|
+
|
|
87
|
+
**Proof of Concept**:
|
|
88
|
+
```code demonstrating issue```
|
|
89
|
+
|
|
90
|
+
**Recommendation**:
|
|
91
|
+
[Specific fix with code]
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
**Example:**
|
|
95
|
+
```markdown
|
|
96
|
+
### 🔴 CRITICAL: Authorization Bypass in Withdraw
|
|
97
|
+
|
|
98
|
+
**File**: TokenVault.sol:156
|
|
99
|
+
**Commit**: abc123def
|
|
100
|
+
**Blast Radius**: 23 callers (HIGH)
|
|
101
|
+
**Test Coverage**: NO
|
|
102
|
+
|
|
103
|
+
**Description**:
|
|
104
|
+
Removed `require(msg.sender == owner)` check allows any user to withdraw funds.
|
|
105
|
+
|
|
106
|
+
**Historical Context**:
|
|
107
|
+
- Git blame: Added 2024-06-15 (commit def456)
|
|
108
|
+
- Message: "Add owner check per audit finding #45"
|
|
109
|
+
- Code existed to prevent unauthorized withdrawals
|
|
110
|
+
|
|
111
|
+
**Attack Scenario**:
|
|
112
|
+
1. Attacker calls `withdraw(1000 ether)`
|
|
113
|
+
2. No authorization check (removed)
|
|
114
|
+
3. 1000 ETH transferred to attacker
|
|
115
|
+
4. Protocol funds drained
|
|
116
|
+
|
|
117
|
+
**Proof of Concept**:
|
|
118
|
+
```solidity
|
|
119
|
+
// As any address
|
|
120
|
+
vault.withdraw(vault.balance());
|
|
121
|
+
// Success - funds stolen
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
**Recommendation**:
|
|
125
|
+
```solidity
|
|
126
|
+
function withdraw(uint256 amount) external {
|
|
127
|
+
+ require(msg.sender == owner, "Unauthorized");
|
|
128
|
+
// ... rest of function
|
|
129
|
+
}
|
|
130
|
+
```
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
### 4. Test Coverage Analysis
|
|
136
|
+
|
|
137
|
+
- Coverage statistics
|
|
138
|
+
- Untested changes list
|
|
139
|
+
- Risk assessment
|
|
140
|
+
|
|
141
|
+
**Template:**
|
|
142
|
+
```markdown
|
|
143
|
+
## Test Coverage Analysis
|
|
144
|
+
|
|
145
|
+
**Coverage:** X% of changed code
|
|
146
|
+
|
|
147
|
+
**Untested Changes:**
|
|
148
|
+
| Function | Risk | Impact |
|
|
149
|
+
|----------|------|--------|
|
|
150
|
+
| functionA() | HIGH | No validation tests |
|
|
151
|
+
| functionB() | MEDIUM | Logic untested |
|
|
152
|
+
|
|
153
|
+
**Risk Assessment:**
|
|
154
|
+
N HIGH-risk functions without tests → Recommend blocking merge
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
### 5. Blast Radius Analysis
|
|
160
|
+
|
|
161
|
+
- High-impact functions table
|
|
162
|
+
- Dependency graph
|
|
163
|
+
- Impact quantification
|
|
164
|
+
|
|
165
|
+
**Template:**
|
|
166
|
+
```markdown
|
|
167
|
+
## Blast Radius Analysis
|
|
168
|
+
|
|
169
|
+
**High-Impact Changes:**
|
|
170
|
+
| Function | Callers | Risk | Priority |
|
|
171
|
+
|----------|---------|------|----------|
|
|
172
|
+
| transfer() | 89 | HIGH | P0 |
|
|
173
|
+
| validate() | 45 | MEDIUM | P1 |
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
---
|
|
177
|
+
|
|
178
|
+
### 6. Historical Context
|
|
179
|
+
|
|
180
|
+
- Security-related removals
|
|
181
|
+
- Regression risks
|
|
182
|
+
- Commit message red flags
|
|
183
|
+
|
|
184
|
+
**Template:**
|
|
185
|
+
```markdown
|
|
186
|
+
## Historical Context
|
|
187
|
+
|
|
188
|
+
**Security-Related Removals:**
|
|
189
|
+
- Line 45: `require` removed (added 2024-03 for CVE-2024-1234)
|
|
190
|
+
- Line 78: Validation removed (added 2023-12 "security hardening")
|
|
191
|
+
|
|
192
|
+
**Regression Risks:**
|
|
193
|
+
- Code pattern removed in commit X, re-added in commit Y
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
---
|
|
197
|
+
|
|
198
|
+
### 7. Recommendations
|
|
199
|
+
|
|
200
|
+
- Immediate actions (blocking)
|
|
201
|
+
- Before production (tracking)
|
|
202
|
+
- Technical debt (future)
|
|
203
|
+
|
|
204
|
+
**Template:**
|
|
205
|
+
```markdown
|
|
206
|
+
## Recommendations
|
|
207
|
+
|
|
208
|
+
### Immediate (Blocking)
|
|
209
|
+
- [ ] Fix CRITICAL issue in TokenVault.sol:156
|
|
210
|
+
- [ ] Add tests for withdraw() function
|
|
211
|
+
|
|
212
|
+
### Before Production
|
|
213
|
+
- [ ] Security audit of auth changes
|
|
214
|
+
- [ ] Load test blast radius functions
|
|
215
|
+
|
|
216
|
+
### Technical Debt
|
|
217
|
+
- [ ] Refactor validation pattern consistency
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
---
|
|
221
|
+
|
|
222
|
+
### 8. Analysis Methodology
|
|
223
|
+
|
|
224
|
+
- Strategy used (DEEP/FOCUSED/SURGICAL)
|
|
225
|
+
- Files analyzed
|
|
226
|
+
- Coverage estimate
|
|
227
|
+
- Techniques applied
|
|
228
|
+
- Limitations
|
|
229
|
+
- Confidence level
|
|
230
|
+
|
|
231
|
+
**Template:**
|
|
232
|
+
```markdown
|
|
233
|
+
## Analysis Methodology
|
|
234
|
+
|
|
235
|
+
**Strategy:** FOCUSED (80 files, medium codebase)
|
|
236
|
+
|
|
237
|
+
**Analysis Scope:**
|
|
238
|
+
- Files reviewed: 45/80 (56%)
|
|
239
|
+
- HIGH RISK: 100% coverage
|
|
240
|
+
- MEDIUM RISK: 60% coverage
|
|
241
|
+
- LOW RISK: Excluded
|
|
242
|
+
|
|
243
|
+
**Techniques:**
|
|
244
|
+
- Git blame on all removals
|
|
245
|
+
- Blast radius calculation
|
|
246
|
+
- Test coverage analysis
|
|
247
|
+
- Adversarial modeling for HIGH RISK
|
|
248
|
+
|
|
249
|
+
**Limitations:**
|
|
250
|
+
- Did not analyze external dependencies
|
|
251
|
+
- Limited to 1-hop caller analysis
|
|
252
|
+
|
|
253
|
+
**Confidence:** HIGH for analyzed scope, MEDIUM overall
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
---
|
|
257
|
+
|
|
258
|
+
### 9. Appendices
|
|
259
|
+
|
|
260
|
+
- Commit reference table
|
|
261
|
+
- Key definitions
|
|
262
|
+
- Contact info
|
|
263
|
+
|
|
264
|
+
---
|
|
265
|
+
|
|
266
|
+
## Formatting Guidelines
|
|
267
|
+
|
|
268
|
+
**Tables:** Use markdown tables for structured data
|
|
269
|
+
|
|
270
|
+
**Code blocks:** Always include syntax highlighting
|
|
271
|
+
```solidity
|
|
272
|
+
// Solidity code
|
|
273
|
+
```
|
|
274
|
+
```rust
|
|
275
|
+
// Rust code
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
**Status indicators:**
|
|
279
|
+
- ✅ Complete
|
|
280
|
+
- ⚠️ Warning
|
|
281
|
+
- ❌ Failed/Blocked
|
|
282
|
+
|
|
283
|
+
**Severity:**
|
|
284
|
+
- 🔴 CRITICAL
|
|
285
|
+
- 🟠 HIGH
|
|
286
|
+
- 🟡 MEDIUM
|
|
287
|
+
- 🟢 LOW
|
|
288
|
+
|
|
289
|
+
**Before/After comparisons:**
|
|
290
|
+
```markdown
|
|
291
|
+
**BEFORE:**
|
|
292
|
+
```code
|
|
293
|
+
old code
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
**AFTER:**
|
|
297
|
+
```code
|
|
298
|
+
new code
|
|
299
|
+
```
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
**Line number references:** Always include
|
|
303
|
+
- Format: `file.sol:L123`
|
|
304
|
+
- Link to commit: `file.sol:L123 (commit abc123)`
|
|
305
|
+
|
|
306
|
+
---
|
|
307
|
+
|
|
308
|
+
## File Naming and Location
|
|
309
|
+
|
|
310
|
+
**Priority order for output:**
|
|
311
|
+
1. Current working directory (if project repo)
|
|
312
|
+
2. User's Desktop
|
|
313
|
+
3. `~/.claude/skills/differential-review/output/`
|
|
314
|
+
|
|
315
|
+
**Filename format:**
|
|
316
|
+
```
|
|
317
|
+
<PROJECT>_DIFFERENTIAL_REVIEW_<DATE>.md
|
|
318
|
+
|
|
319
|
+
Example: VeChain_Stargate_DIFFERENTIAL_REVIEW_2025-12-26.md
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
---
|
|
323
|
+
|
|
324
|
+
## User Notification Template
|
|
325
|
+
|
|
326
|
+
After generating report:
|
|
327
|
+
|
|
328
|
+
```markdown
|
|
329
|
+
Report generated successfully!
|
|
330
|
+
|
|
331
|
+
📄 File: [filename]
|
|
332
|
+
📁 Location: [path]
|
|
333
|
+
📏 Size: XX KB
|
|
334
|
+
⏱️ Review Time: ~X hours
|
|
335
|
+
|
|
336
|
+
Summary:
|
|
337
|
+
- X findings (Y critical, Z high)
|
|
338
|
+
- Final recommendation: APPROVE/REJECT/CONDITIONAL
|
|
339
|
+
- Confidence: HIGH/MEDIUM/LOW
|
|
340
|
+
|
|
341
|
+
Next steps:
|
|
342
|
+
- Review findings in detail
|
|
343
|
+
- Address CRITICAL/HIGH issues before merge
|
|
344
|
+
- Consider chaining with issue-writer for stakeholder report
|
|
345
|
+
```
|
|
346
|
+
|
|
347
|
+
---
|
|
348
|
+
|
|
349
|
+
## Integration with issue-writer
|
|
350
|
+
|
|
351
|
+
After generating differential review, transform into audit report:
|
|
352
|
+
|
|
353
|
+
```bash
|
|
354
|
+
issue-writer --input DIFFERENTIAL_REVIEW_REPORT.md --format audit-report
|
|
355
|
+
```
|
|
356
|
+
|
|
357
|
+
This creates polished documentation for non-technical stakeholders.
|
|
358
|
+
|
|
359
|
+
---
|
|
360
|
+
|
|
361
|
+
## Error Handling
|
|
362
|
+
|
|
363
|
+
If file write fails:
|
|
364
|
+
1. Try Desktop location
|
|
365
|
+
2. Try temp directory
|
|
366
|
+
3. As last resort, output full report to chat
|
|
367
|
+
4. Notify user to save manually
|
|
368
|
+
|
|
369
|
+
**Always prioritize persistent artifact generation over ephemeral chat output.**
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "entry-point-analyzer",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Analyzes smart contract codebases to identify state-changing entry points for security auditing. Detects externally callable functions that modify state, categorizes them by access level, and generates structured audit reports.",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "Nicolas Donboly",
|
|
7
|
+
"email": "opensource@trailofbits.com",
|
|
8
|
+
"url": "https://github.com/trailofbits"
|
|
9
|
+
}
|
|
10
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# Entry Point Analyzer
|
|
2
|
+
|
|
3
|
+
A Claude skill for systematically identifying **state-changing** entry points in smart contract codebases to guide security audits.
|
|
4
|
+
|
|
5
|
+
## Purpose
|
|
6
|
+
|
|
7
|
+
When auditing smart contracts, examining each file or function individually is inefficient. What auditors need is to start from **entry points**—the externally callable functions that represent the attack surface. This skill automates the identification and classification of state-changing entry points, excluding view/pure/read-only functions that cannot directly cause loss of funds or state corruption.
|
|
8
|
+
|
|
9
|
+
## Supported Languages
|
|
10
|
+
|
|
11
|
+
| Language | File Extensions | Framework Support |
|
|
12
|
+
|----------|-----------------|-------------------|
|
|
13
|
+
| Solidity | `.sol` | OpenZeppelin, custom modifiers |
|
|
14
|
+
| Vyper | `.vy` | Native patterns |
|
|
15
|
+
| Solana | `.rs` | Anchor, Native |
|
|
16
|
+
| Move | `.move` | Aptos, Sui |
|
|
17
|
+
| TON | `.fc`, `.func`, `.tact` | FunC, Tact |
|
|
18
|
+
| CosmWasm | `.rs` | cw-ownable, cw-controllers |
|
|
19
|
+
|
|
20
|
+
## Access Classifications
|
|
21
|
+
|
|
22
|
+
The skill categorizes entry points into four levels:
|
|
23
|
+
|
|
24
|
+
1. **Public (Unrestricted)** — Callable by anyone; highest audit priority
|
|
25
|
+
2. **Role-Restricted** — Limited to specific roles (admin, governance, guardian, etc.)
|
|
26
|
+
3. **Review Required** — Ambiguous access patterns needing manual verification
|
|
27
|
+
4. **Contract-Only** — Internal integration points (callbacks, hooks)
|
|
28
|
+
|
|
29
|
+
## Output
|
|
30
|
+
|
|
31
|
+
Generates a structured markdown report with:
|
|
32
|
+
- Summary table of entry point counts by category
|
|
33
|
+
- Detailed tables for each access level
|
|
34
|
+
- Function signatures with file:line references
|
|
35
|
+
- Restriction patterns and role assignments
|
|
36
|
+
- List of analyzed files
|
|
37
|
+
|
|
38
|
+
## Usage
|
|
39
|
+
|
|
40
|
+
Trigger the skill with requests like:
|
|
41
|
+
- "Analyze the entry points in this codebase"
|
|
42
|
+
- "Find all external functions and access levels"
|
|
43
|
+
- "List audit flows for src/core/"
|
|
44
|
+
- "What privileged operations exist in this project?"
|
|
45
|
+
|
|
46
|
+
## Directory Filtering
|
|
47
|
+
|
|
48
|
+
Specify a subdirectory to limit scope:
|
|
49
|
+
- "Analyze only `src/core/`"
|
|
50
|
+
- "Find entry points in `contracts/protocol/`"
|
|
51
|
+
|
|
52
|
+
## Role Detection
|
|
53
|
+
|
|
54
|
+
The skill infers roles from common patterns:
|
|
55
|
+
|
|
56
|
+
| Pattern | Detected Role |
|
|
57
|
+
|---------|---------------|
|
|
58
|
+
| `onlyOwner`, `msg.sender == owner` | Owner |
|
|
59
|
+
| `onlyAdmin`, `ADMIN_ROLE` | Admin |
|
|
60
|
+
| `onlyGovernance`, `governance` | Governance |
|
|
61
|
+
| `onlyGuardian`, `onlyPauser` | Guardian |
|
|
62
|
+
| `onlyKeeper`, `onlyRelayer` | Keeper/Relayer |
|
|
63
|
+
| `onlyStrategy`, `strategist` | Strategist |
|
|
64
|
+
| Dynamic checks (`authorized[msg.sender]`) | Review Required |
|
|
65
|
+
|
|
66
|
+
## Installation
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
/plugin install trailofbits/skills/plugins/entry-point-analyzer
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## License
|
|
73
|
+
|
|
74
|
+
See LICENSE.txt for terms.
|
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: security-entry-point-analyzer
|
|
3
|
+
description: Analyzes smart contract codebases to identify state-changing entry points for security auditing. Detects externally callable functions that modify state, categorizes them by access level (public, admin, role-restricted, contract-only), and generates structured audit reports. Excludes view/pure/read-only functions. Use when auditing smart contracts (Solidity, Vyper, Solana/Rust, Move, TON, CosmWasm) or when asked to find entry points, audit flows, external functions, access control patterns, or privileged operations.
|
|
4
|
+
allowed-tools:
|
|
5
|
+
- Read
|
|
6
|
+
- Grep
|
|
7
|
+
- Glob
|
|
8
|
+
- Bash
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Entry Point Analyzer
|
|
12
|
+
|
|
13
|
+
Systematically identify all **state-changing** entry points in a smart contract codebase to guide security audits.
|
|
14
|
+
|
|
15
|
+
## When to Use
|
|
16
|
+
|
|
17
|
+
Use this skill when:
|
|
18
|
+
- Starting a smart contract security audit to map the attack surface
|
|
19
|
+
- Asked to find entry points, external functions, or audit flows
|
|
20
|
+
- Analyzing access control patterns across a codebase
|
|
21
|
+
- Identifying privileged operations and role-restricted functions
|
|
22
|
+
- Building an understanding of which functions can modify contract state
|
|
23
|
+
|
|
24
|
+
## When NOT to Use
|
|
25
|
+
|
|
26
|
+
Do NOT use this skill for:
|
|
27
|
+
- Vulnerability detection (use audit-context-building or domain-specific-audits)
|
|
28
|
+
- Writing exploit POCs (use solidity-poc-builder)
|
|
29
|
+
- Code quality or gas optimization analysis
|
|
30
|
+
- Non-smart-contract codebases
|
|
31
|
+
- Analyzing read-only functions (this skill excludes them)
|
|
32
|
+
|
|
33
|
+
## Scope: State-Changing Functions Only
|
|
34
|
+
|
|
35
|
+
This skill focuses exclusively on functions that can modify state. **Excluded:**
|
|
36
|
+
|
|
37
|
+
| Language | Excluded Patterns |
|
|
38
|
+
|----------|-------------------|
|
|
39
|
+
| Solidity | `view`, `pure` functions |
|
|
40
|
+
| Vyper | `@view`, `@pure` functions |
|
|
41
|
+
| Solana | Functions without `mut` account references |
|
|
42
|
+
| Move | Non-entry `public fun` (module-callable only) |
|
|
43
|
+
| TON | `get` methods (FunC), read-only receivers (Tact) |
|
|
44
|
+
| CosmWasm | `query` entry point and its handlers |
|
|
45
|
+
|
|
46
|
+
**Why exclude read-only functions?** They cannot directly cause loss of funds or state corruption. While they may leak information, the primary audit focus is on functions that can change state.
|
|
47
|
+
|
|
48
|
+
## Workflow
|
|
49
|
+
|
|
50
|
+
1. **Detect Language** - Identify contract language(s) from file extensions and syntax
|
|
51
|
+
2. **Use Tooling (if available)** - For Solidity, check if Slither is available and use it
|
|
52
|
+
3. **Locate Contracts** - Find all contract/module files (apply directory filter if specified)
|
|
53
|
+
4. **Extract Entry Points** - Parse each file for externally callable, state-changing functions
|
|
54
|
+
5. **Classify Access** - Categorize each function by access level
|
|
55
|
+
6. **Generate Report** - Output structured markdown report
|
|
56
|
+
|
|
57
|
+
## Slither Integration (Solidity)
|
|
58
|
+
|
|
59
|
+
For Solidity codebases, Slither can automatically extract entry points. Before manual analysis:
|
|
60
|
+
|
|
61
|
+
### 1. Check if Slither is Available
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
which slither
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### 2. If Slither is Detected, Run Entry Points Printer
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
slither . --print entry-points
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
This outputs a table of all state-changing entry points with:
|
|
74
|
+
- Contract name
|
|
75
|
+
- Function name
|
|
76
|
+
- Visibility
|
|
77
|
+
- Modifiers applied
|
|
78
|
+
|
|
79
|
+
### 3. Use Slither Output as Foundation
|
|
80
|
+
|
|
81
|
+
- Parse the Slither output table to populate your analysis
|
|
82
|
+
- Cross-reference with manual inspection for access control classification
|
|
83
|
+
- Slither may miss some patterns (callbacks, dynamic access control)—supplement with manual review
|
|
84
|
+
- If Slither fails (compilation errors, unsupported features), fall back to manual analysis
|
|
85
|
+
|
|
86
|
+
### 4. When Slither is NOT Available
|
|
87
|
+
|
|
88
|
+
If `which slither` returns nothing, proceed with manual analysis using the language-specific reference files.
|
|
89
|
+
|
|
90
|
+
## Language Detection
|
|
91
|
+
|
|
92
|
+
| Extension | Language | Reference |
|
|
93
|
+
|-----------|----------|-----------|
|
|
94
|
+
| `.sol` | Solidity | [skills/entry-point-analyzer/references/solidity.md](skills/entry-point-analyzer/references/solidity.md) |
|
|
95
|
+
| `.vy` | Vyper | [skills/entry-point-analyzer/references/vyper.md](skills/entry-point-analyzer/references/vyper.md) |
|
|
96
|
+
| `.rs` + `Cargo.toml` with `solana-program` | Solana (Rust) | [skills/entry-point-analyzer/references/solana.md](skills/entry-point-analyzer/references/solana.md) |
|
|
97
|
+
| `.move` + `Move.toml` with `edition` | [skills/entry-point-analyzer/references/move-sui.md](skills/entry-point-analyzer/references/move-sui.md) |
|
|
98
|
+
| `.move` + `Move.toml` with `Aptos` | [skills/entry-point-analyzer/references/move-aptos.md](skills/entry-point-analyzer/references/move-aptos.md) |
|
|
99
|
+
| `.fc`, `.func`, `.tact` | TON (FunC/Tact) | [skills/entry-point-analyzer/references/ton.md](skills/entry-point-analyzer/references/ton.md) |
|
|
100
|
+
| `.rs` + `Cargo.toml` with `cosmwasm-std` | CosmWasm | [skills/entry-point-analyzer/references/cosmwasm.md](skills/entry-point-analyzer/references/cosmwasm.md) |
|
|
101
|
+
|
|
102
|
+
Load the appropriate reference file(s) based on detected language before analysis.
|
|
103
|
+
|
|
104
|
+
## Access Classification
|
|
105
|
+
|
|
106
|
+
Classify each state-changing entry point into one of these categories:
|
|
107
|
+
|
|
108
|
+
### 1. Public (Unrestricted)
|
|
109
|
+
Functions callable by anyone without restrictions.
|
|
110
|
+
|
|
111
|
+
### 2. Role-Restricted
|
|
112
|
+
Functions limited to specific roles. Common patterns to detect:
|
|
113
|
+
- Explicit role names: `admin`, `owner`, `governance`, `guardian`, `operator`, `manager`, `minter`, `pauser`, `keeper`, `relayer`, `lender`, `borrower`
|
|
114
|
+
- Role-checking patterns: `onlyRole`, `hasRole`, `require(msg.sender == X)`, `assert_owner`, `#[access_control]`
|
|
115
|
+
- When role is ambiguous, flag as **"Restricted (review required)"** with the restriction pattern noted
|
|
116
|
+
|
|
117
|
+
### 3. Contract-Only (Internal Integration Points)
|
|
118
|
+
Functions callable only by other contracts, not by EOAs. Indicators:
|
|
119
|
+
- Callbacks: `onERC721Received`, `uniswapV3SwapCallback`, `flashLoanCallback`
|
|
120
|
+
- Interface implementations with contract-caller checks
|
|
121
|
+
- Functions that revert if `tx.origin == msg.sender`
|
|
122
|
+
- Cross-contract hooks
|
|
123
|
+
|
|
124
|
+
## Output Format
|
|
125
|
+
|
|
126
|
+
Generate a markdown report with this structure:
|
|
127
|
+
|
|
128
|
+
```markdown
|
|
129
|
+
# Entry Point Analysis: [Project Name]
|
|
130
|
+
|
|
131
|
+
**Analyzed**: [timestamp]
|
|
132
|
+
**Scope**: [directories analyzed or "full codebase"]
|
|
133
|
+
**Languages**: [detected languages]
|
|
134
|
+
**Focus**: State-changing functions only (view/pure excluded)
|
|
135
|
+
|
|
136
|
+
## Summary
|
|
137
|
+
|
|
138
|
+
| Category | Count |
|
|
139
|
+
|----------|-------|
|
|
140
|
+
| Public (Unrestricted) | X |
|
|
141
|
+
| Role-Restricted | X |
|
|
142
|
+
| Restricted (Review Required) | X |
|
|
143
|
+
| Contract-Only | X |
|
|
144
|
+
| **Total** | **X** |
|
|
145
|
+
|
|
146
|
+
---
|
|
147
|
+
|
|
148
|
+
## Public Entry Points (Unrestricted)
|
|
149
|
+
|
|
150
|
+
State-changing functions callable by anyone—prioritize for attack surface analysis.
|
|
151
|
+
|
|
152
|
+
| Function | File | Notes |
|
|
153
|
+
|----------|------|-------|
|
|
154
|
+
| `functionName(params)` | `path/to/file.sol:L42` | Brief note if relevant |
|
|
155
|
+
|
|
156
|
+
---
|
|
157
|
+
|
|
158
|
+
## Role-Restricted Entry Points
|
|
159
|
+
|
|
160
|
+
### Admin / Owner
|
|
161
|
+
| Function | File | Restriction |
|
|
162
|
+
|----------|------|-------------|
|
|
163
|
+
| `setFee(uint256)` | `Config.sol:L15` | `onlyOwner` |
|
|
164
|
+
|
|
165
|
+
### Governance
|
|
166
|
+
| Function | File | Restriction |
|
|
167
|
+
|----------|------|-------------|
|
|
168
|
+
|
|
169
|
+
### Guardian / Pauser
|
|
170
|
+
| Function | File | Restriction |
|
|
171
|
+
|----------|------|-------------|
|
|
172
|
+
|
|
173
|
+
### Other Roles
|
|
174
|
+
| Function | File | Restriction | Role |
|
|
175
|
+
|----------|------|-------------|------|
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
## Restricted (Review Required)
|
|
180
|
+
|
|
181
|
+
Functions with access control patterns that need manual verification.
|
|
182
|
+
|
|
183
|
+
| Function | File | Pattern | Why Review |
|
|
184
|
+
|----------|------|---------|------------|
|
|
185
|
+
| `execute(bytes)` | `Executor.sol:L88` | `require(trusted[msg.sender])` | Dynamic trust list |
|
|
186
|
+
|
|
187
|
+
---
|
|
188
|
+
|
|
189
|
+
## Contract-Only (Internal Integration Points)
|
|
190
|
+
|
|
191
|
+
Functions only callable by other contracts—useful for understanding trust boundaries.
|
|
192
|
+
|
|
193
|
+
| Function | File | Expected Caller |
|
|
194
|
+
|----------|------|-----------------|
|
|
195
|
+
| `onFlashLoan(...)` | `Vault.sol:L200` | Flash loan provider |
|
|
196
|
+
|
|
197
|
+
---
|
|
198
|
+
|
|
199
|
+
## Files Analyzed
|
|
200
|
+
|
|
201
|
+
- `path/to/file1.sol` (X state-changing entry points)
|
|
202
|
+
- `path/to/file2.sol` (X state-changing entry points)
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
## Filtering
|
|
206
|
+
|
|
207
|
+
When user specifies a directory filter:
|
|
208
|
+
- Only analyze files within that path
|
|
209
|
+
- Note the filter in the report header
|
|
210
|
+
- Example: "Analyze only `src/core/`" → scope = `src/core/`
|
|
211
|
+
|
|
212
|
+
## Analysis Guidelines
|
|
213
|
+
|
|
214
|
+
1. **Be thorough**: Don't skip files. Every state-changing externally callable function matters.
|
|
215
|
+
2. **Be conservative**: When uncertain about access level, flag for review rather than miscategorize.
|
|
216
|
+
3. **Skip read-only**: Exclude `view`, `pure`, and equivalent read-only functions.
|
|
217
|
+
4. **Note inheritance**: If a function's access control comes from a parent contract, note this.
|
|
218
|
+
5. **Track modifiers**: List all access-related modifiers/decorators applied to each function.
|
|
219
|
+
6. **Identify patterns**: Look for common patterns like:
|
|
220
|
+
- Initializer functions (often unrestricted on first call)
|
|
221
|
+
- Upgrade functions (high-privilege)
|
|
222
|
+
- Emergency/pause functions (guardian-level)
|
|
223
|
+
- Fee/parameter setters (admin-level)
|
|
224
|
+
- Token transfers and approvals (often public)
|
|
225
|
+
|
|
226
|
+
## Common Role Patterns by Protocol Type
|
|
227
|
+
|
|
228
|
+
| Protocol Type | Common Roles |
|
|
229
|
+
|---------------|--------------|
|
|
230
|
+
| DEX | `owner`, `feeManager`, `pairCreator` |
|
|
231
|
+
| Lending | `admin`, `guardian`, `liquidator`, `oracle` |
|
|
232
|
+
| Governance | `proposer`, `executor`, `canceller`, `timelock` |
|
|
233
|
+
| NFT | `minter`, `admin`, `royaltyReceiver` |
|
|
234
|
+
| Bridge | `relayer`, `guardian`, `validator`, `operator` |
|
|
235
|
+
| Vault/Yield | `strategist`, `keeper`, `harvester`, `manager` |
|
|
236
|
+
|
|
237
|
+
## Rationalizations to Reject
|
|
238
|
+
|
|
239
|
+
When analyzing entry points, reject these shortcuts:
|
|
240
|
+
- "This function looks standard" → Still classify it; standard functions can have non-standard access control
|
|
241
|
+
- "The modifier name is clear" → Verify the modifier's actual implementation
|
|
242
|
+
- "This is obviously admin-only" → Trace the actual restriction; "obvious" assumptions miss subtle bypasses
|
|
243
|
+
- "I'll skip the callbacks" → Callbacks define trust boundaries; always include them
|
|
244
|
+
- "It doesn't modify much state" → Any state change can be exploited; include all non-view functions
|
|
245
|
+
|
|
246
|
+
## Error Handling
|
|
247
|
+
|
|
248
|
+
If a file cannot be parsed:
|
|
249
|
+
1. Note it in the report under "Analysis Warnings"
|
|
250
|
+
2. Continue with remaining files
|
|
251
|
+
3. Suggest manual review for unparsable files
|