Skip to content
FendixDocumentationDocs

.fendix.yaml · SEC-001 · SARIF

Current release v3.7.0
CheckStablev3.7.0

Insecure randomness: java.util.Random / Math.random in a security context

Insecure randomness: java.util.Random / Math.random in a security context: a cryptography check run by the textscan analyzer.

On this page
JAVA_WEAK_RANDOM
Analyzer
textscan
Category
Cryptography
Default severity
MEDIUM
CWE
CWE-330
Execution
Passive
Authentication
Not required
Applicability
java
Availability
stable

What it detects

Insecure randomness: java.util.Random / Math.random in a security context: a cryptography check run by the textscan analyzer.

Evidence

The matching source path, line, and bounded code observation produced by the native rule.

Remediation

Use java.security.SecureRandom for tokens, salts, session IDs, and keys. java.util.Random / Math.random are statistically predictable.

Limitations

This check is limited to the applicability and evidence delivered by textscan. Review the evidence in context; a match is a finding input, while confidence and policy determine its disposition.

Analyzer Registry · Findings and release decisions · Policy and confidence

Remediation guidance: Remediation and fix verification · Baselines and suppressions