Automated security scanning for code and pull requests. Detect vulnerabilities before they ship.
Base URL: https://neuronx.jagatab.uk
Pass your API key in the X-Api-Key header:
curl -H "X-Api-Key: nx-YOUR_KEY" https://neuronx.jagatab.uk/v1/scan ...
โ Get a free API key (POST)
| Tier | Scans/Day | Price | Best For |
|---|---|---|---|
| Free | 50 | $0 | Testing & hobbyists |
| Pro | 1,000 | $9/mo | Individual developers |
| Team | Unlimited | $49/mo | Teams & CI/CD pipelines |
Scan code or a unified diff for security vulnerabilities.
curl -X POST https://neuronx.jagatab.uk/v1/scan \
-H "X-Api-Key: nx-YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"code": "import subprocess\nsubprocess.run(user_input, shell=True)",
"filename": "app.py",
"severity_threshold": "warning"
}'
Request body:
| Field | Type | Default | Description |
|---|---|---|---|
code | string | "" | Raw source code to scan |
diff | string | "" | Unified diff (alternative to code) |
filename | string | "code.py" | Filename for language detection |
severity_threshold | string | "warning" | Minimum severity: info/warning/error |
max_issues | int | 20 | Max issues returned (1-100) |
include_fix_suggestions | bool | true | Include AI fix suggestions |
Example response:
{
"status": "error",
"summary": {"total_issues": 2, "errors": 1, "warnings": 1},
"issues": [
{
"severity": "error",
"line": 2,
"message": "Command injection via shell=True with unsanitized input",
"owasp": "A03:2021 Injection",
"fix_suggestion": "Use shlex.split() and shell=False"
}
],
"scan_time_ms": 142.3,
"usage": {"used_today": 1, "limit": 50, "tier": "free"}
}
Check your current usage and remaining quota.
curl -H "X-Api-Key: nx-YOUR_KEY" https://neuronx.jagatab.uk/v1/usage
Create a free-tier API key (no credit card required).
curl -X POST https://neuronx.jagatab.uk/v1/keys/create \
-H "Content-Type: application/json" \
-d '{"name": "My Project", "email": "[email protected]"}'
| HTTP | Error | Meaning |
|---|---|---|
| 401 | missing_api_key / invalid_api_key | Key missing or wrong |
| 429 | rate_limit_exceeded | Daily quota exhausted โ resets midnight UTC |
| 400 | โ | Bad request (provide code or diff) |
Auto-scan pull requests on every push:
# .github/workflows/codeguard.yml
name: CodeGuard Security Scan
on: [pull_request]
jobs:
scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with: {fetch-depth: 0}
- name: Run CodeGuard
run: |
DIFF=$(git diff origin/${{ github.base_ref }}...HEAD)
curl -sf -X POST https://neuronx.jagatab.uk/v1/scan \
-H "X-Api-Key: ${{ secrets.CODEGUARD_API_KEY }}" \
-H "Content-Type: application/json" \
-d "$(jq -n --arg d "$DIFF" '{"diff":$d,"severity_threshold":"error"}')" | tee result.json
if [ "$(jq -r .status result.json)" = "error" ]; then exit 1; fi
# Python
pip install codeguard-sdk
from codeguard import CodeGuard
cg = CodeGuard("nx-YOUR_KEY")
result = cg.scan(code=open("app.py").read(), filename="app.py")
print(result.summary)
CodeGuard is powered by NeuronX AI Security Engine. Documentation ยท Support