Skip to content

Commit edff7b2

Browse files
JuanAgudeloRSLJuanAgudeloRSL
authored andcommitted
feat: scorecard setup
1 parent 3010ec7 commit edff7b2

File tree

6 files changed

+154
-0
lines changed

6 files changed

+154
-0
lines changed

.github/dependantbot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: github-actions
4+
directory: /
5+
schedule:
6+
interval: daily
7+
8+
- package-ecosystem: npm
9+
directory: /
10+
schedule:
11+
interval: daily

.github/workflows/codeQL.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: "CodeQL"
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
pull_request:
7+
branches: ["main"]
8+
schedule:
9+
- cron: "0 0 * * *"
10+
11+
# Declare default permissions as read only.
12+
permissions:
13+
contents: read
14+
15+
jobs:
16+
analyze:
17+
name: Analyze
18+
runs-on: ubuntu-latest
19+
permissions:
20+
actions: read
21+
contents: read
22+
security-events: write
23+
24+
strategy:
25+
fail-fast: false
26+
matrix:
27+
language: [javascript]
28+
29+
steps:
30+
- name: Checkout
31+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
32+
33+
- name: Initialize CodeQL
34+
uses: github/codeql-action/init@aa578102511db1f4524ed59b8cc2bae4f6e88195 #v3.27.6
35+
with:
36+
languages: ${{ matrix.language }}
37+
queries: +security-and-quality
38+
39+
- name: Autobuild
40+
uses: github/codeql-action/autobuild@aa578102511db1f4524ed59b8cc2bae4f6e88195 #v3.27.6
41+
42+
- name: Perform CodeQL Analysis
43+
uses: github/codeql-action/analyze@aa578102511db1f4524ed59b8cc2bae4f6e88195 #v3.27.6
44+
with:
45+
category: "/language:${{ matrix.language }}"
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: "Dependency Review"
2+
on: [pull_request]
3+
4+
# Declare default permissions as read only.
5+
permissions: read-all
6+
7+
jobs:
8+
dependency-review:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
contents: read
12+
pull-requests: write
13+
steps:
14+
- name: "Checkout Repository"
15+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
16+
17+
- name: "Dependency Review"
18+
uses: actions/dependency-review-action@3b139cfc5fae8b618d3eae3675e383bb1769c019 # v4.5.0
19+
with:
20+
fail-on-severity: high
21+
comment-summary-in-pr: true

.github/workflows/scorecard.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Scorecard supply-chain security
2+
on:
3+
branch_protection_rule:
4+
schedule:
5+
- cron: "33 2 * * 2"
6+
push:
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+
security-events: write
18+
id-token: write
19+
20+
steps:
21+
- name: "Checkout code"
22+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2
23+
with:
24+
persist-credentials: false
25+
26+
- name: "Run analysis"
27+
uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0
28+
with:
29+
results_file: results.sarif
30+
results_format: sarif
31+
publish_results: true
32+
33+
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
34+
# format to the repository Actions tab.
35+
- name: "Upload artifact"
36+
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 #v4.4.3
37+
with:
38+
name: SARIF file
39+
path: results.sarif
40+
retention-days: 5
41+
42+
# Upload the results to GitHub's code scanning dashboard (optional).
43+
# Commenting out will disable upload of results to your repo's Code Scanning dashboard
44+
- name: "Upload to code-scanning"
45+
uses: github/codeql-action/upload-sarif@aa578102511db1f4524ed59b8cc2bae4f6e88195 # v3.27.6
46+
with:
47+
sarif_file: results.sarif

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
[![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/rsksmart/rootstock-hardhat-starterkit/badge)](https://scorecard.dev/viewer/?uri=github.com/rsksmart/rootstock-hardhat-starterkit)
2+
[![CodeQL](https://github.com/rsksmart/rootstock-hardhat-starterkit/workflows/CodeQL/badge.svg)](https://github.com/rsksmart/rootstock-hardhat-starterkit/actions?query=workflow%3ACodeQL)
3+
4+
15
<img src="rootstock-logo.jpg" alt="RSK Logo" style="width:100%; height: auto;" />
26

37
## Rootstock Hardhat Starterkit Configuration

SECURITY.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Reporting Security Issues
2+
3+
The Rootstock team and community take security bugs in rootstock seriously. Beside this project is out of our Bug Bounty Program scope, we appreciate your efforts to responsibly disclose your findings, and will make every effort to acknowledge your contributions.
4+
5+
## Responsible Disclosure
6+
7+
For all security related issues, rootstock-hardhat-starterkit has two main points of contact. Reach us at <security@rootstocklabs.com> or use the GitHub Security Advisory ["Report a Vulnerability"](https://github.com/rsksmart/rootstock-hardhat-starterkit/security/advisories/new) tab.
8+
9+
The Rootstock team will send a response indicating the next steps in handling your report. After the initial reply to your report, the security team will keep you informed of the progress towards a fix and full announcement, and may ask for additional information or guidance.
10+
11+
**Ensure the bug was not already reported** by searching on GitHub under [Issues](https://github.com/rsksmart/rootstock-hardhat-starterkit/issues).
12+
13+
## Vulnerability Handling
14+
15+
### Response Time
16+
17+
RootstockLabs will make a best effort to meet the following response times for reported vulnerabilities:
18+
19+
- Time to first response (from report submit) - 5 business days
20+
- Time to triage (from report submit) - 7 business days
21+
22+
We’ll try to keep you informed about our progress throughout the process.
23+
24+
### Disclose Policy
25+
26+
Follow our [disclosure guidelines](https://www.rootstocklabs.com/bounty-program/).

0 commit comments

Comments
 (0)