Skip to content

CICD-184 · Scan repository dependency metadata ​

Encyclopedia · Workflow security fundamentals · All snippets

Previous · CICD-183 · Next · CICD-185

1. Where it fits ​

  • Placement Bash run step following checkout, or equivalent lab terminal.
  • Prerequisites trusted repository, verified inputs and read-only default access.
  • Platforms local-linux, github-actions, gitea-actions.

2. Copy the snippet ​

bash
trivy fs --scanners vuln --severity HIGH,CRITICAL --exit-code 1 .

3. How it works ​

The filesystem scanner inspects dependency metadata visible in the checkout. The severity and exit code settings make selected findings block the job.

4. Verify the result ​

Pin scanner configuration and documented ignore policy. Review false positives separately.

Validation syntax-validated (Bash parse). Status definitions.