Skip to content

[BUG] Slack Reject is recorded under the wrong org/incident and claims an escalation that never happens #192

Backlog

Description

@OkiriGabriel

Problem

In api/server.py /slack/action, the Reject button:

elif action_id == "reject_action":
    org_id = os.getenv("ORG_ID", "default")
    _record_slack_decision(org_id, "PENDING", "rejected", actor_id, actor_name, None)
    return JSONResponse({"text": f"❌ Rejected by <@{actor_id}>. Incident escalated to on-call."})
  • The rejection is recorded under the server's org with incident PENDING, not under the org and incident the button belongs to. In a multi-tenant deployment, rejections land in the wrong tenant's logs and can't be tied back to the incident.
  • The approver allowlist (SLACK_APPROVER_IDS) isn't checked, so anyone in the channel can reject.
  • The reply says "Incident escalated to on-call", but no escalation is triggered.

Proposed fix

  • Give reject buttons the same JSON value as approve buttons (org_id, incident_id, command) and parse it the same way. Old buttons get a 400.
  • Apply the approver allowlist to rejections too.
  • Call escalation_service.escalate(...) with reason approval_rejected, or change the message so it doesn't claim an escalation.
  • Tests: a rejection is stored under the right org and incident; a non-approver gets the "not an approver" reply; escalation is called.

Files

api/server.py (slack_action), tools/notify.py (button payloads), tests/test_slack_approvers.py

Activity

  1. added
    bug
    security
    on Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugsecurity

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions