Skip to content

Conversation

@UjwalSamrat
Copy link

Proposed change

This PR improves the user-facing error message shown when no scan module is specified.

The updated message provides clear guidance to list available modules using '--list-modules' and select one
using the -m option, improving the first-time user experience.

Type of change

  • New core framework functionality
  • Bugfix (non-breaking change which fixes an issue)
  • Code refactoring without any functionality changes
  • New or existing module/payload change
  • Documentation/localization improvement
  • Test coverage improvement
  • Dependency upgrade
  • Other improvement (best practice, cleanup, optimization, etc)

Checklist

  • I've followed the contributing guidelines
  • I've run make pre-commit, it didn't generate any changes
  • I've run make test, all tests passed locally

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 2, 2026

Summary by CodeRabbit

  • Bug Fixes

    • Clarified the user-facing message when no scan module is specified, guiding how to list and select modules.
  • Localization

    • Simplified verbose/verbose-mode help text across many languages for shorter, clearer descriptions.
    • Added multiple Bengali translations for newly surfaced UI/help items.

✏️ Tip: You can customize this high-level summary in your review settings.

Walkthrough

Updated multiple localization YAMLs to simplify or rename verbose descriptions, added several Bengali translation keys, changed English scan_method_select guidance, and adjusted docs/Usage.md verbose flag text and minor formatting.

Changes

Cohort / File(s) Summary
English locale (scan & verbose)
nettacker/locale/en.yaml
Replaced scan_method_select message with guidance to use --show-all-modules and -m; changed verbose_mode description from a "0-5" level string to "enable verbose output".
Documentation
docs/Usage.md
Updated verbose flag help text in English and Persian sections; removed an extra trailing note and adjusted EOF newline/blank line.
Bulk: verbose_mode simplifications (many locales)
nettacker/locale/ar.yaml, nettacker/locale/de.yaml, nettacker/locale/el.yaml, nettacker/locale/es.yaml, nettacker/locale/fa.yaml, nettacker/locale/fr.yaml, nettacker/locale/hy.yaml, nettacker/locale/id.yaml, nettacker/locale/iw.yaml, nettacker/locale/ko.yaml, nettacker/locale/nl.yaml, nettacker/locale/ps.yaml, nettacker/locale/ru.yaml, nettacker/locale/tr.yaml, nettacker/locale/ur.yaml, nettacker/locale/vi.yaml, nettacker/locale/ja.yaml, nettacker/locale/zh-cn.yaml, nettacker/locale/hi.yaml
Simplified or shortened verbose_mode translations (removed explicit 0-5 range/default text); minor formatting/newline fixes in some files; it/pt-br involved key renames in their diffs.
Bengali locale additions & edits
nettacker/locale/bn.yaml
Added multiple new translation keys (e.g., show_all_profiles, single_process_started, software_version, start_api_server, start_multi_process, start_parallel_module_scan, subdomains, time_to_sleep, no_scan_to_compare, compare_report_saved, build_compare_report, finish_build_report) and adjusted existing wording/grammar.
Italian & Portuguese-BR key rename
nettacker/locale/it.yaml, nettacker/locale/pt-br.yaml
verbose_level renamed to verbose_mode and translation updated; minor newline/formatting changes.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Improve clarity of scan module error message' directly aligns with the main change—simplifying and clarifying the scan_method_select error message in en.yaml and related localization updates across multiple locale files.
Description check ✅ Passed The description is relevant to the changeset, explaining the core improvement to the scan module error message and indicating it's a localization improvement, which matches the actual locale file updates throughout the PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 32cfee4 and dfc1c53.

📒 Files selected for processing (5)
  • docs/Usage.md
  • nettacker/locale/it.yaml
  • nettacker/locale/ja.yaml
  • nettacker/locale/pt-br.yaml
  • nettacker/locale/zh-cn.yaml
✅ Files skipped from review due to trivial changes (1)
  • nettacker/locale/zh-cn.yaml
🚧 Files skipped from review as they are similar to previous changes (3)
  • nettacker/locale/pt-br.yaml
  • nettacker/locale/it.yaml
  • docs/Usage.md
🔇 Additional comments (1)
nettacker/locale/ja.yaml (1)

58-58: LGTM! Verbose mode description simplified.

The removal of outdated references to verbose mode levels (0-5) and default values aligns with the PR objectives to clean up unclear messaging.


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 and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0cd1d0d and 6aaa64d.

📒 Files selected for processing (1)
  • nettacker/locale/en.yaml

@pUrGe12
Copy link
Contributor

pUrGe12 commented Jan 7, 2026

Thanks for the fix. Since you're doing this, there are other such messages as well which are not up to date or not clear enough. For example, we don't really have verbose mode levels and so on. Could you fix those too?

@UjwalSamrat
Copy link
Author

Thanks for pointing that out!
I’ll go through the related messages and update or remove anything that’s unclear or outdated (including the verbose mode references). I’ll push the changes shortly.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
nettacker/locale/bn.yaml (1)

90-96: Multiple translation keys lack consistent coverage across all locale files.

The verification reveals significant inconsistencies in translation key distribution:

  • Keys present only in English, Hindi, and Bengali (3 locales): show_all_profiles, single_process_started, start_multi_process, start_parallel_module_scan
  • Keys with partial coverage (11-12 locales): no_scan_to_compare, compare_report_saved, build_compare_report, finish_build_report
  • Keys with near-universal coverage (21-23 locales): software_version, start_api_server, time_to_sleep

The Bengali locale additions should include corresponding translations in the other 21+ locale files to ensure consistent user experience across all supported languages. Several translation keys are missing from many language files.

🤖 Fix all issues with AI agents
In @docs/Usage.md:
- Line 704: Remove the stray conversational sentence "Let me know if you have
any more questions." from the documentation; locate that exact phrase in the
Usage.md content and delete the line so the document ends with only technical,
objective content.

In @nettacker/locale/de.yaml:
- Line 75: The Chinese and Japanese locale files still use the old verbose range
text; update the verbose_mode entries in zh-cn.yaml and ja.yaml (key:
verbose_mode) to the simplified form used in other locales (remove the
“(0-5)”/default suffix), matching the same concise translation pattern as the
other language files so all locales are consistent.

In @nettacker/locale/it.yaml:
- Line 62: The Italian and Portuguese-Brazil locale files use the wrong key name
"verbose_level" which doesn't match the application's lookup ("verbose_mode"
used in nettacker/core/arg_parser.py via help=_("verbose_mode")); open
nettacker/locale/it.yaml and nettacker/locale/pt-br.yaml and rename the key
"verbose_level" to "verbose_mode" so the translation lookup aligns with the rest
of the locales and the code.

In @nettacker/locale/pt-br.yaml:
- Line 75: The locale key is inconsistent: replace the `verbose_level` key with
`verbose_mode` in the Portuguese-Brazil and Italian locale YAMLs so the runtime
lookup used by arg_parser.py, logger.py and config.py succeeds; open the pt-br
and it locale files, find any `verbose_level:` entries and rename them to
`verbose_mode:` (preserve the existing translated value) and run a quick grep
for `verbose_level` to ensure no stray occurrences remain.
🧹 Nitpick comments (1)
nettacker/locale/hi.yaml (1)

35-35: Simplification aligns with PR objectives.

The removal of verbose level references (0-5 range, defaults) successfully addresses the reviewer's feedback about outdated messaging.

However, consider whether the help text should include a brief description of what verbose mode does, rather than just the label "वर्बज़ मोड". Compare with line 109 (verbose_event) which provides descriptive text about the feature's purpose.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 37ebf5e and 32cfee4.

📒 Files selected for processing (22)
  • docs/Usage.md
  • nettacker/locale/ar.yaml
  • nettacker/locale/bn.yaml
  • nettacker/locale/de.yaml
  • nettacker/locale/el.yaml
  • nettacker/locale/en.yaml
  • nettacker/locale/es.yaml
  • nettacker/locale/fa.yaml
  • nettacker/locale/fr.yaml
  • nettacker/locale/hi.yaml
  • nettacker/locale/hy.yaml
  • nettacker/locale/id.yaml
  • nettacker/locale/it.yaml
  • nettacker/locale/iw.yaml
  • nettacker/locale/ko.yaml
  • nettacker/locale/nl.yaml
  • nettacker/locale/ps.yaml
  • nettacker/locale/pt-br.yaml
  • nettacker/locale/ru.yaml
  • nettacker/locale/tr.yaml
  • nettacker/locale/ur.yaml
  • nettacker/locale/vi.yaml
✅ Files skipped from review due to trivial changes (3)
  • nettacker/locale/ps.yaml
  • nettacker/locale/ru.yaml
  • nettacker/locale/ar.yaml
🚧 Files skipped from review as they are similar to previous changes (1)
  • nettacker/locale/en.yaml
🧰 Additional context used
📓 Path-based instructions (1)
docs/**

📄 CodeRabbit inference engine (AGENTS.md)

Place documentation under docs/

Files:

  • docs/Usage.md
🔇 Additional comments (18)
nettacker/locale/hi.yaml (1)

125-125: Clarify the purpose of this modification.

The AI summary indicates this line shows a redundant modification with no meaningful change to the Hindi text. If this is accurate, consider whether this change is necessary or if it introduces unnecessary churn to the PR.

Can you confirm whether this line required modification, or if this is a whitespace/encoding-related change?

nettacker/locale/tr.yaml (2)

67-67: LGTM! Translation simplified appropriately.

The updated translation correctly removes the outdated verbose level details (0-5) and default value, making the message clearer and more maintainable. The simplified "ayrıntılı mod" is accurate Turkish for "verbose mode."


175-175: The all_verbose_level and verbose_mode entries are distinct keys that coexist by design across all locale files. Line 175 in tr.yaml (all_verbose_level: ayrıntılı seviye) is not redundant with line 67 (verbose_mode: ayrıntılı mod)—they serve different configuration purposes and are consistently maintained together in all 20+ locale files. No update needed.

Likely an incorrect or invalid review comment.

nettacker/locale/iw.yaml (1)

64-64: LGTM! Simplified verbose mode description.

The change successfully removes the outdated verbose level range reference, aligning with the PR objectives to simplify user-facing messages.

nettacker/locale/vi.yaml (1)

68-68: LGTM! Updated to simplified verbose mode description.

The Vietnamese translation now reads "enable verbose mode," which is consistent with the simplified approach across all locales and aligns with the PR's goal to remove outdated verbose level references.

nettacker/locale/ur.yaml (1)

70-70: LGTM! Simplified verbose mode label.

The change removes the outdated level range specification and provides a cleaner user experience, consistent with the PR objectives.

nettacker/locale/el.yaml (1)

75-75: LGTM! Simplified verbose mode description.

The Greek translation has been updated to remove the outdated level range specification, making the message clearer and consistent with the PR's objectives.

nettacker/locale/bn.yaml (2)

86-86: LGTM! Verbose event translation is clear.

The Bengali translation for verbose_event appropriately describes enabling verbose output for thread status monitoring.


107-107: LGTM! Verbose mode description simplified.

The verbose_mode translation has been appropriately simplified to "Verbose মোড" (Verbose mode), removing the outdated level range reference.

nettacker/locale/es.yaml (1)

74-74: LGTM! Verbose mode description simplified.

The Spanish translation for verbose_mode has been appropriately simplified from "nivel de modo detallado (0-5) (valor predeterminado 0)" to "modo detallado", removing the outdated level range reference as intended by this PR.

nettacker/locale/nl.yaml (1)

73-73: LGTM! Verbose mode description simplified.

The Dutch translation for verbose_mode has been appropriately simplified from "uitgebreid e niveau (0-5) (standaard 0)" to "uitgebreide modus", removing the outdated level range reference. This also corrects what appears to be a spacing issue in the original text.

nettacker/locale/fr.yaml (1)

75-75: LGTM! Verbose mode description simplified.

The French translation for verbose_mode has been appropriately simplified from "niveau de mode verbeux (0-5) (par défaut 0)" to "mode verbeux", removing the outdated level range reference as intended by this PR.

nettacker/locale/ko.yaml (1)

60-60: LGTM - Verbose mode description simplified appropriately.

The removal of the outdated level range "(0-5) (default 0)" improves clarity and aligns with the PR's objective to clean up verbose mode references across locales.

nettacker/locale/id.yaml (1)

72-72: LGTM - Consistent verbose mode simplification.

The change removes outdated level references and is consistent with the broader localization cleanup across the PR.

nettacker/locale/fa.yaml (1)

74-74: LGTM - Persian locale updated consistently.

The verbose mode description has been appropriately simplified to remove outdated level references, consistent with other locales.

nettacker/locale/hy.yaml (1)

70-70: LGTM - Armenian locale updated appropriately.

The verbose mode description simplification is consistent with the PR-wide cleanup effort.

docs/Usage.md (2)

54-54: LGTM - Verbose flag description improved.

The simplified description "enable verbose output" is clearer and removes outdated level references, consistent with the locale file updates.


202-203: LGTM - Persian translation and formatting updated.

The Persian verbose flag description has been updated to match the English simplification, and the added blank line improves readability in the RTL section.

TYPE: ART
DESCRIPTION: BESCHREIBUNG
verbose_mode: Ausführlicher Modus (0-5) (Standard 0)
verbose_mode: Ausführlicher Modus
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify that verbose_mode has been consistently updated across all locale files
# and that related references are addressed

echo "=== Checking verbose_mode entries across all locale files ==="
rg -n "^verbose_mode:" nettacker/locale/

echo -e "\n=== Checking for remaining verbose level range references (0-5) in locales ==="
rg -n "\(0-5\)" nettacker/locale/

echo -e "\n=== Checking all_verbose_level references that may need updating ==="
rg -n "all_verbose_level" nettacker/locale/

echo -e "\n=== Checking English locale for reference ==="
rg -n "verbose_mode:" nettacker/locale/en.yaml -A 0

Repository: OWASP/Nettacker

Length of output: 2833


🏁 Script executed:

#!/bin/bash
# Check the German locale file structure around line 75
echo "=== German locale file around line 75 ==="
sed -n '70,80p' nettacker/locale/de.yaml

echo -e "\n=== Full German locale file line count ==="
wc -l nettacker/locale/de.yaml

echo -e "\n=== Check for any verbose level references in code (if applicable) ==="
fd -e py -e yaml | xargs grep -l "verbose_mode" | head -5

Repository: OWASP/Nettacker

Length of output: 755


🏁 Script executed:

#!/bin/bash
# Check code implementation to see if verbose levels (0-5) are still supported
echo "=== Checking arg_parser for verbose mode implementation ==="
grep -n "verbose" nettacker/core/arg_parser.py | head -20

echo -e "\n=== Checking config.py for verbose handling ==="
grep -n "verbose" nettacker/config.py | head -15

echo -e "\n=== Check git status to see what locales were changed in this PR ==="
git log --oneline -1 --name-only 2>/dev/null | grep locale || echo "Git log not available"

Repository: OWASP/Nettacker

Length of output: 1320


🏁 Script executed:

#!/bin/bash
# Let me check the exact state of these files and look for verbose level references
echo "=== Check if verbose levels are referenced anywhere in code ==="
rg "0-5" nettacker/ --type py --type yaml 2>/dev/null || echo "No matches found"

echo -e "\n=== Check verbose argument definition ==="
sed -n '1,100p' nettacker/core/arg_parser.py | grep -A 5 -B 5 "verbose" || true

Repository: OWASP/Nettacker

Length of output: 543


Fix incomplete locale updates: Chinese and Japanese not updated despite PR objective.

The German translation change is correct. However, the PR objective to "Remove outdated verbose level references" was incompletely executed. The Chinese (zh-cn.yaml line 58) and Japanese (ja.yaml line 58) locales still contain the outdated "(0-5)" range specifications:

  • Chinese: verbose_mode: 详细模式级别(0-5)(默认0)
  • Japanese: verbose_mode: 冗両モードレベル(0〜5)(デフォルトは0)

All other locales (English, French, Spanish, German, Russian, Dutch, etc.) were successfully simplified. Update these two locales to match the pattern used in other languages.

🤖 Prompt for AI Agents
In @nettacker/locale/de.yaml at line 75, The Chinese and Japanese locale files
still use the old verbose range text; update the verbose_mode entries in
zh-cn.yaml and ja.yaml (key: verbose_mode) to the simplified form used in other
locales (remove the “(0-5)”/default suffix), matching the same concise
translation pattern as the other language files so all locales are consistent.

TYPE: TIPO
DESCRIPTION: DESCRIÇÃO
verbose_level: nível de modo de detalhe (0-5) (padrão 0)
verbose_level: modo detalhado
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check which locale files use verbose_level vs verbose_mode

echo "=== Files using 'verbose_level:' ==="
rg -n "^verbose_level:" nettacker/locale/

echo ""
echo "=== Files using 'verbose_mode:' ==="
rg -n "^verbose_mode:" nettacker/locale/

echo ""
echo "=== Checking if both keys are referenced in code ==="
rg -n "verbose_level|verbose_mode" nettacker/ -g '!*.yaml' -g '!locale/' --type py

Repository: OWASP/Nettacker

Length of output: 2074


Fix key name inconsistency: Change verbose_level to verbose_mode.

The Brazilian Portuguese locale file uses the key verbose_level, but the codebase references only verbose_mode (arg_parser.py, logger.py, config.py). This causes the locale string lookup to fail, leaving Portuguese Brazilian users without the translated text. Two files are affected: pt-br.yaml and it.yaml. Both must use verbose_mode to match the code and all other locales.

🤖 Prompt for AI Agents
In @nettacker/locale/pt-br.yaml at line 75, The locale key is inconsistent:
replace the `verbose_level` key with `verbose_mode` in the Portuguese-Brazil and
Italian locale YAMLs so the runtime lookup used by arg_parser.py, logger.py and
config.py succeeds; open the pt-br and it locale files, find any
`verbose_level:` entries and rename them to `verbose_mode:` (preserve the
existing translated value) and run a quick grep for `verbose_level` to ensure no
stray occurrences remain.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
nettacker/locale/ja.yaml (1)

40-40: Update Japanese translation of scan_method_select to match English.

The English locale has been updated to provide users with specific guidance: No scan module specified. Use --show-all-modules to view available modules and select one using the -m option.

The Japanese translation at line 40 remains generic (あなたのスキャン方法を選んでください! — "Please select your scan method!") and does not convey the same helpful direction. Update the Japanese version to match the improved English message.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 32cfee4 and dfc1c53.

📒 Files selected for processing (5)
  • docs/Usage.md
  • nettacker/locale/it.yaml
  • nettacker/locale/ja.yaml
  • nettacker/locale/pt-br.yaml
  • nettacker/locale/zh-cn.yaml
✅ Files skipped from review due to trivial changes (1)
  • nettacker/locale/zh-cn.yaml
🚧 Files skipped from review as they are similar to previous changes (3)
  • nettacker/locale/pt-br.yaml
  • nettacker/locale/it.yaml
  • docs/Usage.md
🔇 Additional comments (1)
nettacker/locale/ja.yaml (1)

58-58: LGTM! Verbose mode description simplified.

The removal of outdated references to verbose mode levels (0-5) and default values aligns with the PR objectives to clean up unclear messaging.

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.

2 participants