Skip to content

audit fixes: fail-closed expiry, RFC 8785 alignment, action_ref naive rejection#1

Merged
aeoess merged 1 commit into
mainfrom
fix/audit-2026-07-10
Jul 10, 2026
Merged

audit fixes: fail-closed expiry, RFC 8785 alignment, action_ref naive rejection#1
aeoess merged 1 commit into
mainfrom
fix/audit-2026-07-10

Conversation

@aeoess

@aeoess aeoess commented Jul 10, 2026

Copy link
Copy Markdown
Owner

Audit fixes: expiry parsing handles Z on 3.9+ and fails closed on malformed timestamps, canonical JSON aligned to the RFC 8785 anchor (ES numbers byte-identical to Node across 20,009 values, UTF-16 key order, matches the TS reference on floats, astral keys, nulls), action_ref rejects naive timestamps per spec 4.1. 681 passed.

…, action_ref naive ts (audit 2026-07-10)

TRACK B (authority + canonical bytes): review before release. Findings #1/#4/#5/#6 plus Python mediums/lows.

- Expiry: verify_delegation/is_expired/sub_delegate parsed expiresAt with datetime.fromisoformat, which rejects a trailing Z before Python 3.11 (the declared floor is 3.10), swallowing the error so the check no-opped. New _time.parse_iso_utc (Z-correct on 3.9+); unparseable expiry now fails closed.

- Canonical bytes: canonicalize/canonicalize_jcs now serialize floats via _es_number (ECMAScript Number::toString, byte-identical to Node over 20009 values) and sort keys by UTF-16 code units. Verified full Python JCS == TS canonicalizeJCS on floats, astral keys, null preservation. JCS fallback gains ensure_ascii=False.

- action_ref rejects naive timestamps (spec 4.1 requires Z/offset; TS parses naive as local, so assuming UTC silently diverged); explicit year zero-padding.

- __version__ 2.6.0->2.8.0; CHANGELOG 2.7.0 entry added and 2.6.0 un-marked unreleased; canonicalize docstring corrected; AGENTS python floor aligned to pyproject >=3.10.

Full suite 681 passed / 25 skipped / 6 xfailed. No existing test regressed.
@aeoess
aeoess merged commit b803e09 into main Jul 10, 2026
2 checks passed
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