Developer API
Tethlyn Audit API
Run a security scan on any codebase and read the report programmatically. REST, JSON, bearer-key auth.
Introduction
The Tethlyn Audit API runs a pre-delivery security review of a codebase and returns a report ranked by real exploitability. Submit a repository or an archive, poll for the result, and read it back as JSON. Every finding is backed by evidence from the scan, so the report is safe to act on.
Responses come in two layers. The overview (verdict, tallies, category and reachability counts, and finding titles) is free. The full report (each finding's location, evidence, CWE/CVE, reachability and fix) is returned to members; without an active membership the detail endpoint returns 402.
What it checks
Six areas, one verdict
Each scan reviews the codebase across these areas and returns a verdict:
Authorization
Broken access control and object-level authorization (IDOR / BOLA).
Authentication
Session and token hygiene, cookie flags, weak handling.
Data protection
Sensitive data in logs, URLs, or client storage.
Secrets
Credentials and keys committed to the source.
Dependencies
Known-vulnerable and misconfigured packages.
Reachability
Whether each issue is reachable from untrusted input.
Quickstart
Scan a repo in three calls
- Create an API key in your dashboard.
- Submit a repository; you get a scan id.
- Poll the scan until state is done, then read it.
# 1. submit a public repository
curl -X POST https://audit.tethlyn.com/api/v1/audits \
-H "Authorization: Bearer $TETHLYN_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://github.com/org/repo"}'
# -> { "id": "a1B2c3D4e5F6" }
# 2. poll status + free overview
curl https://audit.tethlyn.com/api/v1/audits/a1B2c3D4e5F6 \
-H "Authorization: Bearer $TETHLYN_API_KEY"
# 3. members only: the full report
curl https://audit.tethlyn.com/api/v1/audits/a1B2c3D4e5F6/detail \
-H "Authorization: Bearer $TETHLYN_API_KEY"CI/CD integration
Tethlyn as a pre-production gate
The strongest way to use Tethlyn is as a pre-production gate: run a scan in CI on every pull request or release branch, and block the deploy when the verdict is DO NOT SHIP or FIX FIRST. You catch reachable security issues before they reach production, not after.
#!/usr/bin/env bash
set -euo pipefail
# Submit the repo, wait for the result, fail the build on a blocking verdict.
ID=$(curl -fsS -X POST https://audit.tethlyn.com/api/v1/audits \
-H "Authorization: Bearer $TETHLYN_API_KEY" \
-H "Content-Type: application/json" \
-d "{\"url\":\"$REPO_URL\"}" | jq -r .id)
while :; do
BODY=$(curl -fsS https://audit.tethlyn.com/api/v1/audits/$ID \
-H "Authorization: Bearer $TETHLYN_API_KEY")
STATE=$(echo "$BODY" | jq -r .state)
[ "$STATE" = "done" ] && break
[ "$STATE" = "error" ] && { echo "scan failed"; exit 1; }
sleep 5
done
VERDICT=$(echo "$BODY" | jq -r .overview.verdict)
echo "Tethlyn verdict: $VERDICT"
case "$VERDICT" in
"DO NOT SHIP"|"FIX FIRST") echo "Blocking deploy."; exit 1 ;;
*) echo "Gate passed."; exit 0 ;;
esacname: Security gate
on: [pull_request]
jobs:
tethlyn-audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Tethlyn Audit gate
env:
TETHLYN_API_KEY: ${{ secrets.TETHLYN_API_KEY }}
REPO_URL: https://github.com/${{ github.repository }}
run: ./scripts/tethlyn-gate.shAgentic pipeline
Close the loop with your agent
In an agent-driven pipeline, Tethlyn closes the loop. After your agent builds a feature and it passes code review and end-to-end tests, run a scan and feed the report straight back to the agent. Each finding carries its location, the evidence and the exact remediation, so the agent can apply the fix, re-scan, and only deploy once the verdict is clean.
// after the agent builds the feature and review + e2e tests pass
let verdict = "";
do {
const id = await tethlyn.submit({ url: repoUrl }); // POST /api/v1/audits
const scan = await tethlyn.waitForDone(id); // poll GET .../audits/{id}
verdict = scan.overview.verdict;
if (verdict === "DO NOT SHIP" || verdict === "FIX FIRST") {
const { findings } = await tethlyn.report(id); // GET .../audits/{id}/detail
for (const f of findings) {
await agent.applyFix({ // your coding agent
file: f.location,
problem: f.title,
evidence: f.evidence,
remediation: f.remediation,
});
}
await agent.commit("fix: resolve Tethlyn findings");
}
} while (verdict === "DO NOT SHIP" || verdict === "FIX FIRST");
await deploy(); // verdict is cleanAuthentication
Bearer API key
Authenticate every request with an API key as a bearer token. Create and revoke keys in your dashboard under API keys; a key is shown once at creation and stored only as a hash. A key inherits your account's membership, which is what unlocks the full report over the API.
Authorization: Bearer tth_xxxxxxxxxxxxxxxxxxxxxxxx- Keep keys server-side. A missing or invalid key returns 401.
Start a scan. Submit a repository (JSON) or a zip archive (multipart/form-data). Returns a scan id immediately; the scan runs asynchronously.
| Field | Type | Description |
|---|---|---|
| url | string | Public https git URL. Required for the JSON form. |
| token | string | Optional access token for a private repo. |
| file | binary | A .zip of the source, for the multipart form. |
curl -X POST https://audit.tethlyn.com/api/v1/audits \
-H "Authorization: Bearer $TETHLYN_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://github.com/org/repo"}'{ "id": "a1B2c3D4e5F6" }List scans. Returns the scans owned by this API key, most recent first.
curl https://audit.tethlyn.com/api/v1/audits \
-H "Authorization: Bearer $TETHLYN_API_KEY"{
"audits": [
{ "id": "a1B2c3D4e5F6", "state": "done",
"sourceLabel": "github.com/org/repo",
"verdict": "FIX FIRST", "total": 31 }
]
}Get status + overview. Returns the scan state and, once done, the free overview. Never returns per-finding detail.
curl https://audit.tethlyn.com/api/v1/audits/a1B2c3D4e5F6 \
-H "Authorization: Bearer $TETHLYN_API_KEY"{
"id": "a1B2c3D4e5F6",
"state": "done",
"subscribed": false,
"overview": {
"verdict": "FIX FIRST",
"verdict_note": "High-severity issues should be fixed before this ships.",
"total_findings": 31,
"confirmed": 4,
"needs_review": 27,
"reachable_count": 27,
"categories": { "authz": 22, "authn": 7, "pii": 2 },
"teasers": [
{ "id": "F-0bd2f28fc1",
"title": "Secret in a URL query string",
"severity": "high", "reachability": "likely_reachable" }
]
}
}Get the full report. The paid layer: every finding with its evidence and fix. Requires an active membership on the key's account, otherwise 402.
curl https://audit.tethlyn.com/api/v1/audits/a1B2c3D4e5F6/detail \
-H "Authorization: Bearer $TETHLYN_API_KEY"{
"findings": [
{
"id": "F-0bd2f28fc1",
"title": "Secret in a URL query string",
"severity": "high",
"category": "pii",
"location": "src/admin/actions.ts:1995",
"evidence": "const url = `${SITE}/staff/signup?token=${token}`",
"cwe": ["CWE-598"], "cve": [],
"reachability": "likely_reachable",
"remediation": "Never put secrets in a URL or query string; send them in the request body and use short-lived tokens."
}
]
}Objects
Response shapes
| Field | Type | Description |
|---|---|---|
| verdict | string | DO NOT SHIP · FIX FIRST · SHIP WITH FIXES · OK TO SHIP |
| total_findings | integer | All findings. |
| confirmed | integer | Confirmed issues. |
| needs_review | integer | Flagged for human review. |
| reachable_count | integer | Reachable from untrusted input. |
| categories | object | Count per area (authz, authn, pii, ...). |
| teasers[] | array | Title + severity + reachability only (no detail). |
| Field | Type | Description |
|---|---|---|
| id | string | Stable finding id. |
| severity | string | critical · high · medium · low · info |
| location | string | file:line of the issue. |
| evidence | string | The matched source line. |
| cwe / cve | string[] | Only when asserted for the finding. |
| reachability | string | likely_reachable · not_obviously_reachable · unknown |
| remediation | string | The concrete fix. |
Errors
Status codes
| Code | Meaning | When |
|---|---|---|
| 401 | Unauthorized | Missing or invalid API key. |
| 402 | Payment Required | No active membership for the full report. |
| 404 | Not Found | Unknown scan, or not owned by this key. |
| 400 | Bad Request | Invalid input (bad URL, unsafe archive). |
Why it's trustworthy
Evidence first, no invented CVEs
Every finding is backed by evidence pulled straight from your code, and the report never contains a CWE or CVE that isn't supported by that evidence. Findings are then ranked by whether an attacker can actually reach them from untrusted input, so the issues that matter rise to the top rather than drowning you in noise.
In short
Prefer a spec? The machine-readable OpenAPI 3 document imports into Postman, Insomnia or your SDK generator.
Put a gate in front of production
Tethlyn Audit returns a verdict with every finding ranked by real exploitability and data sensitivity, not a flat severity label. Back to docs.