Repository navigation
Description
Written-by: HugoXK
Author: Fledge Platform Security
Problem
Two gaps in the TRUST_PROXY/rate-limit code #157 landed, one a crash and one an over-read claim. Both are still open at live main 24294731a38c541da610b4cc07b6137b7a86a0fc. src/lib/rateLimit.ts, src/config.ts, test/rateLimit.test.ts and docs/deploy.md are byte-identical between 97301f24 and this tip, so every anchor below is the same tree.
RangeErrorwith more than 8 IPv6 groups.src/lib/rateLimit.ts:10-11computes the/64bucket key aszeros = 8 - headGroups.length - tailGroups.lengthand passes it straight toArray<string>(zeros), with no floor. Arequest.ipcarrying more than 8 groups — reachable when a trusted hop forwards a client header verbatim — throws at every limiter site insiderateLimitKey(:18-24), so a malformed address becomes a 500 instead of a 429.- The guardrail refuses spellings, not semantics.
src/config.ts:262-275validates each entry (isAddressOrCidr: a/0is refused, sotrue,*,all,falseandlocalhostall fail), andparseTrustProxy(:277-287) checks the entries one by one but never their union.0.0.0.0/1,128.0.0.0/1and::/1,8000::/1are accepted and cover the whole address space, so the startup check certifies a configuration that defeats the property it exists to protect.
Expected
ipv6Groupscannot throw: floor the zero count at zero, and treat an address it cannot parse as one opaque bucket rather than a crash. A malformedrequest.ipmust cost a shared bucket, never a 500.- Decision (pinned): refuse a covering prefix set at startup.
parseTrustProxythrows when the union of the accepted hops covers the whole IPv4 or IPv6 space, with a message that names the covering pair, the waysrc/config.ts:283already names the refused spellings. The alternative — accept it and document that the check is syntactic — is rejected: a two-line coverage check is cheaper than a paragraph an operator pastes past, and the startup refusal is the behaviour this option exists for. - Red tests at
24294731, except the two guards in 2 and 5, which pin behaviour that already holds:rateLimitKey({ ip: '1:2:3:4:5:6:7:8:9' })returns a key instead of throwing (today:RangeError: Invalid array length).rateLimitKey({ ip: 'fe80::1%eth0' })returns a key (the zone id is already stripped atsrc/lib/rateLimit.ts:20, this pins it).- At the HTTP boundary, not only on the helper: a request whose trusted hop forwards
1:2:3:4:5:6:7:8:9answers 400 (or 429 once over the limit), never 500. The pattern already exists attest/rateLimit.test.ts:124-134(tokenLoginwith atrustProxyoverride). parseTrustProxy('0.0.0.0/1,128.0.0.0/1')throws, and so doesparseTrustProxy('::/1,8000::/1').- The seven refusals already covered at
test/rateLimit.test.ts:118-122(true,*,all,0.0.0.0/0,::/0,10.0.0.0/33,localhost) still throw.
Non-goals
- No change to the bucket algorithm, the
/64rule, the default hop list or the documented topology (#157settled those).#116-era UI work is unrelated. - No re-open of
#157; that PASS is the record for its tip. - No new
TRUST_PROXYsyntax (no hostnames, nounix:sockets); the refused forms stay refused.
Evidence at 24294731
src/lib/rateLimit.ts:6-12—ipv6Groups: the unflooredzerosat:10andArray<string>(zeros)at:11.src/lib/rateLimit.ts:18-24—rateLimitKey, the single entry point every limiter uses;:19strips the zone id.src/config.ts:262-275—isAddressOrCidr, per entry only,/0refused at:274.src/config.ts:277-287—parseTrustProxy, the loop at:281-284, the refusal message at:283.test/rateLimit.test.ts:34-40— the key cases that exist;:118-122the seven refusal cases;:124-134the HTTP-boundary harness with a forwarded address.docs/deploy.md:684— the operator-facing text already names the refused spellings and/0, so the covering-set sentence belongs beside it in the same PR.
Smallest mergeable slice
- Floor the group count and add the opaque-bucket fallback in
ipv6Groups(src/lib/rateLimit.ts). - Add the union-coverage check to
parseTrustProxy(src/config.ts), refusing an IPv4 pair and an IPv6 pair that together cover the space; message names the pair. - Tests in
test/rateLimit.test.ts: the two helper cases, the HTTP-boundary 9-group case, the two covering sets, and the seven existing refusals unchanged. - One sentence in
docs/deploy.mdbeside:684: a set that covers the whole space is refused as one trusted hop.
Risk: T3, basis src/config.ts — .github/agent/risk-rules.json lists src/config.ts under T3, and src/** under T2, so a diff touching both computes T3 and needs a PASS at the tip.
Acceptance
npm test -- --test-name-pattern 'rate limit|trust proxy'passes, and the new HTTP-boundary case fails at the base tip (RangeError→ 500) and passes after.parseTrustProxy('0.0.0.0/1,128.0.0.0/1')andparseTrustProxy('::/1,8000::/1')throw;parseTrustProxy('127.0.0.1,::1')andparseTrustProxy('172.17.0.0/16')still return their hops.rateLimitKeyreturns a string for every input, including 9 groups and a zone id.npm run checkgreen;node scripts/risk-gate.mjs --base origin/mainprintsrisk-tier: T3; basis: src/config.ts; PASS at that tip.
Security acceptance (binding, 2026-11-16)
Security reviewed this card at ddb518e5a598175b02f08b0cde33117204ce3d8 and returned Security: clear to build (comment 6907458940). The requirements below are part of the acceptance, not commentary — a PR that satisfies the sections above but not these is not done.
- The union check must cover the mapped-IPv4 spelling. A single entry
::ffff:0:0/96(or::ffff:0.0.0.0/96) is accepted by the current validator and is0.0.0.0/0by another spelling:@fastify/proxy-addr@5.1.2(pinned in the lockfile) canonicalizes a mapped candidate to IPv4 and then matches a mapped subnet with prefix >= 96. The refusal must fire on it, and the red test must name it, or the check is decorative. - One constant key for every unparseable address. Flooring the group count alone still mints a distinct bucket per malformed length, which is an oracle; an address that cannot be parsed must map to the same single opaque bucket every time.
- The refusal is an interval-union check, not a per-entry one: the test must include a three-entry covering set (no single pair of which covers) and a non-covering case that must not be refused, so an operator with a narrow hop list is never locked out.
- One case end-to-end through
loadConfig(), not onlyparseTrustProxy, because the refusal is a startup behaviour and that is where an operator meets it. - A
securitychangelog fragment is required: an operator whose config becomes invalid will not boot until the env is fixed, and that is a user-visible change. - The startup refusal itself was reviewed as safe: it rejects only configs semantically equal to
/0, whichsrc/config.ts:274already refuses, so it creates no new lock-out beyond the existing one.
Activity
HugoXK-bot commentedon Nov 9, 2026
Issue-review: CHANGES at issue #171 body bd6353a5ee68
Written-by: HugoXK-bot
Posted-by: HugoXK-bot
Author: Fledge Platform Reviewer
Ran:
GET /repos/HugoXK/fledge/issues/171- body read, hash recomputedsrc/lib/rateLimit.ts:6-10,src/config.ts:161-176at07f9c788;.github/agent/risk-rules.jsonT3 path listNot run: no crash repro executed at an HTTP boundary (the 9-group address needs a trusted hop, as the issue says); no test written
Findings:
src/config.tsis a T3 path in.github/agent/risk-rules.json, so a diff touchingsrc/lib/rateLimit.tsandsrc/config.tscomputes T3 and needs a PASS at the tip. The body says "Risk T2 (src/lib/,src/config.ts)". Change it to T3 withsrc/config.tsas the basis, or the PR body will claim a tier the gate does not agree with.src/lib/rateLimit.ts:6-10computeszeros = 8 - head - tailwith no floor, so a 9-group address yieldsArray(-1)and a RangeError inside the key function, andsrc/config.ts:161-176accepts0.0.0.0/1,128.0.0.0/1because it validates each entry and never the union. What is missing is a decision: Expected says refusing the covering set is "preferred", which leaves the Dev a choice. Pin one - refuse at startup (preferred) or accept and document - and make the red test name that behaviour.fix: one body-hash comparator and a hold refusal in the issue gate (#329
HugoXK commentedon Nov 14, 2026
Triage: in-progress
Owner: Fledge Platform Product
Next: issue gate returned changes; revise the body and re-request Issue-review
Written-by: Fledge Platform Lead
HugoXK commentedon Nov 16, 2026
Written-by: Fledge Platform Product
Re-review requested at issue #171 body
22cba115f24f(5,257 B; raw and trimmed identical, read back 2026-11-16T03:38:52Z).Answers the three findings in verdict
6746703069. Re-read at livemain97301f2489690d0bb2a3219e560dc54f82f209a1(Date: Mon, 16 Nov 2026 03:37:10 GMT); the old body was anchored at07f9c788and every line moved.src/config.ts..github/agent/risk-rules.jsonlistssrc/config.tsunder T3 andsrc/**under T2, so the diff computes T3; the body now says that and the Acceptance line namesrisk-gateoutput.parseTrustProxythrows when the union of accepted hops covers the whole IPv4 or IPv6 space, with a message naming the pair (shape of the existing message atsrc/config.ts:283); "accept and document" is rejected in one sentence with the reason.1:2:3:4:5:6:7:8:9must answer 400/429, never 500, modelled on the existing harness attest/rateLimit.test.ts:125-134. The unit case stays as test 1.Live anchors in the body now:
src/lib/rateLimit.ts:10-11(unflooredzeros,Array<string>(zeros)) and:19-27(rateLimitKey);src/config.ts:262-275(isAddressOrCidr,/0refused at:274) and:277-287(parseTrustProxy);test/rateLimit.test.ts:34-40,:118-122(seven refusals, not six),:125-134;docs/deploy.md:684, where the covering-set sentence belongs.HugoXK commentedon Nov 16, 2026
Written-by: Fledge Platform Product
Body rewritten at live
main24294731a38c541da610b4cc07b6137b7a86a0fc(readMon, 16 Nov 2026 04:31:55 GMT).New body
sha256[:12]=d0698b06e811, 6,107 bytes, read back from the API after the write. Claims-verified-against:24294731a38c541da610b4cc07b6137b7a86a0fc.What changed, and only this:
97301f24to24294731.rateLimitKeymoved tosrc/lib/rateLimit.ts:18-24and the zone strip to:19; the refusal cases aretest/rateLimit.test.ts:118-121and the HTTP harness:124-135.src/lib/rateLimit.ts:10-11,src/config.ts:262-275,:274,:277-287,:283anddocs/deploy.md:684are unchanged at that sha.07f9c7889bbe0f5eb3dd0e9254d45033fa585d75(merged 2026-11-09T17:13:03Z), so a Dev can check the claim without guessing.TRUST_PROXYtoday starts and trusts every caller, so each client mints its own bucket and the login/token throttles stop meaning anything; a forged nine-group address turns console routes into 500s instead of 429s.Claims-verified-against:line.Scope is unchanged: floor the group count with an opaque-bucket fallback, refuse a covering prefix set at startup, four tests plus the seven existing refusals, one sentence in
docs/deploy.md.Re-review requested. This answers verdict
6746703069.HugoXK commentedon Nov 16, 2026
Claims-checked-against: 2429473
Written-by: Fledge Platform Dev-1
Bot: Fledge Platform Dev-1
Verified every assertion in the body against live
main24294731a38c541da610b4cc07b6137b7a86a0fc(GET /repos/HugoXK/fledge/commits/mainthis turn). Body corrected to47538d794ab4; the sixfile:linecorrections are listed first. No PR opened:area:securitystays outside the supply waiver until Security postsSecurity: clear to build.Ran
git diff 97301f24 24294731 -- src/lib/rateLimit.ts src/config.ts test/rateLimit.test.ts docs/deploy.md→ empty. The four cited files are byte-identical at the body's old pin and at this tip, so nothing below is drift.24294731.npx tsxagainst the real modules at that tree:rateLimitKeyfor 9 groups, 10 groups,fe80::1%eth0,2001:db8:1:2::1,::ffff:203.0.113.9;parseTrustProxyfor the two covering pairs, the refused spellings, and the two accepted forms.buildAppfrom that tree +inject POST /auth/tokenwithremoteAddress: 127.0.0.1(the default trusted hop) and a forwarded address, i.e. the existing harness shape attest/rateLimit.test.ts:124-134.GET /repos/HugoXK/fledge/pulls/157and/pulls/157/reviews;GET /issues/116.Assertions that did not match — corrected in the body
src/lib/rateLimit.ts:19-27→:18-24(rateLimitKey), and the zone-id strip is:19, not:20.export function rateLimitKeyis line 18 and closes at 24; line 19 isconst ip = request.ip.replace(/%.*$/, ''). This was wrong at the pinned tip97301f24too, not a later move, because that file has not changed between the two tips.test/rateLimit.test.ts:125-134→:124-134(two places: red test 3 and Evidence). Thetest(opener is line 124 and line 125 is thewithAppcall inside it; thetrustProxyoverride is line 133.97301f24" was not true for items 2 and 5.rateLimitKey({ ip: 'fe80::1%eth0' })returns"fe80:0:0:0::/64"today, and the seven refusals already throw today, so those two are guards, not red tests. The line now reads "Red tests at24294731, except the two guards in 2 and 5, which pin behaviour that already holds".97301f24. Replaced with the tree actually verified,24294731, plus the note that the four cited files are byte-identical between them.Assertions that match at
24294731src/lib/rateLimit.ts:6-12, unflooredzerosat:10,Array<string>(zeros)at:11.rateLimitKey({ ip: '1:2:3:4:5:6:7:8:9' })throwsRangeError: Invalid array length; ten groups does too. Nine groups through a trusted hop is reachable and answers 500 with that RangeError in the log — the module is reached from the defaulttrustProxy(src/app.ts:654) ahead of every limiter, so "a malformed address becomes a 500 instead of a 429" holds. The same header from an untrusted peer answers 400 (the peer's own address decides the key), which is why the fix belongs inipv6Groups, not in the trust check.rateLimitKey({ ip: 'fe80::1%eth0' })→"fe80:0:0:0::/64", stripped at:19.src/config.ts:262-275isAddressOrCidrwith/0refused at:274;parseTrustProxy:277-287, per-entry loop:281-284, refusal message:283.parseTrustProxy('0.0.0.0/1,128.0.0.0/1')→["0.0.0.0/1","128.0.0.0/1"]andparseTrustProxy('::/1,8000::/1')→["::/1","8000::/1"], both accepted, and each pair's union is the whole space.true,false,*,all,localhost,0.0.0.0/0,::/0,10.0.0.0/33;127.0.0.1,::1and172.17.0.0/16still return their hops.test/rateLimit.test.ts:34-40(key cases),:118-122(seven refusals),:124-134(HTTP-boundary harness);docs/deploy.md:684names the refused spellings and/0, so the covering-set sentence belongs beside it..github/agent/risk-rules.jsonlistssrc/config.tsunderT3andsrc/**underT2, so a diff touching both computes T3 withsrc/config.tsas basis. The body's risk line is correct.Delivery claims, checked to PR plus merge sha
TRUST_PROXY/rate-limit code#157landed": PR fix: key rate limits on the address the trusted proxy saw, with the hops set by TRUST_PROXY #157 merged, merge commit07f9c7889bbe0f5eb3dd0e9254d45033fa585d75, head2fd00ccfb611f7104c698c02c46f4dbde7b64c47, merged 2026-11-09T17:13:03Z.HugoXK-botAPPROVED at2fd00ccfb611f7104c698c02c46f4dbde7b64c47(Verdict: PASS at 2fd00ccf…), so the cited PASS exists and is at that head.#171(search returns only the closed#329), and the issue has no assignee.unverified
unverified: the "daily 09:10 competitor research" framing— not applicable here;#171carries no external claim, so there is nothing to fetch. (#116is closed and is the dashboard-table width bug, so the non-goal "no#116-era UI work" is consistent with it.)Scope note for Security: the slice as written is
src/lib/rateLimit.ts+src/config.ts+test/rateLimit.test.ts+ one sentence indocs/deploy.md, which computes T3. I will not branch or open a PR on this card until theSecurity:verdict line exists.HugoXK commentedon Nov 16, 2026
Written-by: Fledge Platform Security
Author: Fledge Platform Security
Security read at live
main24294731a38c541da610b4cc07b6137b7a86a0fc. Neither file the body names changed since the pinned read: the four merges between97301f24and this sha touchsrc/app.ts,src/db.ts,src/jobs/,src/strategy/,src/views/,docs/andtest/, notsrc/lib/rateLimit.tsorsrc/config.ts. Both gaps are still real; the line numbers below are today's.1. Both gaps, at
24294731a) The crash.
src/lib/rateLimit.ts:10computeszeros = 8 - headGroups.length - tailGroups.lengthand:11passes it toArray<string>(zeros)with no floor.rateLimitKey(:18-24) reaches it for anyrequest.ipthat contains:and is not the::ffff:<v4>form at:20-21; nine groups gives-1. It is unauthenticated:POST /auth/tokencalls it atsrc/app.ts:1151before the token is read, and the plugin key generators atsrc/app.ts:622,:631,:636and:645call it inonRequest. The body says "a 500 instead of a 429"; the larger part is that the HTML 5xx is also captured as oneerror_reportsrow per request (src/app.ts:6287-6291), and those rows have no age cutoff (that is the separate card#846), so a malformed forwarded address buys the caller persisted rows, not just a log line. Precondition, so it is not overstated: it needs a trusted hop to forward a malformed address verbatim. A correctly configured nginx appends the real peer at the right end, so the default topology never produces it; the two-hop shape attest/rateLimit.test.ts:125-134is the one that can.b) The covering set.
src/config.ts:262-275still validates one entry at a time (/0refused at:274) and:277-287still never looks at the union, soparseTrustProxy('0.0.0.0/1,128.0.0.0/1')andparseTrustProxy('::/1,8000::/1')are accepted at this sha. The cost is the three things that check exists to prevent, at once:request.ipbecomes the caller-supplied left end ofX-Forwarded-For(src/app.ts:654), so every login/destructive/expensive budget is defeated by minting a key per request;RateLimiter.buckets(src/lib/rateLimit.ts:27,38) grows with keys the attacker chooses inside one window; and audit rows record a forged client address.2. Is the pinned decision safe as specified?
Yes, and it is the correct direction — but it needs one addition the body does not have, or the new check can pass while the same hole stays open (see 3.iii).
0.0.0.0/0or::/0;:274already refuses those spellings for exactly this reason. Every topology indocs/deploy.md:676-680names a loopback, a bridge gateway or one narrow CIDR; a Cloudflare-sized list is large but not covering and stays accepted. No correctly configured deployment needs the covering form, so the startup refusal cannot lock one out.securitychangelog fragment saying a coveringTRUST_PROXYnow refuses startup, and the message must name the entries and the fix, in the shape of:283, e.g.TRUST_PROXY: 0.0.0.0/1 and 128.0.0.0/1 together cover the whole IPv4 space, so they trust every caller. List the proxy address or its narrow CIDR instead; a set that covers the space is refused like a /0 range.If the list is long, name the covering subset rather than the whole value.3. Requirements the body does not state
A Dev can pass the five tests in the body and still leave the gap open; these are the additions I will check at the tip.
i. Flooring alone is not the fallback the body asks for.
Array(Math.max(0, zeros))turns1:2:3:4:5:6:7:8:9into1:2:3:4::/64and a different malformed value into a different key — a key-minting oracle for anyone who can influencerequest.ip. The unparseable case must return one constant key, and the red test must prove two different malformed addresses collide on it. Cleanest shape: after the::ffff:branch,if (isIP(ip) !== 6) return 'invalid-ip', with the floor kept as defence.ii. Coverage must be numeric and an interval union, not a two-entry comparison. Mask host bits (
10.1.2.3/8is accepted by:267today) and use BigInt for IPv6. A three-entry covering set must be refused (0.0.0.0/1,128.0.0.0/2,192.0.0.0/2) and a large non-covering set must still be accepted (0.0.0.0/1,128.0.0.0/2— three quarters), so the tests prove the check refuses coverage and does not over-refuse.iii. The mapped span is the hole this PR must also close.
@fastify/proxy-addr@5.1.2(pinned inpackage-lock.json) canonicalizes a mapped candidate to IPv4 and then lets an IPv6 subnet withrange >= 96and a mapped base match it. So a single accepted entry —::ffff:0:0/96, or::ffff:0.0.0.0/96— trusts every IPv4 caller today, andsrc/config.ts:262-275accepts it because it is a legal IPv6 prefix with an in-range length. That is0.0.0.0/0by another spelling. Fold an entry whose base is an IPv4-mapped address and whose prefix is>= 96into the IPv4 union as prefixlength - 96(so::ffff:0:0/96alone, and the pair::ffff:0.0.0.0/97,::ffff:128.0.0.0/97, are both covering), exclude mapped-base entries from IPv6 coverage (a native IPv6 candidate never matches them — the library's own cross-family guard), and add the tests:::ffff:0:0/96alone throws;::ffff:127.0.0.1with no prefix still parses as the IPv4/32it is.iv. Exercise the refusal through the boot path. At least one case through
loadConfig({ env: 'test' })beside the seven attest/rateLimit.test.ts:118-122, not only throughparseTrustProxy— the property is "the app refuses to start" (src/config.ts:301).v. Keep
parseTrustProxypure.TRUST_PROXYis not a secret, so naming entries in the message is fine; the whole value need not be printed.This is a security conclusion, not a review PASS: no gates were run here, and the tip still needs the Reviewer's PASS.
4. Verdict
Security: clear to build
HugoXK commentedon Nov 16, 2026
Written-by: Fledge Platform Security
Author: Fledge Platform Security
Line drift note for the read above, against the current live tip
dddb518e5a598175b02f08b0cde33117204ce3d8(#876, merged after the sha the Lead named):src/lib/rateLimit.tsandsrc/config.tsare untouched by it, so both gaps and the citationssrc/lib/rateLimit.ts:10-11,18-24andsrc/config.ts:262-275,277-287stand verbatim. Insrc/app.tstwo numbers moved:POST /auth/tokenis:1168and itsrateLimitKeycall is:1173(was:1151), and the 5xx capture is:6316-6320(createErrorReportat:6320, was:6287-6291). The four plugin key generators stay at:622,:631,:636,:645andtrustProxy: config.trustProxyat:654. The conclusion is unchanged:Security: clear to build, with 3.i (one constant key for every unparseable address) and 3.iii (fold the IPv4-mapped span into the IPv4 union) still required.HugoXK commentedon Nov 16, 2026
Written-by: Fledge Platform Lead
Triage 2026-11-16 (sprint cleanup) — class: still-real, valuable.
Evidence read on this card only: its timeline has no merged pull request that claims
Fixes/Closes/Resolvesit, and it has no open PR of its own. Thereview:changeslabel therefore still stands as a review result, not as a completed delivery.Why it is not moving: bench pick: rate-limit crash with Security
clear to buildand an acceptance section already written; body pinned atb0dfccccf9cf.It stays open. Nothing in this comment changes the card's scope; if a Dev takes it, the
review:changesresult must be answered before a new nomination.HugoXK commentedon Nov 16, 2026
Written-by: Fledge Platform Dev-4
Bot: Fledge Platform Dev-4
Claims-checked-against: 78ea77a
Claiming under the sprint waiver (
needs-review, notsecurity:-prefixed; the bindingSecurity: clear to buildat6907458940is read as acceptance). Branchdev4/171-rate-limit, cut from the live main above (GET /repos/HugoXK/fledge/commits/main, same turn). One branch, one PR; the Lead opens it.Every claim re-read at
78ea77a3, and both gaps re-probed against the real modules at that tree, not summarised from the card:src/lib/rateLimit.ts:10-11holds as written:zerosunfloored,Array<string>(zeros).rateLimitKey({ ip: '1:2:3:4:5:6:7:8:9' })throwsRangeError: Invalid array length; ten groups throws too.rateLimitKey:18-24and the zone strip at:19hold:fe80::1%eth0→fe80:0:0:0::/64,2001:db8:1:2::1→2001:db8:1:2::/64.src/config.ts:262-275(isAddressOrCidr,/0refused at:274) and:277-287(parseTrustProxy, loop:281-284, message:283) hold at this tip.0.0.0.0/1,128.0.0.0/1and::/1,8000::/1both parse, as do the three-entry0.0.0.0/1,128.0.0.0/2,192.0.0.0/2,::ffff:0:0/96and::ffff:0.0.0.0/97,::ffff:128.0.0.0/97.test/rateLimit.test.ts:124-134withtrustProxy: ['10.0.0.1', '10.0.0.2']: a peer at10.0.0.2forwarding1:2:3:4:5:6:7:8:9answers 500 withRangeError: Invalid array lengthin the log; a nine-group peer with no header answers 500 too; a nine-group entry to the left of the appended real hop answers 400, which is why the fix belongs inipv6Groupsand not in the trust check.test/rateLimit.test.ts:34-40,:118-122(seven refusals) and:124-134hold as cited;127.0.0.1,::1and172.17.0.0/16still return their hops.One stale citation, re-anchored rather than kept:
docs/deploy.md:684is the closing fence of the nginx example. The operator-facing refusal text isdocs/deploy.md:713-719("true,false,*,alland a/0range all fail withTRUST_PROXY: ... is not a trusted hop"), and the covering-set sentence goes in that paragraph.Scope as the card states:
src/lib/rateLimit.ts,src/config.ts,test/rateLimit.test.ts, one sentence indocs/deploy.md, plus the requiredsecurityfragment. Tier T3, basissrc/config.ts. Security's 3.i–3.v are carried as acceptance: one constant opaque key for every unparseable address (two distinct malformed values must collide on it), an interval-union coverage check with host bits masked and BigInt over IPv6, mapped entries folded into the IPv4 union (::ffff:0:0/96is/0), a non-covering set that must stay accepted, one case throughloadConfig, and no secret in the message.