mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-12 07:20:45 +00:00
chore(format): swiftformat host env and exec approvals (#31115)
This commit is contained in:
@@ -535,7 +535,9 @@ enum ExecApprovalsStore {
|
||||
[.posixPermissions: self.secureStateDirPermissions],
|
||||
ofItemAtPath: url.path)
|
||||
} catch {
|
||||
self.logger.warning("exec approvals state dir permission hardening failed: \(error.localizedDescription, privacy: .public)")
|
||||
self.logger
|
||||
.warning(
|
||||
"exec approvals state dir permission hardening failed: \(error.localizedDescription, privacy: .public)")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -686,7 +686,8 @@ private final class ExecApprovalsSocketServer: @unchecked Sendable {
|
||||
do {
|
||||
try ExecApprovalsSocketPathGuard.removeExistingSocket(at: self.socketPath)
|
||||
} catch {
|
||||
self.logger.warning("exec approvals socket cleanup failed: \(error.localizedDescription, privacy: .public)")
|
||||
self.logger
|
||||
.warning("exec approvals socket cleanup failed: \(error.localizedDescription, privacy: .public)")
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -726,7 +727,8 @@ private final class ExecApprovalsSocketServer: @unchecked Sendable {
|
||||
try ExecApprovalsSocketPathGuard.hardenParentDirectory(for: self.socketPath)
|
||||
try ExecApprovalsSocketPathGuard.removeExistingSocket(at: self.socketPath)
|
||||
} catch {
|
||||
self.logger.error("exec approvals socket path hardening failed: \(error.localizedDescription, privacy: .public)")
|
||||
self.logger
|
||||
.error("exec approvals socket path hardening failed: \(error.localizedDescription, privacy: .public)")
|
||||
close(fd)
|
||||
return -1
|
||||
}
|
||||
|
||||
@@ -22,17 +22,17 @@ enum HostEnvSecurityPolicy {
|
||||
"PS4",
|
||||
"GCONV_PATH",
|
||||
"IFS",
|
||||
"SSLKEYLOGFILE"
|
||||
"SSLKEYLOGFILE",
|
||||
]
|
||||
|
||||
static let blockedOverrideKeys: Set<String> = [
|
||||
"HOME",
|
||||
"ZDOTDIR"
|
||||
"ZDOTDIR",
|
||||
]
|
||||
|
||||
static let blockedPrefixes: [String] = [
|
||||
"DYLD_",
|
||||
"LD_",
|
||||
"BASH_FUNC_"
|
||||
"BASH_FUNC_",
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user