1+ # This workflow uses actions that are not certified by GitHub. They are provided
2+ # by a third-party and are governed by separate terms of service, privacy
3+ # policy, and support documentation.
4+
5+ name : Scorecard supply-chain security
6+
7+ on :
8+ # For Branch-Protection check. Only the default branch is supported. See
9+ # https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
10+ branch_protection_rule :
11+ # To guarantee Maintained check is occasionally updated. See
12+ # https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
13+ schedule :
14+ - cron : ' 16 21 * * 1'
15+ push :
16+ branches : [ "master" ]
17+
18+ # Declare default permissions as read only.
19+ permissions : read-all
20+
21+ jobs :
22+ analysis :
23+ name : Scorecard analysis
24+ runs-on : ubuntu-latest
25+ permissions :
26+ # Needed to upload the results to code-scanning dashboard.
27+ security-events : write
28+ # Needed to publish results and get a badge (see publish_results below).
29+ id-token : write
30+
31+ steps :
32+ - name : " Checkout code"
33+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
34+ with :
35+ persist-credentials : false
36+
37+ - name : " Run analysis"
38+ uses : ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0
39+ with :
40+ results_file : results.sarif
41+ results_format : sarif
42+ # Scorecard team runs a weekly scan of public GitHub repos,
43+ # see https://github.com/ossf/scorecard#public-data.
44+ # Setting `publish_results: true` helps us scale by leveraging your workflow to
45+ # extract the results instead of relying on our own infrastructure to run scans.
46+ # And it's free for you!
47+ publish_results : true
48+
49+ # Upload the results as artifacts (optional). Commenting out will disable
50+ # uploads of run results in SARIF format to the repository Actions tab.
51+ # https://docs.github.com/en/actions/advanced-guides/storing-workflow-data-as-artifacts
52+ - name : " Upload artifact"
53+ uses : actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
54+ with :
55+ name : SARIF file
56+ path : results.sarif
57+ retention-days : 5
58+
59+ # Upload the results to GitHub's code scanning dashboard.
60+ - name : " Upload to code-scanning"
61+ uses : github/codeql-action/upload-sarif@4f3212b61783c3c68e8309a0f18a699764811cda # v3.27.1
62+ with :
63+ sarif_file : results.sarif
0 commit comments