Skip to content

Security scanning

Security scanning CI on GitHub Actions

Vulnerability scanners re-download their databases on every run.

80s → 3s
DB download

Vulnerability scanners re-download their databases on every run.

Why it happens

Trivy, Grype and similar tools fetch a multi-hundred-megabyte database each time.

What to change

  1. Cache the vulnerability database directory keyed on the day
  2. Run scans in parallel with tests rather than after them
  3. Fail only on the severities you will actually act on

Security scanning on runnerhut

yaml
jobs:
scan:
runs-on: runnerhut-4vcpu-ubuntu-2404
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: ~/.cache/trivy
key: trivy-${{ github.run_id }}
restore-keys: trivy-
- run: trivy fs --severity HIGH,CRITICAL .
A working starting point

The only runnerhut-specific line is `runs-on: runnerhut-4vcpu-ubuntu-2404`. Everything else is standard GitHub Actions — the same actions, the same secrets and the same permissions model you use today.

Your next build could be twice as fast, at half the price

Start free. Migrating away is the same one line, and we publish that diff too.