Skip to content

fix(redteam): render nested target connection_params + add --output (#201)#214

Merged
cdot65 merged 1 commit into
mainfrom
cdot65/fix/redteam-targets-get-nested-objects-output-flag
May 28, 2026
Merged

fix(redteam): render nested target connection_params + add --output (#201)#214
cdot65 merged 1 commit into
mainfrom
cdot65/fix/redteam-targets-get-nested-objects-output-flag

Conversation

@cdot65

@cdot65 cdot65 commented May 28, 2026

Copy link
Copy Markdown
Owner

Summary

Closes #201.

Two related fixes for airs redteam targets get:

  1. Pretty renderer: stop printing [object Object] for nested connection_params (request_headers, request_json, response_json) and any nested values inside background / metadata. They now expand as indented JSON under the parent key.
  2. --output <pretty|json|yaml> added for parity with targets list / scan, mirroring the pattern shipped in fix(redteam): add --output flag on prompt-sets get and properties values #211 for prompt-sets get and properties values.

Test plan

  • pnpm test — 661 tests, +5 new in tests/unit/cli/redteam-output-flag.spec.ts covering nested pretty rendering, json + yaml outputs, and default-format behavior
  • pnpm lint (0 errors, 1 pre-existing warning unrelated to this change)
  • pnpm tsc --noEmit
  • pnpm docs:check
  • Manual: airs redteam targets get <uuid> against a real tenant shows nested headers/JSON inline
  • Manual: airs redteam targets get <uuid> --output json | jq . parses cleanly

…lag (#201)

- renderTargetDetail expands nested objects (request_headers, request_json,
  response_json, plus background/metadata children) as indented JSON instead
  of "[object Object]"
- targets get gains --output <pretty|json|yaml> for parity with targets list
  and the prompt-sets get / properties values flags added in #211
@cdot65 cdot65 merged commit 5f657bc into main May 28, 2026
5 checks passed
@cdot65 cdot65 deleted the cdot65/fix/redteam-targets-get-nested-objects-output-flag branch May 28, 2026 01:25
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.

redteam targets get: nested objects render as [object Object]; no --output json

1 participant