Skip to content

Commit

Permalink
Update Vulndb.ymal
Browse files Browse the repository at this point in the history
Signed-off-by: Rafi <[email protected]>
  • Loading branch information
refoo0 committed Aug 12, 2024
1 parent f9a8d73 commit b2d1eb4
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions .github/workflows/vulndb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ env:
POSTGRES_USER: devguard
POSTGRES_HOST: localhost
POSTGRES_PASSWORD: not_reachable_from_the_internet
COSIGN_PASSWORD: ${{ secrets.COSIGN_PRIVATE_KEY }}
date: $(date +%s)

jobs:
build:
Expand Down Expand Up @@ -54,6 +56,17 @@ jobs:

- name: Zip the CSV files
run: zip vulndb.zip cve_affected_component.csv #cves.csv cpe_matches.csv cve_cpe_match.csv cwes.csv exploits.csv weaknesses.csv

- name: Install Cosign
uses: sigstore/cosign-installer@main

- name: Write signing key to disk
run: 'echo "$COSIGN_PASSWORD" > cosign.key'

- name: Sign the database CSV files
run: cosign sign-blob -key cosign.key vulndb.zip



- name: Login to GitHub Container Registry
uses: docker/login-action@v3
Expand All @@ -63,6 +76,10 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}
- name: Setup oras cli
uses: oras-project/setup-oras@v1
- name: Push the database dump to OCI
- name: Push the database ZIP file to GitHub Container Registry
run: |
oras push ghcr.io/l3montree-dev/devguard/vulndb:${{env.date}} vulndb.zip

-name: Push the sign file to GitHub Container Registry
run: |
oras push ghcr.io/l3montree-dev/devguard/vulndb:$(date +%s) vulndb.zip
oras push ghcr.io/l3montree-dev/devguard/vulndb:${{env.date}} vulndb.zip.sig

0 comments on commit b2d1eb4

Please sign in to comment.