GSPM Phase 1#7542
Open
psiinon wants to merge 1 commit into
Open
Conversation
Member
Author
|
New Issues (1)Checkmarx found the following issues in this Pull Request
Fixed Issues (4)Great job! The following issues were fixed in this Pull Request
Use @Checkmarx to interact with Checkmarx PR Assistant. |
Contributor
There was a problem hiding this comment.
Pull request overview
Introduces Phase 1 of the Global Scan Policy Manager (GSPM) across the extensions codebase by adding a new commonlib GSPM registry/policy model and UI (dev-mode), and wiring passive scan rules into the registry, including legacy policy migration and unit tests.
Changes:
- Added a new GSPM framework in
commonlib(registry, policy model, legacy importer, Swing dialogs/table model) plus i18n strings. - Registered passive scan rules with the GSPM registry during
pscanpost-init and unregistered on unload. - Added unit tests covering policy/ruleset matching, registry behavior, and legacy
.policymigration to.policy2.
Reviewed changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| addOns/pscan/src/main/resources/org/zaproxy/addon/pscan/resources/Messages.properties | Adds i18n strings for GSPM tool/category labels in passive scan. |
| addOns/pscan/src/main/java/org/zaproxy/addon/pscan/GspmPassiveScanRegistrar.java | New registrar that adapts passive scan rules to GspmRule and registers them in commonlib. |
| addOns/pscan/src/main/java/org/zaproxy/addon/pscan/ExtensionPassiveScan2.java | Hooks registrar into pscan lifecycle (postInit/unload). |
| addOns/commonlib/src/test/java/org/zaproxy/addon/commonlib/gspm/GspmRuleSetUnitTest.java | New unit tests for rule set matching and category key behavior. |
| addOns/commonlib/src/test/java/org/zaproxy/addon/commonlib/gspm/GspmRegistryUnitTest.java | New unit tests for registry registration, policy views, and migration behavior. |
| addOns/commonlib/src/test/java/org/zaproxy/addon/commonlib/gspm/GspmPolicyUnitTest.java | New unit tests for policy defaults, overrides, ordering, and YAML round-trip. |
| addOns/commonlib/src/main/resources/org/zaproxy/addon/commonlib/resources/Messages.properties | Adds i18n strings for GSPM dialogs/menus/status labels. |
| addOns/commonlib/src/main/java/org/zaproxy/addon/commonlib/gspm/GspmRuleTableModel.java | New table model for displaying/editing per-rule threshold/strength/status in the UI. |
| addOns/commonlib/src/main/java/org/zaproxy/addon/commonlib/gspm/GspmRuleSet.java | New rule-set model with matching logic and stable category key derivation. |
| addOns/commonlib/src/main/java/org/zaproxy/addon/commonlib/gspm/GspmRuleRef.java | New lightweight per-rule reference used in rule sets. |
| addOns/commonlib/src/main/java/org/zaproxy/addon/commonlib/gspm/GspmRule.java | New interface representing a scan rule managed by GSPM. |
| addOns/commonlib/src/main/java/org/zaproxy/addon/commonlib/gspm/GspmRegistry.java | New registry providing rule registration, policy views, tool display names, and persistence loading/migration. |
| addOns/commonlib/src/main/java/org/zaproxy/addon/commonlib/gspm/GspmPolicyManagerDialog.java | New UI dialog to manage policies (add/edit/delete/import/export). |
| addOns/commonlib/src/main/java/org/zaproxy/addon/commonlib/gspm/GspmPolicy.java | New YAML-backed policy model with defaults, category overrides, and per-rule overrides. |
| addOns/commonlib/src/main/java/org/zaproxy/addon/commonlib/gspm/GspmLegacyImporter.java | New importer that migrates legacy XML .policy files into .policy2 YAML. |
| addOns/commonlib/src/main/java/org/zaproxy/addon/commonlib/gspm/GspmDialog.java | New main GSPM editor dialog with tree/category panels and per-rule editing. |
| addOns/commonlib/src/main/java/org/zaproxy/addon/commonlib/ExtensionCommonlib.java | Exposes GspmRegistry, loads policies in dev build, and adds dev-mode menu/toolbar entry points. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
psiinon
force-pushed
the
gspm/phase1
branch
2 times, most recently
from
July 14, 2026 12:52
c8b2c5c to
34783bf
Compare
Signed-off-by: Simon Bennetts <psiinon@gmail.com>
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.



This phase does NOT provide a fully working feature 😁
It does provide:
Lots more to do ...