|
13 | 13 | # Declare default permissions as read only. |
14 | 14 | permissions: read-all |
15 | 15 |
|
16 | | -jobs: |
17 | | - analysis: |
18 | | - name: Scorecard analysis |
19 | | - runs-on: ubuntu-latest |
20 | | - permissions: |
21 | | - # Needed to upload the results to code-scanning dashboard. |
22 | | - security-events: write |
23 | | - # Needed to publish results and get a badge (see publish_results below). |
24 | | - id-token: write |
25 | | - |
26 | | - steps: |
27 | | - - name: "Checkout code" |
28 | | - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 |
29 | | - with: |
30 | | - persist-credentials: false |
31 | | - |
32 | | - - name: "Run analysis" |
33 | | - uses: ossf/scorecard-action@05b42c624433fc40578a4040d5cf5e36ddca8cde # v2.4.2 |
34 | | - with: |
35 | | - results_file: results.sarif |
36 | | - results_format: sarif |
37 | | - # (Optional) "write" PAT token. Uncomment the `repo_token` line below if: |
38 | | - # - you want to enable the Branch-Protection check on a *public* repository |
39 | | - # To create the PAT, follow the steps in https://github.com/ossf/scorecard-action?tab=readme-ov-file#authentication-with-fine-grained-pat-optional. |
40 | | - # repo_token: ${{ secrets.SCORECARD_TOKEN }} |
41 | | - |
42 | | - # Public repositories: |
43 | | - # - Publish results to OpenSSF REST API for easy access by consumers |
44 | | - # - Allows the repository to include the Scorecard badge. |
45 | | - # - See https://github.com/ossf/scorecard-action#publishing-results. |
46 | | - publish_results: true |
47 | | - |
48 | | - # Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF |
49 | | - # format to the repository Actions tab. |
50 | | - - name: "Upload artifact" |
51 | | - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 |
52 | | - with: |
53 | | - name: SARIF file |
54 | | - path: results.sarif |
55 | | - retention-days: 5 |
56 | | - |
57 | | - # Upload the results to GitHub's code scanning dashboard (optional). |
58 | | - # Commenting out will disable upload of results to your repo's Code Scanning dashboard |
59 | | - - name: "Upload to code-scanning" |
60 | | - uses: github/codeql-action/upload-sarif@3599b3baa15b485a2e49ef411a7a4bb2452e7f93 # v3.30.5 |
61 | | - with: |
62 | | - sarif_file: results.sarif |
63 | | -name: Scorecard supply-chain security |
64 | | -on: |
65 | | - # For Branch-Protection check. Only the default branch is supported. See |
66 | | - # https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection |
67 | | - branch_protection_rule: |
68 | | - # To guarantee Maintained check is occasionally updated. See |
69 | | - # https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained |
70 | | - schedule: |
71 | | - - cron: '20 5 * * 0' |
72 | | - push: |
73 | | - branches: [ "main" ] |
74 | | - |
75 | | -# Declare default permissions as read only. |
76 | | -permissions: read-all |
77 | | - |
78 | 16 | jobs: |
79 | 17 | analysis: |
80 | 18 | name: Scorecard analysis |
|
0 commit comments