Skip to content

Commit 7d0bfb7

Browse files
committed
Merge branch 'main' of github.com:HewlettPackard/Mithril
2 parents 8a01596 + 4e42795 commit 7d0bfb7

File tree

1 file changed

+62
-0
lines changed

1 file changed

+62
-0
lines changed

.github/workflows/scorecards.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Scorecards supply-chain security
2+
on:
3+
# Only the default branch is supported.
4+
branch_protection_rule:
5+
schedule:
6+
- cron: '32 22 * * 1'
7+
push:
8+
branches: [ "main" ]
9+
10+
# Declare default permissions as read only.
11+
permissions: read-all
12+
13+
jobs:
14+
analysis:
15+
name: Scorecards analysis
16+
runs-on: ubuntu-latest
17+
permissions:
18+
# Needed to upload the results to code-scanning dashboard.
19+
security-events: write
20+
# Used to receive a badge. (Upcoming feature)
21+
id-token: write
22+
# Needs for private repositories.
23+
contents: read
24+
actions: read
25+
26+
steps:
27+
- name: "Checkout code"
28+
uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # v3.0.0
29+
with:
30+
persist-credentials: false
31+
32+
- name: "Run analysis"
33+
uses: ossf/scorecard-action@3e15ea8318eee9b333819ec77a36aca8d39df13e # v1.1.1
34+
with:
35+
results_file: results.sarif
36+
results_format: sarif
37+
# (Optional) Read-only PAT token. Uncomment the `repo_token` line below if:
38+
# - you want to enable the Branch-Protection check on a *public* repository, or
39+
# - you are installing Scorecards on a *private* repository
40+
# To create the PAT, follow the steps in https://github.com/ossf/scorecard-action#authentication-with-pat.
41+
# repo_token: ${{ secrets.SCORECARD_READ_TOKEN }}
42+
43+
# Publish the results for public repositories to enable scorecard badges. For more details, see
44+
# https://github.com/ossf/scorecard-action#publishing-results.
45+
# For private repositories, `publish_results` will automatically be set to `false`, regardless
46+
# of the value entered here.
47+
publish_results: true
48+
49+
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
50+
# format to the repository Actions tab.
51+
- name: "Upload artifact"
52+
uses: actions/upload-artifact@6673cd052c4cd6fcf4b4e6e60ea986c889389535 # v3.0.0
53+
with:
54+
name: SARIF file
55+
path: results.sarif
56+
retention-days: 5
57+
58+
# Upload the results to GitHub's code scanning dashboard.
59+
- name: "Upload to code-scanning"
60+
uses: github/codeql-action/upload-sarif@5f532563584d71fdef14ee64d17bafb34f751ce5 # v1.0.26
61+
with:
62+
sarif_file: results.sarif

0 commit comments

Comments
 (0)