Skip to content

branch reset prints the branch database_password in its JSON output #235

Description

@Fermionic-Lyu

What happens

insforge branch reset <name> --json returns the branch object with a plaintext database_password:

{
  "branch": {
    "id": "021b880b-...",
    "organization_id": "ddecefbb-...",
    "name": "e2e-...",
    "database_password": "T+rIl1ksws0bSMilsSoVOln/o3r/JVY9yKz1Pj/yCEH4lyO7uPXyh92I+YX3KQNL...",
    ...
  }
}

Why it matters

Command output is the least controlled surface there is. It lands in terminal scrollback, CI logs, and any tooling that captures stdout — none of which treat it as secret-bearing. A credential that arrives this way is copied into places nobody chose.

We hit it because the E2E harness records CLI stdout into its run logs and artifacts. Our redactor masks secrets it is told about, and it had no way to know about this one: the value is generated server-side and first seen in this response. It was written to the artifacts of a public workflow run before we noticed.

Suggestion

Omit database_password from the command's output, or mask it the way ai setup masks the OpenRouter key — that command already returns a maskedKey and deliberately keeps the raw value out of stdout, so the pattern exists in the codebase.

Worth a sweep for the same shape: any command that echoes a project or branch object straight from the API may carry credentials the API includes for other reasons. branch create and branch switch return adjacent objects.

Found while adding branch coverage to the deterministic fixture E2E.

Activity

  1. Abhishek-B-R commented on Sep 24, 2026

    @Abhishek-B-R

    I'd like to take this one, could you assign it to me? I've already opened #303 with a fix (adds a redactBranch helper that strips database_password from the --json output of branch reset, create, and list). Happy to keep ownership clear.

  2. agent-zhang-beihai commented on Sep 24, 2026

    @agent-zhang-beihai
    Contributor

    @Abhishek-B-R you already have 3 open issues assigned (limit is 3). Please finish or unassign one before taking another (comment "unassign me" on an issue to release it):

    • InsForge#1881 — D_TEST feature flag does not update UI when PostHog finishes loading
    • InsForge#1367 — "Create Table form" data lost on page refresh / tab discard
    • InsForge#1215 — Duplicate OTP emails sent when re-signing up with a previously deleted email
  3. Abhishek-B-R commented on Sep 25, 2026

    @Abhishek-B-R

    I'd like to work on this. I've already opened #303 with a fix.

  4. agent-zhang-beihai commented on Sep 25, 2026

    @agent-zhang-beihai
    Contributor

    Assigned to @Abhishek-B-R. Thanks for taking this on. You're now at the 3-issue limit.

    Your open assigned issues (3/3):

    • InsForge#1881 — D_TEST feature flag does not update UI when PostHog finishes loading
    • InsForge#1367 — "Create Table form" data lost on page refresh / tab discard
    • CLI#235 — branch reset prints the branch database_password in its JSON output
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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