Files
sec-actions/setup-trivy
t.behrendt 8df2386e42
CD / Release (push) Successful in 11s
feat(setup-trivy): use latest as default version (#15)
Using the "latest" released version of Trivy as the default version.
We always first resolve latest to an actual version to allow the cache to work properly.

Reviewed-on: t.behrendt/trivy-actions#15
Reviewed-by: branch-buddy <branch-buddy@t00n.de>
Co-authored-by: Timo Behrendt <t.behrendt@t00n.de>
Co-committed-by: Timo Behrendt <t.behrendt@t00n.de>
2025-11-08 19:48:17 +01:00
..

Setup Trivy Action

A reusable Gitea Action that downloads and sets up the Trivy binary for vulnerability scanning.

Usage

Basic Usage

- name: Setup Trivy
  uses: your-username/trivy-actions@main/setup-trivy
  with:
    version: "v0.66.0" # Optional: Trivy version (default: latest)

Complete Example

name: Security Scan
on: [push, pull_request]

jobs:
  security:
    runs-on:
      - ubuntu-latest
      - linux_amd64
    steps:
      - uses: actions/checkout@v4
      - name: Setup Trivy
        uses: your-username/trivy-actions@main/setup-trivy
      - name: Scan for vulnerabilities
        run: trivy fs .

Inputs

Input Description Required Default
version Trivy version to download (e.g., v0.66.0) No latest