security: harden Slack approval handling

This commit is contained in:
Rohit P
2026-07-24 22:33:13 -07:00
parent 56b3c62864
commit 7656952692
21 changed files with 931 additions and 33 deletions
+2
View File
@@ -33,6 +33,7 @@ def _install_form(team_id: str) -> dict:
"team_id": team_id,
"access_token": f"xoxb-{team_id}",
"bot_user_id": "B1",
"slack_user_id": f"U_{team_id}",
"account": f"Workspace {team_id}",
"team_domain": f"dom-{team_id.lower()}",
"connection_id": f"conn_{team_id}",
@@ -71,6 +72,7 @@ def test_managed_callback_installs_and_hot_reloads(client, monkeypatch):
if c["name"] == "slack"
][0]
assert [w["domain"] for w in slack["workspaces"]] == ["dom-t1"]
assert slack["workspaces"][0]["approval_owner_ids"] == ["U_T1"]
assert client.manager.secrets.get("slack:default")["mode"] == "relay"
assert refreshes # new workspace's token loads without an app restart