Skip to content

feat(aws): support excluding regions from scans via CLI, env var, and config#10688

Merged
jfagoagas merged 5 commits into
masterfrom
PROWLER-1361-add-prowler-disallowed-regions-environment-variable-config-option-to-exclude-regions-from-scans
Apr 15, 2026
Merged

feat(aws): support excluding regions from scans via CLI, env var, and config#10688
jfagoagas merged 5 commits into
masterfrom
PROWLER-1361-add-prowler-disallowed-regions-environment-variable-config-option-to-exclude-regions-from-scans

Conversation

@danibarranqueroo
Copy link
Copy Markdown
Member

@danibarranqueroo danibarranqueroo commented Apr 14, 2026

Context

AWS scans could hang or become very slow when a specific region was unresponsive, and the only workaround was removing that region from aws_regions_by_service.json, which is global and brittle.

Description

This PR adds support for excluding AWS regions from scans using:

  • --excluded-region
  • PROWLER_AWS_DISALLOWED_REGIONS
  • aws.disallowed_regions in config.yaml

The exclusion logic now lives in AwsProvider, so it applies to both CLI scans and API/App-triggered scans. Precedence is:

  1. CLI flag
  2. Environment variable
  3. Config file

It also adds documentation and regression tests for the new behavior.

Steps to review

Please add a detailed description of how to review this PR.

Checklist

Community Checklist
  • This feature/issue is listed in here or roadmap.prowler.com
  • Is it assigned to me, if not, request it via the issue/feature in here or Prowler Community Slack

SDK/CLI

  • Are there new checks included in this PR? Yes / No
    • If so, do we need to update permissions for the provider? Please review this carefully.

UI

  • All issue/task requirements work as expected on the UI
  • Screenshots/Video of the functionality flow (if applicable) - Mobile (X < 640px)
  • Screenshots/Video of the functionality flow (if applicable) - Table (640px > X < 1024px)
  • Screenshots/Video of the functionality flow (if applicable) - Desktop (X > 1024px)
  • Ensure new entries are added to CHANGELOG.md, if applicable.

API

  • All issue/task requirements work as expected on the API
  • Endpoint response output (if applicable)
  • EXPLAIN ANALYZE output for new/modified queries or indexes (if applicable)
  • Performance test results (if applicable)
  • Any other relevant evidence of the implementation (if applicable)
  • Verify if API specs need to be regenerated.
  • Check if version updates are required (e.g., specs, Poetry, etc.).
  • Ensure new entries are added to CHANGELOG.md, if applicable.

License

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@danibarranqueroo danibarranqueroo requested a review from a team April 14, 2026 16:44
@danibarranqueroo danibarranqueroo requested a review from a team as a code owner April 14, 2026 16:44
@github-actions github-actions Bot added documentation provider/aws Issues/PRs related with the AWS provider labels Apr 14, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 14, 2026

Conflict Markers Resolved

All conflict markers have been successfully resolved in this pull request.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 14, 2026

✅ All necessary CHANGELOG.md files have been updated.

@mintlify
Copy link
Copy Markdown
Contributor

mintlify Bot commented Apr 14, 2026

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
prowler 🟢 Ready View Preview Apr 14, 2026, 4:47 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 14, 2026

🔒 Container Security Scan

Image: prowler:d2bce2d
Last scan: 2026-04-15 15:03:49 UTC

📊 Vulnerability Summary

Severity Count
🔴 Critical 4
Total 4

4 package(s) affected

⚠️ Action Required

Critical severity vulnerabilities detected. These should be addressed before merging:

  • Review the detailed scan results
  • Update affected packages to patched versions
  • Consider using a different base image if updates are unavailable

📋 Resources:

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 14, 2026

Codecov Report

❌ Patch coverage is 83.56164% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.42%. Comparing base (392ffd5) to head (27f3833).
⚠️ Report is 11 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #10688      +/-   ##
==========================================
- Coverage   93.61%   90.42%   -3.19%     
==========================================
  Files         227      851     +624     
  Lines       31923    24445    -7478     
==========================================
- Hits        29884    22104    -7780     
- Misses       2039     2341     +302     
Flag Coverage Δ
api ?
prowler-py3.10-aws 90.49% <83.56%> (?)
prowler-py3.10-config 90.42% <83.56%> (?)
prowler-py3.11-aws 90.49% <83.56%> (?)
prowler-py3.11-config 90.42% <83.56%> (?)
prowler-py3.12-aws 90.49% <83.56%> (?)
prowler-py3.12-config 90.42% <83.56%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
prowler 90.42% <83.56%> (∅)
api ∅ <ø> (∅)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jfagoagas jfagoagas merged commit 43913b1 into master Apr 15, 2026
36 of 38 checks passed
@jfagoagas jfagoagas deleted the PROWLER-1361-add-prowler-disallowed-regions-environment-variable-config-option-to-exclude-regions-from-scans branch April 15, 2026 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation provider/aws Issues/PRs related with the AWS provider

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants