docs(user.js): correct claims that do not hold - #305
Draft
netravnen wants to merge 1 commit into
Draft
Conversation
netravnen
force-pushed
the
docs/correct-stale-claims
branch
from
August 19, 2026 22:27
3d3bd6f to
538e75d
Compare
netravnen
force-pushed
the
docs/correct-stale-claims
branch
from
August 19, 2026 22:28
538e75d to
be3af0f
Compare
netravnen
force-pushed
the
docs/correct-stale-claims
branch
from
August 19, 2026 22:29
be3af0f to
b87e8ea
Compare
netravnen
force-pushed
the
docs/correct-stale-claims
branch
from
August 19, 2026 22:31
b87e8ea to
e36416a
Compare
netravnen
force-pushed
the
docs/correct-stale-claims
branch
from
August 19, 2026 23:05
e36416a to
3be984f
Compare
netravnen
force-pushed
the
docs/correct-stale-claims
branch
from
August 19, 2026 23:06
3be984f to
0c38d1c
Compare
netravnen
force-pushed
the
docs/correct-stale-claims
branch
from
August 19, 2026 23:07
0c38d1c to
d3bcacf
Compare
Merging to master is the deploy for this repo -- Tampermonkey auto-updates every admin from raw.githubusercontent.com -- so these documents are the control, not commentary. Four claims in them were wrong, and two were wrong in the direction that discourages fixing the underlying problem. ARCHITECTURE.md described CP as matching `/cp/peeringdb_server/*/*/change/*`. The actual header is `/cp/*`, the whole Django admin site. The narrower claim materially understates the injection surface, and the source already carries a comment saying so. CONCERNS.md's coverage row claimed every high-risk pure-logic target was covered and advised expanding only opportunistically. In fact the retry wrappers had zero coverage, and the shim could not have exercised them: its fake response had no `headers.get()`, so the `Retry-After` branch threw on contact. That is how a policy of retrying PUT and DELETE on any 429/5xx shipped unnoticed -- the row asserting completeness is part of why nobody looked. CONCERNS.md's `@connect *` row described CP's cross-origin capability as `anonymous: true` GET-only. That holds for the IX-F fetch alone. Both `pdbFetch` and `pdbPost` fall back to `gmRequestWithRetry` with `withCredentials: true, anonymous: false` for non-same-origin URLs, and pdbPost's fallback carries whatever method it was given -- PUT and DELETE included. No current call site sends a write to a non-PeeringDB origin, so this is latent rather than live, but it is a credentialed arbitrary-method capability, not a read-only one. Changes: - ARCHITECTURE.md: correct CP's @match and note that route scoping lives in the modules[] registry, not the header. - CONCERNS.md coverage row: state plainly that "complete" was wrong and why, list what has since been covered, and name what genuinely remains (DOM-heavy modules the shim's FakeElement cannot drive at all). - CONCERNS.md @connect row: qualify the GET-only claim to the IX-F path, describe the credentialed fallback with file references, and note that scoping that fallback to the PeeringDB origins is possible and not done. Reword the write mitigation now that writes are no longer auto-retried. - AGENTS.md Testing: add the five test files this series introduced, and replace the "every pure-logic target is now covered" sentence with the lesson instead. Security: - Documents a wider cross-origin capability than the `@connect *` justification previously described. No code change here; the gap is now recorded rather than implicitly denied. Testing: - node --test: 535 tests, 534 pass, 1 skipped (live tests are opt-in). - Every corrected claim re-verified against current code before rewriting: the @match headers, the anonymous/withCredentials call sites at peeringdb-cp-consolidated-tools.src.js:2939/:6143/:6300, and the coverage state after this series. - Markdown table column counts confirmed unchanged in CONCERNS.md. Backwards Compatibility: - Documentation only. Assisted-by: Claude:claude-opus-5
netravnen
force-pushed
the
docs/correct-stale-claims
branch
from
August 19, 2026 23:09
d3bcacf to
72f9c6a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Merging to master is the deploy for this repo -- Tampermonkey auto-updates
every admin from raw.githubusercontent.com -- so these documents are the
control, not commentary. Four claims in them were wrong, and two were
wrong in the direction that discourages fixing the underlying problem.
ARCHITECTURE.md described CP as matching
/cp/peeringdb_server/*/*/change/*. The actual header is/cp/*, thewhole Django admin site. The narrower claim materially understates the
injection surface, and the source already carries a comment saying so.
CONCERNS.md's coverage row claimed every high-risk pure-logic target was
covered and advised expanding only opportunistically. In fact the retry
wrappers had zero coverage, and the shim could not have exercised them:
its fake response had no
headers.get(), so theRetry-Afterbranchthrew on contact. That is how a policy of retrying PUT and DELETE on any
429/5xx shipped unnoticed -- the row asserting completeness is part of
why nobody looked.
CONCERNS.md's
@connect *row described CP's cross-origin capability asanonymous: trueGET-only. That holds for the IX-F fetch alone. BothpdbFetchandpdbPostfall back togmRequestWithRetrywithwithCredentials: true, anonymous: falsefor non-same-origin URLs, andpdbPost's fallback carries whatever method it was given -- PUT and DELETE
included. No current call site sends a write to a non-PeeringDB origin,
so this is latent rather than live, but it is a credentialed
arbitrary-method capability, not a read-only one.
Changes:
in the modules[] registry, not the header.
why, list what has since been covered, and name what genuinely remains
(DOM-heavy modules the shim's FakeElement cannot drive at all).
describe the credentialed fallback with file references, and note that
scoping that fallback to the PeeringDB origins is possible and not done.
Reword the write mitigation now that writes are no longer auto-retried.
replace the "every pure-logic target is now covered" sentence with the
lesson instead.
Security:
@connect *justification previously described. No code change here; the gap is now
recorded rather than implicitly denied.
Testing:
the @match headers, the anonymous/withCredentials call sites at
peeringdb-cp-consolidated-tools.src.js:2939/:6143/:6300, and the
coverage state after this series.
Backwards Compatibility:
Assisted-by: Claude:claude-opus-5
Stack created with GitHub Stacks CLI • Give Feedback 💬