Skip to content

Security (Semgrep + Trivy) #11

Security (Semgrep + Trivy)

Security (Semgrep + Trivy) #11

name: Security (Semgrep + Trivy)
on:
pull_request:
push:
branches: [ main, master ]
schedule:
- cron: "11 4 * * 1"
permissions:
contents: read
jobs:
semgrep:
name: Semgrep (OSS rules)
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Run Semgrep
uses: semgrep/semgrep-action@v1
with:
# OSS rules; no token required for public repos.
config: >-
p/default
p/swift
env:
# Avoid requiring a Semgrep App token for basic scanning.
SEMGREP_APP_TOKEN: ""
trivy:
name: Trivy (repo fs scan)
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Trivy filesystem scan
uses: aquasecurity/trivy-action@v0.36.0
with:
scan-type: fs
scan-ref: .
format: table
# Keep this lightweight (we already have Gitleaks for secrets).
scanners: vuln,misconfig
ignore-unfixed: true
severity: CRITICAL,HIGH
exit-code: "1"