Skip to content

P1: Build secret consumer registry and rotation verifier #8722

Closed

Description

@Git-on-my-level

Problem

During the emergency rotation, secret stores could be correct while running Cloud Run revisions and GKE pods still held stale env vars. We had to manually identify consumers, sync K8s/Cloud Run secret wiring, restart/roll services, and verify no stale runtimes remained.

Scope

Add a machine-readable registry and read-only verifier for high-risk runtime secrets.

Proposed deliverables

  • A registry schema for secrets/env vars with fields such as:
    • secret/env var name
    • environment
    • consuming service/job/workflow
    • runtime type: Cloud Run, GKE, GitHub Actions, client build, etc.
    • refresh method: new revision, rollout restart, ExternalSecret sync, release rebuild, etc.
    • safe verification method
    • owner / docs link
  • Initial entries for OPENAI_API_KEY, Google OAuth/client secret vars, Google Maps vars, and other current high-risk backend/provider secrets.
  • A redacted verifier that reports presence/version/hash metadata and stale-runtime risk without printing secret values.
  • CI validation that referenced runtime env vars are present in the registry/contract.

Acceptance criteria

  • OPENAI_API_KEY has complete entries for backend, backend-sync, backend-integration, desktop-backend, backend-listen, pusher, llm-gateway, and any current consumers.
  • The verifier never prints secret values; tests use fake sentinel values to prove redaction.
  • The verifier can classify consumers that require restart/redeploy after rotation.
  • CI fails when charts/workflows/code add a new high-risk secret reference without registry/contract updates.
  • Docs include a rotation checklist with explicit read-only vs prod-write boundaries.

Related context


Safety / agent notes

  • Do not include raw secrets, tokens, provider keys, private keys, or user content in PRs, logs, fixtures, docs, or issue comments.
  • Public code should run without production credentials. Prefer fake fixtures, dry-run/read-only modes, and PASS / FAIL / SKIP_NO_CREDENTIALS / NOT_RUN outputs.
  • Production writes, key rotation/revocation, deploys, traffic shifts, and break-glass actions require explicit maintainer approval outside this issue.
  • If implementation changes setup, deploy commands, env vars, safety rules, service boundaries, or runtime contracts, update docs/AGENTS.md as appropriate.

Activity

  1. added
    backend
    p1
    security-review
    on Jul 1, 2026
  2. added a commit that references this issue on Jul 1, 2026
    e47241b
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

    backendp1security-reviewstability

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions