Skip to content
vetkitChecksChangelogDocumentationBlogComparisons

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

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.