|
17 | 17 | branches: [ "npu/release/18.x" ] |
18 | 18 |
|
19 | 19 | # Declare default permissions as read only. |
20 | | -permissions: |
21 | | - contents: read |
| 20 | +permissions: read-all |
22 | 21 |
|
23 | 22 | jobs: |
24 | 23 | analysis: |
25 | 24 | name: Scorecard analysis |
26 | 25 | runs-on: ubuntu-latest |
27 | | - if: github.repository == 'intel/npu-plugin-llvm' |
28 | 26 | permissions: |
29 | 27 | # Needed to upload the results to code-scanning dashboard. |
30 | 28 | security-events: write |
31 | 29 | # Needed to publish results and get a badge (see publish_results below). |
32 | | - id-token: write |
| 30 | + id-token: write |
| 31 | + # Uncomment the permissions below if installing in a private repository. |
| 32 | + # contents: read |
| 33 | + # actions: read |
33 | 34 |
|
34 | 35 | steps: |
35 | | - - name: Harden Runner |
36 | | - uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1 |
37 | | - with: |
38 | | - egress-policy: audit |
39 | | - |
40 | 36 | - name: "Checkout code" |
41 | | - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 |
| 37 | + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 |
42 | 38 | with: |
43 | 39 | persist-credentials: false |
44 | 40 |
|
45 | 41 | - name: "Run analysis" |
46 | | - uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0 |
| 42 | + uses: ossf/scorecard-action@0864cf19026789058feabb7e87baa5f140aac736 # v2.3.1 |
47 | 43 | with: |
48 | 44 | results_file: results.sarif |
49 | 45 | results_format: sarif |
| 46 | + # (Optional) "write" PAT token. Uncomment the `repo_token` line below if: |
| 47 | + # - you want to enable the Branch-Protection check on a *public* repository, or |
| 48 | + # - you are installing Scorecard on a *private* repository |
| 49 | + # To create the PAT, follow the steps in https://github.com/ossf/scorecard-action?tab=readme-ov-file#authentication-with-fine-grained-pat-optional. |
| 50 | + # repo_token: ${{ secrets.SCORECARD_TOKEN }} |
50 | 51 |
|
| 52 | + # Public repositories: |
51 | 53 | # - Publish results to OpenSSF REST API for easy access by consumers |
52 | 54 | # - Allows the repository to include the Scorecard badge. |
53 | | - # - See https://github.com/ossf/scorecard-action#publishing-results. |
| 55 | + # - See https://github.com/ossf/scorecard-action#publishing-results. |
| 56 | + # For private repositories: |
| 57 | + # - `publish_results` will always be set to `false`, regardless |
| 58 | + # of the value entered here. |
54 | 59 | publish_results: true |
55 | 60 |
|
56 | 61 | # Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF |
57 | 62 | # format to the repository Actions tab. |
58 | 63 | - name: "Upload artifact" |
59 | | - uses: actions/upload-artifact@ff15f0306b3f739f7b6fd43fb5d26cd321bd4de5 # v3.2.1 |
| 64 | + uses: actions/upload-artifact@97a0fba1372883ab732affbe8f94b823f91727db # v3.pre.node20 |
60 | 65 | with: |
61 | 66 | name: SARIF file |
62 | 67 | path: results.sarif |
63 | 68 | retention-days: 5 |
64 | 69 |
|
65 | | - # Upload the results to GitHub's code scanning dashboard. |
| 70 | + # Upload the results to GitHub's code scanning dashboard (optional). |
| 71 | + # Commenting out will disable upload of results to your repo's Code Scanning dashboard |
66 | 72 | - name: "Upload to code-scanning" |
67 | | - uses: github/codeql-action/upload-sarif@662472033e021d55d94146f66f6058822b0b39fd # v3.27.0 |
| 73 | + uses: github/codeql-action/upload-sarif@v3 |
68 | 74 | with: |
69 | 75 | sarif_file: results.sarif |
0 commit comments