Skip to content

Commit 0eacbdc

Browse files
committed
[CP-Sec] Enable OpenSSF Scorecard
Enable OpenSSF Scorecard workflow, add badge to README file
1 parent 51e26c4 commit 0eacbdc

File tree

2 files changed

+57
-1
lines changed

2 files changed

+57
-1
lines changed

.github/workflows/scorecard.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Scorecards' GitHub action
2+
3+
name: Scorecard supply-chain security
4+
on:
5+
# For Branch-Protection check. Only the default branch is supported. See
6+
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
7+
branch_protection_rule:
8+
schedule:
9+
- cron: '7 12 * * 4'
10+
push:
11+
branches: [ "master" ]
12+
13+
# Declare default permissions as read only.
14+
permissions: read-all
15+
16+
jobs:
17+
analysis:
18+
name: Scorecard analysis
19+
runs-on: ubuntu-latest
20+
permissions:
21+
# Needed to upload the results to code-scanning dashboard.
22+
security-events: write
23+
# Needed to publish results and get a badge (see publish_results below).
24+
id-token: write
25+
26+
steps:
27+
- name: "Checkout code"
28+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
29+
with:
30+
persist-credentials: false
31+
32+
- name: "Run analysis"
33+
uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0
34+
with:
35+
results_file: results.sarif
36+
results_format: sarif
37+
publish_results: true
38+
39+
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
40+
# format to the repository Actions tab.
41+
- name: "Upload artifact"
42+
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4
43+
with:
44+
name: SARIF file
45+
path: results.sarif
46+
retention-days: 5
47+
48+
# Upload the results to GitHub's code scanning dashboard (optional).
49+
# Commenting out will disable upload of results to your repo's Code Scanning dashboard
50+
- name: "Upload to code-scanning"
51+
uses: github/codeql-action/upload-sarif@afb54ba388a7dca6ecae48f608c4ff05ff4cc77a # v3.25.15
52+
with:
53+
sarif_file: results.sarif

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
SYCL for CUDA examples
22
==========================
33

4+
[![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/codeplaysoftware/SYCL-For-CUDA-Examples/badge)](https://scorecard.dev/viewer/?uri=github.com/codeplaysoftware/SYCL-For-CUDA-Examples)
5+
46
This repository contains examples that demonstrate how to use the CUDA backend
57
in SYCL.
68

@@ -80,4 +82,5 @@ there is no SYCL code in the example, but it includes scripts to build Kokkos wi
8082
[Hashing Algorithms](examples/hashing)
8183
--------------------------------------------
8284

83-
This example is slightly different - it benchmarks a series of hashing algorithms.
85+
This example is slightly different - it benchmarks a series of hashing algorithms.
86+

0 commit comments

Comments
 (0)