Repository navigation
Conversation
… true, and clean up dead branches ### Summary of Changes Resolves **F16 (Low)** and **F17 (Low)** from the Uphold Workspace Security & Code Quality Audit: - **RFC 7230 Header Name Enforcement (F16):** - Added strict `FIELD_NAME` token grammar validation (`/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/`) for `expose` and `header` configuration options. - Explicitly rejects boolean `true` inputs, preventing misconfigurations from emitting literal `true: <uuid>` HTTP response headers. - **Removed Unreachable Branch (F17):** - Streamlined the ID fallback evaluation logic to eliminate unreachable dead-code paths after `crypto.randomUUID()`. - **Regression Coverage & Docs:** - Added unit test cases covering boolean `true` rejections and malformed header names (bringing the suite to 22 passing tests). - Updated `README.md` option tables to document the tightened `string | false` contract. ### Verification - `node --test` executed cleanly with 22 passing tests and 0 failures.
This branch has not been deployed
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.
Summary of Changes
Resolves F16 (Low) and F17 (Low) from the Uphold Workspace Security & Code Quality Audit:
FIELD_NAMEtoken grammar validation (/^[!#$%&'*+.^_|~0-9A-Za-z-]+$/) forexposeandheader` configuration options.trueinputs, preventing misconfigurations from emitting literaltrue: <uuid>HTTP response headers.crypto.randomUUID().truerejections and malformed header names (bringing the suite to 22 passing tests).README.mdoption tables to document the tightenedstring | falsecontract.Verification
node --testexecuted cleanly with 22 passing tests and 0 failures.