Stop Cloudflare's WAF blocking publishes: no DROP TABLE in the README#9
Merged
Conversation
Every 3.0.0 publish attempt died with `E403 Forbidden - PUT` after all five gates passed — from CI and locally, over OIDC and with an owner's OTP, with and without --provenance. npm reported only its generic "forbidden by your security policy" text and no response body. Proxying the publish through localhost showed why: the body was not an npm JSON error at all but a Cloudflare HTML page, "Attention Required! | Sorry, you have been blocked". The registry sits behind Cloudflare, `npm publish` sends README.md as *plaintext* metadata, and the managed SQL-injection ruleset matches the literal string `DROP TABLE`. The block happens in front of the registry, which is why every credential failed identically and why `await-parallel-limit` — same account, same workflow, no SQL in its README — publishes fine. Confirmed by probing the registry with unauthenticated PUTs (the WAF is in front of auth, so it needs no token and publishes nothing): `DROP TABLE` is blocked in every spelling tried, while `DELETE FROM`, `TRUNCATE` and even `UNION SELECT` pass. Only that one phrase matters. Swap the three README payloads to `DELETE FROM users; --`, which demonstrates a destructive injection just as well. The tarball is gzipped and base64'd before it goes into the request, so llms.txt, src/ and dist/ are unaffected and keep their examples. Record the whole thing in AGENTS.md with the probe recipe — this is invisible from the repo and will silently break releases again otherwise. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
This is why every 3.0.0 publish failed.
Each attempt died with
E403 Forbidden - PUT https://registry.npmjs.org/simple-builderafter all five gates passed — from CI and locally, over OIDC and with an owner's OTP, with and without--provenance. npm surfaced only its generic "forbidden by your security policy" text and no response body.Proxying the publish through localhost revealed the body was never an npm error:
The registry sits behind Cloudflare,
npm publishsends README.md as plaintext in the publish metadata, and the managed SQL-injection ruleset matches the literal stringDROP TABLE. The block happens in front of the registry — which is exactly why every credential type failed identically, and whyawait-parallel-limit(same account, same workflow, no SQL in its README) publishes without trouble.Verification
The WAF sits ahead of auth, so this can be probed with unauthenticated
PUTs — no token, nothing published:readmepayloadpg(sql\SELECT * FROM users`)`1; DROP TABLE users1; DROP TABLE users; #'; DROP TABLE users; --1; DELETE FROM users; --1; TRUNCATE users; --UNION SELECT password FROM usersOnly
DROP TABLEmatters — the--comment and the quoting are irrelevant.Change
Swaps the three README payloads to
DELETE FROM users; --, which demonstrates a destructive injection just as well. The tarball is gzipped and base64'd before it enters the request body, sollms.txt,src/anddist/are invisible to the WAF and keep their examples unchanged.AGENTS.mdrecords the constraint and the probe recipe, since none of this is discoverable from the repo and it will silently break releases again otherwise.npm testpasses: 64/64 unit tests, 26 documented examples verified.🤖 Generated with Claude Code