2
0

feat(config): add security preset for secrets scanning and publish safety checks

This commit is contained in:
2026-03-24 15:44:34 +09:00
parent 09cc064f03
commit 210249394a
2 changed files with 5 additions and 1 deletions

View File

@@ -32,6 +32,10 @@ pub fn preset(name: &str) -> Option<Vec<AgentConfig>> {
AgentConfig { name: "bug-hunt".into(), task: "Find one concrete bug in the codebase. Give file:line and a fix.".into(), cwd: cwd.clone() },
AgentConfig { name: "simplify".into(), task: "Find one function that can be removed or simplified. Be specific.".into(), cwd },
]),
"security" => Some(vec![
AgentConfig { name: "secrets".into(), task: "Scan src/ for hardcoded secrets, API keys, tokens, passwords, personal emails, private IPs. Also check for hardcoded absolute paths like /Users/ or /home/. Report file:line for each finding, or 'clean' if none.".into(), cwd: cwd.clone() },
AgentConfig { name: "safe-publish".into(), task: "Check if this repo is safe to push publicly. Look for: .env files, credentials in config/, personal info in docs/, sensitive data in git history (check git log --all --oneline for suspicious commit messages). Report issues or 'safe'.".into(), cwd },
]),
"report" => Some(vec![
AgentConfig { name: "agent-view".into(), task: "You are an agent inside aishell. Reflect: What context did you receive? What was missing? What would make your job easier? 3 concrete points from your perspective.".into(), cwd: cwd.clone() },
AgentConfig { name: "user-view".into(), task: "You are a developer using aishell daily. Run aishell help and aishell context. What are the 3 biggest friction points in the daily workflow?".into(), cwd: cwd.clone() },

View File

@@ -145,7 +145,7 @@ fn print_help() {
println!(" aishell review Review changes + auto-commit if clean");
println!(" aishell daily Health + quality + idea check");
println!(" aishell run <task> Run single agent");
println!(" aishell run -p <preset> Preset: daily, review, improve, report");
println!(" aishell run -p <preset> Preset: daily, review, improve, security, report");
println!(" aishell run -f <config> Custom config file");
println!(" --loop Loop mode (default: run once)");
println!(" aishell plan -p <preset> Preview agent config without running");