Debian Codegraph @

.github/workflows/scorecard.yml

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