Skip to main content
Pensar Apex organizes all testing activity into sessions. Each session is an isolated workspace that stores findings, POCs, logs, and configuration.

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 a session.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:
Credentials stored in session config are never sent to AI models. They’re used only by browser tools.

Findings and Reports

Individual Findings

Each finding is a separate JSON file:

Aggregated Findings

All findings are combined in findings.json:

Markdown Reports

A human-readable report is generated at report.md:

Session Cleanup

Delete a Session

Deleting a session removes all findings, POCs, and logs permanently. Export important data first.

Archive Sessions

Session Best Practices

Use clear names that identify the target and test type:
Better than generic names like “Test 1” or “Pentest”.
After testing, compress and store sessions:
This saves disk space while preserving results.
Use the TUI to review past sessions:
This helps identify recurring vulnerabilities across targets.
Share findings with stakeholders:

Troubleshooting

If ~/.pensar/sessions/ doesn’t exist, it will be created on first pentest:
Check the session logs for errors:
Look for agent errors or API failures.
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