Skip to content

feat(codex): add AgenTrust agent integrity plugin #96

feat(codex): add AgenTrust agent integrity plugin

feat(codex): add AgenTrust agent integrity plugin #96

Workflow file for this run

name: Validate integrations
on:
pull_request:
push:
branches: [main]
permissions:
contents: read
jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
with:
python-version: "3.12"
- name: Validate integration manifests against schema
run: |
pip install jsonschema pyyaml
python - <<'PY'
import json, sys, pathlib, yaml, jsonschema
schema = json.loads(pathlib.Path("schema/integration.schema.json").read_text())
failures = 0
dirs = [d for d in pathlib.Path("integrations").iterdir() if d.is_dir() and not d.name.startswith("_")]
for d in dirs:
manifest = d / "integration.yaml"
readme = d / "README.md"
if not manifest.exists():
print(f"FAIL {d.name}: missing integration.yaml"); failures += 1; continue
if not readme.exists():
print(f"FAIL {d.name}: missing README.md"); failures += 1; continue
try:
jsonschema.validate(yaml.safe_load(manifest.read_text()), schema)
print(f"OK {d.name}")
except jsonschema.ValidationError as e:
print(f"FAIL {d.name}: {e.message}"); failures += 1
print(f"{len(dirs)} integration(s), {failures} failure(s)")
sys.exit(1 if failures else 0)
PY