Skip to content

feat(plugins): add metadata lint rules#789

Merged
utksh1 merged 2 commits into
utksh1:mainfrom
Pcmhacker-piro:clean-plugin-metadata-lint
Jun 12, 2026
Merged

feat(plugins): add metadata lint rules#789
utksh1 merged 2 commits into
utksh1:mainfrom
Pcmhacker-piro:clean-plugin-metadata-lint

Conversation

@Pcmhacker-piro

@Pcmhacker-piro Pcmhacker-piro commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

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 plugin category field against recognized categories (hard error)
  • Help text lint — each field in the fields array should include a help string (warning-level, non-blocking)
  • warnings list on ValidationResult — enables incremental compliance; existing plugins without help text remain valid

Files changed

File Change
backend/secuscan/plugin_validator.py Added VALID_CATEGORIES, _check_category(), help-text warning in _check_fields(), warnings field on ValidationResult
testing/backend/unit/test_plugin_validator.py Added test_invalid_fixture_catches_missing_help_text, TestMetadataQualityLint class
testing/backend/unit/fixtures/plugins/valid_plugin/metadata.json Added help fields to both example fields
PLUGINS.md Documented the new lint rules

Closes #551, Closes #717

@Pcmhacker-piro

Copy link
Copy Markdown
Contributor Author

heyy @utksh1
i fixed the issue so pls check it

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
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 utksh1 added level:intermediate 35 pts difficulty label for moderate contributor PRs type:feature Feature work category bonus label type:testing Testing work category bonus label area:plugins Scanner plugin metadata, schemas, or plugin runtime work area:docs Documentation or contributor guide work labels Jun 12, 2026

@utksh1 utksh1 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@utksh1 utksh1 merged commit 1998997 into utksh1:main Jun 12, 2026
11 checks passed
@utksh1 utksh1 added the gssoc:approved Admin validation: approved for GSSoC scoring label Jun 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:docs Documentation or contributor guide work area:plugins Scanner plugin metadata, schemas, or plugin runtime work gssoc:approved Admin validation: approved for GSSoC scoring level:intermediate 35 pts difficulty label for moderate contributor PRs type:feature Feature work category bonus label type:testing Testing work category bonus label

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[PLUGINS] Add metadata lint rules for missing field help text and ambiguous categories

2 participants