claude #9
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: Semgrep Code Scan | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| workflow_dispatch: | |
| jobs: | |
| semgrep: | |
| name: Run Semgrep | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: 3.x | |
| - name: Install Semgrep | |
| run: pip install semgrep | |
| - name: Run Semgrep scan (non-blocking) | |
| run: semgrep ci --config auto || true | |
| - name: Save Semgrep reports | |
| if: always() | |
| run: | | |
| semgrep --config auto --json > semgrep-report.json | |
| semgrep --config auto --text > semgrep-report.txt | |
| - name: Upload reports | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: semgrep-reports | |
| path: | | |
| semgrep-report.json | |
| semgrep-report.txt |