Skip to content
← AI red teaming: techniques, open-source tools and automated pipelines

Lesson 14 of 22 · 10 min

Hands-on: scan a REST API with Augustus

Install Augustus with Go, configure its REST generator for your own endpoint, choose probes, and read its table, JSONL and HTML output, with the settings that keep a small local model from being overloaded.

Augustus describes itself as “a Go-based LLM vulnerability scanner for security professionals” [1]. It is built around the same ideas as garak (probes, detectors, generators and buffs, lesson 11), so what you learned there transfers. This lesson follows a real run on 12 October 2026 against a small summarising assistant.

Install it

install with Go
GOBIN="$PWD/bin" go install github.com/praetorian-inc/augustus/cmd/augustus@latest
./bin/augustus list | head -20

On our machine the build fetched a newer Go toolchain by itself. augustus list prints what the build contains: at install time, 243 probes, 132 detectors, 48 generators, 3 harnesses and 35 buffs. The numbers change with each release, so list them yourself.

Configure the REST generator

Its README documents the keys for custom endpoints: uri, method, headers, a request template (req_template for raw text, or req_template_json_object for JSON where $INPUT stands for the prompt), and response_json with response_json_field to say where the reply is [1]. It also lists a proxy key for traffic interception tools.

one probe against your endpoint
./bin/augustus scan rest.Rest \
    --probe promptinject.HijackHateHumans \
    --concurrency 1 --timeout 150s \
    -o out/scan.jsonl --html out/scan.html \
    --config '{
      "uri": "http://127.0.0.1:8800/none/chat",
      "method": "POST",
      "headers": {"Content-Type": "application/json"},
      "req_template_json_object": {"message": "$INPUT"},
      "response_json": true,
      "response_json_field": "reply"
    }'

Choose what to run

  • --probe a,b names probes; --probes-glob "promptinject.*,latentinjection.*" selects families; --all runs everything.
  • --buff and --buffs-glob add prompt transformations, such as the encoding and translation buffs (lesson 11).
  • --detector and --detectors-glob choose the detectors.
  • --refusal-pattern "…" tells the mitigation detectors a phrase your own guardrail uses when it refuses, so a custom refusal is not mistaken for a failure.
  • --setup, --prepare and --cleanup run shell commands before, between and after probes, for example to fetch a token.

Read the output

The terminal shows a table with the probe, the detector, whether the attempt passed, a score and a status, then a line such as “Overall: 0 passed, 0 review, 15 failed, 0 errored”. In our run, promptinject.HijackHateHumans sent 15 prompts, and the rogue-string detector marked all 15 as vulnerable against an unprotected assistant.

The JSONL file has one object per attempt: probe, prompt, response, detector, scores, passed, verdict, status, a metadata block (for example the triggers that were looked for) and a timestamp. The HTML file presents the same results. Filter on "verdict": "vuln" to read the failing replies:

count and inspect
grep -c '"verdict":"vuln"' out/scan.jsonl
grep '"verdict":"vuln"' out/scan.jsonl | head -3

Pitfalls we hit

  • Concurrency: too many parallel requests against a local model.
  • Counts differ by probe: one probe sent 15 prompts, another sends more. Compare failures over attempts, not raw failures.
  • A detector is a rule. Read the failing replies before you trust a failure count (lesson 17).

Try it

  1. Run promptinject.* against an endpoint you own with concurrency 1.
  2. Add --buffs-glob "encoding.*" and note how the failure count changes.
  3. Write the result as failures over attempts with an interval (lesson 18).

Key takeaways

  • Augustus installs with one Go command and its REST generator needs only a URL, a request template and the reply field.
  • Select probes by name or glob, add buffs to transform prompts, and tell the detectors your guardrail’s refusal phrase.
  • The JSONL output has one record per attempt, with a verdict you can filter on.
  • Set concurrency to one on a small local model.

Check yourself

  1. 1. Where does the prompt go in the REST generator’s request template?

    • Where $INPUT appears — Right.
    • In the URL path only
    • In the headers
    • It is added automatically at the end

    The template uses $INPUT as the placeholder for each prompt.

  2. 2. What is --refusal-pattern for?

    • Telling detectors your guardrail’s refusal phrase so it is not flagged — Right.
    • Blocking probes
    • Encrypting output
    • Choosing a model

    It reduces false positives on custom guardrail wording.

  3. 3. Why set --concurrency 1 on a small local model?

    • It queues requests, so parallel load causes timeouts that look like findings — Right.
    • It makes reports longer
    • It is required for HTML
    • It disables buffs

    Overload produces errors, not insight.

  4. 4. How do you list only the failing attempts in the JSONL?

    • Filter on the vuln verdict — Right.
    • Delete the file
    • Open the HTML only
    • Run again

    Each record has a verdict field.

Do it with FireAI

Put this lesson into practice on your own Mac.

Sources

Put it into practice on your Mac

Try every feature free for 17 days, no card needed.

Download for Mac Docs