Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

docs(guards): register the outbound-deadline check so the guard page lists it

nirholasb7ddf37e8da7
diff --git a/data/guards.json b/data/guards.json
index e17e76209..489d873a8 100644
--- a/data/guards.json
+++ b/data/guards.json
@@ -1006,6 +1006,27 @@
"kind": "live",
"reason": "Needs Playwright plus a running server, because the thing under test is how the page behaves when a specific request is aborted or rewritten mid-load. A static fixture cannot fail a fetch the page has not made yet."
}
+ },
+ {
+ "id": "check-fetch-timeouts",
+ "script": "scripts/check-fetch-timeouts.mjs",
+ "npm": "check:fetch-timeouts",
+ "title": "No outbound call without a deadline",
+ "protects": "Every fetch to a third-party host is bounded, so one stalled upstream cannot hold a request open until the platform kills it.",
+ "why": "A fetch with no signal has no deadline at all: undici's defaults run to minutes, so an upstream that accepts a connection and then stalls holds the whole invocation and takes the request budget of every fallback behind it. From the outside that is not a slow provider, it is a dead endpoint, a dead cron, or a page that spins forever. Only the deadline is enforced, because retries, provider ladders and last-good tiers are judgement calls per call site while a deadline never is. The checker balances parentheses to read each call's real extent, since signal is conventionally the last key of an options object and a fixed window would report a bounded call as unbounded exactly when its options are longest.",
+ "stages": [
+ "gate"
+ ],
+ "needs": "none",
+ "proof": {
+ "summary": "A fetch to a third-party host added with no signal and no bounding wrapper.",
+ "violation": {
+ "append": {
+ "api/_lib/rugcheck.js": "\n// Proof fixture: an unbounded call to a third-party host.\nexport async function _proofUnboundedFetch() {\n\treturn fetch('https://api.rugcheck.xyz/v1/proof');\n}\n"
+ }
+ },
+ "expect": "rugcheck.js"
+ }
}
],
"exempt": [
diff --git a/docs/guards.md b/docs/guards.md
index 16ca39522..1d4fb886d 100644
--- a/docs/guards.md
+++ b/docs/guards.md
@@ -91,6 +91,7 @@ Run `npm run audit:guards` to print the current count and per-stage breakdown. T
| Merge-conflict markers | `npm run check:conflicts` | No unresolved conflict marker can be built or deployed. |
| CLAUDE.md truth check | `npm run check:claude` | Every script, path, count, and runbook step named in CLAUDE.md matches the repo. |
| Vendored worker modules | `npm run check:vendored` | Every copy of a shared worker module (`worker_security.py`, `oin.py`, `oin_upload.py`, `gltf_meshopt.py` and its test) is byte-identical across all workers. |
+| No unbounded outbound call | `npm run check:fetch-timeouts` | Every fetch to a third-party host carries a deadline, so one stalled upstream cannot hold a request until the platform kills it. |
| Hard rules, diff scoped | `npm run check:rules` | The CLAUDE.md hard rules on the lines you changed. |
| The guard registry | `npm run audit:guards` | Every guard is registered and every stage claim is true. |
| Design-token ratchet | `npm run audit:tokens` | Hardcoded colour hexes cannot creep back past a committed baseline. |
diff --git a/public/guards.json b/public/guards.json
index e17e76209..489d873a8 100644
--- a/public/guards.json
+++ b/public/guards.json
@@ -1006,6 +1006,27 @@
"kind": "live",
"reason": "Needs Playwright plus a running server, because the thing under test is how the page behaves when a specific request is aborted or rewritten mid-load. A static fixture cannot fail a fetch the page has not made yet."
}
+ },
+ {
+ "id": "check-fetch-timeouts",
+ "script": "scripts/check-fetch-timeouts.mjs",
+ "npm": "check:fetch-timeouts",
+ "title": "No outbound call without a deadline",
+ "protects": "Every fetch to a third-party host is bounded, so one stalled upstream cannot hold a request open until the platform kills it.",
+ "why": "A fetch with no signal has no deadline at all: undici's defaults run to minutes, so an upstream that accepts a connection and then stalls holds the whole invocation and takes the request budget of every fallback behind it. From the outside that is not a slow provider, it is a dead endpoint, a dead cron, or a page that spins forever. Only the deadline is enforced, because retries, provider ladders and last-good tiers are judgement calls per call site while a deadline never is. The checker balances parentheses to read each call's real extent, since signal is conventionally the last key of an options object and a fixed window would report a bounded call as unbounded exactly when its options are longest.",
+ "stages": [
+ "gate"
+ ],
+ "needs": "none",
+ "proof": {
+ "summary": "A fetch to a third-party host added with no signal and no bounding wrapper.",
+ "violation": {
+ "append": {
+ "api/_lib/rugcheck.js": "\n// Proof fixture: an unbounded call to a third-party host.\nexport async function _proofUnboundedFetch() {\n\treturn fetch('https://api.rugcheck.xyz/v1/proof');\n}\n"
+ }
+ },
+ "expect": "rugcheck.js"
+ }
}
],
"exempt": [