2 Commits

Author SHA1 Message Date
renovate-bot 7e544eadbb chore(deps): update https://gitea.t000-n.de/t.behrendt/conventional-semantic-git-tag-increment action to v0.1.34
renovate/stability-days Updates have met minimum release age requirement
CI / Test Setup Trivy amd64 (pull_request) Successful in 9s
CI / Test Setup DB (pull_request) Successful in 22s
CI / Test Get Images From Files (pull_request) Successful in 6s
CI / Test Merge SARIF Files (pull_request) Successful in 6s
CI / Test Setup Trivy arm64 (pull_request) Successful in 35s
2026-06-07 10:17:37 +00:00
t.behrendt 2616391b42 Revert "refactor(setup-db): to run trivy in docker (#54)" (#56)
CD / Release (push) Successful in 5s
This reverts commit 81eda53a59.

Reviewed-on: #56
Co-authored-by: Timo Behrendt <t.behrendt@t00n.de>
Co-committed-by: Timo Behrendt <t.behrendt@t00n.de>
2026-04-10 19:36:38 +02:00
5 changed files with 7 additions and 44 deletions
+1 -1
View File
@@ -15,7 +15,7 @@ jobs:
fetch-depth: 0
- name: Increment tag
id: tag
uses: https://gitea.t000-n.de/t.behrendt/conventional-semantic-git-tag-increment@41b7e04221df8a033bec841d40a097b76e5f67ff # 0.1.29
uses: https://gitea.t000-n.de/t.behrendt/conventional-semantic-git-tag-increment@35ade2957a606ec51fd196b838b0a59996102e96 # 0.1.34
with:
token: ${{ secrets.GITEA_TOKEN }}
- name: Push tag
+1 -1
View File
@@ -13,7 +13,7 @@ jobs:
fetch-depth: 0
- name: Increment tag
id: tag
uses: https://gitea.t000-n.de/t.behrendt/conventional-semantic-git-tag-increment@41b7e04221df8a033bec841d40a097b76e5f67ff # 0.1.29
uses: https://gitea.t000-n.de/t.behrendt/conventional-semantic-git-tag-increment@35ade2957a606ec51fd196b838b0a59996102e96 # 0.1.34
with:
token: ${{ secrets.GITEA_TOKEN }}
prerelease: true
-11
View File
@@ -4,17 +4,6 @@
"local>t.behrendt/renovate-configs:common",
"local>t.behrendt/renovate-configs:action"
],
"customManagers": [
{
"customType": "regex",
"description": "Update Trivy docker image",
"managerFilePatterns": ["/(^|/)setup-db/action\\.ya?ml$/"],
"datasourceTemplate": "docker",
"matchStrings": [
"default:\\s*\"(?<depName>ghcr\\.io/aquasecurity/trivy):(?<currentValue>[\\d\\.]+)(?:@(?<currentDigest>sha256:[a-f0-9]+))?\""
]
}
],
"packageRules": [
{
"matchManagers": ["dockerfile", "kubernetes", "helmfile", "helm-values"],
+3 -8
View File
@@ -2,9 +2,7 @@
A reusable Gitea Action that sets up the Trivy vulnerability database, restoring from cache if available.
The action runs Trivy inside **Docker** with a restricted container configuration so the Trivy runtime is isolated from the host while the database is downloaded into your cache directory.
**Note:** This action only prepares the vulnerability database. If you run Trivy on the runner host for scans (for example `trivy fs .`), install Trivy separately (e.g. with a `setup-trivy` action or your own step).
**Note:** This action only sets up the database. Trivy itself must be installed separately (e.g., using the `setup-trivy` action).
## Usage
@@ -39,8 +37,5 @@ jobs:
## Inputs
| Input | Description | Required | Default |
| ---------------- | --------------------------------------------------------------------------- | -------- | ------- |
| `cache-dir` | Path to the Trivy cache directory | No | `${{ runner.temp }}/trivy` |
| `trivy-version` | Docker image reference for Trivy (digest pin recommended) | No | Pinned `ghcr.io/aquasecurity/trivy` image in `action.yaml` |
**`trivy-version` is optional.** If you omit it, the action uses the default image (version and digest) from `action.yaml`. Set it only when you need a different Trivy image or your own digest pin.
| ----------- | --------------------------------- | -------- | ---------------- |
| `cache-dir` | Path to the Trivy cache directory | No | `~/.cache/trivy` |
+1 -22
View File
@@ -10,10 +10,6 @@ inputs:
description: "Path to the Trivy cache directory (default: ${{runner.temp}}/trivy)"
required: false
default: "${{ runner.temp }}/trivy"
trivy-version:
description: "Trivy docker image version to use (full image reference including digest is recommended)"
required: false
default: "ghcr.io/aquasecurity/trivy:0.69.3@sha256:bcc376de8d77cfe086a917230e818dc9f8528e3c852f7b1aff648949b6258d1c"
outputs:
cache-dir:
@@ -36,21 +32,4 @@ runs:
trivy-db-${{ steps.current-date.outputs.current-date }}
- if: steps.restore-db.outputs.cache-hit != 'true'
shell: bash
run: |
docker run --rm \
--name trivy-db-download \
--user "$(id -u):$(id -g)" \
--read-only \
--env-file /dev/null \
--cap-drop ALL \
--pids-limit 64 \
--memory=512m \
--memory-swap=512m \
--cpus=1 \
--ipc private \
--cgroupns private \
--security-opt no-new-privileges \
--security-opt apparmor=docker-default \
--tmpfs /tmp:rw,noexec,nosuid,nodev,size=1g \
--mount type=bind,src=${{ inputs.cache-dir }},dst=/cache \
${{ inputs.trivy-version }} fs --download-db-only --cache-dir /cache
run: trivy fs --download-db-only --cache-dir "${{ inputs.cache-dir }}"