Skip to content

Develop#63

Merged
Alex793x merged 11 commits intomainfrom
develop
Jun 9, 2025
Merged

Develop#63
Alex793x merged 11 commits intomainfrom
develop

Conversation

@Alex793x
Copy link
Contributor

@Alex793x Alex793x commented Jun 9, 2025

No description provided.

Alex Holmberg added 11 commits June 7, 2025 23:10
With the new update we don't get false positive towards files name conventions such as .env.samples, .env.templates, env.examples etc.
We are also skipping if files are ignored within .gitignore, since those files aren't being track.
upcoming is to ensure git cache isn't storing .gitignored files, to ensure mistakes doesn't happen
With next update, we've added caching, performance improvements and concurrency updates.
The security scan is now performing from 1 min -> 8.4 avg scannings, marking a way faster scanning experience.
@Alex793x Alex793x requested a review from Copilot June 9, 2025 22:02
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR replaces the existing modular security analyzer with a new high-performance “turbo” analyzer, introduces a CLI --mode flag for selectable scan modes, and updates documentation and tests to reflect the change.

  • Add SecurityScanMode enum and CLI --mode option for user-selectable scan modes
  • Integrate TurboSecurityAnalyzer, TurboConfig, and ScanMode in handle_security, removing old progress spinner
  • Add new turbo security subsystem under src/analyzer/security/turbo with caching, parallel scanning, and tests; update README and Cargo dependencies

Reviewed Changes

Copilot reviewed 19 out of 19 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/main.rs Replace old analyzer with TurboSecurityAnalyzer, map CLI mode to internal ScanMode and adjust output
src/cli.rs Add SecurityScanMode enum and --mode CLI parameter
src/analyzer/security_analyzer.rs Remove unused modular analyzer code
src/analyzer/security/turbo/mod.rs New turbo analyzer implementation
src/analyzer/security/turbo/cache.rs New caching layer with DashMap and LRU eviction
src/analyzer/security/turbo/README.md Documentation for turbo analyzer
src/analyzer/security/mod.rs Re-export turbo analyzer types, remove old modules
src/analyzer/mod.rs Simplify re-exports
examples/enhanced_security.rs Remove outdated example
README.md Update CLI examples and security engine docs
Cargo.toml Add dependencies for turbo analyzer
Comments suppressed due to low confidence (3)

src/main.rs:1090

  • We should add unit tests for the scan_mode override logic (both flags -> Lightning, include_low -> Paranoid, and direct --mode mapping) to prevent regressions in these conditionals.
let scan_mode = if no_secrets && no_code_patterns {

src/cli.rs:304

  • [nitpick] The SecurityScanMode enum variants lack individual doc comments. Adding short descriptions to each variant will improve the generated CLI help and future maintainability.
pub enum SecurityScanMode {

src/main.rs:1090

  • [nitpick] Overriding --mode when --no-secrets and --no-code-patterns or --include-low are provided may surprise users. Document this precedence clearly in the CLI help or consider a warning when flags override the chosen mode.
let scan_mode = if no_secrets && no_code_patterns {

@Alex793x Alex793x merged commit 426ac2d into main Jun 9, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants