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] Any Slack user can approve production changes; approver identity is neither checked nor audited #117
The Slack approve_action callback (api/server.py, /slack/action) verifies that the request came from Slack, but not who clicked. Anyone who can see the message in the channel (guests, contractors, any workspace member if the channel is public) can approve a production change: a k8s apply or rollback, an nginx config write, disk cleanup, or security updates.
The approver's identity (payload.user.id / username) is also not recorded in the audit trail, so after an incident there's no record of who authorised a change.
Expected
Only allowlisted Slack users or user groups can approve; others get an ephemeral "not authorised" reply and nothing runs.
The audit entry records approver ID, name, time and the approval reference.
Optional: the person who triggered an action can't approve their own action, and some actions need two approvers.
Suggested fix
SLACK_APPROVER_IDS (user IDs) and/or SLACK_APPROVER_GROUP (resolved with usergroups.users.list), per org.
Check payload["user"]["id"] before background_tasks.add_task(...). Fail closed when approvers are configured and the user isn't on the list.
Write approver identity into incident_store.save_audit and the Slack confirmation ("Approved by @alice").
Tests: allowlisted user executes; another user gets 403/ephemeral and nothing runs; audit contains the approver.
Activity
Merge pull request #148 from open-devops-agent/fix/slack-approvers-117