Skip to content

Commit 98c43d5

Browse files
committed
Add OSFF scorecard action
The scorecard provides more security insights into CRI-O. Signed-off-by: Sascha Grunert <[email protected]>
1 parent add41f4 commit 98c43d5

File tree

1 file changed

+68
-0
lines changed

1 file changed

+68
-0
lines changed

.github/workflows/osff.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: ossf
2+
on:
3+
# For Branch-Protection check. Only the default branch is supported. See
4+
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
5+
branch_protection_rule:
6+
# To guarantee Maintained check is occasionally updated. See
7+
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
8+
schedule:
9+
- cron: '31 15 * * 1'
10+
push:
11+
branches: [ "main" ]
12+
13+
# Declare default permissions as read only.
14+
permissions: read-all
15+
16+
jobs:
17+
analysis:
18+
name: scorecard
19+
runs-on: ubuntu-latest
20+
permissions:
21+
# Needed to upload the results to code-scanning dashboard.
22+
security-events: write
23+
# Needed to publish results and get a badge (see publish_results below).
24+
id-token: write
25+
# Uncomment the permissions below if installing in a private repository.
26+
# contents: read
27+
# actions: read
28+
29+
steps:
30+
- name: "Checkout code"
31+
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
32+
with:
33+
persist-credentials: false
34+
35+
- name: "Run analysis"
36+
uses: ossf/scorecard-action@e38b1902ae4f44df626f11ba0734b14fb91f8f86 # v2.1.2
37+
with:
38+
results_file: results.sarif
39+
results_format: sarif
40+
# (Optional) "write" PAT token. Uncomment the `repo_token` line below if:
41+
# - you want to enable the Branch-Protection check on a *public* repository, or
42+
# - you are installing Scorecard on a *private* repository
43+
# To create the PAT, follow the steps in https://github.com/ossf/scorecard-action#authentication-with-pat.
44+
# repo_token: ${{ secrets.SCORECARD_TOKEN }}
45+
46+
# Public repositories:
47+
# - Publish results to OpenSSF REST API for easy access by consumers
48+
# - Allows the repository to include the Scorecard badge.
49+
# - See https://github.com/ossf/scorecard-action#publishing-results.
50+
# For private repositories:
51+
# - `publish_results` will always be set to `false`, regardless
52+
# of the value entered here.
53+
publish_results: true
54+
55+
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
56+
# format to the repository Actions tab.
57+
- name: "Upload artifact"
58+
uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # v3.1.0
59+
with:
60+
name: SARIF file
61+
path: results.sarif
62+
retention-days: 5
63+
64+
# Upload the results to GitHub's code scanning dashboard.
65+
- name: "Upload to code-scanning"
66+
uses: github/codeql-action/upload-sarif@17573ee1cc1b9d061760f3a006fc4aac4f944fd5 # v2.2.4
67+
with:
68+
sarif_file: results.sarif

0 commit comments

Comments
 (0)