Skip to content

Commit 3aa2aad

Browse files
authored
Merge pull request #5 from jski/feature/security-updates
Updated to add trivy scan weekly, and dependabot updates nightly
2 parents 55e575c + 9c0cffe commit 3aa2aad

File tree

2 files changed

+52
-1
lines changed

2 files changed

+52
-1
lines changed

.github/dependabot.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
version: 2
2+
updates:
3+
# Monitor Dockerfile for base image updates
4+
- package-ecosystem: "docker"
5+
directory: "/"
6+
schedule:
7+
interval: "weekly"
8+
open-pull-requests-limit: 3
9+
labels:
10+
- "dependencies"
11+
- "docker"
12+
13+
# Monitor GitHub Actions for security updates
14+
- package-ecosystem: "github-actions"
15+
directory: "/"
16+
schedule:
17+
interval: "weekly"
18+
open-pull-requests-limit: 5
19+
labels:
20+
- "dependencies"
21+
- "github-actions"

.github/workflows/build-and-push.yml

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,34 @@ jobs:
5959
ghcr.io/${{ github.repository_owner }}/python-container-builder:${{ matrix.python_version }}
6060
${{ matrix.python_version == '3.14' && format('ghcr.io/{0}/python-container-builder:latest', github.repository_owner) || '' }}
6161
provenance: false
62-
outputs: type=image,name=python-container-builder,annotation-index.org.opencontainers.image.description=build your Python distroless containers with this
62+
outputs: type=image,name=python-container-builder,annotation-index.org.opencontainers.image.description=build your Python distroless containers with this
63+
64+
security-scan:
65+
name: Security Scan
66+
runs-on: ubuntu-latest
67+
needs: nightly
68+
permissions:
69+
contents: read
70+
security-events: write
71+
steps:
72+
- name: Run Trivy vulnerability scanner
73+
uses: aquasecurity/trivy-action@master
74+
with:
75+
image-ref: ghcr.io/${{ github.repository_owner }}/python-container-builder:latest
76+
format: 'sarif'
77+
output: 'trivy-results.sarif'
78+
severity: 'CRITICAL,HIGH'
79+
80+
- name: Upload Trivy results to GitHub Security
81+
uses: github/codeql-action/upload-sarif@v3
82+
if: always()
83+
with:
84+
sarif_file: 'trivy-results.sarif'
85+
86+
- name: Print Trivy results summary
87+
uses: aquasecurity/trivy-action@master
88+
if: always()
89+
with:
90+
image-ref: ghcr.io/${{ github.repository_owner }}/python-container-builder:latest
91+
format: 'table'
92+
severity: 'CRITICAL,HIGH'

0 commit comments

Comments
 (0)