Skip to content

Commit 45b0126

Browse files
authored
Add OSSF scorecard. Closes #5968 (#5969)
1 parent eac611d commit 45b0126

File tree

2 files changed

+51
-0
lines changed

2 files changed

+51
-0
lines changed

.github/workflows/scorecard.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: OpenSSF Scorecard
2+
on:
3+
schedule:
4+
- cron: '0 0 * * 0'
5+
push:
6+
branches:
7+
- main
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
analysis:
14+
name: Scorecards 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
20+
id-token: write
21+
actions: read
22+
contents: read
23+
24+
steps:
25+
- name: 'Checkout code'
26+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
27+
with:
28+
persist-credentials: false
29+
30+
- name: 'Run analysis'
31+
uses: ossf/scorecard-action@4eaacf0543bb3f2c246792bd56e8cdeffafb205a # v2.4.3
32+
with:
33+
results_file: results.sarif
34+
results_format: sarif
35+
repo_token: ${{ secrets.GITHUB_TOKEN }}
36+
publish_results: true
37+
38+
# Upload the results as artifacts.
39+
- name: 'Upload artifact'
40+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
41+
with:
42+
name: SARIF file
43+
path: results.sarif
44+
retention-days: 5
45+
46+
# Upload the results to GitHub's code scanning dashboard.
47+
- name: 'Upload to code-scanning'
48+
uses: github/codeql-action/upload-sarif@4e94bd11f71e507f7f87df81788dff88d1dacbfb # v4.31.0
49+
with:
50+
sarif_file: results.sarif

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
[![CI](https://github.com/quickwit-oss/quickwit/actions/workflows/ci.yml/badge.svg)](https://github.com/quickwit-oss/quickwit/actions?query=workflow%3ACI+branch%3Amain)
22
[![codecov](https://codecov.io/gh/quickwit-oss/quickwit/branch/main/graph/badge.svg?token=06SRGAV5SS)](https://codecov.io/gh/quickwit-oss/quickwit)
3+
[![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/quickwit-oss/quickwit/badge)](https://scorecard.dev/viewer/?uri=github.com/quickwit-oss/quickwit)
34
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.0-4baaaa.svg)](CODE_OF_CONDUCT.md)
45
[![License: Apache 2.0](https://img.shields.io/badge/license-Apache%202.0-blue?style=flat-square)](LICENSE)
56
[![Twitter Follow](https://img.shields.io/twitter/follow/Quickwit_Inc?color=%231DA1F2&logo=Twitter&style=plastic)](https://twitter.com/Quickwit_Inc)

0 commit comments

Comments
 (0)