[architect] Four validators gate an 'ISO 8601' timestamp with plain Date.parse, accepting loose strings the format claims to reject
Maintainers usually reply within 1 day
A pull request for this has already been merged.
- #1506 by @hivecommons-hive — merged
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 20/100
- Issue type
- Refactor
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- javascript
- Domain
- devtools
Research direction
Start with the strict ISO regex and its comment in scripts/validate-community-people.mjs, then the shared helpers in scripts/lib/validate-utils.mjs and their tests in tests/validate-utils.test.mjs. Work is already under way in linked PR #1506, so check with its author before starting. Done means a shared checkIsoTimestamp helper with unit tests, and all five call sites (including validate-community-people.mjs) using it.
Written by the indexing model from the issue text.
Description
Architecture Finding
Type: interface-violation/tech-debt (duplicated check with drift)
Affected area: scripts/validate-community-groups.mjs, scripts/validate-enduser-members.mjs, scripts/validate-launch-metrics.mjs (3 fields), scripts/lib/validate-utils.mjs
scripts/validate-community-people.mjs already carries a strict ISO 8601 regex
(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?Z$/) with this exact comment:
Strict ISO 8601 only: plain Date.parse also accepts loose strings like
"March 1, 2026", which would silently defeat the staleness check below.
That fix never made it into the other four validators gating a field whose
error message literally claims "must be ISO 8601" / "must be an ISO
timestamp": validate-community-groups.mjs (checkedAt, which layers the
same 60-second future-skew grace-window check community-people.mjs does —
the exact failure mode the comment above warns about), validate-enduser- members.mjs (collectedAt), and validate-launch-metrics.mjs
(generatedAt, capturedAt, and per-signal collectedAt). Each still
uses Number.isNaN(Date.parse(value)), so a loose, locale-dependent string
passes a check whose own message says it enforces ISO 8601.
This is the same drift-after-copy pattern already fixed twice in this file
(checkUrl, checkNonEmptyArray in scripts/lib/validate-utils.mjs) — the
precedent for centralizing is already established and documented there.
Impact
A malformed or ambiguous timestamp (e.g. "March 1, 2026" or a
non-UTC-offset form) silently passes the gate that is supposed to catch it.
For community-groups.mjs's checkedAt, this also means the stacked
future-skew check beneath it can never fire for such a value, since
new Date(...) happily parses the loose string into some timestamp.
Every future new validator that copies one of these four as a template
copies the gap forward again.
Recommendation
Centralize a checkIsoTimestamp(errors, path, field, value, options) helper
in scripts/lib/validate-utils.mjs (strict regex, optional
futureToleranceMs/futureMessage for the staleness/future-skew check),
and have all five call sites (including validate-community-people.mjs's own
copy) call it instead of carrying independent regex/Date.parse logic.
- Add
checkIsoTimestampto scripts/lib/validate-utils.mjs with full unit coverage in tests/validate-utils.test.mjs - Migrate validate-community-people.mjs's local regex to the shared helper
- Migrate validate-community-groups.mjs's
checkedAtcheck (format + future-skew) to the shared helper - Migrate validate-enduser-members.mjs's
collectedAtcheck to the shared helper - Migrate validate-launch-metrics.mjs's
generatedAt/capturedAt/per-signalcollectedAtchecks to the shared helper
Note: scripts/validate-metrics.mjs has the identical loose-Date.parse
"must be ISO 8601" pattern on its own generatedAt field, but that file and
its test are occupied by open hold-gated PR cncf/endusers#1504 at the time of
filing, so it is deliberately left out of this issue's scope; a follow-up
should migrate it once that PR lands.
Filed by architect agent (ACMM L5 — hold-gated mode)
🐝 Hive Agent: architect | Instance: hosted-available-lke648397-260827-5n31 | SHA: unknown
— hive: agent=architect backend=copilot model=claude-opus-4-6 copilot=1.0.88
- Dominant language
- JavaScript
- Stars
- 0
- Forks
- 2
- Avg merge
- 16h 38m
- Merged PRs (30d)
- 608
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from cncf/endusers
-
[guide] docs/metrics/index.md names retired 'Import reference architectures' workflow as the metrics refresh pathPossibly taken @hivecommons-hive claimed this 1 day ago. Openagent/guide documentation hive/covered-by-pr hive/hosted-available-lke648397-260827-5n31
Difficulty 1/5 Under an hour Newbie friendliness 70/100
cncf/endusers#1537 · 2 comments ·
Maintainers usually reply within 1 day
-
[sec-check] netlify.toml sends no Strict-Transport-Security: HTTPS is never pinned, so one cleartext request is strippablePossibly taken @hivecommons-hive claimed this today. Openagent/sec-check hive/covered-by-pr hive/hosted-available-lke648397-260827-5n31 security
Difficulty 3/5 Half a day Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
[quality] No guard against untrusted-context script injection in workflow run blocksPossibly taken @hivecommons-hive claimed this today. Openagent/quality hive/covered-by-pr hive/hosted-available-lke648397-260827-5n31 quality testing
Difficulty 3/5 1-2 days Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
agent/architect architecture hive/hosted-available-lke648397-260827-5n31 tech-debt
Difficulty 4/5 3-5 days Newbie friendliness 15/100
Maintainers usually reply within 1 day
-
agent/quality hive/hosted-available-lke648397-260827-5n31 needs-decision quality testing
Difficulty 3/5 1-3 hours Newbie friendliness 15/100
cncf/endusers#1535 · 9 comments ·
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
keyxmakerx/Chronicle#1469 ·
Maintainers usually reply within 1 day
-
enhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
suradet-ps/codeframe#40 ·
Maintainers usually reply within 1 day
-
data
Difficulty 1/5 Under an hour Newbie friendliness 74/100
gaseous-project/hasheous#637 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
gramps-project/gramps-web#1549 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100