← Back to list
4/7/2026, 11:28:58 PM
01Issue
FeatureOpenExtensions
@swamp/digitalocean/space-key stores secret in plaintext - should mark as sensitive
Opened by stack72 · 4/7/2026· GitHub #29
Description
The @swamp/digitalocean/space-key extension model does not mark the secret field as sensitive in its ResourceSchema. When a Spaces key is created via the DigitalOcean API, the response includes both access_key and secret. The secret field is not declared in the schema and passes through via .passthrough(), resulting in it being stored in plaintext in the .swamp/ data directory.
Steps to reproduce
- Create a space-key model:
swamp model create @swamp/digitalocean/space-key my-key --global-arg name=test-key - Run the create method:
swamp model method run my-key create - Inspect the persisted data in
.swamp/data/— thesecretfield is stored in plaintext
Expected behavior
The secret field should be:
- Explicitly declared in the
ResourceSchema(not relying on.passthrough()) - Marked with
z.meta({ sensitive: true })so it is auto-vaulted - Replaced with a
${{ vault.get(...) }}reference in the persisted data
Suggested fix
In space_key.ts, update the ResourceSchema to explicitly include the secret field with sensitive metadata:
const ResourceSchema = z.object({
name: z.string().optional(),
grants: z.array(z.object({
bucket: z.string().optional(),
permission: z.string().optional(),
})).optional(),
access_key: z.string().optional(),
secret: z.string().meta({ sensitive: true }).optional(),
created_at: z.string().optional(),
}).passthrough();Environment
- swamp version: 20260401.170720.0-sha.ac267ac9
- Extension: @swamp/digitalocean v2026.03.31.1
Automoved by swampadmin from GitHub issue #29
02Bog Flow
Open
No activity in this phase yet.
03Sludge Pulse
Sign in to post a ripple.