Skip to content

Commit 1ef9b0a

Browse files
committed
Add security scorecard
1 parent 9269e63 commit 1ef9b0a

File tree

2 files changed

+59
-0
lines changed

2 files changed

+59
-0
lines changed

.github/workflows/scorecard.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
---
2+
# This workflow uses actions that are not certified by GitHub. They are provided
3+
# by a third-party and are governed by separate terms of service, privacy
4+
# policy, and support documentation.
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: 15 21 * * 4
14+
push:
15+
branches:
16+
- main
17+
# Declare default permissions as read only.
18+
permissions: read-all
19+
jobs:
20+
analysis:
21+
name: Scorecard analysis
22+
runs-on: ubuntu-latest
23+
permissions:
24+
# Needed to upload the results to code-scanning dashboard.
25+
security-events: write
26+
# Needed to publish results and get a badge (see publish_results below).
27+
id-token: write
28+
# comment the permissions below if installing in a public repository.
29+
# contents: read
30+
# actions: read
31+
steps:
32+
- name: Harden Runner
33+
uses: step-security/harden-runner@6c439dc8bdf85cadbbce9ed30d1c7b959517bc49 # v2.12.2
34+
with:
35+
egress-policy: audit
36+
- name: Checkout code
37+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.5.4
38+
with:
39+
persist-credentials: false
40+
- name: Run analysis
41+
uses: ossf/scorecard-action@05b42c624433fc40578a4040d5cf5e36ddca8cde # v2.4.2
42+
with:
43+
results_file: results.sarif
44+
results_format: sarif
45+
publish_results: true
46+
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
47+
# format to the repository Actions tab.
48+
- name: Upload artifact
49+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
50+
with:
51+
name: SARIF file
52+
path: results.sarif
53+
retention-days: 5
54+
- name: Upload SARIF to GitHub Code Scanning
55+
uses: github/codeql-action/upload-sarif@51f77329afa6477de8c49fc9c7046c15b9a4e79d # v3.29.5
56+
with:
57+
sarif_file: results.sarif

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Event Scanner
22

3+
[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/OpenZeppelin/event-scanner/badge)](https://api.securityscorecards.dev/projects/github.com/OpenZeppelin/event-scanner)
4+
35
> ⚠️ **WARNING: ACTIVE DEVELOPMENT** ⚠️
46
>
57
> This project is under active development and likely contains bugs. APIs and behaviour may change without notice. Use at your own risk.

0 commit comments

Comments
 (0)