Skip to content

Commit 3966c94

Browse files
authored
feat: openssf scoreboard implementation (#29)
This PR is: - adding a CI job for generating OpenSSF score - add the score badge to README.md - reduce CI permissions to improve the score --------- Signed-off-by: Árpád Csepi <csepi.arpad@outlook.com>
1 parent a7a3cd2 commit 3966c94

6 files changed

Lines changed: 65 additions & 0 deletions

File tree

.github/workflows/build-and-test.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ on:
1010
- main
1111
pull_request:
1212

13+
permissions:
14+
contents: read
15+
1316
concurrency:
1417
group: ${{ github.workflow }}-${{ github.ref }}
1518
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

.github/workflows/release-check.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ on:
1010
- main
1111
workflow_dispatch:
1212

13+
permissions:
14+
contents: read
15+
1316
concurrency:
1417
group: ${{ github.workflow }}-${{ github.ref }}
1518
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

.github/workflows/release-python.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ on:
99
tags:
1010
- 'v*'
1111

12+
permissions:
13+
contents: read
14+
1215
concurrency:
1316
group: ${{ github.workflow }}-${{ github.ref }}
1417
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

.github/workflows/reusable-python-build-and-test.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ on:
5050
type: boolean
5151
default: true
5252

53+
permissions:
54+
contents: read
55+
5356
jobs:
5457
pylint:
5558
runs-on: ubuntu-latest

.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: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# SLIMA2A
22

3+
[![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/agntcy/slim-a2a-python/badge)](https://scorecard.dev/viewer/?uri=github.com/agntcy/slim-a2a-python)
4+
35
SLIMA2A is a SLIM transport for A2A using slim's RPC protocol (srpc). It allows
46
agents to communicate over the SLIM network using the A2A protocol, using SLIM
57
identities for authentication and addressing.

0 commit comments

Comments
 (0)