Repository navigation
Architecture
Diagrams of creep, updated at each per-version architecture review (ADR 0005). Last update: 2026-12-03, the v0.8 per-version review at ff71396 (the HTML report path, #415; the package-token preflight job, #416; the Windows shim refusal, #421); previous: 2026-12-02, v0.7 in progress (the repository moved to Ludocius/creep, ADR 0040, #403: layers diagram with gateway/gatewaytest on layer 3 and vendortree on layer 5, the package publish path as a release pull request, CI and release with package-check on every pull request and the local tier-M and tier-L recorder, the walk's wildcard cap after #402); previous: 2026-11-29, the v0.6 per-version review (v0.6 released as v0.6.0: unfit-model floor, creep doctor model probes, classes not looked for, any text file read and a proven vendor, flaskpg verified end to end, live Ollama jobs and fixtures; review fixes #386, #389); previous: 2026-11-25, the v0.5 review at 9863f4e (Homebrew and Scoop, #349); previous: 2026-11-24, the v0.4 per-version review at ac8f140 (v0.4: creep init #340, creep resume #341, gemini preset verified #339; review fixes #342); previous: 2026-11-24, the v0.3 review at 7d5843c (v0.3 feature-complete: read-only creep mcp #323, recipe install and creep.lock (#34), build mirror (#324), creep bench #326, nightly bench, regression gate and docs-only CI skip #329); previous: 2026-11-22, the v0.2 review at 5d7d2cb (v0.2 feature-complete: PoC templates #295, repetitions, bundle and creep reproduce #297, --changed #299, baseline #301, gate per mode #300, GitHub Action #302); previous: 2026-11-19 at 9ff3074 (language-agnostic analysis), 2026-11-16 (v0.1 complete). The source of truth is docs/architecture.md; if they disagree, the document wins. How the build differs from the original design: docs/design.md.
flowchart LR
dev["Developer or CI<br/>(flags, config, policy)"] --> creep["creep<br/>(one Go binary)"]
repo[("Local repo<br/>untrusted content")] --> creep
creep -- "HTTPS, allowlisted, consented" --> models["Model endpoints"]
creep -- "stdin/stdout, through the gateway" --> cli["Model CLI<br/>(claude, gemini verified;<br/>codex, ollama unverified)"]
creep -- "fixed args, offline" --> scanners["gitleaks, osv-scanner<br/>(optional)"]
creep -- "CLI via os/exec, local endpoint only (sandbox, nightly scans)" --> docker["Docker / Podman<br/>(offline app build, internal run network,<br/>PoC runner, images pulled by the operator)"]
base[("Baseline file<br/>--baseline, base commit in a PR")] --> creep
agent["Coding agent<br/>(may be prompt-injected)"] -- "MCP over stdio only (creep mcp, v0.3)" --> creep
clone[("Operator's git clone<br/>at a full commit SHA")] -- "creep recipe add (no fetch)" --> store[("~/.creep/recipes<br/>files + creep.lock")]
store -- "verified each scan" --> creep
docker -. "rootless Podman build only, after a canary" .-> mirror["Operator's mirror network<br/>(sandbox.mirror, v0.3)"]
creep --> out[("Reports SARIF/JSON/MD/HTML<br/>(.creep/report.html: one inert page, v0.8)<br/>run state JSONL (header digests, step records),<br/>.creep/lock, egress.log (+ reserve),<br/>payloads/, .creep/bundles/")]
creep -- "creep init: create-exclusive in os.Root (v0.4)" --> yaml[("./creep.yaml<br/>template v1, never overwritten")]
flowchart LR
res["creep resume RUN (v0.4)"] -->|"header, files, tier checked;<br/>exit 2 before any send"| cal
cal["1 calibrate<br/>language-neutral tasks (ADR 0037)<br/>tier S/M/L + fitness verdict"] -->|"fit"| plan
cal -->|"unfit (ADR 0036)"| unfit{{"--allow-unfit-model?"}}
unfit -->|"no"| x3(("exit 3"))
unfit -->|"yes: run and every model finding<br/>labelled unreliable_model"| plan
doc["creep doctor (ADR 0035)<br/>two synthetic probes, no repo text:<br/>canary-only discovery batch,<br/>context probe of the tier's discovery size"] --> gw
subgraph disc["2 discover (language-agnostic, ADR 0017)"]
direction TB
inv["inventory<br/>languages, manifests, containers<br/>by file name and bytes"] --> trip["tripwire<br/>sink signatures on redacted bytes"]
inv --> mdl["model discovery<br/>whole redacted files, canary per batch,<br/>closed schema of spans and enums"]
end
trip -->|"union, worst-case flags"| plan["3 planner<br/>IDs, enums, booleans, bounded numbers; no model call"]
mdl -->|"union, worst-case flags"| plan
plan --> read["4 reader<br/>redacted slices, closed schema"]
read --> verify["5 sandbox + verify<br/>nightly only: offline build,<br/>PoC template x5, rate, bundle"]
verify --> fix["6 fix (v3)"]
read --> bl["baseline<br/>fingerprints, expiries;<br/>gate skips, report lists"]
verify --> bl
bl --> report["7 report<br/>SARIF, JSON, Markdown, HTML (v0.8)<br/>exit 4 if incomplete;<br/>not_looked_for list (memory_safety, xss, xxe, ...);<br/>code_injection, insecure_deserialization<br/>are their own classes (ADR 0034)"]
scan["scanrun<br/>gitleaks, osv-scanner"] --> report
subgraph gw["gateway (calibrate, discovery, reader and PoC calls)"]
direction LR
r["redact.File"] --> f["fragment"] --> c["consent"] --> b["token budget, AIMD<br/>(reopened log charged, ADR 0032)"] --> e["egress.log write-ahead"]
e --> s["send: allowlisted dialer (HTTP)"]
e --> x["run: EgressLog.Exec (command, ADR 0014)"]
end
cache["run state: finished steps<br/>replay only (reply digest must match)"]
cal -.-> cache
mdl -.-> cache
read -.-> cache
verify -.->|"PoC request"| cache
cache -.->|"unfinished steps only"| gw
Step 2 has no per-language code (#265, built in #268 and #270). The inventory classifies every file by name and bytes (internal/discover/inventory.txt); the tripwire matches one cross-language table of sink signatures on the redacted bytes, with no parser; model discovery sends whole redacted source files through the gateway, up to 8 per batch with one synthetic canary file, and the model proposes entry points, sinks and auth as line spans and enums that creep validates against the file, gives its own IDs and caps per file. The two are combined by union only: model output can add a candidate, never remove one, and every candidate reaches the planner with worst-case flags (DynamicArg, not Parameterized, Authenticated or Indirect, every method). A batch whose reply misses the canary or is invalid is parse_failed. Before the first model call, scan prints on stderr the endpoint and how many whole files discovery may send (ADR 0017 D1). v0.1's internal/static (tree-sitter in wazero, Flask, FastAPI and Express) is removed; its language-neutral rules live in internal/repofile, and go.mod has two direct dependencies: go.yaml.in/yaml/v3 and, since v0.3, github.com/modelcontextprotocol/go-sdk (ADR 0027), imported only by internal/mcp.
A command model passes the tool canary at creep doctor and at every scan start; a reply that leaves files in the CLI's empty working directory is dropped. Each call runs in a private <user cache>/creep/model/run-* directory (never the system temp directory): every ancestor up to home must be a real directory others cannot write to, and empty .env, .gemini/.env and .git stop files end the CLIs' upward searches there (#229, ADR 0014 amended).
Arrows point from a package to what it may import. planner imports no internal package (its row is - since the v0.2 review), so it can never reach repository text; planner and reader never import each other. Only gateway reaches the network; only gateway (model CLIs), scanrun (scanners) and sandbox (docker or podman CLI, ADR 0016) may import os/exec.
flowchart BT
subgraph L0["layer 0"]
exitcode; buildinfo; presets; gitindextest["gitindex/gitindextest"]; bench["bench (v0.3)"]
end
subgraph L1["layer 1"]
config; redact; gitindex; repofile
end
subgraph L2["layer 2"]
gateway
end
subgraph L3["layer 3"]
models; state; gatewaytest["gateway/gatewaytest"]
end
subgraph L4["layer 4"]
calibrate; planner; reader; discover
end
subgraph L5["layer 5"]
report; scanrun; sandbox; recipe; vendortree["vendortree (v0.6)"]
end
subgraph L6["layer 6"]
verify; baseline; mcp["mcp (v0.3)"]; recipestore
end
subgraph L7["layer 7"]
cli
end
subgraph L8["layer 8"]
cmd["cmd/creep"]
end
config --> exitcode & presets
gitindex --> gitindextest
gateway --> config & redact & exitcode
models --> gateway & config
state --> config
gatewaytest --> gateway & presets
calibrate --> models & gateway & redact & state & config
reader --> models & gateway & redact & state & config & repofile
discover --> models & gateway & redact & state & config & repofile
report --> state & config & buildinfo
scanrun --> repofile
sandbox --> repofile
recipe --> reader & models & gateway & redact
vendortree --> discover & redact & gitindex & repofile
verify --> sandbox & state & config
baseline --> report
mcp --> report & exitcode
recipestore --> recipe
cli -->|"any lower layer (*)"| L6 & L5 & L4 & L3 & L2 & L1 & L0
cmd --> cli
repofile (layer 1, no internal imports) holds the language-neutral file rules moved out of static (#265 step C): vendor, generated and minified marks, vendor evidence, optional-scanner lookup with final-path refusal, and the line escaping shared by the reader and discovery. gitindex reads the paths a git index tracks without running git, so the CLI can prove an installed vendor tree (#213). discover is never imported by planner; the CLI copies only its IDs, enums and flags into planner.Input. gateway/gatewaytest (layer 3, imports gateway and presets) holds the replay and live-recording helpers; calibrate, reader and discover import it from tests only, as vendortree does gitindex/gitindextest. vendortree (layer 5) proves which walked files are vendor without reading them (ADR 0039).
sandbox is built (#21): runtime detection (rootless, then Docker Desktop vm, then rootful with a warning), a local endpoint only (unix:// or npipe:// pinned with --host, no remote Podman), and one hardened run builder (--network=none, --cap-drop=ALL, no-new-privileges, read-only root, user 65534, pids, memory and CPU limits, --log-driver=none, every proxy variable empty, --pull=never, digest-pinned images, an image VOLUME only when one of the package's own tmpfs mounts covers it). Containers carry per-run labels; creep clean removes containers first, then networks. Built in #22 (ADR 0016 amendment, accepted):
-
Run network. One bridge network per run,
creep-<run>, created--internalwith IPv6 off; on Docker alsoinhibit_ipv4, so the host cannot reach containers on it. Rootful Podman keeps a host-side address and gets no network (ErrHostReachable). No port is published and no host network is built. Only PoC batches and the database attach to it; plainRunstays--network=none. -
Synthetic database. PostgreSQL 17.12 (Alpine), pinned by digest, seeded only with the repository's migrations (one read-only seed file from the 0700 work directory), data and socket on tmpfs, user 65534, a fresh synthetic password, alias
db. -
Network canary. Pinned BusyBox on the run network before every PoC batch and before the database: two controls must succeed (its own alias, TCP to itself) and four outside probes must fail. A probe that gets through (
ErrNetworkLeak) or any other canary failure (ErrCanary) aborts the run for good. -
Images. creep never pulls;
creep doctorlists the two pinned images and prints the exactdocker pullline for a missing one. Residuals: threat model X10–X12.
state takes an exclusive, non-blocking lock on .creep/lock in NewRun and Resume, held until Run.Close (flock on Unix, an unshared handle on Windows, standard library only; other platforms fail closed). A second run fails at once with state.ErrLocked (exit 2); the OS drops the lock when a process dies. creep scan takes the lock before it removes old reports (#160).
Built in v0.2 for verification (#24, #25, ADR 0019, ADR 0020): the sandbox builds the app offline, starts the database and the app behind the canary, and runs each PoC from a pinned BusyBox runner on the run network. verify owns the closed templates, their rendering and every oracle; it starts no process and opens no connection (Runner is *sandbox.Sandbox). The CLI owns the wiring: it asks the model for a PoC through the gateway, runs it 5 times, applies the rate and writes the redacted bundle. baseline (#27, ADR 0022) sits beside it on layer 6 and imports only report. mcp was built in v0.3 (see below).
sequenceDiagram
participant cli as cli (nightly scan)
participant gw as gateway
participant sb as sandbox
participant v as verify
cli->>sb: Build (repo's own Dockerfile, offline)
cli->>sb: StartDatabase, StartApp (canary first)
loop each probable sqli, path_traversal, template_injection (max 16)
cli->>gw: PoC request (redacted slice, closed schema)
gw-->>cli: verify.PoC
cli->>v: Repeat(PoC, 5 runs, fresh nonce each)
v->>sb: Exchange / DatabaseHasTable / AppCanary
sb-->>v: capped, strictly read answers
v-->>cli: Rate (0/5 stays probable)
cli->>cli: bundle for a verified finding, scrubbed by redact.File
end
cli->>sb: Close (containers, network, images)
bench (layer 0) imports no internal package and reads only its embedded corpus; recipe (layer 5) gained the lock and source rules but still does no file I/O (the CLI owns the store); mcp (layer 6) imports only report, exitcode and the MCP SDK. Tools outside the product: internal/tools/linkcheck (link-time proof that no third-party code reaches the network or a process start, ADR 0027) and internal/tools/benchgate (bench regression gate).
sequenceDiagram
participant a as agent (untrusted)
participant m as mcp (SDK, IOTransport)
participant c as cli (Backend, scanDeps.forMCP)
a->>m: tools/call scan, findings or why (1 MiB cap)
m->>m: check args: 1-1000 report.ValidPath paths, report.ValidID, closed statuses, pages 1-200
m->>c: Backend scan, findings or why
c->>c: pr scan of the listed files: no sandbox, PoC, scanner, consent prompt,<br/>calibration run or state-key creation; writes only under .creep/
c-->>m: ScanRun, report.Finding
m-->>a: results, every path and error escaped (report.Visible) and bounded
Only stdio is linked: make budget exempts the SDK from the net and process reach checks only where internal/mcp imports it (linkProven), because linkcheck proves on every release binary that no third-party symbol reaches net, net/http, net/rpc, net/smtp, os/exec, crypto/tls or os.StartProcess.
flowchart LR
op["operator: git clone,<br/>git checkout --detach SHA"] --> add["creep recipe add<br/>github.com/o/r@SHA clone"]
add -->|".git is a directory; HEAD detached at SHA;<br/>origin is github.com/o/r; policy recipe_sources"| parse["recipe.Parse each recipes/*.json"]
parse --> write["~/.creep/recipes/o/r/SHA/*.json,<br/>then creep.lock (SHA-256 per file)"]
write --> scan["creep scan"]
scan -->|"Pin.Verify every file, Allowed,<br/>fixtures pass at the tier"| hint["reader HINT block<br/>(never the planner)"]
scan -->|"any fault"| x2(("exit 2, no model call"))
The scanned repository and ./creep.yaml never add a source or a lock. Residual (ADR 0028): the clone's working tree is trusted, not re-hashed against the commit.
flowchart LR
cfg["sandbox.mirror.bridge, .proxy<br/>(operator layers only)"] --> chk{"rootless Podman?<br/>network inspect: internal IPv4 bridge?<br/>canary: reaches itself, nothing public?"}
chk -->|yes| b["podman build --network=bridge<br/>+ proxy build arguments"]
chk -->|"no, or Docker (BuildKit)"| r["mirror_refused:<br/>verification unavailable, the scan goes on"]
b --> run["run phase unchanged:<br/>--network=none or the run network"]
flowchart LR
corpus[("internal/bench/corpus<br/>vulnerable and safe twins,<br/>disjoint from calibration")] --> bc["creep bench<br/>discover, planner, reader at S/M/L"]
bc -->|"--replay: embedded fixture"| pub[("docs/bench/results.json, results.md<br/>byte for byte")]
nightly["bench.yml job local<br/>nightly and dispatch, pinned Ollama model"] --> bc
cloud["bench.yml job cloud<br/>dispatch only, bench-cloud environment"] --> bc
bc --> res[("results artifact, 14 days")]
res --> gate["tools/benchgate<br/>recall, honesty, FP rate vs baseline.json, max drift 0.10"]
gate --> rel["release.yml job bench-gate<br/>blocks the release"]
changes.yml, a reusable workflow called by ci.yml and codeql.yml, runs prcheck -ci-scope from the base commit: when every changed path is prose that no check reads, the heavy jobs skip while required checks still report; a push to main or a failed classification runs everything (ADR 0018 amendment).
No layer changes. recipestore (layer 6, imports recipe), which moved out of cli in #330, is now in the layers diagram.
flowchart LR
i["creep init"] --> l["Lstat creep.yaml via os.Root"]
l -->|"file, link, junction, directory, FIFO"| x(("exit 2"))
l -->|"absent"| c["OpenFile O_CREATE + O_EXCL"]
c -->|"raced in"| x
c --> t["config.ProjectTemplate v1<br/>every gate and limit commented out at its default,<br/>no model.* key"]
No config layer, model or network; a --format other than text exits 2. The template is a versioned contract and changes only additively.
sequenceDiagram
participant cli
participant state
participant gateway
cli->>state: Resume (lock, MAC, not ended)
cli->>cli: keyed header digests (version, prompts, contract, endpoint, model, model.env values, mode, options, baseline, config)
cli->>gateway: OpenEgressLog charges the logged calls and tokens
cli->>cli: files digest (bounded by the deadline, cancellable), tier from the calibration cache only
loop each model call
cli->>state: finished step: serve its recording only if the reply digest matches
cli->>gateway: otherwise send (redact, consent, budget, egress.log) and record
end
cli->>cli: nightly: new sandbox name and rebuild; deadline counts recorded time (time steps every 15 s)
Any difference refuses with exit 2 and nothing sent. Residuals (threat model R27): egress.log is unsigned, the cut call's time is not counted, and a cut call is charged twice.
No layer or Go package change in the product; one new tool package, internal/tools/releasescripts, runs the push script against a fake gh.
flowchart LR
t["signed v* tag on main"] --> g["bench-gate + ancestry"]
g --> pt["package-token job (v0.8, #416)<br/>mints a one-hour App token (#429)<br/>preflight: ghs_ token, Contents and Pull requests write"]
pt -->|"bad token: run fails,<br/>nothing built or published"| stop(("fail"))
pt --> e1{{"release environment<br/>maintainer approval"}}
e1 --> r["release job: goreleaser builds archives,<br/>checksums.txt, cask, manifest (skip_upload)"]
r --> s["cosign signature, SBOM, provenance<br/>draft, verify, publish"]
s --> e2{{"release environment<br/>second approval"}}
e2 --> p["package-repos job: fresh runner, contents: read,<br/>mints its own one-hour App token"]
p --> v["cosign verify-blob checksums.txt<br/>url/hash/version bound to the tag<br/>refuse a downgrade"]
v --> br["branch packages/creep-vX.Y.Z off main<br/>one commit via createCommitOnBranch (GitHub-signed)<br/>never writes main"]
br --> rp["release pull request into Ludocius/creep<br/>Casks/creep.rb + bucket/creep.json"]
rp --> pc{{"package-check (required):<br/>cosign-verify that tag's checksums.txt,<br/>pin check with the base branch's script,<br/>install on macOS arm64 + Intel and Windows"}}
pc --> m["maintainer merges<br/>(diff only the two files)"]
m --> u["brew tap Ludocius/creep / scoop bucket add creep:<br/>SHA-256 only"]
pr["pull request"] -.->|"dry-run: snapshot, no secrets"| r
Since ADR 0040 (#403) the cask and the manifest live in the creep repository itself; the separate homebrew-tap and scoop-bucket repositories of v0.5 are retired. Since the #429 amendment PACKAGE_REPOS_TOKEN is a one-hour installation token of the maintainer's GitHub App (installed on Ludocius/creep only, Contents and Pull requests write), minted per run by package-token and package-repos in the release environment from PACKAGE_APP_ID and the secret PACKAGE_APP_PRIVATE_KEY; no long-lived token remains. Every URL must sit under https://github.com/Ludocius/creep/releases/download/<tag>/, every sha256 must be a line of the verified checksums.txt. A prerelease tag or a missing token skips the pull request; a failed run is recovered by re-running package-repos within the 7-day artifact retention, and a file that already holds the release is skipped (threat model P1–P5, TB12).
One new product package, internal/vendortree (layer 5, imports repofile and gitindex, opens nothing itself: cli passes the confined tree), from the v0.6 review (#386). The pipeline diagram above shows the calibration fitness floor, creep doctor's probes and the not-looked-for list.
flowchart LR
w["walk in os.Root<br/>links never followed"] --> t{"text file?<br/>(no NUL in first 8 KiB)"}
t -->|"no"| bin["binary, listed"]
t -->|"yes"| v{"vendor proof"}
v --> ig["repository .gitignore + info/exclude<br/>ignore it or a directory above"]
ig --> ut["git index tracks nothing in the tree"]
ut --> ix{"index agrees with the files on disk?"}
ix -->|"yes"| vend["vendor, unread"]
ix -->|"no"| bound{"within the vendor bound?<br/>(bytes creep reads whole)"}
bound -->|"yes"| vend
bound -->|"no"| exr["vendor_exceeds_read<br/>exit 4"]
v -->|"ignore caps exceeded, unsupported pattern,<br/>ignore file unreadable, linked or swapped"| none["prove nothing: walk again,<br/>read every file;<br/>coverage.vendor_not_proven"]
vend --> tot["every format: vendor totals<br/>coverage.vendor_skipped files, bytes"]
ut -->|"tracked"| read["read like your own code"]
none --> read
v -->|"not ignored"| read
read --> disc["discovery: whole redacted files,<br/>too_large or read_failed: exit 4"]
Ignore caps per walk: 2,048 patterns, 8,192 pattern names, 64 KiB of names, 8 Ki wildcard units (a byte and a state per wildcard name, each ignore file rounded up to 64; one Shift-And automaton per file since #388/#402), no name over 256 bytes. Ignore is decided per directory, git-style, so cost does not grow with depth. TestProofsAgreeWithGit compares the proofs with git ls-files -o -i --exclude-standard on 3,000 seeded trees.
flowchart LR
db["synthetic PostgreSQL<br/>starts empty"] --> mig["the app's own migrate step<br/>(repository code)"]
env[("synthetic env file<br/>mounted read-only,<br/>never on argv")] --> mig
env --> app["app container<br/>internal run network"]
mig --> app
app --> poc["PoC runner x5<br/>creep-owned oracles;<br/>table oracle uses a per-run nonce"]
poc --> out["verified / rate / probable"]
live["live-verify.yml: flaskpg<br/>Flask + PostgreSQL, offline wheels"] -.->|"vulnerable twin 5/5 verified,<br/>safe twin none"| poc
flowchart LR
e2e["ollama-e2e.yml<br/>nightly: init, doctor, estimate, scan<br/>pinned qwen2.5-coder:1.5b"] --> sum["run summary, 14-day artifact<br/>no release reads it"]
rec["live-record.yml<br/>dispatch on main, same 1.5B"] --> fx[("tier-S reader, discovery,<br/>calibration and bench fixtures<br/>reviewed, committed by a maintainer")]
lv["live-verify.yml<br/>nightly flaskpg end to end"] --> issue["failed schedule: one tracking issue"]
bench["bench.yml nightly<br/>pinned qwen2.5-coder:7b"] --> res[("results.json")]
base[("tools/benchgate/baseline.json<br/>first baseline set by the maintainer, #384")] --> gate
res --> gate["tools/benchgate"] --> rel["release.yml bench-gate"]
loc["local recorder, maintainer's machine<br/>CREEP_LIVE_PRESET=claude-code, CREEP_LIVE_TIER=M or L<br/>calls through EgressLog.Exec, tool canary, reply hygiene"] --> fxml[("tier-M and tier-L reader fixtures<br/>claude-haiku-5-5 (M), claude-sonnet-5-5 (L)<br/>reviewed, committed by the maintainer")]
rel --> ptk["package-token preflight (v0.8)"] --> prj["package-repos"] --> relpr["release PR packages/creep-vX.Y.Z<br/>Casks/creep.rb, bucket/creep.json"]
anypr["every pull request"] --> pc["package-check.yml (required)<br/>skips unless a manifest, its workflow<br/>or the package script changed;<br/>brew on macOS arm64 + Intel, scoop on Windows"]
relpr --> pc
Tiers M and L reader fixtures are live since #385 (#401, ADR 0038 amendment, Accepted 2026-12-02): recorded through the embedded claude-code preset on the maintainer's machine, not in CI.
No new Go package and no layer change. report gains an HTML writer over the same report.Report (html.go, htmlsections.go, html/template from the standard library); release.yml gains a package-token job before release; gateway refuses cmd.exe-special characters for a Windows .cmd or .bat model CLI (ADR 0014 amendment).
flowchart LR
cfg["report.formats: [html]<br/>or --format html<br/>(operator layers only; project file refused)"] --> fin["cli finish: writeReports"]
st[("run state")] --> rep["report.New<br/>one Report for every format"]
rep --> md["WriteMarkdown<br/>visible(): escapes | too"]
rep --> ht["WriteHTML<br/>visibleHTML(): control, format,<br/>bidi runes and bad UTF-8 as Go escapes"]
ht --> tpl["html/template<br/>escapes markup; no value is a URL,<br/>attribute or CSS"]
tpl --> page[(".creep/report.html<br/>inline CSS, no script, link, image or URL,<br/>CSP default-src 'none', no-referrer")]
tpl --> so["stdout with --format html<br/>(incomplete mark on stderr)"]
fin -->|"name passes report.ValidPath;<br/>old report removed at run start"| page
md -.->|"same sections in order:<br/>TestHTMLHeadingsMatchMarkdown"| ht
TestHTMLEscapesHostileValues builds a page from hostile values in every text field; TestHTMLSelfContained fails on any script, src, href, url( or @import; goldens testdata/golden/{complete,incomplete}.html pin the page. The default formats stay JSON, Markdown and SARIF; JSON v1 does not change; creep bench refuses --format html.
flowchart LR
tag["signed v* tag on main"] --> anc["ancestry"]
anc --> pt["package-token job<br/>ubuntu-latest, release environment,<br/>contents: read, persist-credentials: false<br/>mints a one-hour App token"]
pt --> sh["package-token-preflight.sh<br/>App token only in this step's env,<br/>never on argv or in output"]
sh --> c1{"token set, accepted,<br/>installation token (ghs_)?"}
c1 -->|"no"| f(("run fails"))
c1 -->|"yes"| probe["probe: pull request main into main"]
probe -->|"403 / 404: no Pull requests write"| f
probe -->|"422 No commits between"| ok["pass, nothing opened"]
probe -->|"201 (should not happen)"| close["close that pull request, fail"]
ok --> rel["release (needs bench-gate, ancestry, package-token)"]
rel --> pr["package-repos: release pull request"]
tools/budget:TestPackageReposTokenOnlyInPushStep allows PACKAGE_REPOS_TOKEN in exactly two step envs (the preflight and the push); tools/releasescripts:TestPackageTokenPreflight and TestPackageTokenPreflightCleansUp run the script under bash with a fake gh (threat model P6). Residual: the probe relies on GitHub checking the permission before it validates the pull request.
The release pentest fixes (#231) tightened four boundaries; v0.2 fixes (#239, #245, #253, #257, #263, #267, #269, #270) added the rules marked with their issue. The diagrams above are unchanged; these rules sit on the "untrusted repository" edge of the context diagram and on the release pipeline.
flowchart LR
proj[("./creep.yaml<br/>untrusted")] -->|"tighten only"| config
user["policy · user file · --config · flags"] --> config
config -->|"model.contract/run/env/preset/name/tier,<br/>sandbox.*, egress.allow, scanners.enabled,<br/>report.formats, output.format:<br/>refused from project"| x1(("exit 2"))
config -->|"budget, timeout, output cap,<br/>calibration age: lower only"| ok["effective config"]
-
Project file only tightens.
./creep.yamlcannot setmodel.contract,model.endpoint,model.run,model.env,model.preset,model.name,egress.allow,sandbox.enabled,sandbox.runtime,scanners.enabled(#62, ADR 0013 amended),model.tier,report.formatsoroutput.format(#250); it may only make gates stricter than the built-in gate, the policy limit and the inherited gate from the user file or policy defaults (#249), and only lowerbudget.max_tokens,budget.max_calls,model.timeout_seconds,model.max_output_bytesandcalibration.cache_days. A violation is a config error (exit 2) that names both sources. A lowered budget, model timeout or output cap cannot hide work: a budget skip, refused call or cut reply makes the run incomplete (exit 4).CREEP_POLICYmust be absolute and./creep.yamlopens without following links (#63). -
Skips need evidence. Since v0.6 (ADR 0039, #366, #380, #386, #389) a tree is listed
vendorunread only when the repository's own.gitignorefiles or.git/info/excludeignore it, the git index tracks nothing in it, and that index agrees with the working tree; no directory name or package-manager mark counts by itself. An index that disagrees is not trusted beyond the vendor bound (vendor_exceeds_read, exit 4). Ignore files past the caps, with an unsupported pattern, or unreadable, linked or swapped prove nothing: every file is read and the report names why (coverage.vendor_not_proven). Any other declared skip (generator header, minified shape) is believed only for a file discovery read in full with no candidate. Every report states the vendor totals (coverage.vendor_skipped: files, bytes). Residual: a.gitthat came with the scanned tree (an archive) is trusted (threat model R9). -
Exit 0 needs a full read (ADR 0017 D2, ADR 0009 note for #265). A run exits 0 only when every inventoried source file not left out by design was read in full by discovery, every discovery canary was found and every tripwire candidate was evaluated, on top of ADR 0009's rules (early stops, skipped sinks, partial slices, failed scanners). A missed canary or invalid reply makes its batch
parse_failed; a file that fits no discovery call istoo_large, never split; a repository read in full with no candidate exits 0 with its readable classes covered.no_routes,unsupported_languageandsyntax_errorare no longer emitted (still valid in report v1, which does not change). Since v0.6 every regular text file is read, in any language and under any name (#366). Residual: a sink with no tripwire signature that an injected file hides from the model is missed (threat model R9, R19). -
Scan deadline.
budget.max_seconds(default 7200, project file may only lower it) bounds discovery, redaction, the reader and the scanners after calibration; past it nothing more is read, every file and hypothesis left isbudget, reports are written and the run exits 4 (#269, ADR 0009 amendment #260).creep estimateis bounded the same way (PARTIAL ESTIMATE). -
Planted state fails closed. A planted
.creepfile or link, or alockthat is a directory, link or FIFO, stops the scan with exit 2 before anything is scanned. A malformed or non-regular cache entry is a miss in live mode (never served) and fails closed in replay (exit 4). Production opens state only withstate.OpenUser;state.OpenWithSecret(the public fixture key) works only in ago testbinary, and astate.keywith a fixed pattern is refused (#160, threat model R18). -
.creepis cleaned. Every.creep/report.*is removed before a run (a link is removed, not followed; an unremovable name stops with exit 2 before any model call), and.creep/.gitignoreis written when missing. The scan cache key includes the endpoint. -
Release guard is main-only. The release workflow builds a
v*tag only if its commit is an ancestor oforigin/main; arelease/*branch is refused until it has its own ruleset. -
creep initonly writes a commented-out template. The./creep.yamlit writes changes nothing until edited, and the project file still only tightens. -
A resume never re-sends a finished step, never resets a budget or deadline, and refuses (exit 2, nothing sent) any changed setting,
model.envvalue, baseline, file, tier or recording (ADR 0032). -
Presets close what their flags can.
geminiadds--skip-trustand blocks MCP servers, and is API-key only (GEMINI_API_KEY); since v0.4 it isverified: trueonly whenmodel.envdeclaresGEMINI_CLI_HOME(verified_env, #338), otherwise every scan warns;codexadds--ignore-user-config, the shell and image tools off andproject_root_markers=[]. There is noantigravitypreset: Antigravity CLI cannot switch its tools off (#258). Averified: truepreset's argv is pinned byTestVerifiedPresetsArePinned(#229, ADR 0015 amended). -
Accepted residual. The
codexandgeminipresets can still read host files the tool canary cannot see (user settings,~/.codex/AGENTS.md;codex'sapply_patch, which cannot be switched off, tells whether a host file exists and holds a given line: checked with codex-cli 0.171.0, #272, #316, socodexstays unverified; re-checked with codex-cli 0.172.0 in v0.8, #412, which adds the browser and computer-use overrides), so both stayhost_reads: unbounded(ADR 0015, threat model C6); creep warns atdoctorand every scan.
Version diff v0.7.0..ff71396 (#415, #416, #417, #420, #421): 64 files, +2006/-167. Layers, contracts and invariants hold; no Critical, High or Medium. Low: the §6 matrix is stale after #421 (gateway, cli, presets follow-ups); the presets' tools_off flags are restated in models/canary_fix.go and cli/doctorexit.go with only a one-way test; the §9 command-model row does not name the Windows shim refusal or its windows-latest-only test. Info: TestPackageReposTokenOnlyInPushStep grew to 70 lines and cli/scanout.go sits at 370 of 400; the ADR 0009, 0014, 0015, 0017 and 0040 amendments must be Accepted on main before the tag. All are planned for one release-review PR.
Version diff v0.5.1..main. No Critical or High. Fixed in #386: the vendor proof moved to internal/vendortree (Medium), ignore-pattern caps with a fail-safe re-walk (Medium), gatewaytest test-only imports marked (Info); pentest: vendor totals in every format (Low), live-record.yml never runs for a fork (Low), threat model X17 on migrate-planted data (Info). Fixed in #389: an ignore file creep cannot read whole, a link or a swap proves nothing (Medium, Low). Not fixed: shared flaskpg wheels (Low, twins need their own build context). Follow-ups in v0.7: #385 (M and L live fixtures), #387 (canary entry and sink lines apart), #388 (slash-free wildcard cost).
Version diff v0.4.0..9863f4e: 10 files, +293/-8. Layers hold, no Go product change, no Critical or High. Every finding is fixed in #349. Medium: A1 (the push script's fail-closed cases lived in a non-required job; now tools/releasescripts in protections), A2 (the token test was not a listed protection and had no broken fixtures). Low: duplicated pin check, hard-coded pin counts, a spoofable committer signal, stale threat-model status. Pentest: the token shared a runner with the build tools (R1, now its own job), no downgrade guard (R2), pins not bound to URL and version (R4), the rendered cask unchecked (R5). Automation added: the script tests and a table of broken workflows for the token check.
Version diff v0.3.0..ac8f140: 56 files, +2039/-213. Layers hold, no file over 400 lines, no Critical or High; the release pentest found 4 Low and 2 Info. Every finding is fixed in #342. Medium: A1 (a refused resume relied on sequential sends; respond now refuses out-of-order steps), A2 (ADR 0032 fields missing from §4 and the fixtures), A3 (no fitness lines for ADR 0031 and 0032; now checked by TestADRsNameFitnessFunction). Low: files read twice for the digest, session size, hand-kept §6 numbers, the ADR index, AGENTS.md drift. Pentest: the files digest is bounded and cancellable (P1), model.env values are in the keyed header (P2), gemini is verified only with GEMINI_CLI_HOME (P3), scanner and PoC time count on resume (P4). Automation added: the ADR fitness-line check, an out-of-order step refusal test, v1 fixtures with every optional field. New benchmark: BenchmarkFilesDigest (about 190 MB/s on the review machine).
Version diff v0.2.0..7d5843c: 175 files, +9368/-167. Layers hold, no file over 400 lines, no Critical or High. Findings go to the release fix PR (no issues, by maintainer decision): Medium docs gaps (no §9 row and no ADR 0029 fitness line for the build mirror; creep.lock and the bench results JSON missing from §4; §6 matrix still at v0.2), and Lows: tools/budget past its 1803-line cap (1830), recipe store logic in cli, benchgate re-deriving the bench rates, the sandbox mirror set by a setter after Open. Automation candidates: a make budget check of the tools/budget size cap, and a test that every accepted ADR has a Fitness function: line.
Review PR: #306 (findings table there; no issues by maintainer decision). internal/redact benchmarks, one run (-count 1 -benchmem), Windows amd64, i7-10510U, measured while make check and other jobs ran on the same machine, so read them as an upper bound:
| Benchmark | Time per op | Note |
|---|---|---|
FileEveryKeyword/short_lines |
133 s | documented 2.3 min (file.go) |
FileEveryKeyword/long_lines |
308 s | documented 4 to 5 min |
FileEveryKeyword/short_lines,_format_char |
626 s | documented 4.7 min, "plan for 10": over the plan under load; re-measure on an idle machine before the tag |
FileRepoCode |
4.7 s (0.22 MB/s) | documented about 2 s per MiB |
FileWholeFileRules (curl_user, curl_header, freemius_gaps) |
1.6 s, 5.7 s, 2.4 s | |
RedactRepoCode / RedactRepoChunk
|
10.0 s / 5.3 s (median 108 ms per chunk) | |
PrivateKeysRepoCode |
17.7 ms (59 MB/s) | |
PrivateKeysWorstCase (worst: adjacent) |
49.9 ms (21 MB/s) | |
Redact/every_keyword, with format char |
8.0 s, 16.2 s | |
SweepGrowth seen=1500 / 12000 / 48000 |
54 / 58 / 105 ms | |
SweepOverflow overflow=256 crafted |
287 ms | #106 |
FileOverflowFull/short_runs,_format_char |
7.7 s | #106 |
Which findings could become automated checks: unused layer allowances could be a make budget warning, but tools/budget is size-capped, so it stays a review item; docs drift and function length stay with the auditor (the gocognit ratchet covers complexity).
docs/architecture.md §8: defaults the developer follows and the auditor checks on every PR (patterns only for real duplication, deep modules, tests on edge cases and failure paths, bounded work, Go-style SOLID, plain functions first).
docs/architecture.md §9: automated checks that guard architectural properties. Among them: network only through gateway, os/exec only in gateway, scanrun and sandbox, every container hardened and cleaned, the layer table, no dependency without an ADR, the 400-line file cap, redaction leak and linearity tests, and no text in planner input, and the tripwire's recall on the testdata apps (TestTripwireRecall); since v0.4 also the init template changing no effective value, a resume refusing changed settings, files, tier or recordings with nothing sent, a reopened egress.log charging the budget, and every accepted ADR naming its fitness function; since v0.3 also the link-time third-party reach proof (linkcheck), MCP tools writing only under .creep/, installed recipes used only as pinned, the bench corpus disjoint from calibration, published bench numbers replaying, and the nightly bench regression gate. The fixed protections each have a test with a broken fixture, run by the required CI job protections (make protections, #17).
docs/architecture.md §10: which ideas from Building Evolutionary Architectures creep adopts for a single-binary CLI (fitness functions, incremental change, anticorruption layer, data over code) and which it skips on purpose.
Home · Current release: latest
Guides: Quickstart · Sandbox · Verification statuses · CI with the Action · Nightly scan · Local models · FAQ
Reference: Commands and flags · Output and exit codes · Configuration · Models and presets · Calibration · Languages · Guarantees and limits · Roadmap
Contributing: Writing recipes · Using creep from an agent (MCP) · Sharing model results
- Architecture
- v0.1 Progress
- v0.2 Progress
- v0.3 Progress
- v0.4 Progress
- v0.5 Progress
- v0.6 Progress
- v0.7 Progress
- Decisions
- Development Workflow
- Release
- Install and verify
- Nightly scan
Repository · Roadmap · Install: brew tap Ludocius/creep https://github.com/Ludocius/creep, scoop bucket add creep https://github.com/Ludocius/creep (details)