Skip to content

bug: Vault secrets are persisted in plaintext in data files and workflow run logs #429

@stack72

Description

@stack72

Summary

Vault secrets resolved via vault.get() CEL expressions are persisted in plaintext in two locations:

  1. Data files — the command field in .swamp/data/ contains the resolved secret value (e.g., echo super-secret-value-12345 instead of the CEL template)
  2. Workflow run logs — the resolved secret appears in plaintext in .swamp/workflow-runs/<workflow-id>/workflow-run-<run-id>.log

Reproduction

Data file leakage

  1. Create a vault and store a secret:
    swamp vault create local_encryption test-vault
    swamp vault put test-vault SECRET_VALUE=super-secret-value-12345
    
  2. Install a model that references the secret via CEL:
    # vault-echo model
    globalArguments:
      run: "echo ${{ vault.get('test-vault', 'SECRET_VALUE') }}"
  3. Execute the model:
    swamp model method run vault-echo execute
    
  4. Inspect persisted data:
    swamp data get vault-echo result --json
    
  5. The content.command field contains echo super-secret-value-12345 — the raw secret.

Workflow log leakage

  1. Same vault setup as above
  2. Create a workflow that references the vault-echo model
  3. Run the workflow:
    swamp workflow run vault-workflow
    
  4. The resolved secret appears in plaintext in .swamp/workflow-runs/<id>/workflow-run-<id>.log

Expected behavior

  • The command field in persisted data should contain the CEL template (echo ${{ vault.get('test-vault', 'SECRET_VALUE') }}), not the resolved value
  • Workflow run logs should redact or mask resolved vault secrets

Impact

Any user or process with read access to the .swamp/ directory can extract vault secrets in plaintext, defeating the purpose of vault encryption.

References

Metadata

Metadata

Assignees

Labels

betaIssues required to close out before public betabugSomething isn't workingready for workPlan has been posted and agreed on

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions