chore: format sources and update protocol outputs
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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 });
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user