Skip to content

fix(appraisal-api): cap and sanitize appraisal request IDs - #685

Open
chainsmt wants to merge 1 commit into
Sub-Rosa-Issue:mainfrom
chainsmt:feat/sanitize-appraisal-request-ids
Open

chainsmt wants to merge 1 commit into
Sub-Rosa-Issue:mainfrom
chainsmt:feat/sanitize-appraisal-request-ids

Conversation

@chainsmt

@chainsmt chainsmt commented Nov 24, 2026 •

Copy link
Copy Markdown

Summary

Oversized or control-character appraisal request IDs can inflate logs and corrupt quote tracing. This change caps and sanitizes inbound x-request-id for the appraisal API.

What changed

  • Documented maximum length (128) and a safe charset for appraisal request IDs.
  • Invalid, oversized, or control-character values are replaced with a server-generated UUID.
  • Only the sanitized ID is written to response headers and error-log context.
  • Header and logging coverage added.

Acceptance criteria

  • Documented maximum header length applied
  • Unsafe characters rejected or replaced
  • Safe server ID when invalid
  • Header and logging tests

Test plan

  • Focused appraisal request-id tests

Closes #674

@drips-wave

drips-wave Bot commented Nov 24, 2026

Copy link
Copy Markdown

@chainsmt Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

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.

security(high/easy): cap and sanitize appraisal request IDs

1 participant