mirror of
https://github.com/KeygraphHQ/shannon.git
synced 2026-05-31 12:49:30 +02:00
8381198c41
* feat: add configurable output directory with --output flag Add --output CLI flag to specify custom output directory for session folders containing audit logs, prompts, agent logs, and deliverables. Changes: - Add --output <path> CLI flag parsing - Update generateAuditPath() to use custom path when provided - Add consolidateOutputs() to copy deliverables to session folder - Update Docker examples with volume mounts for output directories - Default remains ./audit-logs/ when --output is not specified 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * feat: add configurable output directory with --output flag Add --output CLI flag to specify custom output directory for session folders containing audit logs, prompts, agent logs, and deliverables. Changes: - Add --output <path> CLI flag parsing - Store outputPath in Session interface for persistence - Update generateAuditPath() to use custom path when provided - Pass outputPath through pre-recon and checkpoint-manager - Add consolidateOutputs() to copy deliverables to session folder - Update Docker examples with volume mount instructions - Default remains ./audit-logs/ when --output is not specified 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * chore: add gitkeep and fix formatting * fix: correct docker run command formatting in README Remove invalid inline comments after backslash continuations in docker run commands. Comments cannot appear after backslash line continuations in shell scripts, as the backslash escapes the newline character. Reorganized comments to appear on separate lines before or after the command block for better clarity and proper shell syntax. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com>
86 lines
4.1 KiB
TypeScript
86 lines
4.1 KiB
TypeScript
// Copyright (C) 2025 Keygraph, Inc.
|
|
//
|
|
// This program is free software: you can redistribute it and/or modify
|
|
// it under the terms of the GNU Affero General Public License version 3
|
|
// as published by the Free Software Foundation.
|
|
|
|
import chalk from 'chalk';
|
|
import { displaySplashScreen } from '../splash-screen.js';
|
|
|
|
// Helper function: Display help information
|
|
export function showHelp(): void {
|
|
console.log(chalk.cyan.bold('AI Penetration Testing Agent'));
|
|
console.log(chalk.gray('Automated security assessment tool\n'));
|
|
|
|
console.log(chalk.yellow.bold('NORMAL MODE (Creates Sessions):'));
|
|
console.log(
|
|
' shannon <WEB_URL> <REPO_PATH> [--config config.yaml] [--pipeline-testing]'
|
|
);
|
|
console.log(
|
|
' shannon <WEB_URL> <REPO_PATH> --setup-only # Setup local repo and create session only\n'
|
|
);
|
|
|
|
console.log(chalk.yellow.bold('DEVELOPER MODE (Operates on Existing Sessions):'));
|
|
console.log(' shannon --run-phase <phase-name> [--pipeline-testing]');
|
|
console.log(' shannon --run-all [--pipeline-testing]');
|
|
console.log(' shannon --rollback-to <agent-name>');
|
|
console.log(' shannon --rerun <agent-name> [--pipeline-testing]');
|
|
console.log(' shannon --status');
|
|
console.log(' shannon --list-agents');
|
|
console.log(' shannon --cleanup [session-id] # Delete sessions\n');
|
|
|
|
console.log(chalk.yellow.bold('OPTIONS:'));
|
|
console.log(
|
|
' --config <file> YAML configuration file for authentication and testing parameters'
|
|
);
|
|
console.log(
|
|
' --output <path> Custom output directory for session folder (default: ./audit-logs/)'
|
|
);
|
|
console.log(
|
|
' --pipeline-testing Use minimal prompts for fast pipeline testing (creates minimal deliverables)'
|
|
);
|
|
console.log(
|
|
' --disable-loader Disable the animated progress loader (useful when logs interfere with spinner)\n'
|
|
);
|
|
|
|
console.log(chalk.yellow.bold('DEVELOPER COMMANDS:'));
|
|
console.log(
|
|
' --run-phase Run all agents in a phase (parallel execution for 5x speedup)'
|
|
);
|
|
console.log(' --run-all Run all remaining agents to completion (parallel execution)');
|
|
console.log(' --rollback-to Rollback git workspace to agent checkpoint');
|
|
console.log(' --rerun Rollback and rerun specific agent');
|
|
console.log(' --status Show current session status and progress');
|
|
console.log(' --list-agents List all available agents and phases');
|
|
console.log(' --cleanup Delete all sessions or specific session by ID\n');
|
|
|
|
console.log(chalk.yellow.bold('EXAMPLES:'));
|
|
console.log(' # Normal mode - create new session');
|
|
console.log(' shannon "https://example.com" "/path/to/local/repo"');
|
|
console.log(' shannon "https://example.com" "/path/to/local/repo" --config auth.yaml');
|
|
console.log(' shannon "https://example.com" "/path/to/local/repo" --output /path/to/reports');
|
|
console.log(
|
|
' shannon "https://example.com" "/path/to/local/repo" --setup-only # Setup only\n'
|
|
);
|
|
|
|
console.log(' # Developer mode - operate on existing session');
|
|
console.log(' shannon --status # Show session status');
|
|
console.log(' shannon --run-phase exploitation # Run entire phase');
|
|
console.log(' shannon --run-all # Run all remaining agents');
|
|
console.log(' shannon --rerun xss-vuln # Fix and rerun failed agent');
|
|
console.log(' shannon --cleanup # Delete all sessions');
|
|
console.log(' shannon --cleanup <session-id> # Delete specific session\n');
|
|
|
|
console.log(chalk.yellow.bold('REQUIREMENTS:'));
|
|
console.log(' • WEB_URL must start with http:// or https://');
|
|
console.log(' • REPO_PATH must be an accessible local directory');
|
|
console.log(' • Only test systems you own or have permission to test');
|
|
console.log(' • Developer mode requires existing pentest session\n');
|
|
|
|
console.log(chalk.yellow.bold('ENVIRONMENT VARIABLES:'));
|
|
console.log(' PENTEST_MAX_RETRIES Number of retries for AI agents (default: 3)');
|
|
}
|
|
|
|
// Export the splash screen function for use in main
|
|
export { displaySplashScreen };
|