Skip to content

fix: reject invalid rendering proxy header payloads#1657

Merged
kitsuyui merged 1 commit into
mainfrom
fix/audit-implicit-behavior-audit-003
Jul 17, 2026
Merged

fix: reject invalid rendering proxy header payloads#1657
kitsuyui merged 1 commit into
mainfrom
fix/audit-implicit-behavior-audit-003

Conversation

@kitsuyui

Copy link
Copy Markdown
Owner

Summary

  • reject X-Rendering-Proxy payloads that are valid JSON but not JSON objects
  • reject request header fields whose types do not match the documented protocol schema
  • document the 400 Bad Request behavior for invalid request payload shapes

Testing

  • bun run format
  • bun run lint
  • bun run typecheck
  • bun run test -- src/server/request_options.spec.ts src/server/index.spec.ts
  • bun run build
  • pre-push hook: bun run lint
  • pre-push hook: bun run typecheck
  • pre-push hook: bun run test

@github-actions

Copy link
Copy Markdown

Code Metrics Report

main (de60997) #1657 (df8ece0) +/-
Coverage 84.1% 84.3% +0.1%
Code to Test Ratio 1:0.5 1:0.5 -0.1
Test Execution Time 11s 9s -2s
Details
  |                     | main (de60997) | #1657 (df8ece0) |  +/-  |
  |---------------------|----------------|-----------------|-------|
+ | Coverage            |          84.1% |           84.3% | +0.1% |
  |   Files             |             11 |              11 |     0 |
  |   Lines             |            234 |             243 |    +9 |
+ |   Covered           |            197 |             205 |    +8 |
- | Code to Test Ratio  |          1:0.5 |           1:0.5 |  -0.1 |
  |   Code              |           1775 |            1827 |   +52 |
+ |   Test              |           1003 |            1014 |   +11 |
+ | Test Execution Time |            11s |              9s |   -2s |

Code coverage of files in pull request scope (72.9% → 74.6%)

Files Coverage +/- Status
src/server/index.ts 66.6% 0.0% modified
src/server/request_options.ts 95.6% -4.4% modified

Reported by octocov

@kitsuyui
kitsuyui merged commit 6aabcd3 into main Jul 17, 2026
10 checks passed
@kitsuyui
kitsuyui deleted the fix/audit-implicit-behavior-audit-003 branch July 17, 2026 12:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant