Skip to content

Commit 4cd8ff5

Browse files
authored
feat: add openssf workflow and badge (#113)
Signed-off-by: Árpád Csepi <csepi.arpad@outlook.com>
1 parent 8daa777 commit 4cd8ff5

2 files changed

Lines changed: 52 additions & 0 deletions

File tree

.github/workflows/scorecard.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Copyright AGNTCY Contributors (https://github.com/agntcy)
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
name: OpenSSF Scorecard
5+
6+
on:
7+
branch_protection_rule:
8+
schedule:
9+
- cron: "30 1 * * 6"
10+
push:
11+
branches: ["main"]
12+
workflow_dispatch: {}
13+
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+
contents: read
26+
actions: read
27+
28+
steps:
29+
- name: Checkout code
30+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
31+
with:
32+
persist-credentials: false
33+
34+
- name: Run analysis
35+
uses: ossf/scorecard-action@2d1146689b8cda280b9bc96326124645441f03bc # v2.4.4
36+
with:
37+
results_file: results.sarif
38+
results_format: sarif
39+
publish_results: true
40+
41+
- name: Upload artifact
42+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
43+
with:
44+
name: SARIF file
45+
path: results.sarif
46+
retention-days: 5
47+
48+
- name: Upload to code-scanning
49+
uses: github/codeql-action/upload-sarif@cdf488f595d80d6e07e03d4674febd5ab45fa938 # v4.37.9
50+
with:
51+
sarif_file: results.sarif

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
[![npm version](https://img.shields.io/npm/v/agntcy-dir.svg)](https://www.npmjs.com/package/agntcy-dir)
44
[![Coverage](https://codecov.io/gh/agntcy/dir-sdk-javascript/branch/main/graph/badge.svg)](https://codecov.io/gh/agntcy/dir-sdk-javascript)
5+
[![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/agntcy/dir-sdk-javascript/badge)](https://scorecard.dev/viewer/?uri=github.com/agntcy/dir-sdk-javascript)
56
## Overview
67

78
Dir JavaScript SDK provides a simple way to interact with the Directory API.

0 commit comments

Comments
 (0)