pensar pentests
Overview
The pensar pentests command lets you manage pentests (scans) in your workspace through the Pensar Console API. You can list existing pentests, view details, or dispatch new ones — all from the command line.
All commands operate on the selected workspace, which is chosen when you connect with pensar login. There is no longer a project argument.
Usage
Prerequisites
You must be connected to Pensar Console via pensar login before using this command.
Subcommands
List Pentests
Lists all pentests in the selected workspace. Returns a JSON array of pentest objects.
Get Pentest Details
Retrieves detailed information about a specific pentest, including status, findings count, and configuration.
Dispatch a New Pentest
Dispatches a new pentest scan in the selected workspace.
Launch selected endpoints
Use endpoint UUIDs from pensar apps endpoints <appId>. A launch accepts 1–1000 unique endpoint IDs in the selected workspace. Duplicate IDs are removed. Endpoint launches use full depth by default; --level full is also accepted. They cannot be combined with a branch or priority depth. They test existing endpoints without discovering additional targets or narrowing the selection to code changes.
To read IDs from a file, put one UUID on each line:
Blank lines are ignored. File/stdin input may be combined with --endpoint-id; the combined selection is deduplicated. Invalid UUIDs, an empty selection, more than 1,000 unique IDs, incompatible flags, unknown flags, or an unreadable file fail before dispatch.
Select endpoints in CI
Set PENSAR_API_KEY in your CI environment. For a CI-generated ci-targets.json containing a selectedEndpointIds array of discovered endpoint UUIDs, pipe the computed IDs to stdin:
The command returns the queued scan as JSON without waiting for findings. Use pensar pentests get <scanId> to track completion. A successful dispatch does not indicate a passing security assessment. The server validates workspace ownership and application readiness; invalid scope fails without launching a broader scan.
These are hosted Console launches. Local pensar pentest and pensar targeted-pentest commands run their own workflows; their local target and prompt options are not hosted launch options.