Skip to content

Hardcoded PostgreSQL credentials in characterization/tests.py #4

Description

@muhamedfazalps

Security Issue: Hardcoded PostgreSQL Database Credentials

File: characterization/tests.py

PostgreSQL database credentials are hardcoded:

conn = psycopg2.connect(dbname='postgres', port=5432, user='gabriel', password='qwerasdf', host='192.168.184.102')

Impact

  • Database credentials exposed to anyone with repository access
  • Internal network IP (192.168.184.102) exposed, aiding network reconnaissance
  • If the database port is exposed, it could be accessed remotely

Recommendation

  1. Remove hardcoded credentials from test files
  2. Use environment variables or a test-specific config file
  3. Never hardcode real database passwords in source code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions