Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions .github/workflows/generate-osv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,13 @@ jobs:
- name: Install advisories
run: opam pin add --confirm-level=unsafe-yes https://github.com/hannesm/advisories.git

- name: Fetch OSV schema
run: curl -OL https://raw.githubusercontent.com/ossf/osv-schema/refs/heads/main/validation/schema.json
- name: Use Go
uses: actions/setup-go@v6
with:
go-version: stable

- name: Install check-jsonschema
run: pipx install check-jsonschema
- name: Install osv-linter
run: go install github.com/ossf/osv-schema/tools/osv-linter/cmd/osv@latest

- name: Check and run advisories
run: |
Expand All @@ -41,7 +43,7 @@ jobs:
echo "Converting advisory $x"
opam exec -- advisories $x | jq > $x.json
echo "Validating advisory $x.json"
check-jsonschema --schemafile ./schema.json $x.json
osv record lint --collection offline $x.json
echo "Done with exit code $?"
YEAR=$(echo $x | cut -d '/' -f 2)
mkdir -p osv/$YEAR
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/validate-pull.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,13 @@ jobs:
- name: Install advisories
run: opam pin add --confirm-level=unsafe-yes https://github.com/hannesm/advisories.git

- name: Fetch OSV schema
run: curl -OL https://raw.githubusercontent.com/ossf/osv-schema/refs/heads/main/validation/schema.json
- name: Use Go
uses: actions/setup-go@v6
with:
go-version: stable

- name: Install check-jsonschema
run: pipx install check-jsonschema
- name: Install osv-linter
run: go install github.com/ossf/osv-schema/tools/osv-linter/cmd/osv@latest

- name: Check and run advisories
run: |
Expand All @@ -45,6 +47,6 @@ jobs:
echo "Advisory is:"
cat $x.json | jq
echo "Validating advisory $x.json"
check-jsonschema --schemafile ./schema.json $x.json
osv record lint --collection offline $x.json
echo "Done with exit code $?"
done
Loading