Skip to content

FEAT: Show who saved each converter, scorer and technique (part 15) - #4067

Open
varunj-msft wants to merge 211 commits into
microsoft:mainfrom
varunj-msft:varunj-msft/13178-Show-Who-Saved-Registry-Entries
Open

varunj-msft wants to merge 211 commits into
microsoft:mainfrom
varunj-msft:varunj-msft/13178-Show-Who-Saved-Registry-Entries

Conversation

@varunj-msft

@varunj-msft varunj-msft commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

Description

Part 15 of saving Registry entries across restarts. Stacked on part 14 (#4066); part 20 (#4071) builds on it. This PR's own changes: varunj-msft/PyRIT@varunj-msft/13178-Save-Techniques...varunj-msft/13178-Show-Who-Saved-Registry-Entries

Design: 4.4 Credentials (Owners). Where every part fits: PR map.

This is one of the changes for saving Registry entries across restarts. Until the earlier PRs merge, the diff here also shows their changes.

The Targets table already says who saved each target (#4028). Converters, scorers and techniques didn't, so in a shared deployment you couldn't tell your saved entries from someone else's.

  • ConverterInstance, ScorerInstance and TechniqueInstance add saved_by, the name of the person who saved the entry when sign-in was on, and saved_by_me. The server works out saved_by_me from the signed-in caller, so no object ID leaves the server. The list and get routes for the three kinds pass the caller in.
  • An entry saved in a request is marked as the caller's own in that response.
  • The Converters, Scorers and Techniques tabs show "Saved by you" or "Saved by Ada" under a saved entry's name, and "Only converters I saved (N)" (and the same for scorers and techniques) while you have saved one. The caption text is shared with the Targets table.

What stays the same: with sign-in off, nobody is recorded, so no captions or checkbox appear. Who saved an entry doesn't change who can use it.

Screenshots: the Converters tab with "Saved by you" and "Saved by" captions, and with Only converters I saved checked.
who_saved_1_converters_saved_by
who_saved_2_only_converters_i_saved

Not covered:

…API input

External construction now rejects a parameter whose type includes Path unless the
calling service passes the name in allowed_path_params after making the value safe.
The converter service allows its upload parameters once they are stored, and the
target service allows the server-set upload folder and the GitHubCopilotTarget
working directory. The scorer-only check is removed, and the "Valid parameters"
list leaves out path parameters callers cannot set.
The target catalog now applies the path rule to required parameters too, so a
target that needs a disallowed path is left out instead of listed without the
field, matching the scorer catalog. allowed_path_params is typed frozenset[str]
so a bare string cannot turn the allow-list into a substring match.
The target catalog still lists a target whose required path parameter is its
server-set upload folder when the server has one, and leaves it out otherwise.
# Conflicts:
#	tests/unit/backend/test_converter_service.py
A launch script that registers a name held for a saved entry that
couldn't be restored is refused, and the refusal is recorded even when
the script catches it, so the launch stops instead of running with the
script's entry in the saved one's place. A suite entry that fails on a
held entry, or on a broad technique selection, shows the reason without
the error's details.
The OpenAI SDK adds that variable's headers to every request, so a saved
OpenAI target would send whatever the server puts there, which can be a
credential. While it's set, saving an OpenAI target is refused and a
saved one isn't restored; the message names the variable, never its
value. Targets declare such variables in server_header_variables.
Saving converters and scorers follows the same rules as saving targets now: a type that only a scan's launch script added can't be saved, a class without cached metadata is checked the way restore checks it, only a taken name is reported as a conflict, a storage failure logs its short reason, and the owner is recorded only when the entry is saved.
Saving a technique follows the same rules as the other saved entries now: an attack type that only a scan's launch script added can't be saved, a name or tag clash while registering is a conflict, and the owner is recorded only when the technique is saved. A held technique name is refused when a technique is checked before saving too.

This branch has not been deployed

No deployments
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