Pin Microsoft Teams attachment fetch DNS [AI]#87567
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed May 29, 2026, 1:46 AM ET / 05:46 UTC. Summary PR surface: Source +155, Tests +110. Total +265 across 12 files. Reproducibility: yes. at source level: current main validates Teams attachment DNS and then performs a separate no-dispatcher fetch, while the PR routes that path through the pinned SSRF guard. I did not run a live DNS-rebinding or Teams tenant reproduction. Review metrics: 1 noteworthy metric.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land the shared-guard fix after maintainer/security review accepts the fail-closed custom-fetch behavior and the PR has redacted real diagnostic proof or an explicit maintainer proof override for the GHSA path. Do we have a high-confidence way to reproduce the issue? Yes, at source level: current main validates Teams attachment DNS and then performs a separate no-dispatcher fetch, while the PR routes that path through the pinned SSRF guard. I did not run a live DNS-rebinding or Teams tenant reproduction. Is this the best way to solve the issue? Yes, source-wise this is the narrow maintainable direction because it reuses the shared SSRF guard instead of duplicating pinning in the Teams plugin. The merge still needs maintainer acceptance for the fail-closed custom-fetch behavior and real diagnostic proof or an explicit proof override. AGENTS.md: found and applied where relevant. Codex review notes: model gpt-5.5, reasoning high; reviewed against f5e1fe9755c3. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +155, Tests +110. Total +265 across 12 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
|
ClawSweeper PR egg: 🎁 locked until real behavior proof passes. Details
|
This comment was marked as spam.
This comment was marked as spam.
Diff notesFix verdict: SOLVES. The current PR fixes the accepted GHSA root cause for the affected Microsoft Teams attachment paths. The normal no-dispatcher Evidence:
Plain-language post descriptionA Microsoft Teams attachment link could appear safe when OpenClaw checked it, then point somewhere different when OpenClaw actually downloaded it. In a cloud deployment, that could let a malicious Teams attachment make the OpenClaw process contact private internal services, such as cloud metadata endpoints, that should not be reachable through an incoming message. The PR changes Teams attachment downloads to use OpenClaw's guarded fetch path, which checks the destination and pins the connection to the checked address before downloading. It also fails closed for custom fetch hooks that cannot receive the pinned connection, while preserving Teams redirect and Authorization behavior for explicitly allowed hosts. Change Impact Analysis
The fix is limited to Teams attachment fetching plus additive options in the shared fetch guard and Teams fetch helpers. It preserves existing config defaults, CLI behavior, wire formats, manifests, and persisted data. Normal Teams attachments should continue to work, while attachment URLs that resolve or redirect to private/internal destinations are blocked. Impact reasons:
Verification notes:
CaveatsResidual risks:
Automated review gate:
Gate blockers:
Backward Compatibility ReviewCompatibility verdict: PASS. The PR remains backward-compatible for API, CLI, config, and wire/schema contracts. It changes Teams attachment fetch internals, adds optional fetch-guard and Teams fetch-helper parameters, and preserves existing Teams media allowlist defaults; no required config changes, manifest changes, protocol changes, or persisted data shape changes are introduced. Blocking concerns:
Notes:
Verdict: Legitimate CVE |
# Conflicts: # extensions/msteams/src/attachments/shared.test.ts # extensions/msteams/src/attachments/shared.ts
|
Verification before merge: Behavior addressed: Microsoft Teams attachment downloads now pin the
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Verification before merge: Behavior addressed: Microsoft Teams attachment downloads now route through the shared SSRF guarded fetch path so the validated DNS result is pinned into the dispatcher used for the actual request. Real environment tested: Local OpenClaw checkout on macOS plus GitHub Actions PR CI for SHA a253548. Exact steps or command run after this patch:
Evidence after fix:
Observed result after fix: Tests cover dispatcher injection in the Teams guarded fetch path, private/internal DNS rejection, explicit fail-closed behavior for unsupported custom fetch hooks, Bot Framework guarded fetch behavior, and HTTPS-only Authorization retention for allowlisted redirects. What was not tested: Live Microsoft Teams tenant attachment delivery and a live authoritative DNS-rebinding setup. Maintainer landing request accepts the remaining proof gap for this PR. |
Route Microsoft Teams attachment downloads through the shared SSRF guarded fetch path so DNS validation is pinned into the dispatcher used for the actual request. Keep Teams auth fallback and allowlisted HTTPS Authorization redirect behavior while failing closed for custom fetch hooks that cannot accept dispatcher injection. Verification: - CI=1 OPENCLAW_VITEST_MAX_WORKERS=1 timeout 300 node scripts/run-vitest.mjs run extensions/msteams/src/attachments/shared.test.ts extensions/msteams/src/attachments/bot-framework.test.ts src/infra/net/fetch-guard.ssrf.test.ts - gh pr checks 87567 --repo openclaw/openclaw --watch=false PR: openclaw#87567
Route Microsoft Teams attachment downloads through the shared SSRF guarded fetch path so DNS validation is pinned into the dispatcher used for the actual request. Keep Teams auth fallback and allowlisted HTTPS Authorization redirect behavior while failing closed for custom fetch hooks that cannot accept dispatcher injection. Verification: - CI=1 OPENCLAW_VITEST_MAX_WORKERS=1 timeout 300 node scripts/run-vitest.mjs run extensions/msteams/src/attachments/shared.test.ts extensions/msteams/src/attachments/bot-framework.test.ts src/infra/net/fetch-guard.ssrf.test.ts - gh pr checks 87567 --repo openclaw/openclaw --watch=false PR: openclaw#87567
Route Microsoft Teams attachment downloads through the shared SSRF guarded fetch path so DNS validation is pinned into the dispatcher used for the actual request. Keep Teams auth fallback and allowlisted HTTPS Authorization redirect behavior while failing closed for custom fetch hooks that cannot accept dispatcher injection. Verification: - CI=1 OPENCLAW_VITEST_MAX_WORKERS=1 timeout 300 node scripts/run-vitest.mjs run extensions/msteams/src/attachments/shared.test.ts extensions/msteams/src/attachments/bot-framework.test.ts src/infra/net/fetch-guard.ssrf.test.ts - gh pr checks 87567 --repo openclaw/openclaw --watch=false PR: openclaw#87567
Summary
AI-assisted: Yes
Verification
CI=1 OPENCLAW_VITEST_MAX_WORKERS=1 timeout 300 node scripts/run-vitest.mjs run extensions/msteams/src/attachments/shared.test.ts extensions/msteams/src/attachments/bot-framework.test.ts extensions/msteams/src/attachments.test.tsnode scripts/run-oxlint.mjs extensions/msteams/src/attachments/shared.ts extensions/msteams/src/attachments/shared.test.ts extensions/msteams/src/attachments/bot-framework.ts extensions/msteams/src/attachments/bot-framework.test.ts extensions/msteams/src/attachments/download.ts extensions/msteams/src/attachments/remote-media.tsgit diff --checkReal behavior proof
Behavior addressed: Microsoft Teams attachment downloads now use guarded fetches that pin validated DNS results into the request dispatcher before connecting.
Real environment tested: Local OpenClaw worktree on Linux with Node 24.15.0.
Exact steps or command run after this patch: Focused Vitest command listed above against the Teams attachment downloader tests.
Evidence after fix: 3 test files passed, 89 tests passed.
Observed result after fix: Attachment fetch tests preserve auth fallback, redirect handling, and direct save behavior while asserting pinned dispatcher usage.
What was not tested: Live Microsoft Teams attachment download against a real tenant.