Skip to content

Commit c100aaa

Browse files
authored
PMM-7 integrate scorecard. (#958)
1 parent 02d5d2f commit c100aaa

File tree

2 files changed

+49
-0
lines changed

2 files changed

+49
-0
lines changed

.github/workflows/scorecard.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Scorecard
2+
on:
3+
# To guarantee Maintained check is occasionally updated. See
4+
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
5+
schedule:
6+
- cron: "24 3 * * 1"
7+
push:
8+
branches:
9+
- main
10+
11+
# Declare default permissions as read only.
12+
permissions: read-all
13+
14+
jobs:
15+
analysis:
16+
name: Analysis
17+
runs-on: ubuntu-latest
18+
permissions:
19+
# Needed to upload the results to code-scanning dashboard.
20+
security-events: write
21+
# Needed to publish results and get a badge (see publish_results below).
22+
id-token: write
23+
24+
steps:
25+
- name: Checkout code
26+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
27+
with:
28+
persist-credentials: false
29+
30+
- name: Run analysis
31+
uses: ossf/scorecard-action@0864cf19026789058feabb7e87baa5f140aac736 # v2.3.1
32+
with:
33+
results_file: results.sarif
34+
results_format: sarif
35+
publish_results: true
36+
37+
- name: Upload results
38+
uses: actions/upload-artifact@97a0fba1372883ab732affbe8f94b823f91727db # v3.pre.node20
39+
with:
40+
name: SARIF file
41+
path: results.sarif
42+
retention-days: 5
43+
44+
# Upload the results to GitHub's code scanning dashboard (optional).
45+
- name: "Upload to code-scanning"
46+
uses: github/codeql-action/upload-sarif@v3
47+
with:
48+
sarif_file: results.sarif

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
[![Build Status](https://github.com/percona/mongodb_exporter/actions/workflows/go.yml/badge.svg?branch=main)](https://github.com/percona/mongodb_exporter/actions/workflows/go.yml?query=branch%3Amain)
44
[![codecov.io Code Coverage](https://img.shields.io/codecov/c/github/percona/mongodb_exporter.svg?maxAge=2592000)](https://codecov.io/github/percona/mongodb_exporter?branch=main)
55
[![Go Report Card](https://goreportcard.com/badge/github.com/percona/mongodb_exporter)](https://goreportcard.com/report/github.com/percona/mongodb_exporter)
6+
[![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/percona/mongodb_exporter/badge)](https://scorecard.dev/viewer/?uri=github.com/percona/mongodb_exporter)
67
[![CLA assistant](https://cla-assistant.percona.com/readme/badge/percona/mongodb_exporter)](https://cla-assistant.percona.com/percona/mongodb_exporter)
78

89

0 commit comments

Comments
 (0)