Spring Boot YAML jpa show-sql: true outside a dev profile
Rule ID: vetkit.spring.jpa.show-sql-yaml
Hibernate SQL statement logging is enabled (spring.jpa.show-sql: true) outside a development profile. Statements go to stdout unredacted and reveal the schema and query shapes in production logs.
Last updated:
Suite: Security
yaml
Hibernate SQL statement logging is enabled (spring.jpa.show-sql: true) outside a development profile. Statements go to stdout unredacted and reveal the schema and query shapes in production logs.
Category: SECURITY · Engine rule severity: INFO
How to fix it
Keep show-sql: true in application-dev.yml; in production use logging.level.org.hibernate.SQL: DEBUG only when debugging, through the logging framework.
References
Source: packages/engine/rules/sast/config.yml.
Related checks
- Spring Boot spring.jpa.show-sql=true outside a dev profile
- Hibernate TRACE parameter logging writes SQL values to logs
- Spring YAML Hibernate TRACE parameter logging leaks SQL values
- 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
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.