pensar threat-model
Overview
The pensar threat-model command generates a comprehensive threat model by analyzing the codebase in your current working directory. It runs headlessly without launching the TUI, making it suitable for CI/CD pipelines, scripting, and automated security workflows.
Usage
Options
Examples
How It Works
- Apex creates an operator session and loads the
threat-modelskill - The AI agent explores the codebase — reading source files, configuration, infrastructure, and security-relevant code
- The agent produces a structured threat model covering application context, trust boundaries, attacker profiles, security controls, and attack paths
- Progress and tool calls are streamed to stdout in real time
- On completion, the threat model is written to the output file
Output
Default Model
When --model is not provided, Apex uses the default model for your highest-priority configured provider. See pensar models for the priority order.