Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 3edd1d50ac | |||
| 9ff3b9305c | |||
| e02266511a |
@@ -35,16 +35,11 @@ impl ComplianceAgent {
|
|||||||
config.litellm_model.clone(),
|
config.litellm_model.clone(),
|
||||||
config.litellm_embed_model.clone(),
|
config.litellm_embed_model.clone(),
|
||||||
));
|
));
|
||||||
let http = reqwest::Client::builder()
|
|
||||||
.timeout(std::time::Duration::from_secs(30))
|
|
||||||
.connect_timeout(std::time::Duration::from_secs(10))
|
|
||||||
.build()
|
|
||||||
.unwrap_or_default();
|
|
||||||
Self {
|
Self {
|
||||||
config,
|
config,
|
||||||
db,
|
db,
|
||||||
llm,
|
llm,
|
||||||
http,
|
http: reqwest::Client::new(),
|
||||||
session_streams: Arc::new(DashMap::new()),
|
session_streams: Arc::new(DashMap::new()),
|
||||||
session_pause: Arc::new(DashMap::new()),
|
session_pause: Arc::new(DashMap::new()),
|
||||||
session_semaphore: Arc::new(Semaphore::new(DEFAULT_MAX_CONCURRENT_SESSIONS)),
|
session_semaphore: Arc::new(Semaphore::new(DEFAULT_MAX_CONCURRENT_SESSIONS)),
|
||||||
|
|||||||
@@ -174,26 +174,19 @@ impl PipelineOrchestrator {
|
|||||||
k.expose_secret().to_string()
|
k.expose_secret().to_string()
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
let cve_alerts = match tokio::time::timeout(
|
let cve_alerts = match async {
|
||||||
std::time::Duration::from_secs(600),
|
cve_scanner
|
||||||
async {
|
.scan_dependencies(&repo_id, &mut sbom_entries)
|
||||||
cve_scanner
|
.await
|
||||||
.scan_dependencies(&repo_id, &mut sbom_entries)
|
}
|
||||||
.await
|
.instrument(tracing::info_span!("stage_cve_scanning"))
|
||||||
}
|
|
||||||
.instrument(tracing::info_span!("stage_cve_scanning")),
|
|
||||||
)
|
|
||||||
.await
|
.await
|
||||||
{
|
{
|
||||||
Ok(Ok(alerts)) => alerts,
|
Ok(alerts) => alerts,
|
||||||
Ok(Err(e)) => {
|
Err(e) => {
|
||||||
tracing::warn!("[{repo_id}] CVE scanning failed: {e}");
|
tracing::warn!("[{repo_id}] CVE scanning failed: {e}");
|
||||||
Vec::new()
|
Vec::new()
|
||||||
}
|
}
|
||||||
Err(_) => {
|
|
||||||
tracing::warn!("[{repo_id}] CVE scanning timed out after 10 minutes");
|
|
||||||
Vec::new()
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Stage 4: Pattern Scanning (GDPR + OAuth)
|
// Stage 4: Pattern Scanning (GDPR + OAuth)
|
||||||
|
|||||||
Reference in New Issue
Block a user