pensar config
Overview
The pensar config command manages Apex’s global configuration. Today it has a
single area — headers — which stores default HTTP headers that are sent on
in-scope requests during pentests.
These defaults live in ~/.pensar/config.json under defaultHeaders. They are
snapshotted into each new session at create time — existing sessions are not
retroactively updated. Use them for headers you want on most runs (for example a
shared User-Agent or a non-secret correlation header) instead of passing
--header every time.
Per-run flags layer on top of these defaults. Precedence (lowest to highest):
global defaults < a --headers-from file < individual --header flags. Pass
--no-global-headers to a pentest command to skip the default snapshot
entirely. See pensar pentest.
Usage
Subcommands
list
Prints the configured default headers. Sensitive values are masked by
default — header names containing authorization, cookie, token, key,
secret, or password are shown masked and marked with a *.
add / set
Add a header in Name: Value form. add fails if a header with that name
already exists (case-insensitive); set adds or overwrites.
remove
Remove a single header by name (case-insensitive). Aliases: rm, delete.
clear
Remove all default headers. This is destructive, so it requires confirmation.
import
Replace all default headers with the contents of a file. The file may be either
a JSON object ({"X-API-Key": "abc"}) or a list of Name: Value lines. This
replaces the existing set rather than merging.
Storage
Headers are stored in ~/.pensar/config.json under defaultHeaders. New
sessions snapshot these at create time; existing sessions are not updated
retroactively — adjust per-session headers with the operator /headers command
or by editing the session config directly.