Skip to content

Sensitive data exposure in logs on DB connection failure during startup (v0.9.5) #512

Closed

Description

Hello,

While deploying version v0.9.5 on AWS Fargate (EKS), we identified a potential data leak in the logs when a database connection error occurs during container startup.

Specifically, the exception log:

Exception in thread "main" clojure.lang.ExceptionInfo

appears to expose sensitive values from secrets provided via environment variables.

Steps to Reproduce

This behavior can be reproduced using the current repository:

git clone https://github.com/yetanalytics/lrsql.git
cd lrsql
git checkout v0.9.5

To force a connection error, prevent the Postgres container from starting by commenting out or removing the depends_on section in docker-compose.yml:

# depends_on:
#   - db

Then run:

docker-compose up lrs

Observed Behavior

The logs will output the previously mentioned exception, which includes sensitive database access information (e.g., credentials) in plaintext.

Example (truncated)

Exception in thread "main" clojure.lang.ExceptionInfo: Error in component :connection in system com.stuartsierra.component.SystemMap calling #'com.stuartsierra.component/start
...
:db-user "lrsql_user",
...
:db-password "lrsql_password",
...

Concern

This behavior may unintentionally expose sensitive credentials in logs, which could pose a security risk in production environments.

We already tried changing the log level to ERROR, but we’re still seeing the same results.


Please let us know if you need any additional details or if we can help validate a fix.

Thanks in advance for your support!

Activity

  1. cliffcaseyyet commented on Aug 10, 2026

    @cliffcaseyyet
    Contributor

    @pedro-delacalzada-netex

    Hi! Sorry for delay. This is a good catch, and I figured out it was the component framework throwing it outside our normally-redacted pathway for logging. I tested a fix and it will work it's way through release soon. Will keep you posted.

    Thanks,
    Cliff

  2. cliffcaseyyet commented on Aug 10, 2026

    @cliffcaseyyet
    Contributor

    This was merged so it autoclosed the issue. We will cut a formal release very soon (at latest by end of week, but likely sooner) including this change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions