Update vulns/CVE-2024-7646.json #13
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: JSON Schema Validation | |
on: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
validate: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # For git diff | |
- name: Download the JSON schema | |
run: wget https://raw.githubusercontent.com/ossf/osv-schema/v1.6.0/validation/schema.json | |
- name: Install check-jsonschema | |
run: pip install check-jsonschema | |
- name: Validate JSON | |
run: | | |
CHANGED_FILES=$(git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} | grep .json) && : // Ignore errors | |
if [ -n "$CHANGED_FILES" ]; then | |
echo "Validating JSON files: $CHANGED_FILES" | |
check-jsonschema --schemafile schema.json $CHANGED_FILES | |
else | |
echo "No JSON files changed. Skipping validation." | |
fi |