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.

Production
https://audit.tethlyn.com
Staging
https://staging.audit.tethlyn.com
Auth
Bearer API key
Format
JSON

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

  1. Create an API key in your dashboard.
  2. Submit a repository; you get a scan id.
  3. Poll the scan until state is done, then read it.
curl
# 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.

IN CI · PRE-PRODUCTIONPRODUCTIONCommit / PRCI: build + testTethlyn scansubmit → pollVERDICTDeploy to productionBlock deploy + reportpassfailOK TO SHIP · SHIP WITH FIXESDO NOT SHIP · FIX FIRST
Recommended placement: after your build and tests pass, before the deploy step. A clean verdict lets the pipeline continue; a failing one stops it, and the report tells the team exactly what to fix.
scripts/tethlyn-gate.sh
#!/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 ;;
esac
.github/workflows/security-gate.yml
name: 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.sh

Agentic 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.

Build featureyour agentCode reviewE2E testsTethlyn auditVERDICTDeploy to prodAgent applies fixespassreportfix → re-auditOK TO SHIP · SHIP WITH FIXESlocation · evidence · remediation
The report is machine-consumable: the agent iterates on /detail until the verdict is OK TO SHIP or SHIP WITH FIXES, then promotes to production.
agent loop (pseudocode)
// 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 clean

Authentication

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.

header
Authorization: Bearer tth_xxxxxxxxxxxxxxxxxxxxxxxx
  • Keep keys server-side. A missing or invalid key returns 401.
POST/api/v1/audits

Start a scan. Submit a repository (JSON) or a zip archive (multipart/form-data). Returns a scan id immediately; the scan runs asynchronously.

Fields
FieldTypeDescription
urlstringPublic https git URL. Required for the JSON form.
tokenstringOptional access token for a private repo.
filebinaryA .zip of the source, for the multipart form.
request
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"}'
201 created
{ "id": "a1B2c3D4e5F6" }
GET/api/v1/audits

List scans. Returns the scans owned by this API key, most recent first.

request
curl https://audit.tethlyn.com/api/v1/audits \
  -H "Authorization: Bearer $TETHLYN_API_KEY"
response
{
  "audits": [
    { "id": "a1B2c3D4e5F6", "state": "done",
      "sourceLabel": "github.com/org/repo",
      "verdict": "FIX FIRST", "total": 31 }
  ]
}
GET/api/v1/audits/{id}

Get status + overview. Returns the scan state and, once done, the free overview. Never returns per-finding detail.

request
curl https://audit.tethlyn.com/api/v1/audits/a1B2c3D4e5F6 \
  -H "Authorization: Bearer $TETHLYN_API_KEY"
response
{
  "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/api/v1/audits/{id}/detail

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.

request
curl https://audit.tethlyn.com/api/v1/audits/a1B2c3D4e5F6/detail \
  -H "Authorization: Bearer $TETHLYN_API_KEY"
200 ok (members) · 402 payment required (otherwise)
{
  "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

overview
FieldTypeDescription
verdictstringDO NOT SHIP · FIX FIRST · SHIP WITH FIXES · OK TO SHIP
total_findingsintegerAll findings.
confirmedintegerConfirmed issues.
needs_reviewintegerFlagged for human review.
reachable_countintegerReachable from untrusted input.
categoriesobjectCount per area (authz, authn, pii, ...).
teasers[]arrayTitle + severity + reachability only (no detail).
finding
FieldTypeDescription
idstringStable finding id.
severitystringcritical · high · medium · low · info
locationstringfile:line of the issue.
evidencestringThe matched source line.
cwe / cvestring[]Only when asserted for the finding.
reachabilitystringlikely_reachable · not_obviously_reachable · unknown
remediationstringThe concrete fix.

Errors

Status codes

CodeMeaningWhen
401UnauthorizedMissing or invalid API key.
402Payment RequiredNo active membership for the full report.
404Not FoundUnknown scan, or not owned by this key.
400Bad RequestInvalid 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

Evidence-backedNo invented CVEsReachability-rankedActionable fixes

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.

Request access