pseudoRandomBytes

typescript · crypto
sinkDerived from model facts
RoleSink
WeaknessCWE-338
WatchesReturnValue
Kindweak-crypto
Confidencemedium
Corroboration2

Sink boundary: A cryptographic primitive is modeled because its strength may not meet the security property required by the caller.

Argument map · what each slot does

The pack does not provide a callable signature for this record; the watched access path is shown directly.

No positional argument is specified; inspect the return value or named access path in the model facts below.
The weakness
CWE-338
Cryptographically Weak PRNG

A non-cryptographic pseudo-random generator is used for security-sensitive values.

What goes wrong
Attacker's-eye view · weak-crypto

An attacker exploits weak hashing, encryption, or protocol choices to recover or forge values.

// modeled boundary: ReturnValue pseudoRandomBytes(attacker_influenced_value);
To decide if this call is a bug, check
1Identify the property the primitive is meant to provide.
2Use current, reviewed algorithms and parameters.
3Check key, nonce, and mode handling.
These checks require the surrounding codebase. The model names the boundary; it does not decide reachability or prove that a guard dominates every path.
Is this a bug in your code?Atropos stops here — by design

Atropos identifies ReturnValue as a weak-crypto sink. It cannot see whether untrusted data reaches this call in your repository.

Lachesis is the codebase-level step: it traces reachability and guards for this symbol.

Check this symbol in Lachesis
The family · weak-crypto
Model facts · verbatim from the pack
RoleKindAccess pathModel IDConfidence
sinkweak-cryptoReturnValuetypescript.crypto.pseudorandombytes.retmedium · corrob. 2