Skip to content

FEAT Add GUI initializers#2271

Open
hannahwestra25 wants to merge 3 commits into
microsoft:mainfrom
hannahwestra25:hannahwestra25-gui-initializers
Open

FEAT Add GUI initializers#2271
hannahwestra25 wants to merge 3 commits into
microsoft:mainfrom
hannahwestra25:hannahwestra25-gui-initializers

Conversation

@hannahwestra25

@hannahwestra25 hannahwestra25 commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Description

Add GUI Initializer Management

Implements Part 1 of the initializer/target persistence design: design gist.

Summary

The GUI could not manage built-in initializers — .pyrit_conf was the only way to configure them, requiring a config edit and restart. This PR adds an Initializers page backed by a new InitializerSettings database table: .pyrit_conf stays the deployment-owned, read-only baseline, and GUI overrides (enabled, parameters, order_index) are saved as database rows. At startup, the backend merges the baseline with saved overrides into one effective, ordered list — the scanner sees the same merged list. Save and Apply now stay separate: Save only persists an override; Apply now re-runs that initializer live without restarting CentralMemory.

What's included

  • Backend: InitializerSetting model + migration, memory interface support, service/routes for listing (baseline + overrides + source), validating, saving, applying, and resetting a single initializer.

  • Frontend: New Initializers tab (ConfigPageInitializerConfigInitializerTable) with per-row Save / Apply now / Reset. Save is disabled when parameters are unchanged; Apply now stays enabled since it always has a live effect.

Future work

  1. Save GUI-created targets (RegisteredTargets table pointing to TargetIdentifiers) so targets survive a restart, plus restore logic at startup (children rebuilt in order, name-conflict checks, unavailable-target reporting).

  2. Custom initializer management in the GUI — backend already supports guarded upload/removal; GUI surfacing is a separate security-focused follow-up.

image

Tests and Documentation

  • unit tests for the model, memory layer, service, and React components
  • manually loaded GUI

hannahwestra25 and others added 3 commits July 24, 2026 16:58
Adds a DB-backed initializer settings feature: persistence, merge/apply-now
API, and a frontend Initializers config tab.

- pyrit/models/initializer_setting.py: new InitializerSetting model
- pyrit/memory: schema, memory_interface support, and alembic migration
  for initializer settings
- pyrit/backend: routes/service/models for listing, saving, applying, and
  resetting initializer settings, merged with baseline config-file
  initializers
- pyrit/setup/configuration_loader.py: public initializer_configs
  accessor used by the backend instead of a private attribute
- frontend/src/components/Config: new ConfigPage, InitializerConfig, and
  InitializerTable components for viewing and editing initializers in
  the GUI, including Save/Apply now/Reset actions per initializer and a
  no-op guard that disables Save until parameters change

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 42217662-8f83-4440-9b89-2d3645e6af08
…th card layout in a settings dialog

- Backend: filter scorer/technique/load_default_datasets/preload_scenario_metadata out of GET /initializers/settings since they have no visible effect in the browser-only GUI (scanner-only registries).
- Frontend: replace the multi-column InitializerTable with a card-per-initializer InitializerList, since only 'target' is ever shown now.
- Frontend: revert Targets/Initializers tabs on the Config page back to a single Target Configuration view; initializer settings are now reached via an 'Initializer Settings' button that opens a dialog.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 42217662-8f83-4440-9b89-2d3645e6af08
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.

1 participant