Repository navigation
Conversation
🔒 Aisle Security AnalysisWe found 1 potential security issue(s) in this PR:
1. 🟡 Incomplete log sanitization allows log forging via Unicode line separators in WhatsApp outbound logs
Description
However, it only removes C0/C1 control characters (U+0000–U+001F, U+007F, U+0080–U+009F) and does not remove Unicode line/paragraph separators such as:
These characters can be included in otherwise “printable” strings and may be treated as line breaks by downstream log consumers/parsers, enabling log injection/log forging (e.g., adding spoofed log entries) when values like Vulnerable code: function sanitizeWhatsAppLogValue(value: string): string {
const c0Start = String.fromCharCode(0x00);
const c0End = String.fromCharCode(0x1f);
const del = String.fromCharCode(0x7f);
const c1Start = String.fromCharCode(0x80);
const c1End = String.fromCharCode(0x9f);
return value.replace(new RegExp(`[${c0Start}-${c0End}${del}${c1Start}-${c1End}]`, "g"), "");
}Affected sinks include log lines interpolating sanitized values (e.g., RecommendationExpand sanitization to remove/escape Unicode line/paragraph separators (and optionally other non-printing characters) before logging. Prefer escaping over deletion when debugging value fidelity matters. Example fix: function sanitizeWhatsAppLogValue(value: string): string {
// Remove ASCII C0/C1 control chars and common Unicode line separators
return value.replace(/[\u0000-\u001F\u007F-\u009F\u2028\u2029]/g, "");
}Additionally:
Analyzed PR: #70813 at commit Last updated on: 2026-04-23T23:32:09Z |
Greptile SummaryThis PR adds Confidence Score: 5/5Safe to merge — no P0/P1 issues; remaining findings are minor style suggestions. Implementation is well-structured, security-conscious (fromMe hardcoded, no participant exposure), gated behind existing auth and sendMessage flag, and backed by comprehensive unit tests. The two P2 notes (validation ordering for edit and the implicit passthrough on handleWhatsAppReactAction) do not affect correctness or security. No files require special attention.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ee146d90a9
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 327a33f8ff
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 08049c0eff
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
@steipete CI is green now. Quick summary: this adds WhatsApp I also addressed the bot feedback around |
|
Codex review: needs real behavior proof before merge. Reviewed July 30, 2026, 5:09 PM ET / 21:09 UTC. ClawSweeper reviewWhat this changesThis PR adds WhatsApp edit, delete, and unsend actions for bot-owned messages through the channel plugin, CLI, docs, outbound authorization path, and focused regression tests. Merge readiness⛔ Blocked until real behavior proof from a real setup is added - 5 items remain Keep this PR open. It remains the candidate implementation for the still-open WhatsApp revoke request, but it is not merge-ready: GitHub reports a dirty merge state, and the supplied after-fix evidence is targeted test/seam output rather than a real linked WhatsApp account exercising edit and revoke behavior. Priority: P2 Review scores
Verification
How this fits togetherOpenClaw’s message tool routes a channel action through the WhatsApp plugin, which authorizes the target and forwards it to the active Baileys-backed listener. The listener resolves the outbound WhatsApp JID and sends an edit or delete payload to WhatsApp, affecting an already-sent bot message. flowchart LR
A[CLI or agent message action] --> B[WhatsApp channel action handler]
B --> C[Target authorization and action gate]
C --> D[Outbound WhatsApp service]
D --> E[Active Baileys listener]
E --> F[LID-aware JID resolution]
F --> G[WhatsApp edit or revoke payload]
Decision needed
Why: The patch is a new destructive channel capability rather than a narrow correction to an established WhatsApp action contract; code review cannot determine the intended operator permission boundary alone. Before merge
Agent review detailsSecurityNone. PR surfaceSource +366, Tests +604, Docs +7. Total +977 across 24 files. View PR surface stats
Review metricsNone. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Rebase onto current main, retain the existing target-authorization and fromMe-only boundaries, then attach redacted live WhatsApp evidence showing a bot message can be edited and revoked without affecting another chat before maintainers decide whether the existing send-message gate is the intended operator boundary. Do we have a high-confidence way to reproduce the issue? No. The supplied report includes a credible prior live failure and the branch has focused seam coverage, but no current linked-account WhatsApp run demonstrates the after-fix edit or revoke behavior against WhatsApp servers. Is this the best way to solve the issue? Unclear. Reusing the existing action gate, target authorization, and LID-aware outbound route is the narrow maintainable shape, but maintainers still need to approve the destructive-action boundary and see live provider behavior. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 4d034dce0e5c. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
ClawSweeper PR egg 🎁 Pass real behavior proof to wake the egg and unlock a hatchable treat. Where did the egg go?
|
|
I hit this limitation on a live OpenClaw install today and wanted to add a sanitized real-world reproduction for the outbound edit path. Context: a bot-owned WhatsApp message was sent successfully and returned a WhatsApp Repro shape, with private target/id values redacted: openclaw message edit \
--channel whatsapp \
--account <account> \
--target <E164> \
--message-id <whatsapp-message-id> \
--message "corrected text" \
--dry-run \
--jsonThe dry run succeeds because it appears to validate the generic message action shape. Running the same command without Expected behavior after this PR:
No private phone numbers, contact names, or message contents are included here; this is just the operational failure mode observed from the CLI/gateway boundary. |
|
This pull request has been automatically marked as stale due to inactivity. |
Summary
What problem does this PR solve?
Why does this matter now?
What is the intended outcome?
edit,delete, andunsendactions for bot-owned messages.upload-filesupport from currentmainwhile adding the new gateway actions.resolveOutboundJidfor edit/unsend so message keys use the resolved LID JID when available.What is intentionally out of scope?
What does success look like?
editsends a Baileys{ edit }payload withfromMe: true.deleteandunsendsend a Baileys{ delete }payload withfromMe: true.What should reviewers focus on?
extensions/whatsapp/src/inbound/send-api.ts.extensions/whatsapp/src/channel-react-action.ts.actions.sendMessagegating and target authorization inextensions/whatsapp/src/action-runtime.ts.Linked context
Which issue does this close?
Closes #14344
Which issues, PRs, or discussions are related?
Related #67378
Was this requested by a maintainer or owner?
Real behavior proof (required for external PRs)
lid-mapping-15555550000.json.987654@lid; their message keys useremoteJid: "987654@lid",id: "msg-2", andfromMe: true.toWhatsappJid(to), so a PN target with a LID mapping stayed on[email protected]instead of987654@lid.Tests and validation
Which commands did you run?
What regression coverage was added or updated?
extensions/whatsapp/src/inbound/send-api.test.ts: edit/unsend payloads and LID mapping regression coverage.extensions/whatsapp/src/action-runtime.test.ts: edit/delete/unsend gating, authorization path, and edit input validation.extensions/whatsapp/src/channel-react-action.test.ts: gateway dispatch, current WhatsApp context fallback, no participant forwarding, and empty edit text rejection before forwarding.extensions/whatsapp/src/send.test.ts: listener wrappers and log sanitization for message ids and reaction emojis.extensions/whatsapp/src/channel-actions.test.ts: action discovery withactions.sendMessagedisabled.What failed before this fix, if known?
toWhatsappJid(to)instead ofresolveOutboundJid(to).If no test was added, why not?
Risk checklist
Did user-visible behavior change? (
Yes/No)Yes.
Did config, environment, or migration behavior change? (
Yes/No)No.
Did security, auth, secrets, network, or tool execution behavior change? (
Yes/No)Yes.
What is the highest-risk area?
How is that risk mitigated?
actions.sendMessagegating.fromMe: true.participantis not forwarded for edit/delete/unsend.Current review state
What is the next action?
What is still waiting on author, maintainer, CI, or external proof?
Which bot or reviewer comments were addressed?
mainand resolved conflicts with currentupload-filesupport.handleWhatsAppReactActionwrapper with a deprecation comment.