fix: SSH tunnel leak, cmd_bao injection, discovery cache, DNS async
- Store SSH tunnel child in static Mutex (was dropped immediately) - cmd_bao: use env(1) for VAULT_TOKEN instead of sh -c (no shell injection) - Cache API discovery across kube_apply documents (was per-doc roundtrip) - Replace blocking ToSocketAddrs with tokio::net::lookup_host - Remove double YAML->JSON->string->JSON serialization in kube_apply - ResultExt::ctx now preserves all SunbeamError variants
This commit is contained in:
16
src/error.rs
16
src/error.rs
@@ -190,6 +190,14 @@ impl<T, E: Into<SunbeamError>> ResultExt<T> for std::result::Result<T, E> {
|
||||
context: context.to_string(),
|
||||
source,
|
||||
},
|
||||
SunbeamError::Secrets(msg) => SunbeamError::Secrets(format!("{context}: {msg}")),
|
||||
SunbeamError::Config(msg) => SunbeamError::Config(format!("{context}: {msg}")),
|
||||
SunbeamError::Build(msg) => SunbeamError::Build(format!("{context}: {msg}")),
|
||||
SunbeamError::Identity(msg) => SunbeamError::Identity(format!("{context}: {msg}")),
|
||||
SunbeamError::ExternalTool { tool, detail } => SunbeamError::ExternalTool {
|
||||
tool,
|
||||
detail: format!("{context}: {detail}"),
|
||||
},
|
||||
other => SunbeamError::Other(format!("{context}: {other}")),
|
||||
}
|
||||
})
|
||||
@@ -212,6 +220,14 @@ impl<T, E: Into<SunbeamError>> ResultExt<T> for std::result::Result<T, E> {
|
||||
context,
|
||||
source,
|
||||
},
|
||||
SunbeamError::Secrets(msg) => SunbeamError::Secrets(format!("{context}: {msg}")),
|
||||
SunbeamError::Config(msg) => SunbeamError::Config(format!("{context}: {msg}")),
|
||||
SunbeamError::Build(msg) => SunbeamError::Build(format!("{context}: {msg}")),
|
||||
SunbeamError::Identity(msg) => SunbeamError::Identity(format!("{context}: {msg}")),
|
||||
SunbeamError::ExternalTool { tool, detail } => SunbeamError::ExternalTool {
|
||||
tool,
|
||||
detail: format!("{context}: {detail}"),
|
||||
},
|
||||
other => SunbeamError::Other(format!("{context}: {other}")),
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user