Back to all reviewers

Use configuration placeholders

prowler-cloud/prowler
Based on 3 comments
Json

Avoid hardcoding specific values like regions, timeframes, or identifiers in configuration commands, examples, or settings. Instead, use descriptive placeholders that clearly indicate the type of value required. This practice:

Configurations Json

Reviewer Prompt

Avoid hardcoding specific values like regions, timeframes, or identifiers in configuration commands, examples, or settings. Instead, use descriptive placeholders that clearly indicate the type of value required. This practice:

  1. Makes configuration examples more reusable across different environments
  2. Prevents users from mistakenly using example values in production
  3. Supports parametrization of values that may change across environments or over time

Example - Instead of:

aws dms modify-replication-instance --region us-east-1 --replication-instance-arn arn:aws:dms:us-east-1:123456789012:rep:ABCDABCDABCDABCDABCDABCDAB --auto-minor-version-upgrade --apply-immediately

Use:

aws dms modify-replication-instance --region <REGION> --replication-instance-arn <REPLICATION_INSTANCE_ARN> --auto-minor-version-upgrade --apply-immediately

Similarly, when defining configurable timeframes or identifiers in code, make them parameters rather than hardcoding values like “6 months” or specific domain GUIDs. This approach improves flexibility, reusability, and reduces potential confusion about whether example values are required literals.

3
Comments Analyzed
Json
Primary Language
Configurations
Category

Source Discussions