Skip to content

Cleaning up log creation#1

Merged
Zenith1415 merged 1 commit into
mainfrom
bugfixes
Mar 7, 2026
Merged

Cleaning up log creation#1
Zenith1415 merged 1 commit into
mainfrom
bugfixes

Conversation

@Zenith1415

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings March 7, 2026 02:33
@Zenith1415 Zenith1415 merged commit ebe9b98 into main Mar 7, 2026
1 of 2 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

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 adjusts CLI log/output strings in the ShieldCI Rust orchestrator to simplify console messaging during config load, sandbox launch, scanning, and report generation.

Changes:

  • Remove emoji/pictographic prefixes from multiple println! log lines.
  • Simplify several status messages during target launch, scanning, and reporting.
  • Touch (but provide no shown content for) all-in-one Docker/entrypoint files.

Reviewed changes

Copilot reviewed 1 out of 3 changed files in this pull request and generated 6 comments.

File Description
src/main.rs Simplifies and standardizes (partially) console output messages across the main scan flow.
entrypoint_allinone.sh File included in PR context but contents not shown here (currently empty in repo view).
Dockerfile.allinone File included in PR context but contents not shown here (currently empty in repo view).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/main.rs

async fn execute_mcp_tool_stdio(tool_call: &ToolCall) -> Result<String, Box<dyn std::error::Error>> {
println!("🤝 Initiating MCP Handshake & Strike: {} on {}", tool_call.tool, tool_call.target);
println!("Initiating MCP Handshake & Strike: {}", tool_call.tool);

Copilot AI Mar 7, 2026

Copy link

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.

Suggested change
println!("Initiating MCP Handshake & Strike: {}", tool_call.tool);
println!(
"Initiating MCP Handshake & Strike: tool={} target={}",
tool_call.tool,
tool_call.target
);

Copilot uses AI. Check for mistakes.
Comment thread src/main.rs
let report = generate_report(&attack_trace, &codebase, exploit_found).await;
fs::write("SHIELD_REPORT.md", &report).expect("Unable to write report");
println!("\n--- FINAL REPORT ---\n{}\n Saved to SHIELD_REPORT.md", report);
println!("\n--- FINAL REPORT ---\n{}\n Saved to SHIELD_REPORT.md", report);

Copilot AI Mar 7, 2026

Copy link

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.

Suggested change
println!("\n--- FINAL REPORT ---\n{}\n Saved to SHIELD_REPORT.md", report);
println!("\n--- FINAL REPORT ---\n{}\nSaved to SHIELD_REPORT.md", report);

Copilot uses AI. Check for mistakes.
Comment thread src/main.rs
Comment on lines +108 to 112
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

Copilot AI Mar 7, 2026

Copy link

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).

Copilot uses AI. Check for mistakes.
Comment thread src/main.rs
}

println!("🚀 Launching {} server on {}...", config.framework, config.target_url);
println!("Launching {} server", config.framework);

Copilot AI Mar 7, 2026

Copy link

Choose a reason for hiding this comment

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

The new launch message no longer includes the target URL/port (it previously logged where the server would be reachable). For troubleshooting it’s helpful to log config.target_url (and/or the run command) along with the framework so users can immediately see what endpoint is expected to come up.

Suggested change
println!("Launching {} server", config.framework);
println!(
"Launching {} server at {} using: {}",
config.framework, config.target_url, config.run_command
);

Copilot uses AI. Check for mistakes.
Comment thread src/main.rs
Comment on lines +175 to 185
println!("Waiting for target to come online");
let client = Client::builder().timeout(Duration::from_secs(2)).build().unwrap();
for _ in 1..=max_retries {
if client.get(url).send().await.is_ok() {
println!("Target is up and responding!");
println!("Target is up and responding");
return Ok(());
}
sleep(Duration::from_secs(2)).await;
}
Err(format!("Target {} failed to respond.", url))
Err(format!("Target failed to respond."))
}

Copilot AI Mar 7, 2026

Copy link

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 uses AI. Check for mistakes.
Comment thread src/main.rs
sleep(Duration::from_secs(2)).await;
}
Err(format!("Target {} failed to respond.", url))
Err(format!("Target failed to respond."))

Copilot AI Mar 7, 2026

Copy link

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.

Suggested change
Err(format!("Target failed to respond."))
Err("Target failed to respond.".to_string())

Copilot uses AI. Check for mistakes.
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.

3 participants