-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Feature: Better secret management for agents
Problem
Many agent repositories store secrets insecurely (e.g., plaintext .env files). This makes secrets easy to leak via commits, logs, malicious dependencies, or other processes. Safeclaw should provide safer, opinionated defaults and tooling to reduce this risk.
Proposed Direction
Introduce a unified secret management layer in safeclaw that replaces direct .env usage and reduces plaintext exposure. Safe and opinionated defaults for security is preferred.
Key ideas:
- Provide a
safeclaw secretsinterface (CLI + skill API) so agents retrieve secrets via safeclaw instead of reading.envdirectly. - Support secure backends such as OS keychain, encrypted local files, or CI-provided secrets (pluggable provider model).
- Add tooling to detect insecure secret practices (e.g.,
.env, hardcoded tokens) and guide developers toward safer alternatives. - Allow safeclaw to inject secrets into subprocesses in a scoped way (instead of exporting globally), and redact them from logs.
- When running in a VM sandbox, ensure secrets are brokered by safeclaw and not persisted to repo or disk unnecessarily.
This does not need to be a fully-fledged secret manager initially. The goal is to provide safer defaults, reduce common leaks, and create a clear abstraction that can evolve over time.
Acceptance Criteria (Initial Scope)
- Provide a minimal
safeclaw secrets get <name>interface with at least one secure backend (keychain, encrypted file, or env passthrough). - Add a scan or warning for
.envusage and other obvious insecure patterns. - Allow safeclaw to run commands with scoped secret injection instead of requiring global environment variables.
- Ensure secrets retrieved via safeclaw are not printed in logs by default.
Implementation Notes
Suggested starting points (flexible):
- Define a provider interface for secret backends.
- Implement one simple secure backend first (e.g., OS keychain or encrypted file).
- Add detection/linting for unsafe patterns like
.env. - Integrate with safeclaw run / sidecar / VM execution paths.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels