Skip to content

Comments

fix(cli): correct timeout argument help text#1295

Open
Gauravsharma2040 wants to merge 4 commits intoOWASP:masterfrom
Gauravsharma2040:fix-timeout-help
Open

fix(cli): correct timeout argument help text#1295
Gauravsharma2040 wants to merge 4 commits intoOWASP:masterfrom
Gauravsharma2040:fix-timeout-help

Conversation

@Gauravsharma2040
Copy link

The --timeout / -T argument was incorrectly using the "read_passwords"
help key.

This PR:

  • Adds a dedicated "timeout" help key in en.yaml
  • Updates the timeout argument to use the correct help string

No behavioral changes introduced.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 21, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Fixed the CLI help text for the timeout option and added a timeout localization key to English; the Hindi locale file shows only a formatting/newline artifact with no semantic change.

Changes

Cohort / File(s) Summary
Argument Parser
nettacker/core/arg_parser.py
Corrected help text for -T/--timeout (replaced incorrect "read_passwords" help with "timeout").
Localization — English
nettacker/locale/en.yaml
Added timeout: request timeout in seconds key to English locale.
Localization — Hindi (formatting)
nettacker/locale/hi.yaml
Formatting/newline artifact only; no semantic change to finish_build_report or other keys.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'fix(cli): correct timeout argument help text' clearly and accurately summarizes the main change—fixing the help text for the timeout CLI argument.
Description check ✅ Passed The description is directly related to the changeset, explaining the issue (incorrect help key), the fix (adding timeout key in en.yaml and updating the argument), and confirming no behavioral changes.

✏️ 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

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.

Caution

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

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

1-123: ⚠️ Potential issue | 🟡 Minor

Add missing timeout translation and address broader localization gap in hi.yaml.

The app will not crash at startup when Hindi is selected because nettacker/core/messages.py has robust fallback handling—it automatically fills missing keys with English values during initialization. However, timeout is indeed absent from hi.yaml along with 16 other keys (apsw_connection_error, apsw_ill_configuration, database_error, database_lock_issue, database_query_fail, database_retries_exhausted, error_passwords, error_wordlist, exclude_ports, http_header, read_report_fail, remove_logs_fail, report_insertion_fail, report_retrieval_fail, search_results_end, user_wordlist).

This creates a localization gap where these 17 keys will display in English for Hindi-speaking users. Consider adding translations, starting with:

+timeout: सेकंड में अनुरोध टाइमआउट
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@nettacker/locale/hi.yaml` around lines 1 - 123, The hi.yaml is missing the
translation for timeout (and 16 other keys) causing fallback to English; open
nettacker/locale/hi.yaml and add Hindi translations for the exact keys: timeout,
apsw_connection_error, apsw_ill_configuration, database_error,
database_lock_issue, database_query_fail, database_retries_exhausted,
error_passwords, error_wordlist, exclude_ports, http_header, read_report_fail,
remove_logs_fail, report_insertion_fail, report_retrieval_fail,
search_results_end, user_wordlist; preserve any placeholders like {0}/{1}, keep
YAML quoting/indentation consistent with surrounding entries, and verify
selection via nettacker/core/messages.py by switching the locale to Hindi to
confirm no English fallback remains.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@nettacker/locale/hi.yaml`:
- Around line 1-123: The hi.yaml is missing the translation for timeout (and 16
other keys) causing fallback to English; open nettacker/locale/hi.yaml and add
Hindi translations for the exact keys: timeout, apsw_connection_error,
apsw_ill_configuration, database_error, database_lock_issue,
database_query_fail, database_retries_exhausted, error_passwords,
error_wordlist, exclude_ports, http_header, read_report_fail, remove_logs_fail,
report_insertion_fail, report_retrieval_fail, search_results_end, user_wordlist;
preserve any placeholders like {0}/{1}, keep YAML quoting/indentation consistent
with surrounding entries, and verify selection via nettacker/core/messages.py by
switching the locale to Hindi to confirm no English fallback remains.

@securestep9
Copy link
Collaborator

@Gauravsharma2040- please keep changes in this PR in scope of the goal of this PR. For this change, the only update to hi.yaml should be adding the timeout string; please revert any other Hindi text edits.
If you want to fix other Hindi messages, please open a separate PR for those changes and check for existing/open PRs touching hi.yaml to avoid conflicts.

@Gauravsharma2040
Copy link
Author

@Gauravsharma2040- please keep changes in this PR in scope of the goal of this PR. For this change, the only update to hi.yaml should be adding the timeout string; please revert any other Hindi text edits. If you want to fix other Hindi messages, please open a separate PR for those changes and check for existing/open PRs touching hi.yaml to avoid conflicts.

Thanks for pointing that out. I already have a separate PR open that contains the broader Hindi translation refinements. I’ll revert the unrelated changes from this PR and keep it strictly scoped to the timeout string.

@securestep9
Copy link
Collaborator

@Gauravsharma2040 please create an issue with a screenshot showing the incorrect text --help output and link it from your PR. This way when the PR is merge the issue will be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants