Skip to content

test(nikto): add malformed-output tests for parser fallback paths #1420#1983

Open
NaitikVerma6776 wants to merge 1 commit into
utksh1:mainfrom
NaitikVerma6776:issue-#1420
Open

test(nikto): add malformed-output tests for parser fallback paths #1420#1983
NaitikVerma6776 wants to merge 1 commit into
utksh1:mainfrom
NaitikVerma6776:issue-#1420

Conversation

@NaitikVerma6776

Copy link
Copy Markdown
Contributor

Summary

  • Adds a dedicated unit test suite (test_nikto_parser_malformed.py) covering Nikto parser fallback paths for malformed, empty, and partial output.
  • Covers malformed numeric/port fields, empty JSON/text output, partial vulnerability records, invalid JSON fallback to text parsing, and embedded JSON block extraction.
  • Verifies the parser returns a stable findings/count/metadata/summary structure without raising unexpected exceptions.

Closes #1420

Test plan

  • python -m pytest testing/backend/unit/test_nikto_parser_malformed.py -v
  • All 19 new tests pass
  • No changes to plugins/nikto/parser.py production code

Lock down graceful Nikto parser behavior for empty, partial, and
malformed JSON/text output so fallback paths stay stable without raising.

Co-authored-by: Cursor <cursoragent@cursor.com>
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.

[PLUGINS] Add malformed-output tests for Nikto parser fallback paths

1 participant