What is a Session?
A session represents a single penetration test engagement. It contains:- Attack surface data: Discovered endpoints, pages, and infrastructure
- Findings: Vulnerability reports in JSON format
- Proof-of-concepts: Exploit scripts (bash, HTML)
- Reports: Markdown summaries and aggregated findings
- Logs: Agent execution logs and API responses
- Configuration: Target URLs, authentication info, testing objectives
Sessions are automatically created when you run a pentest. You don’t need to create them manually in most cases.
Session Directory Structure
Sessions are stored in~/.pensar/sessions/:
Session Lifecycle
1. Creation
Sessions are created when you start a pentest:2. Active Testing
During testing:- Findings are written to
findings/ - POCs are created in
pocs/ - Logs accumulate in
logs/ - Attack surface data populates
attack_surface/
3. Completion
When the pentest finishes:- All findings are aggregated into
findings.json - A markdown report is generated at
report.md - Session status is updated in
session.json
4. Review
After completion, you can:- Review findings in the TUI
- Read the markdown report
- Execute POC scripts
- Share results with your team
Session Metadata
Each session has asession.json file:
Managing Sessions
View Active Sessions (TUI)
1
Launch TUI
2
Navigate to Sessions
Use arrow keys or type
/sessions to view all sessions.3
Select a Session
Press Enter to view findings, POCs, and reports for that session.
List Sessions (CLI)
Programmatic Access
Session Configuration
Sessions can store custom configuration:Findings and Reports
Individual Findings
Each finding is a separate JSON file:Aggregated Findings
All findings are combined infindings.json:
Markdown Reports
A human-readable report is generated atreport.md:
Session Cleanup
Delete a Session
Archive Sessions
Session Best Practices
Name sessions descriptively
Name sessions descriptively
Use clear names that identify the target and test type:Better than generic names like “Test 1” or “Pentest”.
Archive completed sessions
Archive completed sessions
After testing, compress and store sessions:This saves disk space while preserving results.
Review sessions regularly
Review sessions regularly
Use the TUI to review past sessions:This helps identify recurring vulnerabilities across targets.
Export findings for reporting
Export findings for reporting
Share findings with stakeholders:
Troubleshooting
Session directory not found
Session directory not found
If
~/.pensar/sessions/ doesn’t exist, it will be created on first pentest:Findings not appearing
Findings not appearing
Check the session logs for errors:Look for agent errors or API failures.
Disk space issues
Disk space issues
Large sessions can consume significant space (logs, POCs):
Next Steps
Run Your First Pentest
Create your first session by running a pentest
Understanding Findings
Learn about vulnerability findings structure
Command Reference
Explore all CLI commands for session management
API Documentation
Programmatic session management

