Repository navigation
FIX: Remove TextTarget from GUI - #3777
Merged
Merged
Conversation
TextTarget writes to a local stream and never contacts a service, but it inherited the default supported_auth_modes of (api_key,), so the target picker described it as 'Supported authentication: API key'. Declare an empty tuple and have the dialog say 'No authentication required' when the registry reports no auth modes.
# Conflicts: # tests/unit/registry/test_target_registry.py
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The new async test in tests/unit/backend/test_target_service.py needs an _async suffix to comply with the required naming convention.
1 open issue
What changed in this PR
This PR addresses #3712 by identifying TextTarget as credential-free in registry metadata and displaying that information in the target-creation dialog.
Changes:
- Declare that
TextTargetsupports no authentication modes. - Show “No authentication required” for empty mode lists from loaded registry metadata, while preserving fallback behavior.
- Add registry, backend, and frontend regression tests.
| File | Description |
|---|---|
tests/unit/registry/test_target_registry.py |
Verify credential-free metadata and retain API-key-only coverage. |
tests/unit/backend/test_target_service.py |
Verify the API returns no authentication modes for TextTarget. |
pyrit/prompt_target/text_target.py |
Declare an empty supported authentication-mode tuple. |
frontend/src/components/Config/CreateTargetDialog.tsx |
Display credential-free status when registry metadata is available. |
frontend/src/components/Config/CreateTargetDialog.test.tsx |
Add TextTarget coverage and verify the authentication description. |
Review effort: Balanced
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Roman Lutz (romanlutz)
approved these changes
Nov 7, 2026
Roman Lutz (romanlutz)
left a comment
Contributor
There was a problem hiding this comment.
Had to change this substantially since the original goal didn't make too much sense in the greater scheme of things...
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Nov 7, 2026
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Nov 7, 2026
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.

Description
TextTargetprints to the Python host's text stream for SDK demonstrations and manual workflows; it is not an interactive GUI endpoint. Remove it from CoPyRIT's target flows while preserving SDK and REST API support.Fixes #3712.
Tests and Documentation
Regression coverage checks GUI exclusion, pagination, registry updates, target defaults/references, and readable saved history without sending. The frontend README documents the SDK-only behavior. The full affected frontend batch passed: 18 suites, 740 tests.
Additional focused checks, run from
frontend:npm test -- --runInBand --watch=false --runTestsByPath src\utils\targetVisibility.test.ts src\hooks\useTargetRegistry.test.ts src\hooks\useAttackTargetResolution.test.tsx: passed, 22 tests.npm run type-check: passed.npm run lint: passed.JupyText was not run because no notebook changed. Python tests were not rerun for the frontend-only follow-up; the original registry/backend no-auth metadata regression tests remain in this PR.
The initial no-auth metadata fix was prepared with an AI coding assistant (Claude Code) and submitted by Alex Castillo González. The GUI exclusion is included in follow-up commit
8522680818af.