Skip to content

feat: add --goals, --depth, --breadth flags for DYNAMIC scans#66

Merged
cdot65 merged 2 commits into
cdot65:mainfrom
scthornton:feat/dynamic-scan-params
May 13, 2026
Merged

feat: add --goals, --depth, --breadth flags for DYNAMIC scans#66
cdot65 merged 2 commits into
cdot65:mainfrom
scthornton:feat/dynamic-scan-params

Conversation

@scthornton

Copy link
Copy Markdown
Contributor

The scan command accepts --type DYNAMIC but doesn't expose any way to pass attack goals, depth, or breadth. The SDK already supports attack_goals, stream_depth, and stream_breadth in job_metadata - the CLI just doesn't wire them through.

I had to drop to raw node -e calls against the SDK to launch human-augmented agent scans with custom goals. This adds three flags:

  • --goals <file> - JSON file or inline JSON array of goal strings
  • --depth <n> - max turns per goal (default 10)
  • --breadth <n> - parallel agents per goal (default 6)

Without --goals, DYNAMIC scans still run in fully automated mode (no behavior change).

Usage:

# Agent scan with goals from file
airs redteam scan --target <uuid> --name "my-scan" --type DYNAMIC \
  --goals goals.json --depth 10 --breadth 6

# Inline goals
airs redteam scan --target <uuid> --name "my-scan" --type DYNAMIC \
  --goals '["Goal 1", "Goal 2"]'

# Automated (unchanged behavior)
airs redteam scan --target <uuid> --name "my-scan" --type DYNAMIC

scthornton and others added 2 commits May 12, 2026 08:59
The scan command accepts --type DYNAMIC but doesn't expose attack goals,
depth, or breadth parameters. The SDK supports these via job_metadata
but the CLI didn't wire them through.

Adds:
  --goals <file>    JSON file or inline array of attack goal strings
  --depth <n>       Max conversation turns per goal (default 10)
  --breadth <n>     Parallel agents per goal (default 6)

Without --goals, DYNAMIC scans still run in fully automated mode.
- update redteam.spec to expect new default metadata (breadth/depth)
- add test for goals/depth/breadth happy path
- extract DEFAULT_DYNAMIC_BREADTH/DEPTH constants
- new parseAttackGoals helper: trim + JSON validation + array-of-non-empty-strings check
- new parsePositiveInt helper: NaN/<=0 guard with named flag in error
- helper unit tests
- docs: add Dynamic Scan section to redteam/scanning.md, flag table to cli-commands.md
- changeset
@cdot65 cdot65 merged commit 91d3120 into cdot65:main May 13, 2026
4 checks passed
@cdot65 cdot65 mentioned this pull request May 13, 2026
3 tasks
cdot65 added a commit that referenced this pull request May 13, 2026
…es (#70)

- feat: --goals/--depth/--breadth flags for redteam DYNAMIC scans (#66)
- fix: CSV upload sends File w/ filename instead of bare Blob (#67)
- fix: download template — bump SDK to 0.8.3 + drop OAuth workaround (#68)

Changesets: 0015-0017.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants