ci: add CodeQL, Semgrep, Gitleaks, Trivy security scanning
This commit is contained in:
42
.github/workflows/semgrep.yml
vendored
Normal file
42
.github/workflows/semgrep.yml
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
name: Semgrep SAST
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: ['**']
|
||||
pull_request:
|
||||
branches: [main]
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
security-events: write
|
||||
|
||||
jobs:
|
||||
semgrep:
|
||||
name: Semgrep security scan
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
container:
|
||||
image: semgrep/semgrep:1.79
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Run Semgrep
|
||||
run: |
|
||||
semgrep scan \
|
||||
--config p/security-audit \
|
||||
--config p/secrets \
|
||||
--config p/owasp-top-ten \
|
||||
--config p/javascript \
|
||||
--config p/typescript \
|
||||
--sarif \
|
||||
--output=semgrep.sarif \
|
||||
--metrics=off
|
||||
|
||||
- name: Upload SARIF to GitHub Security
|
||||
uses: github/codeql-action/upload-sarif@v3
|
||||
if: always()
|
||||
with:
|
||||
sarif_file: semgrep.sarif
|
||||
Reference in New Issue
Block a user