Registry
Aalexbit-codemod avatar

python-s2115-secure-db-password-mining

Mine python:S2115: A secure password should be used when connecting to a database; read-only metrics with blocking severity

alexbit-codemod0 executions

  • mining
  • metrics
  • python
  • security
  • python:S2115
Connect a repo
npx codemod python-s2115-secure-db-password-mining

python-s2115-secure-db-password-mining

Read-only mining codemod for python:S2115: A secure password should be used when connecting to a database.

Emits python_security_finding metric rows with blocking severity. Source files are never modified.

Rule

  • ID: python:S2115
  • Severity: blocking
  • Remediation: Use environment variables or a secrets manager for database passwords

Usage

bash
pnpm dlx codemod@latest workflow run -w codemods/python-security-mining/python-s2115-secure-db-password-mining/workflow.yaml --target /path/to/python/project

Development

bash
pnpm --filter ./codemods/python-security-mining/python-s2115-secure-db-password-mining test

Ready to evolve your codebase?

Build tailored, compiler-aware skills to assess, plan, and automate complex codebase changes.