You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
security: spore-bot app-level secrets are plaintext Lambda environment variables (the issue dashboard-api already fixed) #1591
From the pre-1.0 security audit (spore-host/spore-host#649, 2026-11-11), audit id secrets-8. Verified: confirmed, severity low (reviewer said low).
Where:deployment/cloudformation/spore-bot.yaml:354 (at origin/main on 2026-11-11)
Evidence
spore-bot.yaml:346-364 Environment.Variables: SLACK_SIGNING_SECRET, BOT_OAUTH_SECRET, SPORE_SLACK_CLIENT_SECRET, TEAMS_APP_SECRET, TWILIO_AUTH_TOKEN. spore-host infra/tofu/spore-bot/main.tf:13-14 and README:40-42 say secrets live in function env set by aws lambda update-function-configuration. Compare spawn lambda/dashboard-api/slack_secrets.go:3-8: "used to live as PLAINTEXT Lambda environment variables (readable by anyone with lambda:GetFunctionConfig ...). They now live in a single Secrets Manager secret".
Scenario
Any infra-account principal with lambda:GetFunctionConfiguration (ReadOnlyAccess / ViewOnly-type roles, CI or deploy roles) can read the Slack signing and client secrets, the OAuth-state HMAC key (BOT_OAUTH_SECRET, which allows forged OAuth state), the Teams app secret and the Twilio auth token. They also end up in CloudFormation and change-set history. Not externally exploitable, but it widens who holds the crown-jewel secrets.
Verifier
spawn deployment/cloudformation/spore-bot.yaml:346-364 sets SLACK_SIGNING_SECRET, BOT_OAUTH_SECRET, SPORE_SLACK_CLIENT_SECRET, TEAMS_APP_SECRET and TWILIO_AUTH_TOKEN as plaintext Lambda env vars. The spore-host infra/tofu/spore-bot README (lines 39-60) documents that secrets live in function env. Exposure is limited to infra-account principals with lambda:GetFunctionConfiguration, so this is hardening.
Suggested fix
Move them into one Secrets Manager secret (or KMS-sealed values under alias/spore-bot-secrets), using the same loader pattern as slack_secrets.go, then delete the env vars.
Deployed-state check
Run aws lambda get-function-configuration --function-name spore-bot in 966362334030 and list only the key names present under Environment.Variables. Also list which roles hold lambda:GetFunctionConfiguration.
Activity
Bot secrets: never store a workspace credential unsealed by default; …
Bot secrets: never store a workspace credential unsealed by default; …
Bot secrets: never store a workspace credential unsealed by default; …