Skip to content

Commit

Permalink
fix: search github no data dont't exec db save
Browse files Browse the repository at this point in the history
  • Loading branch information
fan-tastic-z committed Jun 7, 2024
1 parent b0f3de3 commit 4e39f4c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "watchvuln-rs"
version = "0.1.7"
version = "0.1.8"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
19 changes: 10 additions & 9 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,16 +137,17 @@ impl WatchVulnApp {
if !vuln.cve.is_empty() && self.app_context.config.github_search {
let links = search_github_poc(&vuln.cve).await;
info!("{} found {} links from github", &vuln.cve, links.len());
if let Err(err) = vuln_informations::Model::update_github_search_by_key(
&self.app_context.db,
&key,
links,
)
.await
{
warn!("update vuln {} github_search error: {}", &vuln.cve, err);
if !links.is_empty() {
if let Err(err) = vuln_informations::Model::update_github_search_by_key(
&self.app_context.db,
&key,
links,
)
.await
{
warn!("update vuln {} github_search error: {}", &vuln.cve, err);
}
}
todo!()
}
let msg = match reader_vulninfo(vuln.into()) {
Ok(msg) => msg,
Expand Down

0 comments on commit 4e39f4c

Please sign in to comment.