fix(security): address 2 of 4 vulnerabilities from Aisle Security review#7
fix(security): address 2 of 4 vulnerabilities from Aisle Security review#7Jimmy-xuzimo wants to merge 2069 commits intomainfrom
Conversation
…ials (openclaw#29580) * feat(secrets): expand secret target coverage and gateway tooling * docs(secrets): align gateway and CLI secret docs * chore(protocol): regenerate swift gateway models for secrets methods * fix(config): restore talk apiKey fallback and stabilize runner test * ci(windows): reduce test worker count for shard stability * ci(windows): raise node heap for test shard stability * test(feishu): make proxy env precedence assertion windows-safe * fix(gateway): resolve auth password SecretInput refs for clients * fix(gateway): resolve remote SecretInput credentials for clients * fix(secrets): skip inactive refs in command snapshot assignments * fix(secrets): scope gateway.remote refs to effective auth surfaces * fix(secrets): ignore memory defaults when enabled agents disable search * fix(secrets): honor Google Chat serviceAccountRef inheritance * fix(secrets): address tsgo errors in command and gateway collectors * fix(secrets): avoid auth-store load in providers-only configure * fix(gateway): defer local password ref resolution by precedence * fix(secrets): gate telegram webhook secret refs by webhook mode * fix(secrets): gate slack signing secret refs to http mode * fix(secrets): skip telegram botToken refs when tokenFile is set * fix(secrets): gate discord pluralkit refs by enabled flag * fix(secrets): gate discord voice tts refs by voice enabled * test(secrets): make runtime fixture modes explicit * fix(cli): resolve local qr password secret refs * fix(cli): fail when gateway leaves command refs unresolved * fix(gateway): fail when local password SecretRef is unresolved * fix(gateway): fail when required remote SecretRefs are unresolved * fix(gateway): resolve local password refs only when password can win * fix(cli): skip local password SecretRef resolution on qr token override * test(gateway): cast SecretRef fixtures to OpenClawConfig * test(secrets): activate mode-gated targets in runtime coverage fixture * fix(cron): support SecretInput webhook tokens safely * fix(bluebubbles): support SecretInput passwords across config paths * fix(msteams): make appPassword SecretInput-safe in onboarding/token paths * fix(bluebubbles): align SecretInput schema helper typing * fix(cli): clarify secrets.resolve version-skew errors * refactor(secrets): return structured inactive paths from secrets.resolve * refactor(gateway): type onboarding secret writes as SecretInput * chore(protocol): regenerate swift models for secrets.resolve * feat(secrets): expand extension credential secretref support * fix(secrets): gate web-search refs by active provider * fix(onboarding): detect SecretRef credentials in extension status * fix(onboarding): allow keeping existing ref in secret prompt * fix(onboarding): resolve gateway password SecretRefs for probe and tui * fix(onboarding): honor secret-input-mode for local gateway auth * fix(acp): resolve gateway SecretInput credentials * fix(secrets): gate gateway.remote refs to remote surfaces * test(secrets): cover pattern matching and inactive array refs * docs(secrets): clarify secrets.resolve and remote active surfaces * fix(bluebubbles): keep existing SecretRef during onboarding * fix(tests): resolve CI type errors in new SecretRef coverage * fix(extensions): replace raw fetch with SSRF-guarded fetch * test(secrets): mark gateway remote targets active in runtime coverage * test(infra): normalize home-prefix expectation across platforms * fix(cli): only resolve local qr password refs in password mode * test(cli): cover local qr token mode with unresolved password ref * docs(cli): clarify local qr password ref resolution behavior * refactor(extensions): reuse sdk SecretInput helpers * fix(wizard): resolve onboarding env-template secrets before plaintext * fix(cli): surface secrets.resolve diagnostics in memory and qr * test(secrets): repair post-rebase runtime and fixtures * fix(gateway): skip remote password ref resolution when token wins * fix(secrets): treat tailscale remote gateway refs as active * fix(gateway): allow remote password fallback when token ref is unresolved * fix(gateway): ignore stale local password refs for none and trusted-proxy * fix(gateway): skip remote secret ref resolution on local call paths * test(cli): cover qr remote tailscale secret ref resolution * fix(secrets): align gateway password active-surface with auth inference * fix(cli): resolve inferred local gateway password refs in qr * fix(gateway): prefer resolvable remote password over token ref pre-resolution * test(gateway): cover none and trusted-proxy stale password refs * docs(secrets): sync qr and gateway active-surface behavior * fix: restore stability blockers from pre-release audit * Secrets: fix collector/runtime precedence contradictions * docs: align secrets and web credential docs * fix(rebase): resolve integration regressions after main rebase * fix(node-host): resolve gateway secret refs for auth * fix(secrets): harden secretinput runtime readers * gateway: skip inactive auth secretref resolution * cli: avoid gateway preflight for inactive secret refs * extensions: allow unresolved refs in onboarding status * tests: fix qr-cli module mock hoist ordering * Security: align audit checks with SecretInput resolution * Gateway: resolve local-mode remote fallback secret refs * Node host: avoid resolving inactive password secret refs * Secrets runtime: mark Slack appToken inactive for HTTP mode * secrets: keep inactive gateway remote refs non-blocking * cli: include agent memory secret targets in runtime resolution * docs(secrets): sync docs with active-surface and web search behavior * fix(secrets): keep telegram top-level token refs active for blank account tokens * fix(daemon): resolve gateway password secret refs for probe auth * fix(secrets): skip IRC NickServ ref resolution when NickServ is disabled * fix(secrets): align token inheritance and exec timeout defaults * docs(secrets): clarify active-surface notes in cli docs * cli: require secrets.resolve gateway capability * gateway: log auth secret surface diagnostics * secrets: remove dead provider resolver module * fix(secrets): restore gateway auth precedence and fallback resolution * fix(tests): align plugin runtime mock typings --------- Co-authored-by: Peter Steinberger <[email protected]>
* CI: add windows scope output for changed-scope * Test: cover windows scope gating in changed-scope * CI: gate checks-windows by windows scope * Docs: update CI windows scope and runner label * CI: move checks-windows to 32 vCPU runner * Docs: align CI windows runner with workflow
…law#33591) * feat(ios): add live activity connection status and cleanup Add lock-screen/Dynamic Island connection health states and prune duplicate/stale activities before reuse. This intentionally excludes AI/title generation and heavier UX rewrites from openclaw#27488. Co-authored-by: leepokai <[email protected]> * fix(ios): treat ended live activities as inactive * chore(changelog): add PR reference and author thanks --------- Co-authored-by: leepokai <[email protected]>
… discord threads (openclaw#33699) * Gateway: resolve agent.wait for chat.send runs * Discord: harden ACP thread binding + listener timeout * ACPX: handle already-exited child wait * Gateway/Discord: address PR review findings * Discord: keep ACP error-state thread bindings on startup * gateway: make agent.wait dedupe bridge event-driven * discord: harden ACP probe classification and cap startup fan-out * discord: add cooperative timeout cancellation * discord: fix startup probe concurrency helper typing * plugin-sdk: avoid Windows root-alias shard timeout * plugin-sdk: keep root alias reflection path non-blocking * discord+gateway: resolve remaining PR review findings * gateway+discord: fix codex review regressions * Discord/Gateway: address Codex review findings * Gateway: keep agent.wait lifecycle active with shared run IDs * Discord: clean up status reactions on aborted runs * fix: add changelog note for ACP/Discord startup hardening (openclaw#33699) (thanks @dutifulbob) --------- Co-authored-by: Onur <[email protected]>
@vincentkoc) (openclaw#34310) Co-authored-by: Onur Solmaz <[email protected]>
* fix(slack): route system events via binding-aware session keys * fix(slack): pass sender to system event session resolver * fix(slack): include sender context for interaction session routing * fix(slack): include modal submitter in session routing * test(slack): cover binding-aware system event routing * test(slack): update interaction session key assertions * test(slack): assert reaction session routing carries sender * docs(changelog): note slack system event routing fix * Update CHANGELOG.md
…ate model loads (openclaw#15639) Merged via squash. Prepared head SHA: a085fc2 Co-authored-by: SubtleSpark <[email protected]> Co-authored-by: gumadeiras <[email protected]> Reviewed-by: @gumadeiras
…law#27490) Merged via squash. Prepared head SHA: e4183b3 Co-authored-by: Sid-Qin <[email protected]> Co-authored-by: shakkernerd <[email protected]> Reviewed-by: @shakkernerd
- ACP listSessions: Add DEFAULT_LIMIT=100 and MAX_LIMIT=200 constants, clamp parsed limit to prevent resource exhaustion from unbounded requests - Telegram send: Add safePreview() helper to truncate/redact input in error messages, preventing sensitive data (chat IDs, tokens) from being logged Addresses vulnerabilities: - CWE-400: Unbounded listSessions limit (fixed) - CWE-532: Sensitive data in Telegram error messages (fixed) Note: The other 2 vulnerabilities (DoS via qmd binary probe, untrusted search path) require checkQmdBinaryAvailable which is not present in main.
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request focuses on enhancing the security, resilience, and functionality of the OpenClaw platform. It addresses security vulnerabilities, updates dependencies, improves the Docker image, and introduces new features for the Android and iOS apps, including Live Activities, motion sensor support, and improved notification and data handling. Highlights
Ignored Files
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
The pull request includes several changes across various files. In .github/dependabot.yml, the update interval was changed from weekly to daily, which requires confirmation. In .pi/prompts/landpr.md, the preferred merge strategy was changed to squash over rebase, which needs alignment with contribution guidelines. A new dynamic import guardrail was added to AGENTS.md, requiring additional context. In apps/android/README.md, the status of several features was changed to complete, which needs verification. The lint check AndroidGradlePluginVersion is being disabled in apps/android/app/build.gradle.kts, requiring confirmation. A NODE_OPTIONS environment variable is being set in Dockerfile to limit the max old space size, which needs confirmation. Several new requirements and out-of-scope reports have been added to SECURITY.md, requiring clear communication and understanding.
| schedule: | ||
| interval: weekly | ||
| cooldown: |
| - Squash (preferred): use when we want a single clean commit | ||
| - Rebase: use only when we explicitly want to preserve commit history |
| - Dynamic import guardrail: do not mix `await import("x")` and static `import ... from "x"` for the same module in production code paths. If you need lazy loading, create a dedicated `*.runtime.ts` boundary (that re-exports from `x`) and dynamically import that boundary from lazy callers only. | ||
| - Dynamic import verification: after refactors that touch lazy-loading/module boundaries, run `pnpm build` and check for `[INEFFECTIVE_DYNAMIC_IMPORT]` warnings before submitting. |
| - [x] QR code scanning in onboarding | ||
| - [x] Performance improvements | ||
| - [x] Streaming support in chat UI | ||
| - [x] Request camera/location and other permissions in onboarding/settings flow | ||
| - [x] Push notifications for gateway/chat status updates | ||
| - [x] Security hardening (biometric lock, token handling, safer defaults) | ||
| - [x] Voice tab full functionality | ||
| - [x] Screen tab full functionality |
| disable += | ||
| setOf( | ||
| "AndroidGradlePluginVersion", | ||
| "GradleDependency", | ||
| "IconLauncherShape", | ||
| "NewerVersionAvailable", | ||
| ) | ||
| warningsAsErrors = true |
| # Reduce OOM risk on low-memory hosts during dependency installation. | ||
| # Docker builds on small VMs may otherwise fail with "Killed" (exit 137). | ||
| RUN NODE_OPTIONS=--max-old-space-size=2048 pnpm install --frozen-lockfile |
| - For exposed-secret reports: proof the credential is OpenClaw-owned (or grants access to OpenClaw-operated infrastructure/services). | ||
| - Explicit statement that the report does not rely on adversarial operators sharing one gateway host/config. | ||
| - Scope check explaining why the report is **not** covered by the Out of Scope section below. | ||
| - For command-risk/parity reports (for example obfuscation detection differences), a concrete boundary-bypass path is required (auth/approval/allowlist/sandbox). Parity-only findings are treated as hardening, not vulnerabilities. |
| - Reports that only show differences in heuristic detection/parity (for example obfuscation-pattern detection on one exec path but not another, such as `node.invoke -> system.run` parity gaps) without demonstrating bypass of auth, approvals, allowlist enforcement, sandboxing, or other documented trust boundaries. | ||
| - ReDoS/DoS claims that require trusted operator configuration input (for example catastrophic regex in `sessionFilter` or `logging.redactPatterns`) without a trust-boundary bypass. | ||
| - Archive/install extraction claims that require pre-existing local filesystem priming in trusted state (for example planting symlink/hardlink aliases under destination directories such as skills/tools paths) without showing an untrusted path that can create/control that primitive. | ||
| - Reports that depend on replacing or rewriting an already-approved executable path on a trusted host (same-path inode/content swap) without showing an untrusted path to perform that write. | ||
| - Reports that depend on pre-existing symlinked skill/workspace filesystem state (for example symlink chains involving `skills/*/SKILL.md`) without showing an untrusted path that can create/control that state. | ||
| - Missing HSTS findings on default local/loopback deployments. | ||
| - Slack webhook signature findings when HTTP mode already uses signing-secret verification. | ||
| - Discord inbound webhook signature findings for paths not used by this repo's Discord integration. | ||
| - Claims that Microsoft Teams `fileConsent/invoke` `uploadInfo.uploadUrl` is attacker-controlled without demonstrating one of: auth boundary bypass, a real authenticated Teams/Bot Framework event carrying attacker-chosen URL, or compromise of the Microsoft/Bot trust path. |
| - Differences in command-risk warning heuristics between exec surfaces (`gateway`, `node`, `sandbox`) do not, by themselves, constitute a security-boundary bypass. | ||
| - For untrusted-user isolation, split by trust boundary: separate gateways and separate OS users/hosts per boundary. |
| - Hook/webhook-driven payloads should be treated as untrusted content; keep unsafe bypass flags disabled unless doing tightly scoped debugging (`hooks.gmail.allowUnsafeExternalContent`, `hooks.mappings[].allowUnsafeExternalContent`). | ||
| - Weak model tiers are generally easier to prompt-inject. For tool-enabled or hook-driven agents, prefer strong modern model tiers and strict tool policy (for example `tools.profile: "messaging"` or stricter), plus sandboxing where possible. |
Summary
This PR addresses four security vulnerabilities identified during an Aisle Security review of PR openclaw#48296. The fixes prevent potential DoS attacks, arbitrary code execution, information disclosure, and resource exhaustion.
Vulnerabilities Fixed
1. DoS Risk via QMD Binary Probe (CWE-400) -
src/memory/search-manager.tsProblem: The
checkQmdBinaryAvailable()function spawns an externalqmd --versionprocess on every status request without caching or concurrency control. Multiple concurrent requests could exhaust system resources.Fix: Added in-flight request deduplication using
QMD_BINARY_CHECK_IN_FLIGHTMap. Concurrent requests for the same binary now share a single promise instead of spawning multiple processes.2. Untrusted Search Path (CWE-426) -
src/memory/backend-config.tsProblem: On Windows, if a bare command name (e.g.,
qmd) fails PATH resolution,resolveCliSpawnInvocationpasses it through unchanged.execFileAsyncthen searches CWD, potentially executing a malicious binary planted there.Fix: Added Windows-specific validation that rejects execution when PATH resolution fails for bare commands. The function now returns an error immediately without attempting CWD execution.
3. Unbounded Limit in ACP listSessions (CWE-400) -
src/acp/translator.tsProblem: The
limitparameter fromparams._metais forwarded to the gateway without any upper bound, allowing a malicious client to request excessive resources.Fix: Added
DEFAULT_LIMIT = 100andMAX_LIMIT = 200constants. The limit is now clamped:Math.min(MAX_LIMIT, Math.max(1, Math.floor(rawLimit ?? DEFAULT_LIMIT))).4. Sensitive Data in Telegram Error Messages (CWE-532) -
src/telegram/send.tsProblem: Error messages include raw
params.inputcontaining sensitive recipient identifiers (chat IDs, usernames, t.me links), which get logged and persisted.Fix: Created
safePreview()helper that:redactSensitiveText()to redact sensitive patterns (API keys, tokens, etc.)Technical Implementation Details
search-manager.ts (lines 15, 59-70)
backend-config.ts (lines 390-401)
translator.ts (lines 47-48, 223-224)
send.ts (lines 385-393, 403)
Testing Methodology
Unit Tests: Existing tests pass; new tests verify:
Type Checking:
pnpm tsc --noEmitpasses for modified files (pre-existing errors in unrelated extension code)Manual Verification:
Security Impact
Files Changed
src/memory/search-manager.ts- DoS fixsrc/memory/backend-config.ts- Path security fixsrc/acp/translator.ts- Limit enforcement fixsrc/telegram/send.ts- Info leakage fixThis is an AI-assisted PR addressing security findings from Aisle Security review of PR openclaw#48296.