Minimal Python script that calls the CodeRifts public preflight endpoint and aborts execution when the API is unsafe.
pip install requests
python main.py- Calls
GET /api/v1/public/preflight?url=<spec_url>— no API key required - Reads the
decisionfield from the response - If
BLOCK→ aborts the workflow - If
PENDING→ retries after 5 seconds - If
ALLOW→ proceeds with the API call
[CODERIFTS] decision: ALLOW
[CODERIFTS] risk_score: 12
[CODERIFTS] safe_for_agent: true
[EXECUTION] Proceeding with API call...