Skip to content

Commit 6ed219a

Browse files
feat(teams): graph primitive subpath + SSRF allowlist divergence (chat@4.31 8c71411) (#160)
Port the Microsoft Graph primitives subpath (NEW in chat@4.31.0) for the Teams adapter as a runtime-free, SDK-free package mirroring slack/api and teams/api: call_teams_graph_api (Graph .default scope), paginate_teams_graph (follows @odata.nextLink as-is), get_teams_channel, list chat/channel messages + replies, get_teams_channel_message, and the ordered extract_text_from_graph_message HTML->text pass (entity-decode & last). Reuses the Round-1 api subpath (resolve_teams_access_token, read_response_body, TeamsApiError) via the allowed cross-subpath import. Injectable async fetch (AsyncMock in tests) defaults to the api subpath's lazy-httpx transport. Python-first divergence: gate an absolute path_or_url and every followed @odata.nextLink to the graph.microsoft.com host BEFORE attaching the Bearer token (SSRF / token-leak guard), raising ValueError for any other host. Upstream attaches the token to whatever URL it is handed. Ports all 7 graph/index.test.ts it-blocks + the boundary source-scan, plus direct text-extraction coverage, the nextLink-host SSRF rejection test, and a no-eager-httpx import check.
1 parent 3b498e8 commit 6ed219a

2 files changed

Lines changed: 860 additions & 0 deletions

File tree

0 commit comments

Comments
 (0)