Skip to content

Commit 58b50e1

Browse files
Add Caliptra Security workflow
1 parent e46a5bb commit 58b50e1

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed
+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Caliptra Security
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
branches: [master]
8+
schedule:
9+
- cron: "0 0 * * *" # Daily scan
10+
11+
env:
12+
REGISTRY: ghcr.io
13+
SCANNER_IMAGE: ghcr.io/caliptrasecurity/agent:main
14+
15+
jobs:
16+
scan:
17+
runs-on: ubuntu-latest
18+
permissions:
19+
contents: read
20+
security-events: write
21+
pull-requests: write
22+
packages: read
23+
24+
steps:
25+
- name: Checkout repository
26+
uses: actions/checkout@v4
27+
28+
- name: Log in to the Container registry
29+
uses: docker/login-action@v3
30+
with:
31+
registry: ${{ env.REGISTRY }}
32+
username: ${{ github.actor }}
33+
password: ${{ secrets.GITHUB_TOKEN }}
34+
35+
- name: Pull scanner image
36+
run: docker pull ${{ env.SCANNER_IMAGE }}
37+
38+
- name: Run Dependency Scanner
39+
id: scanner
40+
run: |
41+
docker run --rm \
42+
-v ${{ github.workspace }}:/code \
43+
-e SCAN_PATH=/code \
44+
-e INPUT_FAIL_ON_SEVERITY=true \
45+
-e GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} \
46+
-e GITHUB_REF_NAME=${{ github.ref_name }} \
47+
-e GITHUB_SHA=${{ github.sha }} \
48+
-e GITHUB_REPOSITORY=${{ github.repository }} \
49+
-e GITHUB_EVENT_NAME=${{ github.event_name }} \
50+
-e GITHUB_OUTPUT=$GITHUB_OUTPUT \
51+
${{ env.SCANNER_IMAGE }}

0 commit comments

Comments
 (0)