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