Skip to content
This repository was archived by the owner on Nov 27, 2025. It is now read-only.

Commit d101eab

Browse files
Update scorecard workflow (#81)
1 parent 73f2c6b commit d101eab

File tree

1 file changed

+21
-15
lines changed

1 file changed

+21
-15
lines changed

.github/workflows/scorecard.yml

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,53 +17,59 @@ on:
1717
branches: [ "npu/release/18.x" ]
1818

1919
# Declare default permissions as read only.
20-
permissions:
21-
contents: read
20+
permissions: read-all
2221

2322
jobs:
2423
analysis:
2524
name: Scorecard analysis
2625
runs-on: ubuntu-latest
27-
if: github.repository == 'intel/npu-plugin-llvm'
2826
permissions:
2927
# Needed to upload the results to code-scanning dashboard.
3028
security-events: write
3129
# 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
3334

3435
steps:
35-
- name: Harden Runner
36-
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
37-
with:
38-
egress-policy: audit
39-
4036
- name: "Checkout code"
41-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
37+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
4238
with:
4339
persist-credentials: false
4440

4541
- name: "Run analysis"
46-
uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0
42+
uses: ossf/scorecard-action@0864cf19026789058feabb7e87baa5f140aac736 # v2.3.1
4743
with:
4844
results_file: results.sarif
4945
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 }}
5051

52+
# Public repositories:
5153
# - Publish results to OpenSSF REST API for easy access by consumers
5254
# - 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.
5459
publish_results: true
5560

5661
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
5762
# format to the repository Actions tab.
5863
- name: "Upload artifact"
59-
uses: actions/upload-artifact@ff15f0306b3f739f7b6fd43fb5d26cd321bd4de5 # v3.2.1
64+
uses: actions/upload-artifact@97a0fba1372883ab732affbe8f94b823f91727db # v3.pre.node20
6065
with:
6166
name: SARIF file
6267
path: results.sarif
6368
retention-days: 5
6469

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
6672
- name: "Upload to code-scanning"
67-
uses: github/codeql-action/upload-sarif@662472033e021d55d94146f66f6058822b0b39fd # v3.27.0
73+
uses: github/codeql-action/upload-sarif@v3
6874
with:
6975
sarif_file: results.sarif

0 commit comments

Comments
 (0)