Skip to content
This repository was archived by the owner on Dec 20, 2024. It is now read-only.

Commit f9c652c

Browse files
authored
chore: tools.yaml validator/schema (#324)
fixes #323 --------- Signed-off-by: Jan Kowalleck <[email protected]>
1 parent 49f6fc3 commit f9c652c

File tree

3 files changed

+63
-6
lines changed

3 files changed

+63
-6
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: validate tools yaml
2+
3+
on:
4+
pull_request:
5+
paths: ["_data/tools.yml"]
6+
push:
7+
paths: ["_data/tools.yml"]
8+
workflow_dispatch:
9+
10+
permissions: read-all
11+
12+
jobs:
13+
lint-yaml:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: install yamale
17+
run: pip install 'yamale>=5.2.1,<6'
18+
- name: checkout
19+
uses: actions/checkout@v4
20+
- name: lint tools yaml
21+
run: yamale -s _data/.schema/tools.schema.yaml _data/tools.yml

_data/.schema/tools.schema.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# yamale schema syntax: https://github.com/23andMe/Yamale#schema
2+
list(include('tool'))
3+
4+
---
5+
6+
tool:
7+
name: str()
8+
publisher: str()
9+
description: str() # all after 250 chars is truncated
10+
repoUrl: str(required=False)
11+
websiteUrl: str(matches='^https?://.+')
12+
categories: list(include('category'))
13+
14+
# see _data/tool-categories.yml
15+
category: >
16+
enum(
17+
'opensource',
18+
'proprietary',
19+
'build-integration',
20+
'analysis',
21+
'author',
22+
'github-action',
23+
'github-app',
24+
'transform',
25+
'library',
26+
'signing-notary',
27+
'distribute'
28+
)
29+

_data/tools.yml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
---
2+
3+
# `description` will be truncated at 250 characters
4+
# `categories` values may be the keys from `tool-categories.yml` file
5+
26
- name: CycloneDX Core for Java
37
publisher: CycloneDX
48
description: Library which facilitates the creation of SBOMs from Java objects,
@@ -783,7 +787,7 @@
783787
websiteUrl: https://github.com/conan-io/conan-extensions
784788
categories:
785789
- opensource
786-
- build-integration
790+
- build-integration
787791
- name: Checkov
788792
publisher: Checkov
789793
description: Prevent cloud misconfigurations during build-time for Terraform, Cloudformation,
@@ -1708,7 +1712,7 @@
17081712
websiteUrl: https://github.com/nscuro/cdx-central
17091713
categories:
17101714
- opensource
1711-
- distribution
1715+
- distribute
17121716
- name: cdx-vs-cdx
17131717
publisher: marcosanchotene
17141718
description: GUI tool to compare two SBOMs in CycloneDX JSON format.
@@ -1800,10 +1804,10 @@
18001804
- distribute
18011805
- build-integration
18021806
- proprietary
1803-
- gitHub-app
1807+
- github-app
18041808
- analysis
18051809
- author
1806-
- name: Athena
1810+
- name: Athena
18071811
publisher: Medical Aegis Inc
18081812
description: Athena is a SaaS solution for medical device makers that overlays the product development lifecycle to address risks before devices go to market.
18091813
websiteUrl: https://medicalaegis.com
@@ -1884,7 +1888,7 @@
18841888
categories:
18851889
- opensource
18861890
- analysis
1887-
- distribution
1891+
- distribute
18881892
- name: SUM Platform
18891893
publisher: Security Pattern
18901894
description: SBOM management and vulnerability monitoring platform for IoT and embedded systems. Show compliance to regulations and standards and manage risk across the entire product lifecycle.
@@ -1947,7 +1951,7 @@
19471951
- author
19481952
- build-integration
19491953
- distribute
1950-
- gitHub-app
1954+
- github-app
19511955
- github-action
19521956
- name: cyclonedx_deps_to_mermaid.xsl
19531957
publisher: Jan Kowalleck
@@ -1981,3 +1985,6 @@
19811985
categories:
19821986
- analysis
19831987
- opensource
1988+
1989+
# `description` will be truncated at 250 characters
1990+
# `categories` values may be the keys from `tool-categories.yml` file

0 commit comments

Comments
 (0)