diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml new file mode 100644 index 0000000..f00b5a5 --- /dev/null +++ b/.github/workflows/validate.yml @@ -0,0 +1,23 @@ +name: Validate Schema +on: + pull_request: + +concurrency: + group: validate-schema-${{ github.ref_name }} + cancel-in-progress: true + +jobs: + validate: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Validate Schema + uses: caido/action-json-schema-validate:3d80261c1f49e8664a6311b08c5809127cfc4a91 + with: + schema: schema.json + files: plugin_packages.json + fail-on-invalid: true + cache-remote-schema: false diff --git a/plugin_packages.json b/plugin_packages.json index b21e51a..4af447d 100644 --- a/plugin_packages.json +++ b/plugin_packages.json @@ -2,6 +2,7 @@ { "id": "autorize", "name": "Autorize", + "license": "MIT", "description": "Automated access control testing plugin for Caido", "author": { "name": "Caido Labs Inc.", diff --git a/schema.json b/schema.json new file mode 100644 index 0000000..33f09d1 --- /dev/null +++ b/schema.json @@ -0,0 +1,42 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "license": { + "type": "string" + }, + "description": { + "type": "string" + }, + "author": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string", + "format": "email" + }, + "url": { + "type": "string", + "format": "uri" + } + }, + "required": ["name", "email", "url"] + }, + "repository": { + "type": "string" + } + }, + "required": ["id", "name", "license", "description", "author", "repository"] + } +}