Skip to content

Commit 47fe60a

Browse files
committed
Create scorecard.yml and remove old workflow
1 parent e16b587 commit 47fe60a

File tree

2 files changed

+66
-36
lines changed

2 files changed

+66
-36
lines changed

.github/workflows/scorecard.yml

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

.github/workflows/scorecards-analysis.yml

-36
This file was deleted.

0 commit comments

Comments
 (0)