Repository navigation
feat(builtins): $SRANDOM, uuidgen, openssl rand - #2533
Merged
Merged
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
bashkit | 22dc42e | Commit Preview URL Branch Preview URL |
Oct 07 2026, 03:56 AM |
Secret generators backed by the OS CSPRNG (same source as /dev/urandom). openssl implements only rand, capped at 1 MiB (TM-DOS-123); uuidgen emits v4 only (L-RAND-001). Claude-Session: https://claude.ai/code/session_019aFikmptPc91Fj4N2iDXQA
chaliy
force-pushed
the
claude/fidelity-random
branch
from
October 7, 2026 03:55
2a0b6ff to
22dc42e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Михайло · project thread
What changed
The usual ways to make random numbers, IDs and secrets now work:
$SRANDOM(bash 5.1): a fresh 32-bit value per read. Assigning to it is ignored, as in bash.uuidgen(and-r): random v4 UUIDs.openssl rand [-hex|-base64] [-out FILE] NUM. Otheropensslsubcommands fail with openssl's ownInvalid commandmessage, so scripts can fall back.All three read from the OS CSPRNG (
getrandom, the same source as/dev/urandom), never from the$RANDOMLCG.Why
Agents generate tokens and passwords with
openssl rand -hex 32,uuidgenand$SRANDOM. All three were "command not found" or empty.Before / After
Before:
uuidgen/openssl→ command not found;$SRANDOM→ empty.After:
random.test.shchecks the output shapes against real bash and openssl.Risk
command -v opensslnow succeeds, but onlyrandworks (L-RAND-001).openssl randrefuses requests over 1 MiB (TM-DOS-123).Checklist
https://claude.ai/code/session_019aFikmptPc91Fj4N2iDXQA
Generated by Claude Code