Skip to content

fix(cms): validate signed cache invalidation requests - #95

Merged
snowopsdev merged 1 commit into
mainfrom
codex/qa-20260905-lane05
Sep 5, 2026
Merged

snowopsdev merged 1 commit into
mainfrom
codex/qa-20260905-lane05

Conversation

@snowopsdev

Copy link
Copy Markdown
Owner

What Problem This Solves

The signed cache-invalidation endpoint accepted timestamps that converted to NaN, bypassing its five-minute freshness check. It also trusted parsed JSON field shapes, so null, arrays, and invalid article or slug values could throw, acknowledge an invalid request, or begin purging paths before returning an error.

Why This Change Was Made

Signature verification establishes who sent the bytes, while the route still needs to validate freshness and the body contract before changing cache state. The route now rejects non-finite timestamps and validates the complete parsed body before any path invalidation occurs.

User Impact

Configured webhook senders receive predictable 400 responses for malformed event data and 401 responses for timestamps whose freshness cannot be established. Valid signed publication events continue to invalidate their intended paths.

Evidence

  • Fail-before suite reproduced six failures after correcting the exploratory test parameterization.
  • Four focused suites passed 24/24 tests.
  • Nine HTTP contract requests passed, including null, array and numeric-slug 400 responses; a NaN timestamp 401 response; and a valid signed publication 200 response.
  • CMS typecheck, focused ESLint and diff checks passed.
  • Test fixtures restored webhook settings after verification; owned app sessions stopped normally.

Reject non-finite timestamps and malformed event fields before invalidating any paths. Covers E2E-008 and E2E-009.

Co-Authored-By: Codex <[email protected]>
@snowopsdev
snowopsdev marked this pull request as ready for review September 5, 2026 03:54
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 5, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-05T03:57:35.157227Z 4a78ff7 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@snowopsdev
snowopsdev merged commit 94b0a8c into main Sep 5, 2026
7 checks passed
@snowopsdev
snowopsdev deleted the codex/qa-20260905-lane05 branch September 5, 2026 05:36
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