A security-sensitive value is generated with System.Random or Guid.NewGuid() inside a token/secret/OTP generator.
Why AI tools produce this: AI coding tools generate this anti-pattern by default, it appears in a large share of AI-written auth code.
Why this matters
System.Random is a non-cryptographic PRNG seeded from the clock: its output is predictable and its state is recoverable from a few samples, so an attacker can reconstruct the "random" secret (CWE-338). Guid.NewGuid() is not guaranteed to be cryptographically random either. AI tools paste these in because they look random enough.
Use System.Security.Cryptography.RandomNumberGenerator instead, e.g. RandomNumberGenerator.GetBytes(32) (then Base64/hex encode) or RandomNumberGenerator.GetInt32(...).
Suppressing this rule
If a finding is a genuine false positive, scope the suppression to the exact line and leave a reason, never disable the rule project-wide. Disable directives are line-scoped by design.
// oauthlint-disable-next-line auth.csharp.crypto.insecure-random -- <reason>