mirror of
https://github.com/fawney19/Aether.git
synced 2026-10-10 19:29:50 +08:00
feat(security): harden gateway boundaries and usage policies
Consolidate subscription usage policy enforcement, privacy-safe persistence, and gateway security hardening into one reviewable change. Includes bounded HTTP and execution envelopes, header and protocol guards, DNS and relay validation, authentication and secret projection hardening, secure backup/install paths, and regression coverage.
This commit is contained in:
@@ -15,7 +15,8 @@ pub struct VideoTaskRegistry {
|
||||
}
|
||||
|
||||
impl VideoTaskRegistry {
|
||||
pub fn insert(&mut self, snapshot: LocalVideoTaskSnapshot) {
|
||||
pub fn insert(&mut self, mut snapshot: LocalVideoTaskSnapshot) {
|
||||
snapshot.sanitize_persisted_diagnostics();
|
||||
match &snapshot {
|
||||
LocalVideoTaskSnapshot::OpenAi(seed) => {
|
||||
self.openai.insert(seed.local_task_id.clone(), snapshot);
|
||||
@@ -97,4 +98,12 @@ impl VideoTaskRegistry {
|
||||
seed.apply_provider_body(provider_body);
|
||||
true
|
||||
}
|
||||
|
||||
pub(crate) fn sanitize_persisted_diagnostics(&mut self) -> bool {
|
||||
let mut changed = false;
|
||||
for snapshot in self.openai.values_mut().chain(self.gemini.values_mut()) {
|
||||
changed = snapshot.sanitize_persisted_diagnostics() || changed;
|
||||
}
|
||||
changed
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user