chore: refresh Codecov integration (action v5, yaml, app docs) #33
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Slither Analysis | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - fix/** | |
| - feature/** | |
| - ci/** | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| # ── Job 1: Scan clean code (basic, applications, defi, evm) ───────────────── | |
| # Uploads findings to GitHub Code Scanning — never blocks | |
| # (many "clean" teaching contracts intentionally use advanced patterns | |
| # that Slither flags, e.g. delegatecall, custom ERC20, DeFi math) | |
| slither-clean: | |
| name: "Slither — clean contracts" | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| security-events: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Install Foundry toolchain | |
| uses: foundry-rs/foundry-toolchain@v1 | |
| with: | |
| version: stable | |
| - name: Install Forge dependencies | |
| run: forge install | |
| - name: Run Slither on clean contracts | |
| uses: crytic/slither-action@v0.4.0 | |
| id: slither-clean | |
| continue-on-error: true # informational — teaching repo uses intentional patterns | |
| with: | |
| # slither --filter-paths expects a regex, not a comma-separated list | |
| slither-args: --filter-paths "(src/hacks|lib|test|script)(/|$)" | |
| sarif: slither-clean.sarif | |
| fail-on: none | |
| - name: Upload SARIF to GitHub Code Scanning | |
| uses: github/codeql-action/upload-sarif@v3 | |
| if: always() | |
| with: | |
| sarif_file: slither-clean.sarif | |
| category: slither-clean | |
| # ── Job 2: Scan hacks/ (expected vulnerabilities) ─────────────────────────── | |
| # Informational only — results are kept as workflow artifacts (not Code Scanning) | |
| slither-hacks: | |
| name: "Slither — hacks (informational)" | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Install Foundry toolchain | |
| uses: foundry-rs/foundry-toolchain@v1 | |
| with: | |
| version: stable | |
| - name: Install Forge dependencies | |
| run: forge install | |
| - name: Run Slither on hacks/ (informational only) | |
| uses: crytic/slither-action@v0.4.0 | |
| id: slither-hacks | |
| continue-on-error: true | |
| with: | |
| # Scan only src/hacks by filtering out all other src/ directories | |
| slither-args: --filter-paths "src/basic,src/applications,src/defi,src/evm" | |
| sarif: slither-hacks.sarif | |
| fail-on: none | |
| - name: Upload hacks SARIF as artifact | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: slither-hacks-sarif | |
| path: slither-hacks.sarif |