Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/developer-guide/configurable-checks.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ When adding a new configurable check to Prowler, update the following files:

For a complete list of checks that already support configuration, see the [Configuration File Tutorial](/user-guide/cli/tutorials/configuration_file).

<Note>
Because a configurable check's verdict depends on the `audit_config` value it reads, a compliance requirement can lose meaning if the scan ran with a looser threshold than the control demands. Compliance frameworks can guard against this with **configuration guardrails**: a requirement declares the strictest configuration it tolerates and is forced to FAIL when the scan's config falls short. See [Configuration Guardrails for Requirements](/developer-guide/security-compliance-framework#configuration-guardrails-for-requirements).
</Note>

## Adding a Parameter to the Provider Schema

Most providers have a typed Pydantic schema in `prowler/config/schema/`, registered in `prowler/config/schema/registry.py`. When a config is loaded and the provider has a registered schema, `validate_provider_config` checks each user-supplied key against it, logs a warning, and drops any field that fails validation. The consumer's `.get(key, default)` then falls back to the built-in default. Providers without a registered schema are passed through unchanged.
Expand Down
195 changes: 187 additions & 8 deletions docs/developer-guide/security-compliance-framework.mdx

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions prowler/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ All notable changes to the **Prowler SDK** are documented in this file.

### 🚀 Added

- Per-requirement configuration validation for compliance frameworks via `ConfigRequirements`, so a requirement is reported as FAIL when its configurable checks ran with a configuration too loose to satisfy it (applied across all compliance outputs: CSV, OCSF, and console tables) [(#11669)](https://github.com/prowler-cloud/prowler/pull/11669)
- `entra_conditional_access_policy_explicitly_targets_azure_devops` check for M365 provider, verifying at least one enabled Conditional Access policy explicitly includes the Azure DevOps cloud application instead of relying on a broad "All cloud apps" policy [(#11182)](https://github.com/prowler-cloud/prowler/pull/11182)
- `entra_conditional_access_policy_no_exclusion_gaps` check for M365 provider, verifying every user, group, role, or application excluded from an enabled Conditional Access policy stays in scope of another enabled policy [(#11577)](https://github.com/prowler-cloud/prowler/pull/11577)

Expand Down
32 changes: 32 additions & 0 deletions prowler/compliance/alibabacloud/cis_2.0_alibabacloud.json
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,14 @@
],
"Checks": [
"ram_user_console_access_unused"
],
"ConfigRequirements": [
{
"Check": "ram_user_console_access_unused",
"ConfigKey": "max_console_access_days",
"Operator": "lte",
"Value": 90
}
]
},
{
Expand Down Expand Up @@ -841,6 +849,14 @@
],
"Checks": [
"sls_logstore_retention_period"
],
"ConfigRequirements": [
{
"Check": "sls_logstore_retention_period",
"ConfigKey": "min_log_retention_days",
"Operator": "gte",
"Value": 365
}
]
},
{
Expand Down Expand Up @@ -1353,6 +1369,14 @@
],
"Checks": [
"rds_instance_sql_audit_retention"
],
"ConfigRequirements": [
{
"Check": "rds_instance_sql_audit_retention",
"ConfigKey": "min_rds_audit_retention_days",
"Operator": "gte",
"Value": 180
}
]
},
{
Expand Down Expand Up @@ -1551,6 +1575,14 @@
],
"Checks": [
"cs_kubernetes_cluster_check_recent"
],
"ConfigRequirements": [
{
"Check": "cs_kubernetes_cluster_check_recent",
"ConfigKey": "max_cluster_check_days",
"Operator": "lte",
"Value": 7
}
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,14 @@
"Checks": [
"ram_user_console_access_unused"
],
"ConfigRequirements": [
{
"Check": "ram_user_console_access_unused",
"ConfigKey": "max_console_access_days",
"Operator": "lte",
"Value": 90
}
],
"Attributes": [
{
"Title": "Inactive users disabled for console access",
Expand Down Expand Up @@ -399,6 +407,14 @@
"LevelOfRisk": 3,
"Weight": 10
}
],
"ConfigRequirements": [
{
"Check": "cs_kubernetes_cluster_check_weekly",
"ConfigKey": "max_cluster_check_days",
"Operator": "lte",
"Value": 7
}
]
},
{
Expand Down Expand Up @@ -695,6 +711,14 @@
"Checks": [
"rds_instance_sql_audit_retention"
],
"ConfigRequirements": [
{
"Check": "rds_instance_sql_audit_retention",
"ConfigKey": "min_rds_audit_retention_days",
"Operator": "gte",
"Value": 180
}
],
"Attributes": [
{
"Title": "RDS SQL audit retention configured",
Expand Down
24 changes: 24 additions & 0 deletions prowler/compliance/aws/asd_essential_eight_aws.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@
"config_recorder_all_regions_enabled",
"inspector2_is_enabled"
],
"ConfigRequirements": [
{
"Check": "config_recorder_all_regions_enabled",
"ConfigKey": "mute_non_default_regions",
"Operator": "eq",
"Value": false
}
],
"Attributes": [
{
"Section": "1 Patch applications",
Expand Down Expand Up @@ -260,6 +268,14 @@
"config_recorder_all_regions_enabled",
"inspector2_is_enabled"
],
"ConfigRequirements": [
{
"Check": "config_recorder_all_regions_enabled",
"ConfigKey": "mute_non_default_regions",
"Operator": "eq",
"Value": false
}
],
"Attributes": [
{
"Section": "2 Patch operating systems",
Expand Down Expand Up @@ -742,6 +758,14 @@
"accessanalyzer_enabled",
"accessanalyzer_enabled_without_findings"
],
"ConfigRequirements": [
{
"Check": "accessanalyzer_enabled",
"ConfigKey": "mute_non_default_regions",
"Operator": "eq",
"Value": false
}
],
"Attributes": [
{
"Section": "4 Restrict administrative privileges",
Expand Down
Loading
Loading