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 : ' 38 2 * * 2'
10+ push :
11+ branches : [ "develop" ]
12+
13+ # Declare default permissions as read only.
14+ permissions : read-all
15+
16+ jobs :
17+ analysis :
18+ name : Scorecard analysis
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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
32+ with :
33+ persist-credentials : false
34+
35+ - name : " Run analysis"
36+ uses : ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0
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?tab=readme-ov-file#authentication-with-fine-grained-pat-optional.
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@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.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 (optional).
65+ # Commenting out will disable upload of results to your repo's Code Scanning dashboard
66+ - name : " Upload to code-scanning"
67+ uses : github/codeql-action/upload-sarif@17a820bf2e43b47be2c72b39cc905417bc1ab6d0 # v3.28.6
68+ with :
69+ sarif_file : results.sarif
0 commit comments