Skip to content

Commit f66264f

Browse files
authored
Merge pull request #196 from Jdubrick/cncf-cleaner-tasks
add openssf scorecard scanning/badge and clomonitor exemption
2 parents 35722ec + 87164a6 commit f66264f

File tree

3 files changed

+68
-0
lines changed

3 files changed

+68
-0
lines changed

.clomonitor.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# CLOMonitor metadata file
2+
# This file must be located at the root of the repository
3+
4+
# Checks exemptions
5+
exemptions:
6+
- check: license_scanning # Check identifier (see https://github.com/cncf/clomonitor/blob/main/docs/checks.md#exemptions)
7+
reason: "There are currently no plans moving forward to implement FOSSA or Snyk for scanning purposes." # Justification of this exemption (mandatory, it will be displayed on the UI)

.github/workflows/scorecard.yaml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Scorecard 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+
pull_request:
7+
branches: [ "main" ]
8+
9+
# Declare default permissions as read only.
10+
permissions: read-all
11+
12+
jobs:
13+
analysis:
14+
name: Scorecard analysis
15+
runs-on: ubuntu-latest
16+
permissions:
17+
# Needed to upload the results to code-scanning dashboard.
18+
security-events: write
19+
# Needed to publish results and get a badge (see publish_results below).
20+
id-token: write
21+
22+
steps:
23+
- name: "Checkout code"
24+
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
25+
with:
26+
persist-credentials: false
27+
28+
- name: "Run analysis"
29+
uses: ossf/scorecard-action@e38b1902ae4f44df626f11ba0734b14fb91f8f86 # v2.1.2
30+
with:
31+
results_file: results.sarif
32+
results_format: sarif
33+
# (Optional) "write" PAT token. Uncomment the `repo_token` line below if:
34+
# - you want to enable the Branch-Protection check on a *public* repository, or
35+
# - you are installing Scorecard on a *private* repository
36+
# To create the PAT, follow the steps in https://github.com/ossf/scorecard-action#authentication-with-pat.
37+
# repo_token: ${{ secrets.SCORECARD_TOKEN }}
38+
39+
# Public repositories:
40+
# - Publish results to OpenSSF REST API for easy access by consumers
41+
# - Allows the repository to include the Scorecard badge.
42+
# - See https://github.com/ossf/scorecard-action#publishing-results.
43+
publish_results: true
44+
45+
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
46+
# format to the repository Actions tab.
47+
- name: "Upload artifact"
48+
uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # v3.1.0
49+
with:
50+
name: SARIF file
51+
path: results.sarif
52+
retention-days: 5
53+
54+
# Upload the results to GitHub's code scanning dashboard.
55+
- name: "Upload to code-scanning"
56+
uses: github/codeql-action/upload-sarif@17573ee1cc1b9d061760f3a006fc4aac4f944fd5 # v2.2.4
57+
with:
58+
sarif_file: results.sarif

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
<div id="header">
44

55
[![Apache2.0 License](https://img.shields.io/badge/license-Apache2.0-brightgreen.svg)](LICENSE)
6+
[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/8257/badge)](https://www.bestpractices.dev/projects/8257)
7+
[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/devfile/registry-support/badge)](https://securityscorecards.dev/viewer/?uri=github.com/devfile/registry-support)
8+
69
</div>
710

811
Provide support for devfile registries

0 commit comments

Comments
 (0)