惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

aimingoo的专栏
aimingoo的专栏
量子位
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
S
Schneier on Security
Cisco Talos Blog
Cisco Talos Blog
T
ThreatConnect
J
Java Code Geeks
博客园 - 司徒正美
A
Arctic Wolf
T
True Tiger Recordings
C
Cybersecurity and Infrastructure Security Agency CISA
Cyberwarzone
Cyberwarzone
Know Your Adversary
Know Your Adversary
T
Threat Research - Cisco Blogs
V
Vulnerabilities – Threatpost
Recorded Future
Recorded Future
P
Palo Alto Networks Blog
The Hacker News
The Hacker News
The Register - Security
The Register - Security
S
Securelist
www.infosecurity-magazine.com
www.infosecurity-magazine.com
C
CXSECURITY Database RSS Feed - CXSecurity.com
Application and Cybersecurity Blog
Application and Cybersecurity Blog
I
Intezer
P
Privacy & Cybersecurity Law Blog
Scott Helme
Scott Helme
K
Kaspersky official blog
博客园 - 聂微东
Last Week in AI
Last Week in AI
V
V2EX
小众软件
小众软件
F
Fox-IT International blog
Martin Fowler
Martin Fowler
Apple Machine Learning Research
Apple Machine Learning Research
T
Tenable Blog
F
Future of Privacy Forum
Microsoft Security Blog
Microsoft Security Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
腾讯CDC
Stack Overflow Blog
Stack Overflow Blog
C
Check Point Blog
阮一峰的网络日志
阮一峰的网络日志
GbyAI
GbyAI
T
Threatpost
I
InfoQ
P
Proofpoint News Feed
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
T
Tor Project blog
G
GRAHAM CLULEY
D
DataBreaches.Net

Recent Commits to openclaw:main

fix: speed up Discord voice wake consults · openclaw/openclaw@5ae91f0 fix(qa): harden restart inflight Windows scenario · openclaw/openclaw@3eb06e3 Recover Codex context overflow prompt errors (#85542) · openclaw/openclaw@5cfa577 docs: update changelog for #70473 · openclaw/openclaw@d967760 fix(agents): derive overflow budgets from provider errors · openclaw/openclaw@d5b0174 fix(plugins): only memoize complete metadata snapshots · openclaw/openclaw@3137622 docs: update changelog for media wake fallback (#85489) · openclaw/openclaw@a11d4e6 fix: fallback after active media wake failure (#85489) · openclaw/openclaw@1b64ccb perf(plugins): reuse derived metadata snapshots · openclaw/openclaw@159e440 docs: require maintainer-editable PR branches · openclaw/openclaw@f271f00 fix: scan OpenClaw sessions in agent transcript finder · openclaw/openclaw@4012ae4 docs: note agent transcript OpenClaw session scan · openclaw/openclaw@dd375f9 docs: require generic local fixes · openclaw/openclaw@fc93af5 fix: broaden leading voice wake fuzzing · openclaw/openclaw@a9c91ca test(agents): preserve provider hook mock exports (#86523) · openclaw/openclaw@657b246 Policy: add agent-scoped policy overlays (#85817) · openclaw/openclaw@fbb6340 fix(kilocode): normalize string stop param to array in stream wrapper… · openclaw/openclaw@abe9923 Doctor: expose shell completion health findings (#85566) · openclaw/openclaw@dc17412 fix(agents): honor effective exec policy for Claude live Bash (#86330) fix(test): stabilize e2e runtime imports fix(test): clean plugin gauntlet temp roots · openclaw/openclaw@633e4b8 perf: cache plugin package realpaths (#86517) · openclaw/openclaw@69d728a fix(qa): settle restart races with live budget · openclaw/openclaw@2cac9e5 fix(crabbox): sync full sparse lease runs · openclaw/openclaw@e97e831 fix(qa): extend config mutation Windows budget fix(qa): extend config cleanup Windows budget · openclaw/openclaw@8a93851 test(crabbox): tolerate Windows shell capture · openclaw/openclaw@50d6611 fix(sessions): stop doctor OOM on large session stores and reclaim st… · openclaw/openclaw@89aea9b fix(ollama): strip inline kimi cloud reasoning leak (#86515) fix(discord): merge media captions into one message (#86487) · openclaw/openclaw@bc10fad fix(utils): clamp fetch timeout timers (#85985) fix(ui): preserve user code block rendering (#85942) fix(memory): prevent silent vector index degradation when embedding p… docs: clarify agent transcript placeholders · openclaw/openclaw@8da8bc4 test(qa): annotate live transport RTT measurements · openclaw/openclaw@bb6f37e fix(qqbot): derive outbound watchdog from configured timeouts (#85267… · openclaw/openclaw@aa702cf fix(test): clean kitchen sink rpc temp state · openclaw/openclaw@6f695c1 fix: quiet missing daily memory reads fix: tighten empty plugin registry reuse · openclaw/openclaw@026cfb6 perf: speed up agent transcript lookup · openclaw/openclaw@e7ad116 fix: guard QMD session stem fallback (#86482) · openclaw/openclaw@2e3b59b Guard OpenAI chat payload turns (#86497) · openclaw/openclaw@489e415 fix(gateway): keep session tool mirrors under pressure · openclaw/openclaw@459e89a docs: route github creation through agent transcript test(tools): add unmocked image custom-provider auth regression (#85733) · openclaw/openclaw@f0bfb3f refactor(plugin-sdk): rename plain text tool-call compat wrapper docs(skills): defer private release locators · openclaw/openclaw@23d38e4 Replace Sharp image backend with Photon (#86437) · openclaw/openclaw@b9f975b fix(agents): release embedded-attempt session lock on every exit path… · openclaw/openclaw@32ddfc2 fix: accept OpenClaw voice wake confusions (#86507) fix(crabbox): bootstrap macos js toolchain chore: add agent transcript skill · openclaw/openclaw@d63e8d4 fix(gateway): dedupe session tool fanout · openclaw/openclaw@89a21db fix: Hook ingress token unlocks password-mode gateway auth (#86453) · openclaw/openclaw@d51f268 fix #86077: keep fallback errors candidate scoped (#86134) · openclaw/openclaw@d6b7fe8 fix(diagnostics): reclaim wedged session lanes with a stale leaked ac… · openclaw/openclaw@6f76d9f fix: derive plugin media trust from metadata (#86410) · openclaw/openclaw@e761eb8 fix(media-understanding): normalize HEIC before image descriptions (#… · openclaw/openclaw@75c7236 fix: accept leading fuzzy Discord voice wake names (#86484) · openclaw/openclaw@8fe4f34 feat: promote provider tool call stream wrapper (#86489) fix(test): dedupe kitchen sink command assertions test: derive deprecated sdk usage guard (#86403) fix(qa): extend memory fallback Windows budget fix(ui): move control ui chunking helper out of runtime source · openclaw/openclaw@968c87d fix: quiet retained lost task noise (#86475) fix(build): keep control ui chunking out of deadcode · openclaw/openclaw@dc26069 fix: rotate realtime voice sessions on max duration · openclaw/openclaw@dc2c4aa fix(test): stream bundled plugin sweep logs · openclaw/openclaw@fc3cd49 docs: add bugfix changelog credits · openclaw/openclaw@2e7e4bc fix(models): show oauth marker auth status (#86378) · openclaw/openclaw@a6df39d fix: seed cron task progress summaries (#86313) · openclaw/openclaw@92afd8b fix(update): exclude prerelease tags from stable git channel (#86260) · openclaw/openclaw@28f169b fix(doctor): warn and continue when cron job store is unreadable (#86… fix(gateway): clear runtime config snapshot before in-process restart… · openclaw/openclaw@90caa3b fix(scripts): restore sparse crabbox changed gates · openclaw/openclaw@d270879 fix(build): support Windows UI builds · openclaw/openclaw@0bb9b42 Fix local embedding worker safety (#85348) · openclaw/openclaw@7ff29a9 fix(ui): scope chat session picker to active agent (#85965) · openclaw/openclaw@70c7d6f [codex] improve iOS realtime talk mode (#86355) · openclaw/openclaw@9ca52ce fix(scripts): dedupe docker lane resources · openclaw/openclaw@5e94469 docs: add code size guidance · openclaw/openclaw@9a60fcf fix(test): avoid source gateway import in rpc walk · openclaw/openclaw@e9b8a6e docs: add bugfix changelog entries · openclaw/openclaw@f950132 Fix heartbeat response loop guard (#86324) (#86357) · openclaw/openclaw@e2c174e fix(memory-core): filter REM dreaming candidates to light-staged entr… · openclaw/openclaw@8b42771 fix(telegram): propagate forum topic names into agent context (#86299) fix(slack): keep downloaded files out of reply media (#86318) · openclaw/openclaw@2fcd481 fix(cron): accept plus durations for one-shot jobs (#86341) · openclaw/openclaw@9239f94 fix(plugins): clear metadata memo at lifecycle boundaries · openclaw/openclaw@e7c696a chore(skills): normalize release skill routing · openclaw/openclaw@4737e19 docs(release): require early performance regression check · openclaw/openclaw@0336938 fix(qa): capture Windows gateway metrics · openclaw/openclaw@9afbfc1 feat(qa): add coverage scenario matching · openclaw/openclaw@a1fe86a fix(perf): avoid duplicate docker package ui build build: enable modern TypeScript module syntax · openclaw/openclaw@bbc1772 ci: include performance evidence in release validation fix(providers): stream ordinary tool-like prose promptly fix(perf): harden gateway restart bench exits · openclaw/openclaw@82bbcf6 fix(gateway): gate talk secret bootstrap handoff (#85690) · openclaw/openclaw@c791e42 fix: suppress async media incomplete-turn errors (#85933) · openclaw/openclaw@35dcd42
fix(security): audit Claude permission overrides under YOLO (#86557) · openclaw/openclaw@bd65b42
sallyom · 2026-05-26 · via Recent Commits to openclaw:main

@@ -1,13 +1,22 @@

11

import path from "node:path";

22

import { resolveAgentWorkspaceDir, resolveDefaultAgentId } from "../agents/agent-scope.js";

3+

import { resolveExecDefaults } from "../agents/exec-defaults.js";

4+

import { normalizeProviderId } from "../agents/provider-id.js";

35

import { resolveSandboxConfigForAgent } from "../agents/sandbox/config.js";

46

import type { ChannelPlugin } from "../channels/plugins/types.plugin.js";

57

import type { ConfigFileSnapshot, OpenClawConfig } from "../config/config.js";

68

import { resolveConfigPath, resolveStateDir } from "../config/paths.js";

9+

import type { CliBackendConfig } from "../config/types.agent-defaults.js";

710

import type { GatewayAuthConfig } from "../config/types.gateway.js";

811

import type { SecurityAuditSuppression } from "../config/types.openclaw.js";

912

import { isInterpreterLikeAllowlistPattern } from "../infra/command-analysis/inline-eval.js";

10-

import { type ExecApprovalsFile, loadExecApprovals } from "../infra/exec-approvals.js";

13+

import {

14+

type ExecApprovalsFile,

15+

loadExecApprovals,

16+

maxAsk,

17+

minSecurity,

18+

resolveExecApprovalsFromFile,

19+

} from "../infra/exec-approvals.js";

1120

import {

1221

listInterpreterLikeSafeBins,

1322

resolveMergedSafeBinProfileFixtures,

@@ -42,6 +51,10 @@ type SecurityAuditExplicitGatewayAuth = {

4251

password?: string;

4352

};

4453

type SecurityAuditGatewayAuthOverride = Pick<GatewayAuthConfig, "mode" | "token" | "password">;

54+

type ClaudePermissionModeHit = {

55+

argSet: "args" | "resumeArgs";

56+

mode: string;

57+

};

45584659

export type {

4760

SecurityAuditFinding,

@@ -559,13 +572,127 @@ export function collectElevatedFindings(cfg: OpenClawConfig): SecurityAuditFindi

559572

return findings;

560573

}

561574575+

const CLAUDE_PERMISSION_MODE_FLAG = "--permission-mode";

576+

const CLAUDE_BYPASS_PERMISSION_MODE = "bypassPermissions";

577+578+

function extractClaudePermissionMode(args: readonly string[] | undefined): string | undefined {

579+

if (!Array.isArray(args)) {

580+

return undefined;

581+

}

582+

for (let i = args.length - 1; i >= 0; i -= 1) {

583+

const arg = args[i] ?? "";

584+

if (arg === CLAUDE_PERMISSION_MODE_FLAG) {

585+

const value = args[i + 1];

586+

if (typeof value === "string" && value.trim().length > 0 && !value.startsWith("-")) {

587+

return value.trim();

588+

}

589+

continue;

590+

}

591+

if (arg.startsWith(`${CLAUDE_PERMISSION_MODE_FLAG}=`)) {

592+

const value = arg.slice(`${CLAUDE_PERMISSION_MODE_FLAG}=`.length).trim();

593+

if (value.length > 0 && !value.startsWith("-")) {

594+

return value;

595+

}

596+

}

597+

}

598+

return undefined;

599+

}

600+601+

function collectRestrictiveClaudePermissionModeHits(

602+

backend: CliBackendConfig | undefined,

603+

): ClaudePermissionModeHit[] {

604+

if (!isManagedClaudeLiveBackendConfig(backend)) {

605+

return [];

606+

}

607+

const hits: ClaudePermissionModeHit[] = [];

608+

const argsMode = extractClaudePermissionMode(backend.args);

609+

if (argsMode && argsMode !== CLAUDE_BYPASS_PERMISSION_MODE) {

610+

hits.push({ argSet: "args", mode: argsMode });

611+

}

612+

const resumeArgsMode = extractClaudePermissionMode(backend.resumeArgs);

613+

if (resumeArgsMode && resumeArgsMode !== CLAUDE_BYPASS_PERMISSION_MODE) {

614+

hits.push({ argSet: "resumeArgs", mode: resumeArgsMode });

615+

}

616+

return hits;

617+

}

618+619+

function isManagedClaudeLiveBackendConfig(

620+

backend: CliBackendConfig | undefined,

621+

): backend is CliBackendConfig {

622+

if (!backend) {

623+

return false;

624+

}

625+

const output = backend.output ?? "jsonl";

626+

const input = backend.input ?? "stdin";

627+

const liveSession =

628+

backend.liveSession ?? (output === "jsonl" && input === "stdin" ? "claude-stdio" : undefined);

629+

return liveSession === "claude-stdio" && output === "jsonl" && input === "stdin";

630+

}

631+632+

function findClaudeCliBackendConfig(

633+

backends: Record<string, CliBackendConfig> | undefined,

634+

): CliBackendConfig | undefined {

635+

if (!backends) {

636+

return undefined;

637+

}

638+

const directKey = Object.keys(backends).find(

639+

(key) => normalizeOptionalLowercaseString(key) === "claude-cli",

640+

);

641+

if (directKey) {

642+

return backends[directKey];

643+

}

644+

for (const [key, backend] of Object.entries(backends)) {

645+

if (normalizeProviderId(key) === "claude-cli") {

646+

return backend;

647+

}

648+

}

649+

return undefined;

650+

}

651+652+

function collectYoloExecScopeIds(cfg: OpenClawConfig, approvals: ExecApprovalsFile): string[] {

653+

const agents = Array.isArray(cfg.agents?.list) ? cfg.agents.list : [];

654+

return [

655+

{ id: DEFAULT_AGENT_ID },

656+

...agents

657+

.filter(

658+

(entry): entry is NonNullable<(typeof agents)[number]> =>

659+

Boolean(entry) && typeof entry === "object" && typeof entry.id === "string",

660+

)

661+

.map((entry) => ({ id: entry.id })),

662+

]

663+

.filter((entry) => {

664+

const execDefaults = resolveExecDefaults({

665+

cfg,

666+

agentId: entry.id === DEFAULT_AGENT_ID ? undefined : entry.id,

667+

});

668+

const resolvedApprovals = resolveExecApprovalsFromFile({

669+

file: approvals,

670+

agentId: entry.id === DEFAULT_AGENT_ID ? undefined : entry.id,

671+

overrides: {

672+

security: execDefaults.security,

673+

ask: execDefaults.ask,

674+

},

675+

});

676+

return (

677+

minSecurity(execDefaults.security, resolvedApprovals.agent.security) === "full" &&

678+

maxAsk(execDefaults.ask, resolvedApprovals.agent.ask) === "off"

679+

);

680+

})

681+

.map((entry) => entry.id);

682+

}

683+562684

export function collectExecRuntimeFindings(cfg: OpenClawConfig): SecurityAuditFinding[] {

563685

const findings: SecurityAuditFinding[] = [];

564686

const globalExecHost = cfg.tools?.exec?.host;

565687

const globalStrictInlineEval = cfg.tools?.exec?.strictInlineEval === true;

566688

const defaultSandboxMode = resolveSandboxConfigForAgent(cfg).mode;

567689

const defaultHostIsExplicitSandbox = globalExecHost === "sandbox";

568690

const approvals = loadExecApprovals();

691+

const claudePermissionModeHits = collectRestrictiveClaudePermissionModeHits(

692+

findClaudeCliBackendConfig(cfg.agents?.defaults?.cliBackends),

693+

);

694+

const yoloExecScopeIds =

695+

claudePermissionModeHits.length > 0 ? collectYoloExecScopeIds(cfg, approvals) : [];

569696570697

if (defaultHostIsExplicitSandbox && defaultSandboxMode === "off") {

571698

findings.push({

@@ -646,6 +773,17 @@ export function collectExecRuntimeFindings(cfg: OpenClawConfig): SecurityAuditFi

646773

});

647774

}

648775776+

if (claudePermissionModeHits.length > 0 && yoloExecScopeIds.length > 0) {

777+

findings.push({

778+

checkId: "agents.claude_cli.permission_mode_overridden_by_yolo",

779+

severity: "warn",

780+

title: "Claude permission mode is ignored under YOLO exec",

781+

detail: `claude-cli sets ${claudePermissionModeHits.map((hit) => `${hit.argSet}=${hit.mode}`).join(", ")}, but OpenClaw exec is YOLO for: ${yoloExecScopeIds.join(", ")}. Managed Claude live sessions use --permission-mode bypassPermissions.`,

782+

remediation:

783+

"Restrict OpenClaw tools.exec.security/tools.exec.ask, or remove the Claude --permission-mode override.",

784+

});

785+

}

786+649787

if (openExecSurfacePaths.length > 0 && execEnabledScopes.length > 0) {

650788

findings.push({

651789

checkId: "security.exposure.open_channels_with_exec",