Conversation
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
… similar to javascript version
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.
There was a problem hiding this comment.
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
SecurityScanModeenum and CLI--modeoption for user-selectable scan modes - Integrate
TurboSecurityAnalyzer,TurboConfig, andScanModeinhandle_security, removing old progress spinner - Add new turbo security subsystem under
src/analyzer/security/turbowith 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_modeoverride logic (both flags -> Lightning,include_low-> Paranoid, and direct--modemapping) to prevent regressions in these conditionals.
let scan_mode = if no_secrets && no_code_patterns {
src/cli.rs:304
- [nitpick] The
SecurityScanModeenum 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
--modewhen--no-secretsand--no-code-patternsor--include-loware 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 {
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.