Skip to content

Commit 9fdcfed

Browse files
Use shared OSSF Scorecard workflow
1 parent 46f5b2d commit 9fdcfed

1 file changed

Lines changed: 5 additions & 35 deletions

File tree

.github/workflows/ossf-scorecard.yml

Lines changed: 5 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -8,45 +8,15 @@ on:
88
- cron: "2 15 * * 1" # once a week
99
workflow_dispatch:
1010

11-
permissions:
12-
contents: read
11+
permissions: {}
1312

1413
jobs:
1514
analysis:
1615
permissions:
17-
contents: read
18-
# Needed for Code scanning upload
19-
security-events: write
20-
# Needed for GitHub OIDC token if publish_results is true
21-
id-token: write
22-
runs-on: ubuntu-latest
23-
steps:
24-
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
25-
with:
26-
persist-credentials: false
27-
28-
- uses: ossf/scorecard-action@2d1146689b8cda280b9bc96326124645441f03bc # v2.4.4
29-
with:
30-
results_file: results.sarif
31-
results_format: sarif
32-
publish_results: true
33-
34-
# Upload the results as artifacts (optional). Commenting out will disable
35-
# uploads of run results in SARIF format to the repository Actions tab.
36-
# https://docs.github.com/en/actions/advanced-guides/storing-workflow-data-as-artifacts
37-
- name: "Upload artifact"
38-
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
39-
with:
40-
name: SARIF file
41-
path: results.sarif
42-
retention-days: 5
43-
44-
# Upload the results to GitHub's code scanning dashboard (optional).
45-
# Commenting out will disable upload of results to your repo's Code Scanning dashboard
46-
- name: "Upload to code-scanning"
47-
uses: github/codeql-action/upload-sarif@d1ba80a13dd99fba24a470575428917156a28b43 # v4.37.5
48-
with:
49-
sarif_file: results.sarif
16+
contents: read # for actions/checkout
17+
id-token: write # for Scorecard to publish results
18+
security-events: write # for the SARIF upload to code scanning
19+
uses: open-telemetry/shared-workflows/.github/workflows/scorecard.yml@f13d0cb656d7244ca8c1638b6996dbaef1083bdd # v0.6.0
5020

5121
workflow-notification:
5222
permissions:

0 commit comments

Comments
 (0)