1+ name : Scorecard supply-chain security
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 : ' 20 7 * * 2'
10+ workflow_dispatch :
11+ push :
12+ branches : ["main"]
13+ # Declare default permissions as read only.
14+ permissions : read-all
15+ jobs :
16+ analysis :
17+ name : Scorecard analysis
18+ runs-on : ubuntu-latest
19+ permissions :
20+ # Needed to upload the results to code-scanning dashboard.
21+ security-events : write
22+ # Needed to publish results and get a badge (see publish_results below).
23+ id-token : write
24+ contents : read
25+ actions : read
26+ # To allow GraphQL ListCommits to work
27+ issues : read
28+ pull-requests : read
29+ # To detect SAST tools
30+ checks : read
31+ steps :
32+ - name : " Checkout code"
33+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
34+ with :
35+ persist-credentials : false
36+ - name : " Run analysis"
37+ uses : ossf/scorecard-action@dc50aa9510b46c811795eb24b2f1ba02a914e534 # v2.3.3
38+ with :
39+ results_file : results.sarif
40+ results_format : sarif
41+ # (Optional) "write" PAT token. Uncomment the `repo_token` line below if:
42+ # - you want to enable the Branch-Protection check on a *public* repository, or
43+ # - you are installing Scorecards on a *private* repository
44+ # To create the PAT, follow the steps in https://github.com/ossf/scorecard-action#authentication-with-pat.
45+ # repo_token: ${{ secrets.SCORECARD_TOKEN }}
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+ # Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
55+ # format to the repository Actions tab.
56+ - name : " Upload artifact"
57+ uses : actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
58+ with :
59+ name : SARIF file
60+ path : results.sarif
61+ retention-days : 5
62+ # Upload the results to GitHub's code scanning dashboard.
63+ - name : " Upload to code-scanning"
64+ uses : github/codeql-action/upload-sarif@b6a472f63d85b9c78a3ac5e89422239fc15e9b3c # v3.28.1
65+ with :
66+ sarif_file : results.sarif
0 commit comments