Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
40 changes: 40 additions & 0 deletions .github/workflows/sbom.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: SBOM & Vulnerability Scan

on:
push:
branches: ["release/*"]
pull_request:
branches: ["release/*"]
workflow_dispatch:

jobs:
sbom:
name: Generate SBOM and scan
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Build image
run: |
docker build -t postgres:local -f 18/alpine3.23/Dockerfile 18/alpine3.23/

- name: Generate SBOM (Syft)
uses: anchore/sbom-action@v0
with:
image: postgres:local
format: cyclonedx-json
output-file: sbom.cdx.json

- name: Scan vulnerabilities (Grype)
uses: anchore/scan-action@v6
with:
image: postgres:local
fail-build: false
output-format: table

- name: Upload SBOM
uses: actions/upload-artifact@v4
with:
name: sbom-postgres
path: sbom.cdx.json
retention-days: 90
32 changes: 4 additions & 28 deletions 18/alpine3.23/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading