refactor!: trivy to osv
CI / Test Setup OSV Scanner amd64 (pull_request) Successful in 8s
CI / Test Setup DB (pull_request) Failing after 9s
CI / Test Get Images From Files (pull_request) Successful in 9s
CI / Test Merge SARIF Files (pull_request) Successful in 2s
CI / Test Setup OSV Scanner arm64 (pull_request) Successful in 3m58s
CI / Test Setup OSV Scanner amd64 (pull_request) Successful in 8s
CI / Test Setup DB (pull_request) Failing after 9s
CI / Test Get Images From Files (pull_request) Successful in 9s
CI / Test Merge SARIF Files (pull_request) Successful in 2s
CI / Test Setup OSV Scanner arm64 (pull_request) Successful in 3m58s
This commit is contained in:
+22
-10
@@ -1,8 +1,8 @@
|
||||
# Setup DB Action
|
||||
|
||||
A reusable Gitea Action that sets up the Trivy vulnerability database, restoring from cache if available.
|
||||
A reusable Gitea Action that sets up the osv-scanner offline vulnerability database, restoring from cache if available.
|
||||
|
||||
**Note:** This action only sets up the database. Trivy itself must be installed separately (e.g., using the `setup-trivy` action).
|
||||
**Note:** This action only sets up the database. osv-scanner itself must be installed separately (e.g., using the `setup-osv` action). Subsequent steps receive `OSV_SCANNER_LOCAL_DB_CACHE_DIRECTORY` via the environment.
|
||||
|
||||
## Usage
|
||||
|
||||
@@ -10,7 +10,7 @@ A reusable Gitea Action that sets up the Trivy vulnerability database, restoring
|
||||
|
||||
```yaml
|
||||
- name: Setup DB
|
||||
uses: https://gitea.t000-n.de/t.behrendt/trivy-actions/setup-db@0.0.1
|
||||
uses: https://gitea.t000-n.de/t.behrendt/osv-scanner-actions/setup-db@0.0.1
|
||||
```
|
||||
|
||||
### Complete Example
|
||||
@@ -26,16 +26,28 @@ jobs:
|
||||
- linux_amd64
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Setup Trivy
|
||||
uses: https://gitea.t000-n.de/t.behrendt/trivy-actions/setup-trivy@0.0.1
|
||||
- name: Setup OSV Scanner
|
||||
uses: https://gitea.t000-n.de/t.behrendt/osv-scanner-actions/setup-osv@0.0.1
|
||||
with:
|
||||
version: "v2.4.0"
|
||||
amd64-digest: "15314940c10d26af9c6649f150b8a47c1262e8fc7e17b1d1029b0e479e8ed8a0"
|
||||
arm64-digest: "44e580752910f0ff36ec99aff59af20f65df1e859aa31e5605a8f0d055b496e9"
|
||||
- name: Setup DB
|
||||
uses: https://gitea.t000-n.de/t.behrendt/trivy-actions/setup-db@0.0.1
|
||||
id: setup-db
|
||||
uses: https://gitea.t000-n.de/t.behrendt/osv-scanner-actions/setup-db@0.0.1
|
||||
- name: Scan for vulnerabilities
|
||||
run: trivy fs .
|
||||
run: osv-scanner scan source --offline-vulnerabilities -r .
|
||||
```
|
||||
|
||||
## Inputs
|
||||
|
||||
| Input | Description | Required | Default |
|
||||
| ----------- | --------------------------------- | -------- | ---------------- |
|
||||
| `cache-dir` | Path to the Trivy cache directory | No | `~/.cache/trivy` |
|
||||
| Input | Description | Required | Default |
|
||||
| ------------- | --------------------------------------------------------------------------- | -------- | -------------------------------- |
|
||||
| `cache-dir` | Path used as `OSV_SCANNER_LOCAL_DB_CACHE_DIRECTORY` | No | `${{ runner.temp }}/osv-scanner` |
|
||||
| `ecosystems` | Comma-separated OSV ecosystems to download; empty downloads all ecosystems | No | _(all)_ |
|
||||
|
||||
## Outputs
|
||||
|
||||
| Output | Description |
|
||||
| ----------- | ------------------------------------------------ |
|
||||
| `cache-dir` | Path to the osv-scanner local DB cache directory |
|
||||
|
||||
Reference in New Issue
Block a user