Skip to content
This repository was archived by the owner on Sep 21, 2026. It is now read-only.

About

CodeRifts integration example for minimal Python projects

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

CodeRifts — Minimal Python Example

Minimal Python script that calls the CodeRifts public preflight endpoint and aborts execution when the API is unsafe.

Quick Start

pip install requests
python main.py

How It Works

  1. Calls GET /api/v1/public/preflight?url=<spec_url> — no API key required
  2. Reads the decision field from the response
  3. If BLOCK → aborts the workflow
  4. If PENDING → retries after 5 seconds
  5. If ALLOW → proceeds with the API call

Example Output

[CODERIFTS] decision: ALLOW
[CODERIFTS] risk_score: 12
[CODERIFTS] safe_for_agent: true
[EXECUTION] Proceeding with API call...

Links

About

CodeRifts integration example for minimal Python projects

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages