forked from kyverno/kyverno
-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (49 loc) · 1.6 KB
/
scorecard.yaml
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
52
name: Scorecards supply-chain security
on:
schedule:
- cron: '30 1 * * 6'
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
analysis:
runs-on: ubuntu-latest
permissions:
security-events: write
id-token: write
steps:
- name: Checkout
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
with:
persist-credentials: false
- name: Check secret
id: checksecret
uses: ./.github/actions/is-defined
with:
value: ${{ secrets.SCORECARD_READ_TOKEN }}
- name: Setup build env
if: steps.checksecret.outputs.result == 'true'
uses: ./.github/actions/setup-build-env
- name: Run analysis
if: steps.checksecret.outputs.result == 'true'
uses: ossf/scorecard-action@e38b1902ae4f44df626f11ba0734b14fb91f8f86 # v2.1.2
with:
results_file: results.sarif
results_format: sarif
repo_token: ${{ secrets.SCORECARD_READ_TOKEN }}
publish_results: true
- name: Upload artifact
if: steps.checksecret.outputs.result == 'true'
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
with:
name: SARIF file
path: results.sarif
retention-days: 5
- name: Upload to code-scanning
if: steps.checksecret.outputs.result == 'true'
uses: github/codeql-action/upload-sarif@39d8d7e78f59cf6b40ac3b9fbebef0c753d7c9e5 # v2.2.2
with:
sarif_file: results.sarif