athena-mcp 1.0.0
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 +477 -0
- package/install.js +327 -0
- package/mcp/servers.json +100 -0
- package/mcp/tools/README.md +64 -0
- package/mcp/tools/__init__.py +1 -0
- package/mcp/tools/aderyn_runner.py +226 -0
- package/mcp/tools/eas_attest.py +404 -0
- package/mcp/tools/evidence_chain.py +363 -0
- package/mcp/tools/exploit_simulator.py +545 -0
- package/mcp/tools/fuzz_runner.py +440 -0
- package/mcp/tools/gev_analyzer.py +362 -0
- package/mcp/tools/halmos_runner.py +408 -0
- package/mcp/tools/incremental_auditor.py +441 -0
- package/mcp/tools/knowledge_base.py +378 -0
- package/mcp/tools/poc_generator.py +479 -0
- package/mcp/tools/protocol_scanner.py +456 -0
- package/mcp/tools/repair_validator.py +421 -0
- package/mcp/tools/slither_runner.py +221 -0
- package/package.json +52 -0
- package/requirements.txt +20 -0
- package/skills/glm-audit-skill/SKILL.md +73 -0
- package/skills/glm-audit-skill/references/audit-agents/access-control-agent.md +42 -0
- package/skills/glm-audit-skill/references/audit-agents/asymmetry-agent.md +42 -0
- package/skills/glm-audit-skill/references/audit-agents/boundary-agent.md +42 -0
- package/skills/glm-audit-skill/references/audit-agents/economic-security-agent.md +42 -0
- package/skills/glm-audit-skill/references/audit-agents/execution-trace-agent.md +42 -0
- package/skills/glm-audit-skill/references/audit-agents/first-principles-agent.md +42 -0
- package/skills/glm-audit-skill/references/audit-agents/flow-gap-agent.md +38 -0
- package/skills/glm-audit-skill/references/audit-agents/invariant-agent.md +37 -0
- package/skills/glm-audit-skill/references/audit-agents/math-precision-agent.md +37 -0
- package/skills/glm-audit-skill/references/audit-agents/numerical-gap-agent.md +37 -0
- package/skills/glm-audit-skill/references/audit-agents/periphery-agent.md +37 -0
- package/skills/glm-audit-skill/references/audit-agents/shared-rules.md +37 -0
- package/skills/glm-audit-skill/references/audit-agents/trust-gap-agent.md +39 -0
- package/skills/glm-audit-skill/references/judging.md +45 -0
- package/skills/glm-audit-skill/references/report-formatting.md +22 -0
- package/skills/glm-audit-skill/references/senior-auditor-sop.md +34 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Finding Assessment Protocol
|
|
2
|
+
|
|
3
|
+
Every candidate finding must clear four sequential checkpoints before it becomes a confirmed finding. A failure at any checkpoint results in rejection or demotion to a lead for further investigation.
|
|
4
|
+
|
|
5
|
+
## Checkpoint 1 — Path Reconstruction
|
|
6
|
+
|
|
7
|
+
Walk the full execution path from external entry point to the alleged vulnerability. Document every modifier, require statement, guard clause, and access control check encountered along that path. If you cannot trace a complete unbroken path, the finding fails here.
|
|
8
|
+
|
|
9
|
+
## Checkpoint 2 — State Feasibility
|
|
10
|
+
|
|
11
|
+
Demonstrate that the vulnerable contract state can actually be reached in a production deployment. Consider initialization order, proxy patterns, upgrade mechanisms, and realistic transaction sequences. Theoretical states that require impossible preconditions do not pass.
|
|
12
|
+
|
|
13
|
+
## Checkpoint 3 — Actor Profile
|
|
14
|
+
|
|
15
|
+
Identify the minimum privilege level required to trigger the vulnerability. The attack must be executable by an unprivileged or semi-privileged actor — owner-only findings are typically informational only. Document the exact actor type and their capabilities.
|
|
16
|
+
|
|
17
|
+
## Checkpoint 4 — Damage Assessment
|
|
18
|
+
|
|
19
|
+
Quantify the concrete harm: stolen funds, bricked contracts, corrupted state, or broken invariants. Tie the impact to an identifiable victim class (liquidity providers, token holders, protocol treasury). Abstract or theoretical damage does not qualify.
|
|
20
|
+
|
|
21
|
+
## Confidence Scoring
|
|
22
|
+
|
|
23
|
+
Base score starts at 100. Apply deductions:
|
|
24
|
+
|
|
25
|
+
- Incomplete execution path traced: -20
|
|
26
|
+
- Impact bounded to a single non-compounding scenario: -15
|
|
27
|
+
- Requires specific or unusual contract state to be reachable: -10
|
|
28
|
+
- Actor requires partial privilege (not fully unprivileged): -5
|
|
29
|
+
|
|
30
|
+
Score below 60 → demote to lead. Score below 40 → reject outright.
|
|
31
|
+
|
|
32
|
+
## Known-Safe Patterns (skip these)
|
|
33
|
+
|
|
34
|
+
- `unchecked` arithmetic blocks in Solidity ≥0.8 (overflow reverts by default)
|
|
35
|
+
- SafeERC20 wrapper usage for token interactions
|
|
36
|
+
- `nonReentrant` guards (flag only if cross-contract reentrancy is still possible)
|
|
37
|
+
- Two-step ownership transfer patterns
|
|
38
|
+
|
|
39
|
+
## Lead Escalation Criteria
|
|
40
|
+
|
|
41
|
+
Promote a finding to lead status (requires senior auditor review) when:
|
|
42
|
+
|
|
43
|
+
- The vulnerability spans multiple contracts in an echo/reentrancy chain
|
|
44
|
+
- Two or more independent agents converge on the same attack surface
|
|
45
|
+
- The attack path is partially complete but missing one link that may exist under specific conditions
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Audit Report Structure
|
|
2
|
+
|
|
3
|
+
Save the final report as `{project-name}-audit-report-{timestamp}.md` in the project root directory.
|
|
4
|
+
|
|
5
|
+
## Section Layout
|
|
6
|
+
|
|
7
|
+
1. **Executive Summary** — One paragraph: total findings by severity, overall risk posture, and any critical items requiring immediate attention.
|
|
8
|
+
|
|
9
|
+
2. **Scope & Methodology** — Contracts audited, commit hash, tools used, and audit duration.
|
|
10
|
+
|
|
11
|
+
3. **Findings** — Ordered by confidence score (descending). Each entry includes:
|
|
12
|
+
- **ID & Title** with confidence score in brackets (e.g. `[C:85]`)
|
|
13
|
+
- **Severity**: Critical / High / Medium / Low / Informational
|
|
14
|
+
- **Location**: `ContractName.functionName()` with line range
|
|
15
|
+
- **Description**: What the vulnerability is and why it matters
|
|
16
|
+
- **Proof of Concept**: Concrete scenario demonstrating the issue
|
|
17
|
+
- **Recommendation**: Actionable fix with diff-style code snippet
|
|
18
|
+
- **Status**: Open / Acknowledged / Mitigated
|
|
19
|
+
|
|
20
|
+
4. **Leads** — Trails identified but not fully verified. Each lead includes the partial evidence and reason for demotion (e.g., "missing link in cross-contract path"). These are not confirmed findings but warrant follow-up.
|
|
21
|
+
|
|
22
|
+
5. **Appendix** — Agent breakdown table showing which agents flagged which findings, plus any tool output worth preserving.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Senior Auditor Operating Principles
|
|
2
|
+
|
|
3
|
+
This document defines the analytical mindset that every audit agent should internalize before scanning code. These principles are not about tools or checklists — they are about how to think.
|
|
4
|
+
|
|
5
|
+
## Principle 1 — Decompose Before You Attack
|
|
6
|
+
|
|
7
|
+
Before hunting for bugs, fully understand what the contract is supposed to do. Read the documentation, the comments, and the test suite. Build a mental model of the intended behavior. If you cannot articulate the contract's purpose in plain language, you are not ready to look for what goes wrong.
|
|
8
|
+
|
|
9
|
+
This means: for each function, ask "what is the intended invariant here?" before asking "how can I break it?"
|
|
10
|
+
|
|
11
|
+
## Principle 2 — Assume Every Assumption Is Wrong
|
|
12
|
+
|
|
13
|
+
Every `require` statement, every modifier, every unchecked return value embodies an assumption about the world. Your job is to enumerate those assumptions and then stress-test each one.
|
|
14
|
+
|
|
15
|
+
For each line of code, ask three questions:
|
|
16
|
+
- What does this assume to be true?
|
|
17
|
+
- How was that assumption established?
|
|
18
|
+
- What happens to downstream logic if the assumption is violated?
|
|
19
|
+
|
|
20
|
+
Pay special attention to assumptions that are validated once during initialization but relied upon forever after. Time is the enemy of assumptions.
|
|
21
|
+
|
|
22
|
+
## Principle 3 — Think Adversarially, Not Defensively
|
|
23
|
+
|
|
24
|
+
Once you understand the intended behavior, flip your perspective. Instead of asking "does this code work?", ask "how would I make it fail while looking like it works?" This is the inversion principle: after understanding what code IS supposed to do, engineer scenarios where it does NOT do that — while still passing all existing checks.
|
|
25
|
+
|
|
26
|
+
The strongest vulnerabilities are those that exist in the gap between what tests verify and what the contract actually permits.
|
|
27
|
+
|
|
28
|
+
## Principle 4 — Trace the Money, Not the Code
|
|
29
|
+
|
|
30
|
+
Code-level correctness does not guarantee economic correctness. A function can be bug-free in isolation yet still allow value extraction when composed with other protocols, flash loans, or MEV strategies. Always ask: who benefits from this code path, and could they engineer an advantage that was not intended?
|
|
31
|
+
|
|
32
|
+
## Principle 5 — Bound Your Confidence
|
|
33
|
+
|
|
34
|
+
Not every suspicious pattern is a vulnerability. Rate your confidence honestly. A finding you cannot fully trace to a concrete impact is a lead, not a finding. Over-reporting erodes trust; under-reporting misses real risks. Calibrate carefully.
|