Skip to content

Commit bcb71f9

Browse files
authored
Merge pull request #149 from syncable-dev/develop
Develop
2 parents 6a09fb8 + 7287c0c commit bcb71f9

17 files changed

Lines changed: 1009 additions & 242 deletions

File tree

.qoder/quests/vulnerability-fix.md

Lines changed: 516 additions & 0 deletions
Large diffs are not rendered by default.

src/analyzer/display/color_adapter.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ impl ColorAdapter {
5757
"Apple_Terminal" => {
5858
// macOS Terminal.app - check for light theme indicators
5959
// Many users have light themes, so be more aggressive
60-
if let Ok(term_session_id) = env::var("TERM_SESSION_ID") {
60+
if let Ok(_term_session_id) = env::var("TERM_SESSION_ID") {
6161
// If we can't detect definitively, assume light for Terminal.app
6262
// since many users use the default light theme
6363
return ColorScheme::Light;
@@ -66,7 +66,7 @@ impl ColorAdapter {
6666
}
6767
"iTerm.app" => {
6868
// iTerm2 - check for theme hints
69-
if let Ok(iterm_session_id) = env::var("ITERM_SESSION_ID") {
69+
if let Ok(_iterm_session_id) = env::var("ITERM_SESSION_ID") {
7070
// Default to dark for iTerm as it's more commonly used with dark themes
7171
return ColorScheme::Dark;
7272
}

src/analyzer/security/turbo/pattern_engine.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -258,8 +258,8 @@ impl PatternEngine {
258258
fn calculate_confidence(&self, line: &str, content: &str, pattern: &CompiledPattern, file_meta: &super::file_discovery::FileMetadata) -> f32 {
259259
let mut confidence: f32 = 0.6;
260260

261-
let line_lower = line.to_lowercase();
262-
let content_lower = content.to_lowercase();
261+
let _line_lower = line.to_lowercase();
262+
let _content_lower = content.to_lowercase();
263263

264264
// Enhanced false positive detection
265265
if self.is_obvious_false_positive(line, content, file_meta) {
@@ -679,7 +679,7 @@ impl PatternEngine {
679679
/// Load default security patterns - focused on ACTUAL secrets, not references
680680
fn load_default_patterns(
681681
secret_patterns: &mut Vec<(String, Arc<CompiledPattern>)>,
682-
env_var_patterns: &mut Vec<(String, Arc<CompiledPattern>)>,
682+
_env_var_patterns: &mut Vec<(String, Arc<CompiledPattern>)>,
683683
api_key_patterns: &mut Vec<(String, Arc<CompiledPattern>)>,
684684
complex_patterns: &mut Vec<(Regex, Arc<CompiledPattern>)>,
685685
) -> Result<(), SecurityError> {

src/analyzer/tool_management/installer.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
use crate::analyzer::dependency_parser::Language;
22
use crate::analyzer::tool_management::{ToolDetector, InstallationSource};
3-
use crate::error::{AnalysisError, IaCGeneratorError, Result};
4-
use log::{info, warn, debug};
3+
use crate::error::Result;
54
use std::collections::HashMap;
65
use thiserror::Error;
76

src/analyzer/tool_management/installers/go.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use crate::analyzer::tool_management::ToolDetector;
2-
use crate::error::{AnalysisError, IaCGeneratorError, Result};
2+
use crate::error::Result;
33
use super::common::InstallationUtils;
44
use std::collections::HashMap;
55
use log::{info, warn};

src/analyzer/tool_management/installers/javascript.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ use crate::error::{AnalysisError, IaCGeneratorError, Result};
33
use super::common::InstallationUtils;
44
use std::collections::HashMap;
55
use std::process::Command;
6-
use log::{info, warn, debug};
6+
use log::{info, warn};
77

88
/// Ensure npm is available (comes with Node.js)
99
pub fn ensure_npm(
1010
tool_detector: &mut ToolDetector,
11-
installed_tools: &mut HashMap<String, bool>,
11+
_installed_tools: &mut HashMap<String, bool>,
1212
) -> Result<()> {
1313
if tool_detector.detect_tool("npm").available {
1414
return Ok(());

src/analyzer/tool_management/installers/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ pub mod java;
1212
pub use common::InstallationStrategy;
1313

1414
use crate::error::Result;
15-
use std::collections::HashMap;
1615

1716
/// Common trait for tool installers
1817
pub trait ToolInstaller {

src/analyzer/tool_management/installers/rust.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use crate::analyzer::tool_management::ToolDetector;
22
use crate::error::{AnalysisError, IaCGeneratorError, Result};
33
use super::common::InstallationUtils;
44
use std::collections::HashMap;
5-
use log::{info, warn};
5+
use log::info;
66

77
/// Install cargo-audit for Rust vulnerability scanning
88
pub fn install_cargo_audit(

src/analyzer/tool_management/status.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
use crate::analyzer::dependency_parser::Language;
2-
use crate::analyzer::tool_management::{ToolDetector, ToolStatus, InstallationSource};
3-
use std::collections::HashMap;
2+
use crate::analyzer::tool_management::{ToolDetector, InstallationSource};
43

54
/// Handles reporting and display of tool status information
65
pub struct ToolStatusReporter {

src/analyzer/vulnerability/checkers/go.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use std::path::Path;
2-
use log::{info, warn};
2+
use log::info;
33

44
use crate::analyzer::dependency_parser::DependencyInfo;
55
use super::{LanguageVulnerabilityChecker, VulnerableDependency, VulnerabilityError};

0 commit comments

Comments
 (0)