Skip to content

Commit 38c5265

Browse files
added scorecards.yml
Signed-off-by: Barabanov <[email protected]>
1 parent 8994dc8 commit 38c5265

File tree

5 files changed

+44
-4
lines changed

5 files changed

+44
-4
lines changed

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: Build Docs
2-
permissions: { } # No permissions by default on workflow level
2+
permissions: {} # No permissions by default on workflow level
33

44
on:
55
workflow_dispatch: # run on request (no need for PR)

.github/workflows/publish.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
release:
66
types: [published]
77

8-
permissions: { } # No permissions by default on workflow level
8+
permissions: {} # No permissions by default on workflow level
99

1010
jobs:
1111
build:

.github/workflows/scorecards.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Scorecards supply-chain security
2+
on:
3+
# For Branch-Protection check. Only the default branch is supported. See
4+
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
5+
branch_protection_rule:
6+
schedule:
7+
# Run security checks every day at 2 AM UTC
8+
- cron: "0 2 * * *"
9+
workflow_dispatch:
10+
11+
permissions: {}
12+
13+
jobs:
14+
analysis:
15+
name: Scorecards analysis
16+
runs-on: ubuntu-latest
17+
permissions:
18+
# Needed to upload the results to code-scanning dashboard
19+
security-events: write
20+
# Needed to publish results and get a badge
21+
id-token: write
22+
23+
steps:
24+
- name: Checkout code
25+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
26+
with:
27+
persist-credentials: false
28+
29+
- name: Run analysis
30+
uses: ossf/scorecard-action@05b42c624433fc40578a4040d5cf5e36ddca8cde # v2.4.2
31+
with:
32+
results_file: results.sarif
33+
results_format: sarif
34+
publish_results: true
35+
36+
# Upload the results to GitHub's code scanning dashboard
37+
- name: Upload to code-scanning
38+
uses: github/codeql-action/upload-sarif@ce28f5bb42b7a9f2c824e633a3f6ee835bab6858 # v3.29.0
39+
with:
40+
sarif_file: results.sarif

.github/workflows/test_accuracy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: test_accuracy
2-
permissions: { } # No permissions by default on workflow level
2+
permissions: {} # No permissions by default on workflow level
33
on:
44
pull_request:
55
merge_group:

.github/workflows/test_precommit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: test_precommit
2-
permissions: { } # No permissions by default on workflow level
2+
permissions: {} # No permissions by default on workflow level
33
on:
44
pull_request:
55
merge_group:

0 commit comments

Comments
 (0)