Skip to content

[2026.9.36] fix(msteams): backport restrictive unresolved allowlists to extended stable - #187286

Merged
RomneyDa merged 6 commits into
extended-stable/2026.9.33from
openclaw/ember-shrimp
Oct 29, 2026
Merged

RomneyDa merged 6 commits into
extended-stable/2026.9.33from
openclaw/ember-shrimp

Conversation

@RomneyDa

@RomneyDa RomneyDa commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

Original attribution verified

The published tip directly descends from original authored candidate fcce003793a63deef3e2904e5302bb8e8812c0e0; original author identities, upstream references and RomneyDa coauthor trailers remain intact in PR history. Full ancestry verification supersedes the earlier tip-only attribution warning. Published tree is unchanged; no merge, history rewrite or force-push was necessary.

What Problem This Solves

Backports the focused Microsoft Teams unresolved-allowlist fix to extended-stable/2026.9.33. Configured names that cannot be resolved must remain restrictive rather than collapse to an empty/open runtime allowlist.

User Impact

  • Unresolved sender, team, and channel allowlists remain fail-closed.
  • Explicit stable identities and wildcard behavior retain their existing semantics.
  • The deny sentinel remains module-private and cannot collide with an operator-defined access group.
  • Existing extended-stable lifecycle and authorization tests are retained; no dependency, version, lockfile, or release-validation changes are included.

Why This Change Was Made

This is a two-source backport, adapted to the extended-stable owners and test harnesses:

Original authors, messages, source SHAs, and requested commit coauthor trailers are preserved. Aggregate policy.ts changes are explicitly excluded because they are not established by these two source commits. The scope/provenance audit does not establish release inclusion, and this PR makes no such claim.

Base verified from the remote: e93b50ad2400871616c2e6588d57488dba94ecad.

Evidence

  • Focused resolver, lifecycle, authorization, policy, participant, read-policy, and account-policy suites: 134 tests passed across 7 files.
  • Repeated at the final head with --maxWorkers=1: 134/134 passed, 8.09 seconds.
  • Negative control restoring pre-fix projection semantics: all four actual-handler admission regressions failed for the intended reason (unauthorized messages reached conversation-store admission); source bytes were restored before final validation.
  • git diff --check and formatting checks pass for all five changed files.

Draft-only gates still outstanding

  • Independent full-context autoreview was prepared but could not execute because the supported codex executable is unavailable. No alternative reviewer was substituted and no clean review verdict is claimed.
  • The scoped lint wrapper is blocked before Teams lint by copied local baseline dependency/type mismatches in unchanged core code (nonBlockingRead declarations and missing chokidar). Tracked dependency and lock files were not changed to work around this.
  • Exact-head hosted checks remain pending; no live Teams proof was run.

Keep this PR in draft until independent review and required hosted checks are complete. Not ready for review or merge.

eleqtrizit and others added 3 commits October 29, 2026 04:14
…psing to open (#184989)

* fix(msteams): keep unresolved allowlists restrictive instead of collapsing to open

* fix(msteams): use a non-access-group deny marker for unresolved sender allowlists

* test(msteams): drop marker-representation test covered by handler regression

* test(msteams): drop projection-plus-route cases duplicated by handler admission table

(cherry picked from commit 9c7f90a)
Co-authored-by: RomneyDa <[email protected]>
(cherry picked from commit 25265e4b23843946108fe75d6823cd4e3e64cfd7)
The Microsoft Teams fail-closed allowlist sentinel now remains module-private while preserving its exact restrictive projection and lifecycle coverage.

(cherry picked from commit 59b1ddd)
Co-authored-by: RomneyDa <[email protected]>
(cherry picked from commit 52a8609397572a37ae78544c11118704f8711f12)
…stable

OpenClaw-Publication: 0457935b-4ff7-4cd5-bf04-de5a5e46e7f3
@clawsweeper

clawsweeper Bot commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation channel: discord Channel integration: discord channel: googlechat Channel integration: googlechat channel: imessage Channel integration: imessage channel: line Channel integration: line channel: matrix Channel integration: matrix channel: mattermost Channel integration: mattermost channel: msteams Channel integration: msteams channel: nextcloud-talk Channel integration: nextcloud-talk channel: nostr Channel integration: nostr channel: signal Channel integration: signal channel: slack Channel integration: slack channel: telegram Channel integration: telegram channel: tlon Channel integration: tlon channel: voice-call Channel integration: voice-call channel: whatsapp-web Channel integration: whatsapp-web channel: zalo Channel integration: zalo channel: zalouser Channel integration: zalouser app: android App: android app: ios App: ios app: macos App: macos app: web-ui App: web-ui gateway Gateway runtime extensions: copilot-proxy Extension: copilot-proxy extensions: diagnostics-otel Extension: diagnostics-otel extensions: llm-task Extension: llm-task labels Oct 29, 2026
@RomneyDa

Copy link
Copy Markdown
Member Author

@clawsweeper review

@clawsweeper

clawsweeper Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper

clawsweeper Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge.

What this changes

This PR backports the Teams fix that keeps unresolved group-sender, team, and channel allowlists restrictive.

Example: Teams uses dmPolicy="open", allowFrom=["*"], groupPolicy="allowlist", and groupAllowFrom=["Bob Builder"], but Bob cannot be resolved.

  • Before: The group list becomes empty and falls back to the unrestricted DM list.
  • After: The runtime group list matches nobody, so an unlisted group sender is rejected.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) The focused patch has no remaining concrete finding, but candidate authorization and upgrade proof do not yet satisfy the merge gate.
Proof confidence 🧂 unranked krab (1/6) Real behavior proof is necessary before merge. See Before merge.
Patch quality 🦐 gold shrimp (3/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: A Teams bot can answer outside an explicitly configured group-sender, team, or channel allowlist when its names cannot be resolved.
Reason: The maintainer-authored backport restores documented restrictions using the already merged upstream design.

Merge readiness

⛔ Blocked before merge - 3 items remain

Keep this maintainer-authored security backport open: both earlier findings are fixed, and source review found no new concrete defect.

Priority: P1
Reviewed head: 9cf919ceeb4ba0cc6a09b2b9b9578f20027aa0f2

Before merge

  • Add real behavior proof - Authority-chain proof required: the candidate supplies resolver/lifecycle tests and actual-handler negative controls, while the linked Gateway traces exercise upstream main; provide redacted extended-stable Gateway output showing unresolved restrictions reject unlisted principals before dispatch or downstream Graph access, with allowed DM and stable-ID controls, and revocation before delayed delivery. After adding proof, update the PR body, then request a new review with @clawsweeper re-review. The PR author or someone with repository write access can request it.
  • Resolve merge risk - The PR author must establish that queued or replayed activities cannot retain superseded sender or route authority through to dispatch on the extended-stable candidate.
  • Add data-model compatibility proof - The review found that existing stored data may not work after upgrade. Show that existing data still loads and works with this change.

Findings

None.

Tests

  • Missing end-to-end proof: Missing extended-stable Gateway evidence for denied unresolved sender/team/channel cases with allowed DM and stable-ID controls, delayed-delivery revocation, and an upgrade preserving existing settings.
Agent review details

How this fits together

The Teams plugin projects operator configuration into runtime authorization inputs; inbound and replayed activities pass through route and sender gates before conversation admission and agent dispatch.

flowchart TD
  A[Operator configuration] --> B[Teams startup projection]
  B --> C[Runtime allowlists]
  D[Authenticated Teams activity] --> E[Durable ingress and replay]
  E --> F[Route and sender authorization]
  C --> F
  F --> G[Conversation admission and agent dispatch]
Loading

Technical review

Best possible solution:

Keep the repair in the Teams projection owner, preserving explicit restrictions without changing shared empty-list semantics or stored settings.

Do we have a high-confidence way to reproduce the issue?

The base projection drops unresolved names into empty maps or lists that existing gates interpret as unconfigured or eligible for DM fallback; upstream Gateway traces and the reported backport negative controls support that source path, without a review-side execution.

Is this the best way to solve the issue?

The repair uses the existing plugin owner and preserves the shared gates' legitimate empty-list behavior; stable IDs, wildcards, access groups, and stored configuration remain structurally unchanged.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against e125921a28eb.

Merge-risk options

Maintainer options:

  1. Verify current authority on delayed delivery (recommended)
    The PR author should exercise a queued or replayed Teams activity after its sender or route permission is revoked and show rejection before dispatch or provider access.

Provenance checked

  • Stable-only team and channel projection keeps the original intent (fbd330b: Enforce configured conversation policies while preventing mutable names from becoming active authorization identities.)
  • Group conversation IDs and DM fallback preparation keeps the original intent (994ca7d: Preserve stable Teams group and channel conversation identities and resolved fallback senders without granting personal-DM access.)
  • Restrictive unresolved projection and private sentinel keeps the original intent (9c7f90a: Keep unresolved configured restrictions nonempty and matching nobody; the subsequent sentinel change removes a test-only export.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

PR surface

Source +78, Tests +222. Total +300 across 5 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 2 86 8 +78
Tests 3 224 2 +222
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 5 310 10 +300

Review metrics

Metric Value Why it matters
Production versus test changes Production +86/-8 lines; tests +224/-2 lines Production growth preserves configured restrictions and removes redundant placeholders; tests cover distinct projection, startup, and handler-admission boundaries.

Labels

Label changes:

  • add rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🦐 gold shrimp.
  • remove rating: 🦪 silver shellfish: Current PR rating is rating: 🧂 unranked krab, so this older rating label is no longer current.

Label justifications:

  • P1: The extended-stable defect can admit group senders or conversations outside an operator's configured restrictions.
  • merge-risk: 🚨 compatibility: The accepted tightening stops names-only groupAllowFrom configurations from falling back to the DM allowlist.
  • merge-risk: 🚨 security-boundary: The patch changes which Teams principals reach agent dispatch, and candidate final-effect authorization evidence remains incomplete.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🦐 gold shrimp.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Add extended-stable Gateway traces for the allowed and forbidden final-effect scenarios, including policy revocation before queued or replayed delivery.
  • Show an upgrade from the published extended-stable release with existing Teams settings and state intact; redact credentials, IPs, phone numbers, and non-public endpoints.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (1 earlier review cycle)
  • reviewed 2026-10-29T04:39:41.392Z sha f1f82a8 :: needs real behavior proof before merge. :: [P2] Remove the import of the deleted sentinel export | [P2] Import MSTeamsConfig from the existing plugin-root barrel

Reviewed October 29, 2026, 2:34 AM ET / 06:34 UTC (Revision 2).

@RomneyDa

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: msteams Channel integration: msteams merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P1 High-priority user-facing bug, regression, or broken workflow. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: M status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants