-
Notifications
You must be signed in to change notification settings - Fork 13
Closed
Labels
betaIssues required to close out before public betaIssues required to close out before public betabugSomething isn't workingSomething isn't workingready for workPlan has been posted and agreed onPlan has been posted and agreed on
Description
Summary
Vault secrets resolved via vault.get() CEL expressions are persisted in plaintext in two locations:
- Data files — the
commandfield in.swamp/data/contains the resolved secret value (e.g.,echo super-secret-value-12345instead of the CEL template) - Workflow run logs — the resolved secret appears in plaintext in
.swamp/workflow-runs/<workflow-id>/workflow-run-<run-id>.log
Reproduction
Data file leakage
- 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 - Install a model that references the secret via CEL:
# vault-echo model globalArguments: run: "echo ${{ vault.get('test-vault', 'SECRET_VALUE') }}"
- Execute the model:
swamp model method run vault-echo execute - Inspect persisted data:
swamp data get vault-echo result --json - The
content.commandfield containsecho super-secret-value-12345— the raw secret.
Workflow log leakage
- Same vault setup as above
- Create a workflow that references the
vault-echomodel - Run the workflow:
swamp workflow run vault-workflow - The resolved secret appears in plaintext in
.swamp/workflow-runs/<id>/workflow-run-<id>.log
Expected behavior
- The
commandfield 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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
betaIssues required to close out before public betaIssues required to close out before public betabugSomething isn't workingSomething isn't workingready for workPlan has been posted and agreed onPlan has been posted and agreed on