Commit Graph

27 Commits

Author SHA1 Message Date
ajmallesh 55716963da feat: migrate to use MCP tools instead of helper scripts 2025-10-23 11:56:47 -07:00
ajmallesh d6e5db2397 fix: critical bug - exploitation phase was always skipped
ROOT CAUSE:
- Exploitation phase checked session.validationResults to determine eligibility
- validationResults field was removed during audit system refactor
- Field never existed in session schema, so all exploits were skipped

THE FIX:
- Exploitation phase now validates queue files directly when checking eligibility
- Reads exploitation_queue.json and checks if vulnerabilities array is non-empty
- No need to store validation results - just re-validate on demand

CHANGES:
1. runParallelExploit() now calls safeValidateQueueAndDeliverable() directly
2. Removed validationResults parameter from markAgentCompleted()
3. Simplified calculateVulnerabilityAnalysisSummary() - no longer needs validation data
4. Simplified calculateExploitationSummary() - no longer needs validation data

IMPACT:
- Exploitation agents will now run when vulnerabilities are found
- Queue files are the single source of truth for eligibility
- Simpler architecture - no duplicate state storage

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-22 17:41:41 -07:00
ajmallesh 50bf583993 chore: remove run-metadata.json functionality
Reasoning:
- Pollutes target repo with run-metadata.json
- Redundant with audit system (session.json has all metadata)
- Less useful than comprehensive audit logs
- Target repos should stay clean - only deliverables belong there

All debugging info now lives in audit-logs/{hostname}_{sessionId}/session.json

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-22 16:19:40 -07:00
ajmallesh 82909185aa docs: enhance export-metrics.js documentation
- Added comprehensive header comment explaining use case
- Documents data source (session.json from audit-logs)
- CSV output format and use cases clearly described
- Includes usage examples and note about raw data access
- Removes need for separate docs/ folder in repo

Docs were design artifacts, not needed in open source repo.
All relevant documentation now lives in code comments.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-22 16:16:36 -07:00
ajmallesh cb9971241b chore: remove reconcile-session.js script
Reasoning:
- Shannon is a local CLI tool with direct filesystem access
- Manual file editing (JSON, rm -rf) is simpler than reconciliation script
- Automatic reconciliation runs before every command (built-in)
- If auto-reconciliation has bugs, fix the code, don't create workarounds
- Over-engineered for a local development tool

For recovery: Just delete .shannon-store.json or edit JSON files directly

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-22 16:13:50 -07:00
ajmallesh 3babf02d68 feat: implement unified audit system v3.0 with crash-safety and self-healing
## Unified Audit System (v3.0)
- Implemented crash-safe, append-only logging to audit-logs/{hostname}_{sessionId}/
- Added session.json with comprehensive metrics (timing, cost, attempts)
- Agent execution logs with turn-by-turn detail
- Prompt snapshots saved to audit-logs/.../prompts/{agent}.md
- SessionMutex prevents race conditions during parallel execution
- Self-healing reconciliation before every CLI command

## Session Metadata Standardization
- Fixed critical bug: standardized on 'id' field (not 'sessionId') throughout codebase
- Updated: shannon.mjs (recon, report), src/phases/pre-recon.js
- Added validation in AuditSession to fail fast on incorrect field usage
- JavaScript shorthand syntax was causing wrong field names

## Schema Improvements
- session.json: Added cost_usd per phase, removed redundant final_cost_usd
- Renamed 'percentage' -> 'duration_percentage' for clarity
- Simplified agent metrics to single total_cost_usd field
- Removed unused validation object from schema

## Legacy System Removal
- Removed savePromptSnapshot() - prompts now only saved by audit system
- Removed target repo pollution (prompt-snapshots/ no longer created)
- Single source of truth: audit-logs/{hostname}_{sessionId}/prompts/

## Export Script Simplification
- Removed JSON export mode (session.json already exists)
- CSV-only export with clean columns: agent, phase, status, attempts, duration_ms, cost_usd
- Tested on real session data

## Documentation
- Updated CLAUDE.md with audit system architecture
- Added .gitignore entry for audit-logs/

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-22 16:09:08 -07:00
ajmallesh b8dc33f180 chore: remove screenshot saving from Playwright MCP instances
Remove unnecessary screenshot storage to reduce file I/O and disk usage:
- Removed screenshot directory creation
- Removed --output-dir flag from Playwright MCP setup
- Agents can still take screenshots, but they won't persist to disk

Screenshots were not being used by any part of Shannon for analysis
or reporting, making their storage unnecessary overhead.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-22 12:15:47 -07:00
ajmallesh 04f810b9fb chore: remove permanent deliverables copying to Documents folder
Simplified deliverable management by removing automatic copying to ~/Documents/pentest-deliverables/. All deliverables now remain only in <target-repo>/deliverables/, eliminating file duplication and improving UX.

Changes:
- Removed savePermanentDeliverables() function from src/setup/deliverables.js
- Removed function call and related console output from shannon.mjs
- Removed unused 'os' import from deliverables.js

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-22 12:11:48 -07:00
ajmallesh be776c4640 chore: save deliverable script decoupling deliverable creation from the actual content 2025-10-22 11:31:58 -07:00
ajmallesh de8c5ee041 chore: upgrade model from Sonnet 4 -> Sonnet 4.5 2025-10-21 16:34:56 -07:00
ajmallesh dc290a8fc4 Merge pull request #1 from Khaushik-keygraph/main
chore: added logging
2025-10-21 09:16:59 -07:00
Khaushik-keygraph ac15ac284f chore: optimized logging 2025-10-17 13:59:34 +05:30
Khaushik-keygraph e193d04594 chore: added logging 2025-10-17 13:52:13 +05:30
Khaushik-keygraph 6cdd067dd4 Update README.md 2025-10-09 15:54:04 +05:30
Khaushik-keygraph 76d4b3a040 fix: renamed agent filename 2025-10-08 23:49:16 +05:30
ajmallesh c470983d15 docs: update Discord invite link to infinite expiry
Updated Discord invite links in README.md to use a permanent invite link
that will not expire.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-07 14:10:55 -07:00
keygraphVarun ad36ab6a4a Update README.md 2025-10-07 13:50:31 -07:00
keygraphVarun 2ad8278112 Update README.md 2025-10-07 13:09:29 -07:00
keygraphVarun 64126c816a Update README.md 2025-10-07 12:59:22 -07:00
keygraphVarun 2239cee695 Create SHANNON-PRO.md 2025-10-07 12:49:33 -07:00
keygraphVarun ed7cbb0672 Add files via upload
gif
2025-10-07 12:47:04 -07:00
keygraphVarun 3b3151c175 Add files via upload
assets
2025-10-07 11:51:31 -07:00
keygraphVarun e9ee158fc7 Update README.md
italics
2025-10-06 18:28:11 -07:00
keygraphVarun 605b1d9971 Update README.md
typo
2025-10-06 18:27:00 -07:00
keygraphVarun 9a69c705d5 Update LICENSE
Simplified
2025-10-06 18:25:18 -07:00
keygraphVarun 9e213314de Update README.md
fixes
2025-10-06 18:20:41 -07:00
ajmallesh 9327630c45 Initial commit 2025-10-03 19:35:08 -07:00