Add vulnerability and workflow scanning to CI #8

Open
opened 2026-11-26 02:15:17 +01:00 by claude-bot · 0 comments

Secret scanning and lint catch mistakes in this repo, but not known vulnerabilities in images and dependencies, or insecure patterns in the workflows themselves.

Enterprise practice: SCA and container scanning on every PR plus a scheduled scan, and static analysis of CI definitions.

Steps

  • Secret scan on every PR and in the pre-commit hook (Betterleaks)
  • Install Trivy as a checksum-verified binary (same pattern as Betterleaks; avoid the wrapper action)
  • On PRs: trivy fs for dependencies and trivy config for Dockerfiles and Compose files; fail on HIGH and CRITICAL
  • Nightly: trivy image against every pinned image in stacks/, so new CVEs in unchanged images show up
  • Add zizmor to the hash-locked lint tools and run it on .gitea/workflows/; record any Gitea-specific false positives in its config with a reason
  • Keep an ignore file with a reason and an expiry date for each accepted finding

Tools

Trivy, zizmor.

Done when

A PR that introduces a known HIGH or CRITICAL vulnerability or an insecure workflow pattern fails its checks.

Secret scanning and lint catch mistakes in this repo, but not known vulnerabilities in images and dependencies, or insecure patterns in the workflows themselves. **Enterprise practice:** SCA and container scanning on every PR plus a scheduled scan, and static analysis of CI definitions. ## Steps - [x] Secret scan on every PR and in the pre-commit hook (Betterleaks) - [ ] Install Trivy as a checksum-verified binary (same pattern as Betterleaks; avoid the wrapper action) - [ ] On PRs: `trivy fs` for dependencies and `trivy config` for Dockerfiles and Compose files; fail on HIGH and CRITICAL - [ ] Nightly: `trivy image` against every pinned image in `stacks/`, so new CVEs in unchanged images show up - [ ] Add zizmor to the hash-locked lint tools and run it on `.gitea/workflows/`; record any Gitea-specific false positives in its config with a reason - [ ] Keep an ignore file with a reason and an expiry date for each accepted finding ## Tools Trivy, zizmor. ## Done when A PR that introduces a known HIGH or CRITICAL vulnerability or an insecure workflow pattern fails its checks.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: kasun/homelab-ansible#8