|
8 | 8 | - cron: "56 23 * * 6" # once a week |
9 | 9 | workflow_dispatch: |
10 | 10 |
|
11 | | -permissions: read-all |
| 11 | +permissions: {} |
12 | 12 |
|
13 | 13 | jobs: |
14 | 14 | analysis: |
15 | | - runs-on: ubuntu-latest |
16 | 15 | permissions: |
17 | | - # Needed for Code scanning upload |
18 | | - security-events: write |
19 | | - # Needed for GitHub OIDC token if publish_results is true |
20 | | - id-token: write |
21 | | - steps: |
22 | | - - name: Harden the runner (Audit all outbound calls) |
23 | | - uses: step-security/harden-runner@05e31511f85b41b11d1cf0ef85d0992719546e2c # v2.21.0 |
24 | | - with: |
25 | | - egress-policy: audit |
26 | | - |
27 | | - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 |
28 | | - with: |
29 | | - persist-credentials: false |
30 | | - |
31 | | - - uses: ossf/scorecard-action@2d1146689b8cda280b9bc96326124645441f03bc # v2.4.4 |
32 | | - with: |
33 | | - results_file: results.sarif |
34 | | - results_format: sarif |
35 | | - publish_results: true |
36 | | - |
37 | | - # Upload the results as artifacts (optional). Commenting out will disable |
38 | | - # uploads of run results in SARIF format to the repository Actions tab. |
39 | | - # https://docs.github.com/en/actions/advanced-guides/storing-workflow-data-as-artifacts |
40 | | - - name: "Upload artifact" |
41 | | - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 |
42 | | - with: |
43 | | - name: SARIF file |
44 | | - path: results.sarif |
45 | | - retention-days: 5 |
46 | | - |
47 | | - # Upload the results to GitHub's code scanning dashboard (optional). |
48 | | - # Commenting out will disable upload of results to your repo's Code Scanning dashboard |
49 | | - - name: "Upload to code-scanning" |
50 | | - uses: github/codeql-action/upload-sarif@ff2f1c621b7f889edc0d3c761ac2e6a3f8cdb0dd # v4.37.7 |
51 | | - with: |
52 | | - 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@dde3047a8f219c296772c17936b9d02bb7447af5 # v0.12.0 |
| 20 | + with: |
| 21 | + use-harden-runner: true |
0 commit comments