How asendz/ai-web3-security-course works
Lucid is a course-built Solidity security harness: an engineer points its CLI at contracts, which are loaded into a numbered source blob, audited by an LLM, and printed as validated findings. Optional Module 2 paths first build protocol context and can repeat the hunt while excluding earlier findings. The README also describes later specialist orchestration and measurement, but those capabilities are not evidenced as runtime components in the supplied tree. The agent excerpt is incomplete, so only documented call relationships are shown.
Main entry points: run.py Scan CLI · llm.py LLM client · agent.py Baseline hunt · schema.py Finding validator
Components 12
Scan workflow
- Scan CLI
lucid/run.py - Solidity sources
target/src - Codebase loader
lucid/codebase.py - Printed findings
lucid/run.py
Audit logic
- Context builder
lucid/context.py - Baseline hunt
lucid/agent.py - Context-aware hunt
lucid/agent.py - Exclusion loop
lucid/agent.py - Finding validator
lucid/schema.py
Model boundary
- LLM client
lucid/llm.py - Chat model API
Other components
- Engineer
Connections 20
- Engineer → Scan CLI: starts scan
- Scan CLI → Codebase loader: loads contracts
- Solidity sources → Codebase loader: reads Solidity
- Scan CLI → Context builder: builds context
- Context builder → LLM client: requests context
- Scan CLI → Baseline hunt: runs hunt
- Scan CLI → Context-aware hunt: runs contextual hunt
- Scan CLI → Exclusion loop: runs rounds
- Baseline hunt → LLM client: requests audit
- Context-aware hunt → LLM client: requests audit
- Exclusion loop → LLM client: requests rounds
- Baseline hunt → Finding validator: validates findings
- Context-aware hunt → Finding validator: validates findings
- Exclusion loop → Finding validator: validates findings
- LLM client → Chat model API: sends prompts
- Chat model API → LLM client: returns replies
- Baseline hunt → Scan CLI: returns findings
- Context-aware hunt → Scan CLI: returns findings
- Exclusion loop → Scan CLI: returns findings
- Scan CLI → Printed findings: prints results