vetkit.js.session.hardcoded-secret
The session or cookie signing secret is a string literal in the source code. Anyone who can read the code can forge signed cookies or session data.
Last updated:
Suite: Security
javascript, typescript
The session or cookie signing secret is a string literal in the source code. Anyone who can read the code can forge signed cookies or session data.
Category: SECURITY · Engine rule severity: WARNING
How to fix it
Read the secret from the environment or a secret manager (e.g. secret: process.env.SESSION_SECRET), use a long random value and rotate the one that was committed.
References
Source: packages/engine/rules/sast/javascript.yml.
Generated from shipped rule definitions at build time. Matching is a review signal, not proof of exploitability. “generic” denotes text matching, not complete language or framework coverage. Runtime configuration and available tools affect whether a rule runs.