Skip to content

fix(nuclei): add missing opts - #1226

Open
bpce-it-dis-soc-sof wants to merge 2 commits into
freelabz:mainfrom
BPCE:fix-nuclei-opts
Open

fix(nuclei): add missing opts#1226
bpce-it-dis-soc-sof wants to merge 2 commits into
freelabz:mainfrom
BPCE:fix-nuclei-opts

Conversation

@bpce-it-dis-soc-sof

@bpce-it-dis-soc-sof bpce-it-dis-soc-sof commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • New Features

    • Expanded nuclei scan options to support more protocol, severity, template, tag, and ID filtering choices.
    • Technology scan results now include tag information directly in the output.
  • Bug Fixes

    • Improved how scan result details are assembled, making output more consistent across supported items.

@coderabbitai

coderabbitai Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: b0191861-6a72-4261-87ca-43c259b9b242

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Walkthrough

Adds module-level NUCLEI_PROTOCOLS* and NUCLEI_SEVERITIES* constants to secator/tasks/nuclei.py, expands the opts dictionary and opt_key_map with broader severity/protocol/id/exclude filtering CLI flag mappings, and refactors Technology tag extraction from extra_data_extractor (removing with_tags parameter) into the output_map directly.

Changes

Nuclei config and tag extraction refactor

Layer / File(s) Summary
Protocol/severity constants and opts rework
secator/tasks/nuclei.py
Adds NUCLEI_PROTOCOLS, NUCLEI_PROTOCOLS_STR, NUCLEI_SEVERITIES, NUCLEI_SEVERITIES_STR constants. Reworks opts with updated help text and expanded include/exclude option keys. Updates opt_key_map to cover severity, id, protocol, exclude_severity, exclude_tags, exclude_templates, exclude_id, exclude_protocol, and templates.
Technology tag extraction moved to output_map
secator/tasks/nuclei.py
output_map for Technology drops with_tags from extra_data_extractor call and maps tags directly from x['info']['tags']. extra_data_extractor removes with_tags parameter and the conditional tags-appending code path.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • freelabz/secator#1095: Modifies the same nuclei.opts/opt_key_map for template-related CLI flag wiring in nuclei.py.
  • freelabz/secator#1115: Modifies the same extra_data_extractor and result field mappings in the nuclei output enrichment pipeline.

Poem

🐇 Hoppity-hop through the nuclei code,
Severity constants now lighten the load.
Tags once extracted with with_tags in tow,
Now live in output_map, stealing the show.
The rabbit declares: clean mappings are grand,
A protocol list in each furry paw hand!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: adding and wiring missing nuclei options.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

1 participant