Skip to content

Commit 5f84d75

Browse files
authored
Merge pull request #1898 from hyperledger/swcurran-openssf-scorecard
Adds OpenSSF scorecard workflow and badge
2 parents c52a528 + e8c552b commit 5f84d75

File tree

2 files changed

+81
-0
lines changed

2 files changed

+81
-0
lines changed

.github/workflows/scorecard.yml

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

README.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
![logo](collateral/logos/indy-logo.png)
22

33
[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/hyperledger/indy-node/tree/main)
4+
5+
<p float="left">
6+
<a href="https://scorecard.dev/viewer/?uri=github.com/hyperledger/indy-node"><img src="https://api.scorecard.dev/projects/github.com/hyperledger/indy-node/badge" />
7+
</p>
8+
49
# Indy Node
510
- [Indy Node](#indy-node)
611
- [Announcements](#announcements)

0 commit comments

Comments
 (0)