Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scripts/lib/security-checklist.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export function evaluateSecurityEvidence(value) {
}
if (Number.isNaN(updatedAtMs)) {
failures.push("updated_at must be an ISO date or timestamp");
} else if (updatedAtMs - Date.now() > 24 * 60 * 60 * 1000) {
} else if (updatedAtMs > Date.now()) {
failures.push("updated_at cannot be in the future");
Comment on lines +71 to 72

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 Info: Date-only timestamps ahead of UTC now fail closed

A date-only updated_at parses to midnight UTC (security-checklist.mjs:43). For an authoring timezone ahead of UTC, that instant can be later than Date.now(), so removing the 24h grace at security-checklist.mjs:71 now rejects it. This matches the PR's stated fail-closed intent.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

}

Expand Down
8 changes: 8 additions & 0 deletions test/security-checklist.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,14 @@ describe("security validation checklist parser", () => {
expect(result.failures).toEqual([]);
});

it("rejects security evidence dated even slightly in the future", () => {
const futureTimestamp = new Date(Date.now() + 60 * 60 * 1000).toISOString();
const result = evaluateSecurityEvidence(reviewedSecurityEvidence(futureTimestamp));

expect(result.passed).toBe(false);
expect(result.failures).toContain("updated_at cannot be in the future");
});

it.each([
"07/02/2026",
"2026-07-02 10:30:15",
Expand Down
Loading