fix: tighten AgreementStartDate CFN pattern + strptime safety (§1.129, §1.130)#30
Merged
Conversation
…cept (§1.129, §1.130)
CFN AllowedPattern:
- Replace ^\d{4}-\d{2}-\d{2}\$ with stricter pattern that rejects month>12
and day>31 at CFN parameter validation.
- Applied to AgreementStartDate in main YAML and both AgreementStartDate
+ AgreementEndDate in configurator.html embedded template (same class
of bug on both date params).
Lambda strptime safety:
- Wrap datetime.strptime() calls in try/except ValueError.
- On ValueError: log + return (event treated as out-of-scope). Do NOT
raise / DLQ — stack is operator-broken, customer must redeploy, so
DLQ spam is noise not signal.
- Applied to is_after_agreement (main YAML), is_within_agreement
(configurator), and the backfill start_time parsing (configurator).
Severity re-scoped CRITICAL → MEDIUM: CFN AllowedPattern already enforced
at stack creation, so Phase 16's 5,339 DLQ came from raw-YAML deploy
bypassing the configurator — not a real customer path.
1 task
hyunsies
added a commit
that referenced
this pull request
Apr 24, 2026
CHANGELOG stopped at PR #25 (v20.3.0) but the repo shipped 9 more PRs this cycle. VERSIONING.md's example list and "source of truth" version constant were also stale. Bringing both current: - New v20.4.0 entry covering #37 (three-path classifier) and #38 (scope- intersection preflight), with a docs cross-reference to the #36 reconciliation Lambda design. - New v20.3.1 umbrella entry for the PATCH-class fixes shipped against v20.3.0: #29 (log retention), #30 (date pattern), #33 (CRITICAL scope fixes), #34 (SNS backfill helper), #35 (cross-account rip-out). Grouped retroactively — each shipped individually without a version bump. - VERSIONING.md examples list updated to include session PRs per their MINOR / PATCH classification. - VERSIONING.md "source of truth" constant bumped v20.1.0 → v20.4.0. Pure docs; no runtime / CFN / IAM change. sync-check passes. Co-authored-by: Chris Hyu <chhyu@amazon.com> Co-authored-by: Claude Opus 4.7 (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.
Summary
Closes §1.129, §1.130 — CFN date pattern + strptime safety.
Severity re-scope: CRITICAL → MEDIUM
Phase 16's evidence (5,339 DLQ from `2024-13-01`) came from raw-YAML deploy bypassing the configurator's CFN AllowedPattern. In the real customer path, CFN rejects invalid dates at stack creation, so this is a defense-in-depth fix, not a runtime-severity bug.
Verify-flag results
Regex validation (tested locally)
Test plan