Skip to content

Audit other LIF services for DATABASE_URL log-leak pattern #954

@bjagg

Description

@bjagg

Follow-up to #938 / PR #951.

What

The pattern logger.info(f"DATABASE_URL : {DATABASE_URL}") lived in components/lif/mdr_utils/database_setup.py. It's plausibly been copied into other service-side modules in this monorepo. Audit + fix.

Likely suspects

  • components/lif/graphql_*/...
  • components/lif/translator_*/...
  • components/lif/advisor_api/... (and any other *_api)
  • components/lif/query_cache_*/...
  • components/lif/identity_mapper/...
  • orchestrators/dagster/... (Dagster jobs use their own DB; same pattern risk)

Approach

Quick grep:

grep -rnE 'DATABASE_URL\s*:?\s*\{|logger\.info.*DATABASE_URL|logger\.info.*postgres(ql)?://' \
  components/ bases/ projects/ orchestrators/

For any hit, apply the same fix shape as PR #951: redact the password before logging (extract _redact_url to a shared util if more than one service needs it).

Definition of done

  • grep returns no matches for the leaking pattern.
  • Any module that does log a connection URL routes through a redacting helper.
  • Spot-check production log groups for the dev / demo equivalents of the affected services.

Related

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions