Skip to content

P2 — Remove hardcoded default database credentials from prisma.config.ts #249

@itsmiso-ai

Description

@itsmiso-ai

Problem

prisma.config.ts:4-6 contains plaintext credentials:

const databaseUrl =
  process.env.DATABASE_URL ?? "postgresql://dispatch:dispatch@localhost:5432/dispatch";

While this is a default fallback for local dev, it's a supply-chain risk if the file is ever included in error reports or screenshots.

Recommended Fix

Remove the fallback entirely; require DATABASE_URL to be set explicitly. Or use a clearly-labeled placeholder like postgresql://user:placeholder@localhost:5432/dispatch.

Acceptance Criteria

  • No plaintext credentials in committed source files
  • DATABASE_URL is required at runtime (fails with clear error if not set)

Parent: #235 (Weekly tech debt audit: 2026-05-27)

Labels: audit

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    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