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