chore: format sources and update protocol outputs

This commit is contained in:
Peter Steinberger
2026-01-15 05:17:03 +00:00
parent 2d066b8715
commit 139f80a291
33 changed files with 186 additions and 223 deletions

View File

@@ -84,7 +84,10 @@ describe("security audit", () => {
expect(res.findings).toEqual(
expect.arrayContaining([
expect.objectContaining({ checkId: "browser.control_remote_no_token", severity: "critical" }),
expect.objectContaining({
checkId: "browser.control_remote_no_token",
severity: "critical",
}),
]),
);
} finally {

View File

@@ -351,7 +351,9 @@ function collectBrowserControlFindings(cfg: ClawdbotConfig): SecurityAuditFindin
const tailscaleMode = cfg.gateway?.tailscale?.mode ?? "off";
const gatewayAuth = resolveGatewayAuth({ authConfig: cfg.gateway?.auth, tailscaleMode });
const gatewayToken =
gatewayAuth.mode === "token" && typeof gatewayAuth.token === "string" && gatewayAuth.token.trim()
gatewayAuth.mode === "token" &&
typeof gatewayAuth.token === "string" &&
gatewayAuth.token.trim()
? gatewayAuth.token.trim()
: null;

View File

@@ -157,10 +157,11 @@ function setWhatsAppGroupAllowFromFromStore(params: {
}
}
function applyConfigFixes(params: {
function applyConfigFixes(params: { cfg: ClawdbotConfig; env: NodeJS.ProcessEnv }): {
cfg: ClawdbotConfig;
env: NodeJS.ProcessEnv;
}): { cfg: ClawdbotConfig; changes: string[]; policyFlips: Set<string> } {
changes: string[];
policyFlips: Set<string>;
} {
const next = structuredClone(params.cfg ?? {});
const changes: string[] = [];
const policyFlips = new Set<string>();
@@ -170,7 +171,15 @@ function applyConfigFixes(params: {
changes.push('logging.redactSensitive=off -> "tools"');
}
for (const channel of ["telegram", "whatsapp", "discord", "signal", "imessage", "slack", "msteams"]) {
for (const channel of [
"telegram",
"whatsapp",
"discord",
"signal",
"imessage",
"slack",
"msteams",
]) {
setGroupPolicyAllowlist({ cfg: next, channel, changes, policyFlips });
}