42 lines
952 B
Markdown
42 lines
952 B
Markdown
# Setup Trivy Action
|
|
|
|
A reusable Gitea Action that downloads and sets up the Trivy binary for vulnerability scanning.
|
|
|
|
## Usage
|
|
|
|
### Basic Usage
|
|
|
|
```yaml
|
|
- name: Setup Trivy
|
|
uses: your-username/trivy-actions@main/setup-trivy
|
|
with:
|
|
version: "v0.66.0" # Optional: Trivy version (default: v0.66.0)
|
|
```
|
|
|
|
### Complete Example
|
|
|
|
```yaml
|
|
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
|
|
with:
|
|
version: "v0.66.0"
|
|
- name: Scan for vulnerabilities
|
|
run: trivy fs .
|
|
```
|
|
|
|
## Inputs
|
|
|
|
| Input | Description | Required | Default |
|
|
| --------- | ----------------------------------------- | -------- | --------- |
|
|
| `version` | Trivy version to download (e.g., v0.66.0) | No | `v0.66.0` |
|