feat: migrate AI Red Teaming to standalone extension with profiles support#6635
Draft
feat: migrate AI Red Teaming to standalone extension with profiles support#6635
Conversation
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
Contributor
|
89a7312 to
5486e88
Compare
- replace ai_scans/scanning_agents routes with red_team_scans - add separate fake target server - add toHaveExitCode matcher and extractJSON helper
- bump cli-extension-ai-redteam - add /api prefix to fake server control server routes - add request sequence assertions and url field assertion
- Picks up ground truth context, target URL passthrough, goal renaming, and web-based target setup wizard
Bump cli-extension-ai-redteam to latest (17f3df) which adds profiles support, --goals flag, --list-profiles/--list-goals, and minired report endpoint. Add acceptance tests for new flags and update fake server with profiles, goals, and report mock endpoints.
# Conflicts: # cliv2/go.mod # cliv2/go.sum
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Migrate AI Red Teaming from
cli-extension-ai-bomto the standalonecli-extension-ai-redteamextension and bump to the latest version (17f3df) which brings profiles support and attacks-based scanning API.What changed
cli-extension-ai-bom/pkg/redteamtocli-extension-ai-redteam/pkg/redteamas a standalone Go module/api/hidden/orgs/:orgId/ai_scans/...to/api/hidden/tenants/:tenantId/red_team_scans/.... New required flag:--tenant-id--profileflag to select attack profiles (fast, security, safety),--goalsflag for direct goal specification, and--list-profilesto enumerate available profiles/reportendpoint instead of client-side normalization--attackflag (replaced by--goals),--control-server-urlflag,--list-strategiesflag, and allredteam scanning-agentsubcommands (list, create, delete)Non-redteam changes bundled in
includeGoStandardLibraryDepsanddisableGoPackageUrlsInCliresolution from callers intobuildPluginOptions(), simplifying the call chain[go-bridge]prefix, stderr soft-cap/truncation logic, andStringDecoder-based UTF-8 chunk decodingaibom test(cli_policy_test) acceptance testsTest plan
redteamscan flow (create → next → status → next → status → get)redteam getresult retrieval--html,--html-file-output)--list-profiles,--list-goalsflags--goalsand--profileflags--goals --profileconflictbuildPluginOptionsfeature flag changes🤖 Generated with Claude Code