style: fix formatting drift in security allowlist checks

This commit is contained in:
Peter Steinberger
2026-02-19 13:30:52 +00:00
parent ff74d89e86
commit 268b0dc921
3 changed files with 10 additions and 11 deletions

View File

@@ -1,5 +1,3 @@
import path from "node:path";
import type { ExecAllowlistEntry } from "./exec-approvals.js";
import { import {
DEFAULT_SAFE_BINS, DEFAULT_SAFE_BINS,
analyzeShellCommand, analyzeShellCommand,
@@ -11,6 +9,7 @@ import {
type CommandResolution, type CommandResolution,
type ExecCommandSegment, type ExecCommandSegment,
} from "./exec-approvals-analysis.js"; } from "./exec-approvals-analysis.js";
import type { ExecAllowlistEntry } from "./exec-approvals.js";
import { import {
SAFE_BIN_GENERIC_PROFILE, SAFE_BIN_GENERIC_PROFILE,
SAFE_BIN_PROFILES, SAFE_BIN_PROFILES,

View File

@@ -1,20 +1,20 @@
import { isToolAllowedByPolicies } from "../agents/pi-tools.policy.js";
import {
resolveSandboxConfigForAgent,
resolveSandboxToolPolicyForAgent,
} from "../agents/sandbox.js";
/** /**
* Synchronous security audit collector functions. * Synchronous security audit collector functions.
* *
* These functions analyze config-based security properties without I/O. * These functions analyze config-based security properties without I/O.
*/ */
import type { SandboxToolPolicy } from "../agents/sandbox/types.js"; import type { SandboxToolPolicy } from "../agents/sandbox/types.js";
import type { OpenClawConfig } from "../config/config.js";
import type { AgentToolsConfig } from "../config/types.tools.js";
import { isToolAllowedByPolicies } from "../agents/pi-tools.policy.js";
import {
resolveSandboxConfigForAgent,
resolveSandboxToolPolicyForAgent,
} from "../agents/sandbox.js";
import { getBlockedBindReason } from "../agents/sandbox/validate-sandbox-security.js"; import { getBlockedBindReason } from "../agents/sandbox/validate-sandbox-security.js";
import { resolveToolProfilePolicy } from "../agents/tool-policy.js"; import { resolveToolProfilePolicy } from "../agents/tool-policy.js";
import { resolveBrowserConfig } from "../browser/config.js"; import { resolveBrowserConfig } from "../browser/config.js";
import { formatCliCommand } from "../cli/command-format.js"; import { formatCliCommand } from "../cli/command-format.js";
import type { OpenClawConfig } from "../config/config.js";
import type { AgentToolsConfig } from "../config/types.tools.js";
import { resolveGatewayAuth } from "../gateway/auth.js"; import { resolveGatewayAuth } from "../gateway/auth.js";
import { resolveNodeCommandAllowlist } from "../gateway/node-command-policy.js"; import { resolveNodeCommandAllowlist } from "../gateway/node-command-policy.js";
import { inferParamBFromIdOrName } from "../shared/model-param-b.js"; import { inferParamBFromIdOrName } from "../shared/model-param-b.js";

View File

@@ -1,9 +1,8 @@
import type { OpenClawConfig } from "../config/config.js";
import type { ExecFn } from "./windows-acl.js";
import { resolveBrowserConfig, resolveProfile } from "../browser/config.js"; import { resolveBrowserConfig, resolveProfile } from "../browser/config.js";
import { resolveBrowserControlAuth } from "../browser/control-auth.js"; import { resolveBrowserControlAuth } from "../browser/control-auth.js";
import { listChannelPlugins } from "../channels/plugins/index.js"; import { listChannelPlugins } from "../channels/plugins/index.js";
import { formatCliCommand } from "../cli/command-format.js"; import { formatCliCommand } from "../cli/command-format.js";
import type { OpenClawConfig } from "../config/config.js";
import { resolveConfigPath, resolveStateDir } from "../config/paths.js"; import { resolveConfigPath, resolveStateDir } from "../config/paths.js";
import { resolveGatewayAuth } from "../gateway/auth.js"; import { resolveGatewayAuth } from "../gateway/auth.js";
import { buildGatewayConnectionDetails } from "../gateway/call.js"; import { buildGatewayConnectionDetails } from "../gateway/call.js";
@@ -37,6 +36,7 @@ import {
inspectPathPermissions, inspectPathPermissions,
} from "./audit-fs.js"; } from "./audit-fs.js";
import { DEFAULT_GATEWAY_HTTP_TOOL_DENY } from "./dangerous-tools.js"; import { DEFAULT_GATEWAY_HTTP_TOOL_DENY } from "./dangerous-tools.js";
import type { ExecFn } from "./windows-acl.js";
export type SecurityAuditSeverity = "info" | "warn" | "critical"; export type SecurityAuditSeverity = "info" | "warn" | "critical";