diff --git a/.github/workflows/nix.yml b/.github/workflows/nix.yml index c94954f..a852566 100644 --- a/.github/workflows/nix.yml +++ b/.github/workflows/nix.yml @@ -59,6 +59,10 @@ jobs: mkdir -p $DATA_DIR/$YEAR docker run --rm -v $PWD:/repo --workdir /repo haskell/hsec-tools:latest /bin/hsec-tools osv "$FILE" > $DATA_DIR/$YEAR/$ID.json done < <(find advisories -type f -name "*.md" | grep -v '^advisories/reserved/') + - name: Validate OSV data + run: | + curl -OL https://raw.githubusercontent.com/ossf/osv-schema/refs/heads/main/validation/schema.json + nix develop --command check-jsonschema --schemafile ../schema.json ./osv/*/*.json - name: Publish OSV data if: ${{ github.event_name == 'push' && github.ref_name == 'main' && github.repository == 'haskell/security-advisories' }} env: diff --git a/flake.nix b/flake.nix index d163def..4b7f521 100644 --- a/flake.nix +++ b/flake.nix @@ -44,6 +44,7 @@ ghcid haskell-language-server pkgs.nixpkgs-fmt + pkgs.check-jsonschema ]) else drv; };