Skip to main content

Security Overview

secretctl is designed with security as the foundational principle. This guide explains the security architecture, threat model, and the measures taken to protect your secrets.

Core Security Principles

1. Standard Libraries Only

secretctl uses only Go standard library and golang.org/x/crypto for cryptographic operations:

  • No custom cryptography - All encryption uses battle-tested implementations
  • Minimal dependencies - Reduces supply chain attack surface
  • Auditable codebase - Easier security reviews

2. AI-Safe Access for AI Integration

The cornerstone of secretctl's AI security model:

AI agents NEVER receive plaintext secrets.

Access MethodPlaintext AccessUse Case
CLIYesHuman operators
Desktop AppYesHuman operators
MCP ServerNoAI agents

This aligns with 1Password's "Access Without Exposure" philosophy.

3. Local-First Architecture

Your secrets never leave your machine:

  • No cloud dependency - Works completely offline
  • No account required - No external authentication
  • No network exposure - MCP uses stdio transport (Phase 0-2)
  • Full data ownership - You control your vault files

4. Encryption at Rest

All secrets are encrypted using industry-standard algorithms:

  • AES-256-GCM - Authenticated encryption for secrets
  • Argon2id - Memory-hard key derivation function
  • OWASP parameters - Following 2025 best practices

Security Features Summary

Encryption

FeatureImplementation
Symmetric encryptionAES-256-GCM
Key derivationArgon2id (64MB, 3 iterations, 4 threads)
Nonce96-bit random per encryption
Salt128-bit per vault

Access Control

FeatureDescription
Master passwordRequired to decrypt vault
File permissions0600 for sensitive files
MCP policyConfigurable allowed/denied keys
Output sanitizationAutomatic secret redaction in command output

Audit & Compliance

FeatureDescription
Audit loggingAll operations recorded
HMAC chainTamper-evident log integrity
Export optionsJSON, CSV for compliance
Verificationsecretctl audit verify command

Threat Model

What secretctl Protects

  • Confidentiality of encrypted secrets at rest
  • Integrity of vault data and audit logs
  • Access control for MCP operations (no plaintext to AI)
  • Audit trail of all secret access

Out of Scope (Industry Standard Exclusions)

Like Vault, Infisical, and 1Password, secretctl excludes:

  • Root-level compromise - If attacker has root, game over
  • Memory dump attacks - Go runtime limitations (see below)
  • Weak master passwords - User responsibility
  • Unlimited storage access - Physical access assumed trusted
Memory Protection Limitations

Go's garbage collector manages memory, making guaranteed zeroing difficult. This is an industry-standard exclusion, shared by Vault and Infisical. secretctl minimizes the time secrets exist in memory.

Attack Levels

LevelAttackerCapabilitiesProtected?
L1Network observerNetwork interceptionYes (localhost only)
L2Malicious appFile system readYes (encryption)
L3Root attackerFull system accessNo (excluded)

Comparison with Alternatives

ProductMCP SupportAI Plaintext AccessLocal-FirstOSS
HashiCorp VaultYes (experimental)Yes (read_secret)No (server required)BSL
InfisicalYesYes (get-secret)No (server required)Yes
1PasswordNo (refuses MCP)No (policy)No (subscription)No
secretctlYesNo (AI-Safe Access)YesYes

Unique Position: secretctl is the only solution with MCP support + no plaintext to AI + fully local + open source.

1Password's Security Principles

secretctl follows the same principles that guide 1Password's approach to AI:

Principle1Passwordsecretctl
Secrets stay secretZero-knowledge encryptionAES-256-GCM + Argon2id
Deterministic authorizationLLMs don't make auth decisionsPolicy engine controls access
No raw credentials to LLMsDon't include secrets in promptsAI-Safe Access prohibits plaintext
AuditabilityRecord access and actionsFull audit logging
TransparencyDisclose what AI seesOnly masked values returned
Least privilegeMinimum necessary accessPolicy-based key restrictions
Security built-inNot bolted onCLI/MCP/UI share consistent design

Why AI Agents Shouldn't See Secrets

1Password identified four key reasons to avoid giving secrets to AI:

RiskDescriptionsecretctl Mitigation
Non-determinismAI behavior is unpredictablePolicy engine for deterministic control
Prompt injectionMalicious prompts could extract secretsSecrets never reach AI context
IrrevocabilityCan't un-see a secret in LLM contextNothing to revoke if never exposed
Cache/sharingAI might store or share downstreamNo secret value exists to share

Security Reporting

Found a security issue? Please report it responsibly:

  1. Do not open a public GitHub issue
  2. Email security concerns to the maintainer
  3. Allow reasonable time for a fix before disclosure

We take security seriously and appreciate responsible disclosure.