Skip to content

Commit 8aceaf5

Browse files
fix(security): close fail-open bypass in exec script preflight [AI] (#59398)
* fix: address issue * fix: finalize issue changes * fix: address PR review feedback * fix: address PR review feedback * fix: address PR review feedback * fix: address PR review feedback * fix: address PR review feedback * fix: address PR review feedback * fix: address review feedback * fix: address PR review feedback * fix: address PR review feedback * fix: address review-pr skill feedback * fix: address PR review feedback * fix: address review-pr skill feedback * fix: address PR review feedback * fix: address PR review feedback * fix: address PR review feedback * fix: address PR review feedback * fix: address PR review feedback * fix: address review-pr skill feedback * fix: address PR review feedback * fix: address PR review feedback * fix: address review-pr skill feedback * fix: address PR review feedback * fix: address PR review feedback * fix: address PR review feedback * fix: address PR review feedback * fix: address review-pr skill feedback * fix: address PR review feedback * fix: address PR review feedback * fix: address PR review feedback * chore: add changelog for exec preflight fail-closed hardening --------- Co-authored-by: Devin Robison <[email protected]>
1 parent e36c563 commit 8aceaf5

5 files changed

Lines changed: 1437 additions & 78 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Docs: https://docs.openclaw.ai
1616
- Zalo/webhook: scope replay-dedupe cache key to path and account using `JSON.stringify` so multi-account deployments do not silently drop events due to cross-account cache poisoning. (#59387) Thanks @pgondhi987.
1717
- Plugins/Google: separate OAuth CSRF state from PKCE code verifier during Gemini browser sign-in so state validation and token exchange use independent values. (#59116) Thanks @eleqtrizit.
1818
- Exec/Windows: reject malformed drive-less rooted executable paths like `:\Users\...` so approval and allowlist candidate resolution no longer treat them as cwd-relative commands. (#58040) Thanks @SnowSky1.
19+
- Exec/preflight: fail closed on complex interpreter invocations that would otherwise skip script-content validation, and correctly inspect quoted script paths before host execution. Thanks @pgondhi987.
1920

2021
## 2026.4.2-beta.1
2122

‎extensions/discord/src/components.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ import {
2828
buildDiscordModalCustomId as buildDiscordModalCustomIdImpl,
2929
parseDiscordModalCustomIdForCarbon as parseDiscordModalCustomIdForCarbonImpl,
3030
} from "./component-custom-id.js";
31-
3231
// Some test-only module graphs partially mock `@buape/carbon` and can drop `Modal`.
3332
// Keep dynamic form definitions loadable instead of crashing unrelated suites.
3433
const ModalBase: typeof Modal = (Modal ?? class {}) as typeof Modal;

‎extensions/discord/src/monitor/agent-components.wildcard.test.ts‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { beforeAll, describe, expect, it, vi } from "vitest";
1+
import { beforeAll, describe, expect, it } from "vitest";
22

3-
let buildDiscordComponentCustomId: typeof import("../components.js").buildDiscordComponentCustomId;
4-
let buildDiscordModalCustomId: typeof import("../components.js").buildDiscordModalCustomId;
3+
let buildDiscordComponentCustomId: typeof import("../component-custom-id.js").buildDiscordComponentCustomId;
4+
let buildDiscordModalCustomId: typeof import("../component-custom-id.js").buildDiscordModalCustomId;
55
let createDiscordComponentButton: typeof import("./agent-components.js").createDiscordComponentButton;
66
let createDiscordComponentChannelSelect: typeof import("./agent-components.js").createDiscordComponentChannelSelect;
77
let createDiscordComponentMentionableSelect: typeof import("./agent-components.js").createDiscordComponentMentionableSelect;
@@ -11,7 +11,8 @@ let createDiscordComponentStringSelect: typeof import("./agent-components.js").c
1111
let createDiscordComponentUserSelect: typeof import("./agent-components.js").createDiscordComponentUserSelect;
1212

1313
beforeAll(async () => {
14-
({ buildDiscordComponentCustomId, buildDiscordModalCustomId } = await import("../components.js"));
14+
({ buildDiscordComponentCustomId, buildDiscordModalCustomId } =
15+
await import("../component-custom-id.js"));
1516
({
1617
createDiscordComponentButton,
1718
createDiscordComponentChannelSelect,

0 commit comments

Comments
 (0)