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 @@ -49,7 +49,7 @@ function parseIsoDateOrTimestamp(value) {

export function evaluateSecurityEvidence(value) {
const failures = [];
const updatedAt = typeof value?.updated_at === "string" ? value.updated_at.trim() : "";
const updatedAt = typeof value?.updated_at === "string" ? value.updated_at : "";

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Behavior change missing from CHANGELOG

Dropping .trim() makes whitespace-padded updated_at evidence fail closed, a behavior change. CONTRIBUTING.md requires a ## Unreleased CHANGELOG entry for every behavior change, and none was added for this security-evidence module.

Prompt for agents
CONTRIBUTING.md requires a CHANGELOG.md ## Unreleased entry for every behavior change. This PR changes evaluateSecurityEvidence in scripts/lib/security-checklist.mjs to reject whitespace-padded updated_at values (fail-closed) by removing .trim(). Add a new bullet under the ## Unreleased section of CHANGELOG.md describing that the security-validation evidence boundary now requires an exact canonical updated_at timestamp identity and rejects surrounding whitespace. Match the Korean prose style of the surrounding CHANGELOG entries.
Open in Devin Review

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

const updatedAtMs = parseIsoDateOrTimestamp(updatedAt);

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

it("rejects surrounding whitespace instead of normalizing security evidence timestamp identity", () => {
const result = evaluateSecurityEvidence(reviewedSecurityEvidence(" 2026-07-02T10:30:15.250Z "));

expect(result.passed).toBe(false);
expect(result.failures).toContain("updated_at must be an ISO date or timestamp");
});

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));
Expand Down
Loading