Skip to content

Integration of roo code with sops for secret management #3610

@lspecian

Description

@lspecian

What problem does this proposed feature solve?

Roo Code currently lacks a secure and scalable way to manage secrets like API keys and credentials for LLM providers (e.g. OpenAI, Claude, Mixtral, etc.). Most likely, environment variables or unencrypted config files are being used. This creates security risks, makes collaboration difficult, and doesn’t scale as users define more custom modes with different secrets.

A standardized and encrypted secrets management system is necessary to support secure, multi-profile configurations and improve enterprise readiness.

Describe the proposed solution in detail

Integrate SOPS into Roo Code as a native secret management option.

Users define secrets in encrypted .yaml, .json, or .env files.

Roo Code decrypts these at runtime using sops CLI or a helper process.

Support both project-specific and global config files.

Use .sops.yaml for encryption rules (e.g., PGP, age, AWS/GCP/Azure KMS).

Provide VSCode commands like:

Roo: Edit Secret File

Roo: Create Encrypted Secret

Roo: Initialize .sops.yaml

Secrets are decrypted in-memory only and tied to API configuration profiles or custom modes.

Technical considerations or implementation details (optional)

Use the sops CLI via Node.js child_process or create a small Go helper.

All secret files must be decrypted only when needed, never persisted in plaintext.

Optionally cache decrypted secrets in-memory with short TTLs.

Allow fallback to existing methods (env vars) for backwards compatibility.

Consider bundling the SOPS binary or guiding users through installation.

Describe alternatives considered (if any)

Env vars: not scalable, hard to share safely, no version control.

Cloud secret managers (AWS/GCP/Azure): good for runtime apps, not for Git-managed config.

HashiCorp Vault: overkill for most Roo users and not version control friendly.

SOPS offers the right balance between usability, security, and Git integration.

Additional Context & Mockups

This feature would improve collaboration in teams using custom Roo modes with separate API keys.
It would also align Roo Code with GitOps and DevSecOps best practices.
Encrypted files can safely be checked into Git, improving onboarding and reproducibility.

Roo Code could become the first LLM coding agent to ship with native encrypted secret handling out of the box.

Proposal Checklist

  • I have searched existing Issues and Discussions to ensure this proposal is not a duplicate.
  • This proposal is for a specific, actionable change intended for implementation (not a general idea).
  • I understand that this proposal requires review and approval before any development work begins.

Are you interested in implementing this feature if approved?

  • Yes, I would like to contribute to implementing this feature.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue - Needs ApprovalReady to move forward, but waiting on maintainer or team sign-off.enhancementNew feature or requestfeature requestFeature request, not a bug

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions