Skip to content

fix: keep LINE group allowlists scoped [AI]#106056

Merged
steipete merged 7 commits into
openclaw:mainfrom
pgondhi987:fix/fix-861
Jul 13, 2026
Merged

fix: keep LINE group allowlists scoped [AI]#106056
steipete merged 7 commits into
openclaw:mainfrom
pgondhi987:fix/fix-861

Conversation

@pgondhi987

@pgondhi987 pgondhi987 commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes an issue where LINE operators who leave DMs open but configure group access as an allowlist could have group messages admitted without any group-specific allowlist entries.

Why This Change Was Made

LINE group access now uses only the group-level allowlist sources when group policy is set to allowlist. The DM allowlist remains scoped to DMs, while group-specific overrides and account-level group allowlists continue to work through the existing channel ingress path.

User Impact

Operators can keep DM access open without that DM setting broadening access in LINE groups. Existing group allowlist entries still admit the intended senders, and empty group allowlists now deny group senders consistently.

Compatibility note: LINE group configurations that previously relied on top-level DM allowFrom entries should set groupAllowFrom or per-group allowFrom for group senders.

Evidence

  • AI-assisted.
  • AWS Crabbox cbx_93178783bc9f / run_8181ae25ce5f: corepack pnpm test extensions/line/src/bot-handlers.test.ts -- --reporter=verbose
  • Result: extensions/line/src/bot-handlers.test.ts passed, 29 tests.

@openclaw-barnacle openclaw-barnacle Bot added channel: line Channel integration: line size: XS maintainer Maintainer-authored PR labels Jul 13, 2026
@pgondhi987

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P1 High-priority user-facing bug, regression, or broken workflow. 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. labels Jul 13, 2026
@clawsweeper

clawsweeper Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed July 13, 2026, 3:36 AM ET / 07:36 UTC.

Summary
The PR removes the top-level LINE DM allowFrom fallback from group sender authorization and adds focused documentation and regression coverage.

PR surface: Source -4, Tests +22, Docs +1. Total +19 across 3 files.

Reproducibility: yes. at source level: configure LINE with dmPolicy: "open", allowFrom: ["*"], groupPolicy: "allowlist", and no group-specific entries; current main selects the wildcard DM list for group authorization. A live LINE reproduction was not supplied.

Review metrics: 1 noteworthy metric.

  • Authorization fallback: 1 removed. Removing the LINE allowFrom fallback changes a shipped group-access path and can require operator configuration changes during upgrade.

Merge readiness
Overall: 🦪 silver shellfish
Proof: 🦪 silver shellfish
Patch quality: 🦐 gold shrimp
Result: blocked until real behavior proof from a real setup is added.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • [P1] Add maintainer-approved upgrade diagnostics or migration guidance for existing allowFrom-dependent LINE group configurations.
  • [P1] Provide redacted after-fix proof from a real LINE group for both denied wildcard-DM and allowed explicit-group cases.

Proof guidance:

  • [P1] Needs real behavior proof before merge: The evidence is a focused mocked test run only; before merge, provide a redacted real LINE group transcript, recording, or runtime logs showing that wildcard-open DMs do not admit group senders while explicit group entries still work, then update the PR body to trigger review or ask a maintainer for @clawsweeper re-review.

Risk before merge

  • [P1] Existing LINE installations that intentionally relied on top-level allowFrom for group senders will silently stop processing those group messages after upgrade unless they add groupAllowFrom or per-group entries.
  • [P1] The focused mocked test does not prove that a real LINE webhook denies the wildcard-DM sender while continuing to admit explicitly configured group senders.

Maintainer options:

  1. Add upgrade diagnostics before merge (recommended)
    Keep the strict group-only authorization change, but warn or repair affected non-wildcard configurations safely and document manual handling for wildcard DM configurations.
  2. Accept the fail-closed upgrade break
    Merge without migration only after a maintainer explicitly accepts silent group-message denial for installations relying on the shipped fallback.
  3. Pause the policy change
    Retain the current fallback and pause this PR if the repository is not ready to own the upgrade impact.

Next step before merge

  • [P2] A maintainer must decide the shipped fallback's upgrade semantics and require real LINE behavior proof; this is not a safe autonomous repair decision.

Maintainer decision needed

  • Question: Should LINE immediately remove the shipped explicit allowFrom fallback for group sender authorization, and what upgrade handling is required for installations that relied on it?
  • Rationale: The strict scope matches the LINE docs and closes an authorization gap, but the fallback has shipped for multiple releases and removing it can silently disable existing group workflows; repository policy requires explicit maintainer ownership of that security-versus-compatibility choice.
  • Likely owner: steipete — This person introduced and refactored the shipped allowlist boundary now being changed.
  • Options:
    • Strict scope with upgrade handling (recommended): Remove the fallback, add an operator-visible doctor or startup diagnostic with safe migration guidance, and require real LINE proof for denied and explicitly allowed group senders.
    • Accept immediate fail-closed break: Merge the strict behavior with documentation only and explicitly accept that affected installations must discover and repair their configuration after group messages stop.
    • Retain the fallback: Preserve current behavior and close or narrow this PR until maintainers define a different LINE group authorization contract.

Security
Cleared: The patch narrows an authorization boundary and introduces no dependency, secret, permission, workflow, or supply-chain changes; the remaining blocker is upgrade compatibility rather than a patch-introduced security weakness.

Review findings

  • [P1] Provide an upgrade path for the removed allowlist fallback — extensions/line/src/bot-handlers.ts:257
Review details

Best possible solution:

Make LINE group sender authorization use only per-group or groupAllowFrom entries, pair that fail-closed change with operator-visible upgrade handling for prior allowFrom-dependent configurations, and prove denied and explicitly allowed cases on a real LINE account.

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

Yes at source level: configure LINE with dmPolicy: "open", allowFrom: ["*"], groupPolicy: "allowlist", and no group-specific entries; current main selects the wildcard DM list for group authorization. A live LINE reproduction was not supplied.

Is this the best way to solve the issue?

Not yet. Scoping group authorization to group-specific entries is the narrow security fix, but the submitted path needs explicit upgrade handling and real LINE proof before it is the best merge-ready solution.

Full review comments:

  • [P1] Provide an upgrade path for the removed allowlist fallback — extensions/line/src/bot-handlers.ts:257
    This deletes a shipped LINE authorization fallback, so installations that use top-level allowFrom for group senders will silently stop receiving group messages after upgrade. Before merging, add maintainer-approved operator-visible detection or migration guidance—handling wildcard DM lists safely—or preserve the fallback until that compatibility decision is made.
    Confidence: 0.96

Overall correctness: patch is incorrect
Overall confidence: 0.94

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against afdc29c3dd43.

Label changes

Label changes:

  • add merge-risk: 🚨 compatibility: The PR removes a shipped fallback, so previously functioning LINE group configurations can silently stop receiving messages after upgrade.

Label justifications:

  • P1: Current main can admit LINE group traffic through a wildcard DM allowlist, creating an urgent channel authorization-boundary problem.
  • merge-risk: 🚨 compatibility: The PR removes a shipped fallback, so previously functioning LINE group configurations can silently stop receiving messages after upgrade.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🦐 gold shrimp.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The evidence is a focused mocked test run only; before merge, provide a redacted real LINE group transcript, recording, or runtime logs showing that wildcard-open DMs do not admit group senders while explicit group entries still work, then update the PR body to trigger review or ask a maintainer for @clawsweeper re-review.
Evidence reviewed

PR surface:

Source -4, Tests +22, Docs +1. Total +19 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 1 1 5 -4
Tests 1 22 0 +22
Docs 1 3 2 +1
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 26 7 +19

What I checked:

  • Current-main authorization path: Current main selects per-group allowFrom, then account groupAllowFrom, then non-empty account allowFrom; consequently dmPolicy: "open" with allowFrom: ["*"] can satisfy a group allowlist without a group-specific entry. (extensions/line/src/bot-handlers.ts:254, afdc29c3dd43)
  • Documented LINE scopes: The LINE documentation describes allowFrom as the DM allowlist and groupAllowFrom plus per-group allowFrom as the group sender controls, supporting the PR's intended separation. Public docs: docs/channels/line.md. (docs/channels/line.md:140, afdc29c3dd43)
  • Shipped fallback provenance: Commit 8bdda7a deliberately removed DM pairing-store identities from LINE group authorization while retaining the explicit config allowFrom fallback; the associated security fix shipped from version 2026.2.26 onward. (synscan.net) (extensions/line/src/bot-handlers.ts:254, 8bdda7a651c2)
  • Shared security model: Repository security documentation distinguishes DM access from group authorization and states that hard channel allowlists enforce the access boundary before agent processing. (github.com) Public docs: docs/gateway/security/index.md. (docs/gateway/security/index.md, afdc29c3dd43)
  • Regression coverage: The added test exercises the exact empty-group-list configuration and expects the LINE group event to be blocked, but it remains mocked webhook-handler coverage rather than a real LINE run. (extensions/line/src/bot-handlers.test.ts:527, d3351c530790)
  • Repository compatibility policy: The root review policy treats removed fallbacks and newly fail-closed behavior as upgrade-sensitive and requires explicit migration or operator-impact handling when existing configurations can stop working. (AGENTS.md:25, afdc29c3dd43)

Likely related people:

  • steipete: Commit 8bdda7a established the LINE DM-pairing versus group-authorization split while retaining explicit allowFrom fallback behavior, and 892a9c2 subsequently centralized related allowlist policy. (role: introduced and refactored the relevant authorization boundary; confidence: high; commits: 8bdda7a651c2, 892a9c24b0f6; files: extensions/line/src/bot-handlers.ts, extensions/line/src/bot-handlers.test.ts, src/channels/allow-from.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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 keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.
Review history (2 earlier review cycles)
  • reviewed 2026-07-13T05:56:36.828Z sha cccb49a :: needs real behavior proof before merge. :: none
  • reviewed 2026-07-13T06:54:42.310Z sha 74bb7f0 :: needs real behavior proof before merge. :: none

@openclaw-barnacle openclaw-barnacle Bot added the docs Improvements or additions to documentation label Jul 13, 2026
@pgondhi987

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

Re-review progress:

@clawsweeper clawsweeper Bot removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. 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. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Jul 13, 2026
@pgondhi987

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Jul 13, 2026
@clawsweeper clawsweeper Bot added the merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. label Jul 13, 2026
@steipete steipete self-assigned this Jul 13, 2026
@steipete

Copy link
Copy Markdown
Contributor

Maintainer pass before landing:

  • Kept the runtime fix: LINE group allowlists no longer inherit DM allowFrom entries when groupPolicy: "allowlist".
  • Added a code-site comment at the group allowlist resolution point so the shared ingress policy fallback stays disabled intentionally.
  • Confirmed docs now tell operators to use groupAllowFrom or per-group allowFrom for group senders.

Proof:

  • node scripts/run-vitest.mjs extensions/line/src/bot-handlers.test.ts — 1 file, 29 tests passed
  • node_modules/.bin/oxfmt --check extensions/line/src/bot-handlers.ts extensions/line/src/bot-handlers.test.ts — passed
  • git diff --check — passed
  • .agents/skills/autoreview/scripts/autoreview --mode local — clean
  • .agents/skills/autoreview/scripts/autoreview --mode branch --base origin/main — clean, no accepted/actionable findings

@steipete
steipete merged commit ffff72c into openclaw:main Jul 13, 2026
36 checks passed
wm0018 pushed a commit to wm0018/openclaw that referenced this pull request Jul 14, 2026
Prevent LINE group allowlist policy from inheriting DM allowFrom entries, so open DMs do not broaden group access. Keep group-specific allowlists and per-group overrides as the only group admission sources, and document the scoped behavior.

Co-authored-by: pgondhi987 <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 14, 2026
Prevent LINE group allowlist policy from inheriting DM allowFrom entries, so open DMs do not broaden group access. Keep group-specific allowlists and per-group overrides as the only group admission sources, and document the scoped behavior.

Co-authored-by: pgondhi987 <[email protected]>
wheakerd pushed a commit to wheakerd/clawdbot that referenced this pull request Jul 15, 2026
Prevent LINE group allowlist policy from inheriting DM allowFrom entries, so open DMs do not broaden group access. Keep group-specific allowlists and per-group overrides as the only group admission sources, and document the scoped behavior.

Co-authored-by: pgondhi987 <[email protected]>
(cherry picked from commit ffff72c)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: line Channel integration: line docs Improvements or additions to documentation maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P1 High-priority user-facing bug, regression, or broken workflow. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: XS 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.

2 participants