Debian Codegraph @

.github/workflows/scorecard.yml

raw
1 name: Scorecard supply-chain security
2
3 on:
4 # For Branch-Protection check. Only the default branch is supported. See
5 # https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
6 branch_protection_rule:
7 # To guarantee Maintained check is occasionally updated. See
8 # https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
9 schedule:
10 - cron: '39 1 * * 3'
11 push:
12 branches: [ "main" ]
13
14 # Declare default permissions as read only.
15 permissions: read-all
16
17 jobs:
18 analysis:
19 name: Scorecard analysis
20 runs-on: ubuntu-latest
21 permissions:
22 # Needed to upload the results to code-scanning dashboard.
23 security-events: write
24 # Needed to publish results and get a badge (see publish_results below).
25 id-token: write
26 # Uncomment the permissions below if installing in a private repository.
27 # contents: read
28 # actions: read
29
30 steps:
31 - name: "Checkout code"
32 uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
33 with:
34 persist-credentials: false
35
36 - name: "Run analysis"
37 uses: ossf/scorecard-action@4eaacf0543bb3f2c246792bd56e8cdeffafb205a # v2.4.3
38 with:
39 results_file: results.sarif
40 results_format: sarif
41 # (Optional) "write" PAT token. Uncomment the `repo_token` line below if:
42 # - you want to enable the Branch-Protection check on a *public* repository, or
43 # - you are installing Scorecard on a *private* repository
44 # To create the PAT, follow the steps in https://github.com/ossf/scorecard-action#authentication-with-pat.
45 # repo_token: ${{ secrets.SCORECARD_TOKEN }}
46
47 # Public repositories:
48 # - Publish results to OpenSSF REST API for easy access by consumers
49 # - Allows the repository to include the Scorecard badge.
50 # - See https://github.com/ossf/scorecard-action#publishing-results.
51 # For private repositories:
52 # - `publish_results` will always be set to `false`, regardless
53 # of the value entered here.
54 publish_results: true
55
56 # Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
57 # format to the repository Actions tab.
58 - name: "Upload artifact"
59 uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
60 with:
61 name: SARIF file
62 path: results.sarif
63 retention-days: 5
64
65 # Upload the results to GitHub's code scanning dashboard.
66 - name: "Upload to code-scanning"
67 uses: github/codeql-action/upload-sarif@fdbfb4d2750291e159f0156def62b853c2798ca2 # v4.31.5
68 with:
69 sarif_file: results.sarif