FEAT Add GUI initializers#2271
Open
hannahwestra25 wants to merge 3 commits into
Open
Conversation
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
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
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_confwas the only way to configure them, requiring a config edit and restart. This PR adds an Initializers page backed by a newInitializerSettingsdatabase table:.pyrit_confstays 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 restartingCentralMemory.What's included
Backend:
InitializerSettingmodel + migration, memory interface support, service/routes for listing (baseline + overrides + source), validating, saving, applying, and resetting a single initializer.Frontend: New
Initializerstab (ConfigPage→InitializerConfig→InitializerTable) 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
Save GUI-created targets (
RegisteredTargetstable pointing toTargetIdentifiers) so targets survive a restart, plus restore logic at startup (children rebuilt in order, name-conflict checks, unavailable-target reporting).Custom initializer management in the GUI — backend already supports guarded upload/removal; GUI surfacing is a separate security-focused follow-up.
Tests and Documentation