Skip to content

fix(lint): give randomness guidance for crypto values - #3659

Merged
jrusso1020 merged 1 commit into
mainfrom
fix/crypto-lint-guidance
Sep 4, 2026
Merged

fix(lint): give randomness guidance for crypto values#3659
jrusso1020 merged 1 commit into
mainfrom
fix/crypto-lint-guidance

Conversation

@jrusso1020

Copy link
Copy Markdown
Collaborator

hyperframes lint still labels crypto.getRandomValues() as time-dependent code in the current extracted lint package. Give it the same seeded-PRNG guidance as Math.random() while retaining clock-specific guidance for Date.now().

Builds on #1729 by @AGRO-CODEX. Validation: 59 core-rule tests pass; the new semantic guidance regression fails on unchanged main. Required lint, format and typecheck hooks pass.

Builds on #1729 in the extracted lint package.

Co-authored-by: AGRO-CODEX <brstopo@gmail.com>

@miguel-heygen miguel-heygen left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewed 51e21c7ccd491b2bf776188eae8a1441bb8a944e; no actionable findings.

packages/lint/src/rules/core.ts:481 aligns crypto randomness guidance with Math.random() without changing detection or severity. packages/lint/src/rules/core.test.ts:604 pins seeded-PRNG guidance, rejects the old time-dependent wording, and preserves wall-clock guidance for Date.now().

Traced the rule through the shared lint package and CLI formatter. The successful CI Test job explicitly reports 59 core-rule tests and 548 lint-package tests passing; lint, format, typecheck, build, and CLI smoke also passed. No prior substantive reviews to duplicate. Validation used exact-head source and CI logs; no local dependency installation or test run.

Verdict: APPROVE
Reasoning: The wording fix is narrowly scoped and the semantic regression test protects both randomness and clock guidance without adding unnecessary abstractions.

— Magi

@jrusso1020
jrusso1020 merged commit 0ad9c70 into main Sep 4, 2026
47 checks passed
@jrusso1020
jrusso1020 deleted the fix/crypto-lint-guidance branch September 4, 2026 22:39
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.

2 participants