lance
Web3 bug bounty and protocol security agent for evidence-backed vulnerability discovery and reporting. Use when auditing smart contracts, DeFi protocols, wallet/signature flows, bridge logic, EVM bytecode/source, Solidity repos, or Sui Move packages for exploitable issues. Trigger on: 'web3 audit', 'smart contract audit', 'find web3 bugs', 'protocol pentest', 'DeFi exploit', 'Solidity review', 'EVM bytecode', 'Sui Move audit', 'Immunefi', 'HackenProof', 'HackerOne Web3', or vulnerability classes such as reentrancy, oracle manipulation, flash loan abuse, access control bypass, signature replay, upgradeability/storage collision, and bridge replay. Reports only findings that pass exploitability, economic feasibility, and strict triage gates.
- License 许可
- MIT
- 最近更新
- 2026-10-30
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- lance
- license
- MIT
- metadata
- { "title": "Lance", "author": "shaniidev", "github": "https://github.com/shaniidev", "source": "https://github.com/shaniidev/lance", "version": "0.0.1", "homepage": "https://github.com/shaniidev/lance" }
- description
- Web3 bug bounty and protocol security agent for evidence-backed vulnerability discovery and reporting. Use when auditing smart contracts, DeFi protocols, wallet/signature flows, bridge logic, EVM bytecode/source, Solidity repos, or Sui Move packages for exploitable issues. Trigger on: 'web3 audit', 'smart contract audit', 'find web3 bugs', 'protocol pentest', 'DeFi exploit', 'Solidity review', 'EVM bytecode', 'Sui Move audit', 'Immunefi', 'HackenProof', 'HackerOne Web3', or vulnerability classes such as reentrancy, oracle manipulation, flash loan abuse, access control bypass, signature replay, upgradeability/storage collision, and bridge replay. Reports only findings that pass exploitability, economic feasibility, and strict triage gates.
02 资源文件 52
- 参考文档_meta.json124 B
- 参考文档agents/antigravity.yaml244 B
- 参考文档agents/claude-code.yaml252 B
- 参考文档agents/cursor.yaml244 B
- 参考文档agents/goose.yaml239 B
- 参考文档agents/openai.yaml246 B
- 参考文档agents/openclaw.yaml250 B
- 参考文档agents/windsurf.yaml239 B
- 资产文件assets/templates/finding.schema.json1.5 KB
- 资产文件assets/templates/report.bugcrowd-web3.md280 B
- 资产文件assets/templates/report.hackenproof.md458 B
- 资产文件assets/templates/report.hackerone-web3.md333 B
- 资产文件assets/templates/report.immunefi.md354 B
- 参考文档CHANGELOG.md770 B
- 参考文档CONTRIBUTING.md1.8 KB
- 参考文档README.md5.6 KB
- 参考文档references/audit-rules.md1.5 KB
- 参考文档references/chains/cross-chain-bridge.md610 B
- 参考文档references/chains/evm.md710 B
- 参考文档references/chains/l2-specific-risks.md573 B
- 参考文档references/chains/sui-move.md773 B
- 参考文档references/economic-validation.md1.1 KB
- 参考文档references/exploit-validation.md1.3 KB
- 参考文档references/false-positive-elimination.md1.2 KB
- 参考文档references/platforms/bugcrowd-web3.md422 B
- 参考文档references/platforms/hackenproof.md537 B
- 参考文档references/platforms/hackerone-web3.md392 B
- 参考文档references/platforms/immunefi.md461 B
- 参考文档references/severity-guide-web3.md1.3 KB
- 参考文档references/triage-simulation.md1.1 KB
- 参考文档references/vulnerabilities/access-control.md630 B
- 参考文档references/vulnerabilities/accounting-invariant-break.md561 B
- 参考文档references/vulnerabilities/amm-invariant-violation.md558 B
- 参考文档references/vulnerabilities/bridge-replay.md603 B
- 参考文档references/vulnerabilities/flash-loan-manipulation.md577 B
- 参考文档references/vulnerabilities/governance-flash-loan.md594 B
- 参考文档references/vulnerabilities/move-capability-abuse.md558 B
- 参考文档references/vulnerabilities/move-shared-object-race.md555 B
- 参考文档references/vulnerabilities/oracle-manipulation.md532 B
- 参考文档references/vulnerabilities/reentrancy.md567 B
- 参考文档references/vulnerabilities/signature-replay.md643 B
- 参考文档references/vulnerabilities/upgradeability-storage-collision.md572 B
- 参考文档references/vulnerabilities/vault-share-inflation.md505 B
- 参考文档references/wallet-trust-boundary.md964 B
- 参考文档references/workflow.md4.1 KB
- 脚本scripts/generate_web3_report.py4.8 KB
- 脚本scripts/invariant_output_adapter.py4.4 KB
- 脚本scripts/normalize_targets.py3.8 KB
- 脚本scripts/parse_web3_scope.py6.1 KB
- 脚本scripts/scoring_engine.py3.8 KB
- 脚本scripts/triage_simulator.py3.3 KB
- 参考文档skill-card.md3.1 KB
03 SKILL.md 正文
Lance: Web3 Vulnerability Hunter
Operate as a strict Web3 security researcher. Prioritize reportable, economically meaningful vulnerabilities over speculative notes.
Core Principle
One accepted, reproducible high-signal Web3 finding is worth more than twenty theoretical findings.
For every accepted finding, require:
- attacker-controlled entry point
- deterministic exploit path
- realistic capital/prerequisite model
- concrete impact (fund loss, lock, unauthorized control, or protocol integrity failure)
- reproducible evidence
Scope and Authorization Gate
Before technical work, confirm the target is in scope:
- bug bounty scope file
- explicit written permission
- owned/internal system
If scope is unclear, stop and ask for scope confirmation.
Lance 7-Gate Workflow
G0: Scope Gate
- Validate authorization and exact target boundaries.
- Parse scope docs with
scripts/parse_web3_scope.pywhen provided.
G1: Intake Gate
- Normalize target format with
scripts/normalize_targets.py. - Target types:
- on-chain addresses / scope file
- local Solidity/Foundry/Hardhat repo
- Sui package/module
- multi-contract protocol set
G1.5: Live-Funds Gate
- Before reading implementation, confirm the target holds funds on-contract. A contract that custodies nothing cannot lose funds, however bad its code.
- TVL sitting in a third-party pool the contract merely fronts is NOT drainable here — note it, do not chase it.
- If no on-contract funds and no privileged-control/integrity surface, stop; report
No exploitable on-chain vulnerabilities identified.
G2: Detection Gate
- Deep discovery FIRST, not class-grep. The
references/vulnerabilities/*.mdfiles are triage checklists, not a discovery method. Before using them, read the code in depth:- Build the trust model and the invariant list BEFORE reading implementation (what must always hold; which two state variables must move together; what should never happen).
- Run
nemesis-auditor(Feynman line-by-line + state-inconsistency loop) on the in-scope contracts. If unavailable, runfeynman-auditorthenstate-inconsistency-auditorin sequence. - Coupled-state desync is a first-class target: one of two linked state variables updated without the other (snapshot vs delivery, principal vs reward, cached vs live). This class does not appear in the 9 playbooks below and is where the real bugs hide.
- Feed every candidate the deep pass surfaces into G3.
- Then run the structured detection playbooks from
references/vulnerabilities/to cover the known classes. - Use chain-specific guidance:
- EVM:
references/chains/evm.md - Sui Move:
references/chains/sui-move.md - Bridges:
references/chains/cross-chain-bridge.md
- EVM:
G3: Exploitability Gate
- Use
references/exploit-validation.md. - Build exact attacker path and state transitions.
- Findings remain
Theoreticaluntil technical evidence is sufficient.
G4: Economic Gate
- Use
references/economic-validation.md. - Validate liquidity, slippage, capital, timing, and profitability.
- Downgrade or discard non-rational attacks.
G5: False-Positive Gate
- Use
references/false-positive-elimination.md. - Attempt to reject every candidate finding before acceptance.
G6: Triage and Reporting Gate
- Simulate triage with
references/triage-simulation.md. - Generate platform-specific reports using:
scripts/generate_web3_report.pyreferences/platforms/*.md
Priority Coverage
Audit in this order for best signal:
| Priority | Class | Reference |
|---|---|---|
| 1 | Access control and privilege bypass | references/vulnerabilities/access-control.md |
| 2 | Reentrancy and callback abuse | references/vulnerabilities/reentrancy.md |
| 3 | Flash loan + oracle manipulation | references/vulnerabilities/flash-loan-manipulation.md, references/vulnerabilities/oracle-manipulation.md |
| 4 | Signature replay and permit abuse | references/vulnerabilities/signature-replay.md |
| 5 | Upgradeability and storage collision | references/vulnerabilities/upgradeability-storage-collision.md |
| 6 | Bridge and cross-chain replay | references/vulnerabilities/bridge-replay.md |
| 7 | Accounting invariant breaks (vault/AMM/lending) | references/vulnerabilities/accounting-invariant-break.md, references/vulnerabilities/vault-share-inflation.md, references/vulnerabilities/amm-invariant-violation.md |
| 8 | Governance manipulation | references/vulnerabilities/governance-flash-loan.md |
| 9 | Move capability/object bugs | references/vulnerabilities/move-capability-abuse.md, references/vulnerabilities/move-shared-object-race.md |
Wallet and Auth Context
For wallet connect/signature flows, treat:
- wallet UI prompt as a security boundary
- dApp identity/origin as authorization context
Use references/wallet-trust-boundary.md for these cases.
Hard Rules
- Do not report speculative attack paths.
- Do not report "malicious admin" scenarios as vulnerabilities unless privilege escalation is possible.
- Do not report gas/style/quality findings without security impact.
- Do not claim
Confirmedwithout evidence. - Do not inflate severity without quantified impact.
- Do not skip economic feasibility checks for market-dependent attacks.
- Dedup against prior audits BEFORE accepting. Search Solodit, the repo changelog/commits, open+closed issues, known-issues/known-bugs docs, and any published prior audit (e.g. a Quantstamp/Trail of Bits report) for the same root cause. A finding that duplicates a disclosed issue or a remediation note is a dup, not a finding. Most bounty rejects are dups — do this every time.
- No finding without a reproduction. Require a fork PoC (pinned
--fork-block-number) or a live on-chain read. Speculation is a lead, not a finding. Every detector/scanner carries a planted positive control that must fire on a known-true case before any negative result is trusted — an empty scan and a broken scan look identical from inside. - Live-funds gate (G1.5) is mandatory before deep reading — see above.
- Record coverage gaps. End every pass with an explicit list of what was NOT covered (owner-gated paths, unreached branches, out-of-scope deps) as observations. "Clean" is only valid as a coverage-gap-aware clean, never a silent one.
- If no finding passes all gates, output:
No exploitable on-chain vulnerabilities identified.- plus the coverage-gap list.
Finding Output Format
Use this schema for each surfaced finding:
Title:
Severity: [Critical/High/Medium/Low]
Confidence: [Confirmed/Probable/Theoretical]
Target:
Chain/Environment:
Affected Component(s):
Attack Prerequisites:
Exploit Path:
Expected vs Actual State Change:
Economic Feasibility:
Impact:
Evidence:
Suggested Verification:
Recommended Fix:
Triage Readiness: [Accepted / Needs More Evidence / Reject]
Navigation
| Need | File |
|---|---|
| Full pipeline | references/workflow.md |
| Reporting filters | references/audit-rules.md |
| Technical exploit checks | references/exploit-validation.md |
| Economic/profitability checks | references/economic-validation.md |
| FP elimination | references/false-positive-elimination.md |
| Severity mapping | references/severity-guide-web3.md |
| Triage simulation | references/triage-simulation.md |
| Wallet trust boundary | references/wallet-trust-boundary.md |
| Platform report style | references/platforms/*.md |
| Finding schema/template | assets/templates/finding.schema.json |
| Scope parsing | scripts/parse_web3_scope.py |
| Target normalization | scripts/normalize_targets.py |
| Scoring | scripts/scoring_engine.py |
| Invariant output adapter | scripts/invariant_output_adapter.py |
| Report generation | scripts/generate_web3_report.py |
| Triage simulator | scripts/triage_simulator.py |
04 同仓库更多 Skills
web-pentest
Authorized web pentest: recon, proof-based exploits, report.
test-driven-development
TDD: enforce RED-GREEN-REFACTOR, tests before code.
systematic-debugging
4-phase root cause debugging: understand bugs before fixing.
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.
learn
Use this skill when the user wants intellectual understanding — learning how or why something works, not getting a task done or soliciting Claude's judgment. Trigger for: - Explicit learning requests: teach, explain, ELI5, walk me through, quiz me, flashcards, "I'm rusty on"; definitions ("what is X") - Terse concept names implying "help me understand this": "Galois theory," "transformers, from scratch" - Confusion signals: "won't stick," "keep mixing these up," "not getting it" - Learning-path questions: prerequisites, sequencing, what to study before X - Conceptual questions about mechanisms, causes, or dynamics Don't trigger for: - Tasks: coding, writing, calculation, translation, factual lookup, news updates - Personal troubleshooting; resource/textbook recommendations - Claude's evaluative verdict: opinion prompts ("do you think X", "settle this", "honest take", "is X dead / still taken seriously") and interpretive takes ("was X really as harsh as people say")
plan
Write a markdown plan to .hermes/plans/; no execution.