Skip to content

feat(red-team): add Network Broker channel sub-client#187

Merged
cdot65 merged 3 commits into
mainfrom
cdot65/feat/red-team-network-broker
Jul 8, 2026
Merged

feat(red-team): add Network Broker channel sub-client#187
cdot65 merged 3 commits into
mainfrom
cdot65/feat/red-team-network-broker

Conversation

@cdot65

@cdot65 cdot65 commented Jul 8, 2026

Copy link
Copy Markdown
Owner

Closes #186

What

Adds a first-class Red Team Network Broker channel sub-client. RedTeamClient.networkBroker now lets SDK users discover and manage the broker channels that Red Team targets reference via network_broker_channel_uuid — previously those UUIDs had to be obtained out-of-band.

API

client.networkBroker:

  • listChannels(options?)GET /v1/channels — supports status (single or repeated), search, include_all_if_empty, limit, skip
  • createChannel(body)POST /v1/channels
  • getChannel(channelId)GET /v1/channels/{channelId} (UUID-validated)
  • updateChannel(channelId, body)PATCH /v1/channels/{channelId} (UUID-validated)
  • getChannelStats()GET /v1/channels/stats

Uses a distinct network broker data-plane base URL, sharing the Red Team OAuth adapter. Overridable via the networkBrokerEndpoint constructor option or PANW_RED_TEAM_NETWORK_BROKER_ENDPOINT.

New models/schemas (all .passthrough()): ChannelStatus (ONLINE/OFFLINE/DRAFT), CreateChannelRequest, UpdateChannelRequest, Channel, ChannelStats, ChannelListPagination, ChannelListResponse.

Tests

  • test/red-team/network-broker-client.spec.ts — HTTP verb, path, query serialization (incl. repeated status), request body, response parsing, UUID validation
  • test/models/red-team-network-broker.spec.ts — schema parsing + passthrough of extra fields
  • test/red-team/client.spec.ts — sub-client wiring + endpoint override (option and env var)

Docs

Red Team guide gains a Network Broker section (distinct base endpoint, channel-UUID discovery), a runnable docs-site/examples/red-team-network-broker.ts, and env-var table updates.

Verification

format:check, lint, typecheck, preflight (0 unacknowledged drift), docs:check, and the full Vitest suite (1324 tests) all pass locally.

Notes

  • Non-breaking; existing Red Team APIs unchanged. Shipping as minor (changeset included).
  • The channel endpoints are not in the local specs/, so preflight lists the new schemas as unmatched local helpers (no drift). Follow-up gaps from the PRD (language endpoints, target-profile error logs, model-security model endpoints, customer-app list drift) are out of scope here.

🤖 Generated with Claude Code

cdot65 added 3 commits July 8, 2026 18:22
Expose RedTeamClient.networkBroker with listChannels, createChannel,
getChannel, updateChannel, getChannelStats against the network broker
data plane. Endpoint overridable via networkBrokerEndpoint option or
PANW_RED_TEAM_NETWORK_BROKER_ENDPOINT. Adds Channel/ChannelStats/
ChannelStatus schemas and request/response types.

Refs #186
Add guide section, runnable example, env var docs, and changeset.

Refs #186
@cdot65
cdot65 merged commit 7077c41 into main Jul 8, 2026
4 checks passed
@cdot65
cdot65 deleted the cdot65/feat/red-team-network-broker branch July 8, 2026 23:25
cdot65 added a commit that referenced this pull request Jul 9, 2026
- feat(red-team): Network Broker channel sub-client (#187)
- feat(red-team): supported-languages and target-profile error-log endpoints (#193)
- feat(model-security): read-only models sub-client (#195)
- fix(management): percent-encode TSG ID in customer-apps list path (#189)
- fix(red-team): correct Network Broker ChannelStats field names (#199)
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.

feat(red-team): add Network Broker channel sub-client

1 participant