Spring Boot hardcoded JWT secret in properties file
Rule ID: vetkit.spring.jwt.hardcoded-secret
A JWT signing secret is hard-coded in a Spring Boot configuration file. Anyone with the repository can forge tokens for any user.
Last updated:
Suite: Security
regex
A JWT signing secret is hard-coded in a Spring Boot configuration file. Anyone with the repository can forge tokens for any user.
Category: SECURITY · Engine rule severity: ERROR
How to fix it
Reference an environment variable or secret-manager property (jwt.secret=${JWT_SECRET}), keep real values out of the repository and rotate the exposed key.
References
Source: packages/engine/rules/sast/config.yml.
Related checks
- Spring Boot hardcoded JWT secret in application YAML
- Spring Boot actuator env show-values=always exposes secrets
- Spring Boot YAML show-values: always unmasks actuator env
- Spring Boot actuator exposure.include=* exposes all endpoints
- Spring Boot YAML exposure include "*" exposes all actuators
- Spring Boot 1.x management.security.enabled=false actuator
Check your own repository for this
vetkit runs this rule as part of a repository audit, alongside secret scanning, dependency vulnerabilities, code quality and AI code risk checks. It reads a temporary checkout and never executes your code.
Start with the free Security Quick Scan · See how the platform works
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.