Skip to content

Commit

Permalink
feat(trivy): add trivy-db and trivy-java-db sync
Browse files Browse the repository at this point in the history
  • Loading branch information
g-iannelli committed Sep 26, 2024
1 parent 47456d9 commit 3f40a67
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/sync-trivy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: "Sync Trivy"

on:
push:
branches:
- "main"
schedule:
- cron: "0 2 * * *"

jobs:
sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Login to SIGHUP new Registry
uses: docker/login-action@v3
with:
registry: registry.sighup.io
username: ${{ secrets.SIGHUP_REGISTRY_USERNAME }}
password: ${{ secrets.SIGHUP_REGISTRY_PASSWORD }}
- name: Install yq
run: |
sudo apt-get update && sudo apt-get install -yqq wget
sudo wget -q https://github.com/mikefarah/yq/releases/download/v4.19.1/yq_linux_amd64 -O /usr/bin/yq
sudo chmod +x /usr/bin/yq
- name: Iterate
run: |
yq --version
docker run --rm quay.io/skopeo/stable:v1.13 --version
./single_sync.sh modules/trivy/images.yml false
15 changes: 15 additions & 0 deletions modules/trivy/images.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
images:
- name: trivy-db [Trivy DB]
source: ghcr.io/aquasecurity/trivy-db
tag:
- "2"
destinations:
- registry.sighup.io/fury-secured/trivy/trivy-db

- name: trivy-java-db [Trivy java DB]
source: ghcr.io/aquasecurity/trivy-java-db
tag:
- "1"
destinations:
- registry.sighup.io/fury-secured/trivy/trivy-java-db

0 comments on commit 3f40a67

Please sign in to comment.