feat(plugins): add metadata lint rules#789
Merged
Merged
Conversation
Contributor
Author
|
heyy @utksh1 |
Add quality gates for plugin metadata to help contributors write consistent, user-friendly plugin definitions. - VALID_CATEGORIES set + _check_category() validation - Help text lint check (warning-level, non-blocking) - warnings list on ValidationResult for incremental compliance - Cross-owner BOLA regression tests Closes utksh1#551, Closes utksh1#717
9783088 to
2e9404d
Compare
3 tasks
Add quality gates for plugin metadata to help contributors write consistent, user-friendly plugin definitions. - VALID_CATEGORIES set + _check_category() validation - Help text lint check (warning-level, non-blocking) - warnings list on ValidationResult for incremental compliance - Cross-owner BOLA regression tests Closes utksh1#551, Closes utksh1#717
utksh1
approved these changes
Jun 12, 2026
utksh1
left a comment
Owner
There was a problem hiding this comment.
Scoped metadata validator quality gates. Category validation is hard-fail, missing help text is warning-only for incremental adoption, docs/tests are included, and CI is green.
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.
Changes
Add quality gates for plugin metadata to help contributors write consistent, user-friendly plugin definitions.
New features
VALID_CATEGORIES— centralized set of recognized plugin categories_check_category()— validates plugincategoryfield against recognized categories (hard error)fieldsarray should include ahelpstring (warning-level, non-blocking)warningslist onValidationResult— enables incremental compliance; existing plugins without help text remain validFiles changed
backend/secuscan/plugin_validator.pyVALID_CATEGORIES,_check_category(), help-text warning in_check_fields(),warningsfield onValidationResulttesting/backend/unit/test_plugin_validator.pytest_invalid_fixture_catches_missing_help_text,TestMetadataQualityLintclasstesting/backend/unit/fixtures/plugins/valid_plugin/metadata.jsonhelpfields to both example fieldsPLUGINS.mdCloses #551, Closes #717