File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : devsecops-pipeline
2+ on : [push, pull_request]
3+
4+ jobs :
5+ secrets :
6+ name : Secrets scanning (Gitleaks)
7+ runs-on : self-hosted
8+ steps :
9+ - uses : actions/checkout@v4
10+ with : { fetch-depth: 0 } # para análisis que miran historial
11+ - name : Gitleaks
12+ uses : gitleaks/gitleaks-action@v2
13+ env :
14+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
15+ # Si usas un gitleaks.toml propio, añade inputs/vars según la acción
16+
17+ sast :
18+ name : SAST (Semgrep)
19+ runs-on : self-hosted
20+ needs : [secrets]
21+ steps :
22+ - uses : actions/checkout@v4
23+ - name : Semgrep (bloqueante)
24+ run : |
25+ docker run --rm -v "$PWD:/src" returntocorp/semgrep:latest \
26+ semgrep scan --error --config p/ci --config .semgrep
27+ - name : Export SARIF (para pestaña Security)
28+ run : |
29+ docker run --rm -v "$PWD:/src" returntocorp/semgrep:latest \
30+ semgrep scan --config p/ci --config .semgrep --sarif -o semgrep.sarif || true
31+ - uses : github/codeql-action/upload-sarif@v3
32+ with : { sarif_file: semgrep.sarif }
Load diff This file was deleted.
You can’t perform that action at this time.
0 commit comments