Skip to content

Commit aa69c95

Browse files
authored
Add OSI and GitHub data sources. (#219)
This change adds two data sources useful to implement OSPS Baseline checks. OSI data source is pretty simple and static, and can be used to verify if a given license is allowed by either OSI or FSF. GitHub data source is useful to get the license of a given public repository as detected by GitHub. Note that this currently only works for public repositories.
1 parent 0c69133 commit aa69c95

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

data-sources/ghapi.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
version: v1
2+
type: data-source
3+
name: ghapi
4+
rest:
5+
def:
6+
license:
7+
endpoint: https://api.github.com/repos/{owner}/{repo}/license
8+
parse: json
9+
input_schema:
10+
type: object
11+
properties:
12+
owner:
13+
type: string
14+
repo:
15+
type: string

data-sources/osi.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
version: v1
2+
type: data-source
3+
name: osi
4+
rest:
5+
def:
6+
licenses:
7+
endpoint: https://raw.githubusercontent.com/spdx/license-list-data/refs/heads/main/json/licenses.json
8+
parse: json
9+
input_schema: {}

0 commit comments

Comments
 (0)