Skip to content

Conversation

@IITanShravan
Copy link

This PR adds a YAML document header to ar.yaml, fixes indentation in the first 10 keys, removes unused key blocks, and inserts a "# API" section comment for key grouping and future maintainability.
fixes: #596

  • Added '---' YAML header
  • Normalized indentation and ordering for initial keys
  • Removed unused/duplicate key blocks
  • Added section comment for API-related keys

Tested parsing and file format to ensure no issues.

- Add '---' header at top of ar.yaml
- Verified and normalized indentation/logical order for first 10 keys
- Inserted '# API' comment before API-related keys begin
This is a draft commit in fork; no PR opened yet.

Signed-off-by: Shravan Kumar <[email protected]>
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 29, 2025

Summary by CodeRabbit

  • New Features

    • Introduced API server configuration with customizable host, port, debug mode, authentication keys, IP whitelisting, and access logging capabilities.
  • Changes

    • Restructured application messaging to support API-based operations, including database management, scan execution, and report comparison functionality.

Walkthrough

The Arabic locale file (ar.yaml) underwent a significant restructuring, removing 22 CLI-focused locale keys related to scan targeting and result messages, and adding 57 new API-focused configuration and operational message keys organized under a new top-level "API" grouping.

Changes

Cohort / File(s) Summary
Locale restructuring
nettacker/locale/ar.yaml
Removed 22 keys (module_pattern_404, enter_default, enter_choices_default, all_targets, all_thread_numbers, out_file, all_scan_methods, all_scan_methods_exclude, all_usernames, all_passwords, timeout_seconds, all_ports, all_verbose_level, all_socks_proxy, retries_number, graph, subdomain_found, select_profile, profile_404, waiting, vulnerable, target_vulnerable, no_vulnerability_found); added 57 new keys under new "API" top-level block including API configuration options (start_api_server, API_host, API_port, API_debug, API_access_key, white_list_API, etc.) and operational messages (host_up, host_down, http_auth_success, database_connect_fail, etc.).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Verify translation quality: Ensure all 57 new Arabic translations under the API block are linguistically accurate and contextually appropriate
  • Cross-locale consistency: Confirm corresponding keys exist with consistent naming and structure in other locale files (e.g., en.yaml) to prevent runtime key lookup failures
  • Key naming consistency: Validate that new API key names align with their actual usage throughout the codebase
  • Removal validation: Ensure the 22 removed keys are no longer referenced in CLI or other functional code paths

Pre-merge checks and finishing touches

❌ Failed checks (3 warnings, 1 inconclusive)
Check name Status Explanation Resolution
Title Check ⚠️ Warning The PR title emphasizes formatting and organizational improvements ("add YAML header, fix indentation, mark API section"), but the raw_summary reveals the primary changes are structural: removal of 23 public locale keys related to scan targets and comprehensive addition of 51+ API-related keys under a new section. While the title captures some aspects of the changes (marking API section), it does not clearly convey the main content restructuring from target-focused messages to an API-centric configuration. The title is thus partially related to the changeset but does not represent the most significant alterations.
Linked Issues Check ⚠️ Warning Linked issue #596 identifies two main objectives: standardizing YAML files through cleanup and documentation, and ensuring YAML files support control constructs (while and for loops). The PR addresses the first objective by adding a YAML header, fixing indentation, removing unused keys, and organizing keys with section comments. However, there is no evidence in the changeset that the second objective—implementing loop support in YAML files—has been addressed. The PR thus only partially fulfills the stated requirements of issue #596.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Out of Scope Changes Check ❓ Inconclusive The changeset removes 23 existing public locale keys and adds 51+ new API-related keys, representing a substantial structural reorganization of the locale configuration. While some level of restructuring could be justified as part of YAML standardization and cleanup, the magnitude and nature of these changes—wholesale replacement of scan-target-focused keys with API-centric keys—may exceed the scope of basic standardization implied by issue #596. It is unclear whether this restructuring aligns with the original intent to "clean up and document" YAML conventions or if it represents a separate feature restructuring.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed The PR description is related to the changeset, mentioning key aspects such as adding a YAML header, fixing indentation, removing unused key blocks, and inserting an API section comment. Although the description does not provide granular detail about the extent of keys being removed and added, it does convey the general intent of cleanup and restructuring, which aligns with the substantive changes shown in the raw_summary.
✨ 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 677f13e and 29d42b3.

📒 Files selected for processing (1)
  • nettacker/locale/ar.yaml (2 hunks)
🔇 Additional comments (4)
nettacker/locale/ar.yaml (4)

1-1: YAML document header added correctly.

The --- marker at line 1 is standard YAML practice for document start declaration and improves file robustness.


159-227: New API section keys are well-structured and properly translated.

The 57 new API-focused locale keys (lines 159-227) follow naming conventions, have correct indentation, and include proper Arabic translations. The # API comment at line 159 provides helpful section organization for maintainability.


2-158: Verify indentation normalization claim.

The PR objectives state: "Normalizes indentation and ordering for the initial keys (first ~10 keys)". However, the provided code format shows all lines as new/changed (~ marks), making it impossible to verify indentation normalization in the diff. Please confirm that indentation changes were applied consistently and did not introduce any formatting inconsistencies.


2-158: Critical inconsistency detected: removed keys still exist in fr.yaml and de.yaml.

The PR removes 22 keys from ar.yaml only, but verification shows:

  • fr.yaml: Contains all 6 sample removed keys (all_targets, all_usernames, all_passwords, all_ports, enter_default, module_pattern_404)
  • de.yaml: Contains all 6 sample removed keys
  • en.yaml: None of these keys present (130 lines vs ar.yaml's 227 lines)

The problem: This violates the stated PR goal of "standardize YAML files." Since no Python code references these keys (verified in initial search), they should be removed consistently from ALL locales, not just ar.yaml. Removing keys from only ar.yaml while other locales retain them creates locale inconsistency and defeats the purpose of standardization.

Required verification:

  1. Confirm whether other locale files (fr, de, etc.) are being updated in separate PRs or commits
  2. If this is a standalone PR, the removed keys should also be removed from fr.yaml, de.yaml, and other locales that contain them
  3. Clarify the standardization strategy: is en.yaml (130 lines, minimal) the target state for all locales?

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.

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.

Standardize yaml files

1 participant