Skip to content

Credential encryption key stored as plaintext env var without rotation #267

Closed

Description

@vybe

CSO Audit Finding #3 — 2026-04-05

Severity: HIGH | Confidence: 8/10 | Status: VERIFIED
Category: Secrets Management (A02 — Cryptographic Failures)
Phase: P5 — Infrastructure Shadow Surface

Description

The AES-256-GCM encryption key used for all .credentials.enc files is passed as a plaintext environment variable (CREDENTIAL_ENCRYPTION_KEY) in docker-compose.yml. This key encrypts/decrypts credentials for ALL agents on the platform.

Issues:

  1. Visible in docker inspect output
  2. Visible in process listings (/proc/*/environ)
  3. No key rotation mechanism exists
  4. Single key for all agents — if compromised, all encrypted credentials are exposed

Exploit Scenario

Attacker with read access to any backend container process listing (e.g., via container escape or compromised monitoring agent) extracts CREDENTIAL_ENCRYPTION_KEY → decrypts all agent .credentials.enc backup files.

Remediation

Short-term:

  • Document key rotation procedure (generate new key, re-encrypt all .credentials.enc files)
  • Restrict container process environment visibility

Medium-term:

  • Migrate to Docker secrets (Swarm mode) or external secret manager (HashiCorp Vault, AWS Secrets Manager)
  • Consider per-agent encryption keys derived from a master key

Estimated effort: 1-2 days

References

  • CSO report: docs/security-reports/cso-2026-04-05.md
  • Prior finding: C-001 in docs/security-reports/security-analysis-2026-03-09.md (related — API exposure was fixed, but storage concern remains)

Activity

  1. added
    priority-p2
    security
    severity-high
    on Apr 5, 2026
  2. added
    status-in-progress
    on Apr 6, 2026
  3. removed
    status-in-progress
    on Apr 17, 2026
  4. added
    complexity-low
    theme-security
    on Jun 3, 2026
  5. added
    type-feature
    on Jun 3, 2026
  6. added
    status-incubating
    priority-p1
    status-ready
    and removed
    priority-p2
    status-incubating
    on Jun 14, 2026
  7. vybe commented on Jun 15, 2026

    @vybe
    ContributorAuthor

    /roadmap-plan prioritize (2026-06-15): bumped P2→P1 and promoted incubating→ready. Rationale: VERIFIED HIGH CSO finding (8/10) — a single AES-256-GCM master key encrypts all agents' .credentials.enc, passed as a plaintext env var (visible in docker inspect / /proc/*/environ) with no rotation and no per-agent isolation. Flagged as under-ranked in the 2026-06-09 roadmap review; elevating to feed the Security & Trust 'Now' lane. Pairs with #1089 (credential hot-reload rotation mechanism).

  8. removed
    status-ready
    on Jun 30, 2026
  9. dolho commented on Jun 30, 2026

    @dolho
    Contributor

    /claim

  10. added
    status-in-progress
    on Jun 30, 2026
  11. github-actions commented on Jun 30, 2026

    @github-actions

    Claimed by @dolho. Label status-in-progress added.

    Next steps:

    1. Create branch: feature/267-<short-slug>
    2. Implement the feature
    3. Open a PR with Fixes #267
  12. added
    status-in-dev
    and removed
    status-in-progress
    on Jul 2, 2026
  13. removed
    status-in-dev
    on Aug 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

complexity-lowpriority-p1securityseverity-hightheme-securitytype-feature

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions