This repository demonstrates the Solidity Security Scanner PRO GitHub Action in action.
The VulnerableVault.sol contract contains these intentional vulnerabilities:
| # | Vulnerability | Severity | Line |
|---|---|---|---|
| 1 | Reentrancy β external call before state update | π΄ Critical | 22-24 |
| 2 | Unprotected selfdestruct |
π High | 29-31 |
| 3 | Uncached array length in loop | π‘ Medium | 35 |
| 4 | Post-increment in loop (gas waste) | π‘ Medium | 35 |
| 5 | tx.origin authentication |
π High | 41 |
When you push code or open a PR, the scanner automatically:
- Detects all
.solfiles - Runs static analysis (Slither + heuristic engine)
- Posts inline comments on vulnerable lines
- Outputs a JSON report with severity scores
# .github/workflows/audit.yml
name: "Security Audit"
on: [pull_request]
jobs:
audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: mvmax-dev/solidity-security-scanner@main
with:
github_token: ${{ secrets.GITHUB_TOKEN }}β If this scanner catches a vulnerability in your project, consider starring the main repo!