-
Notifications
You must be signed in to change notification settings - Fork 1
Cleaning up log creation #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -105,10 +105,10 @@ fn load_shield_config() -> Option<ShieldConfig> { | |||||||||||||
| if yaml_path.exists() { | ||||||||||||||
| let content = fs::read_to_string(yaml_path).ok()?; | ||||||||||||||
| let config: ShieldConfig = serde_yaml::from_str(&content).ok()?; | ||||||||||||||
| println!("📋 Loaded shieldci.yml configuration"); | ||||||||||||||
| println!("Loaded shieldci.yml configuration"); | ||||||||||||||
| Some(config) | ||||||||||||||
| } else { | ||||||||||||||
| println!("⚠️ No shieldci.yml found, falling back to auto-detection"); | ||||||||||||||
| println!("No shieldci.yml found, falling back to auto-detection"); | ||||||||||||||
| None | ||||||||||||||
| } | ||||||||||||||
| } | ||||||||||||||
|
|
@@ -156,12 +156,12 @@ fn fetch_config_from_shell() -> TargetConfig { | |||||||||||||
|
|
||||||||||||||
| fn launch_sandbox(config: &TargetConfig) { | ||||||||||||||
| if !config.build_command.is_empty() { | ||||||||||||||
| println!("⚙️ Running build: {}", config.build_command); | ||||||||||||||
| println!("Running build: {}", config.build_command); | ||||||||||||||
| let parts: Vec<&str> = config.build_command.split_whitespace().collect(); | ||||||||||||||
| let _ = Command::new(parts[0]).args(&parts[1..]).status(); | ||||||||||||||
| } | ||||||||||||||
|
|
||||||||||||||
| println!("🚀 Launching {} server on {}...", config.framework, config.target_url); | ||||||||||||||
| println!("Launching {} server", config.framework); | ||||||||||||||
|
||||||||||||||
| println!("Launching {} server", config.framework); | |
| println!( | |
| "Launching {} server at {} using: {}", | |
| config.framework, config.target_url, config.run_command | |
| ); |
Copilot
AI
Mar 7, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This now uses format!("Target failed to respond.") with no interpolation, which typically triggers a Clippy warning and adds noise. Prefer returning a plain "...".to_string()/String::from(...) here.
| Err(format!("Target failed to respond.")) | |
| Err("Target failed to respond.".to_string()) |
Copilot
AI
Mar 7, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wait_for_target logs and returns an error without including the url, which makes failures harder to diagnose. Consider including the URL (and possibly retry count/timeout) in both the initial log and the returned error string.
Copilot
AI
Mar 7, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The MCP strike log line no longer includes the target being scanned. Including tool_call.target (or a sanitized/shortened version) would make scan output much easier to correlate with later results in attack_trace and in CI logs.
| println!("Initiating MCP Handshake & Strike: {}", tool_call.tool); | |
| println!( | |
| "Initiating MCP Handshake & Strike: tool={} target={}", | |
| tool_call.tool, | |
| tool_call.target | |
| ); |
Copilot
AI
Mar 7, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The final report message now prints a leading space before “Saved to SHIELD_REPORT.md” ("\n Saved..."), which looks like an accidental formatting artifact in CLI output. Remove the extra space (or restore the prior formatting) so the message renders cleanly.
| println!("\n--- FINAL REPORT ---\n{}\n Saved to SHIELD_REPORT.md", report); | |
| println!("\n--- FINAL REPORT ---\n{}\nSaved to SHIELD_REPORT.md", report); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change removes emoji/prefixes from some log lines, but the file still prints emojis elsewhere (e.g., the scout and boot messages). If the goal is to “clean up log creation”, consider applying a consistent logging format across the remaining
println!calls (either all plain text or all with the same prefixing style).