When to Use
Use this skill when:
- Creating a new compliance framework for any provider — decide universal vs legacy first (see below)
- Syncing an existing framework with an upstream source of truth (CIS, FINOS CCC, CSA CCM, NIST, ENS, etc.)
- Adding requirements to existing frameworks, or extending a universal framework to a new provider
- Mapping checks to compliance controls
- Adding
ConfigRequirements guardrails so configurable checks can't silently satisfy a requirement with a loosened config
- Auditing existing check mappings as a cloud auditor ("are these mappings correct?", "which checks apply?", "review the mappings")
- Adding a new legacy output formatter (table dispatcher + per-provider classes + CSV models)
- Fixing JSON bugs: duplicate IDs, empty Version, wrong Section, stale check refs, inconsistent FamilyName, padded tangential check mappings
- Investigating why a finding/check isn't showing under the expected compliance framework in the UI
- Understanding compliance framework structures and attributes
The authoritative contributor doc is docs/developer-guide/security-compliance-framework.mdx —
keep this skill and that doc consistent when either changes. For reviewing
a compliance PR, use the sister skill
prowler-compliance-review instead.
Universal vs Legacy: The First Decision
Prowler supports two JSON schemas. Choosing wrong means unnecessary Python
code, so decide this before anything else. At load time both converge: legacy
files are adapted into the universal ComplianceFramework model
(adapt_legacy_to_universal()), so the difference is about authoring cost
and capabilities, not about what the rest of Prowler sees.
Side-by-side comparison
|
Universal (recommended for new frameworks) |
Legacy provider-specific |
| File location |
prowler/compliance/<framework>.json (top level) |
prowler/compliance/<provider>/<framework>_<version>_<provider>.json |
| Providers |
Any number, one file (checks dict keyed by provider) |
Exactly one provider per file (one file per provider to multi-cover) |
| Key style |
lowercase (framework, requirements, checks) |
Capitalized (Framework, Requirements, Checks) |
| Attribute schema |
Declared in the JSON itself via attributes_metadata, validated at load |
Pydantic class per framework family in compliance_models.py (code change for new shapes) |
| Attributes per requirement |
One flat dict (attributes: {...}) |
List of objects (Attributes: [{...}]) — only Attributes[0] is used downstream |
| Table/CSV/OCSF output |
Data-driven from outputs.table_config — zero Python changes |
Formatter package + registrations in compliance.py, __main__.py, export.py |
| Guardrails field |
config_requirements (+ mandatory Provider per constraint) |
ConfigRequirements (Provider omitted) |
| Loader behavior on error |
Lenient: logs + skips file (load_compliance_framework_universal) |
Fail-fast: sys.exit(1) (load_compliance_framework) |
| Loaded by |
Only get_bulk_compliance_frameworks_universal() |
Both loaders (Compliance.get_bulk() + universal, via adapter) |
| Shipped examples |
cis_controls_8.1.json, csa_ccm_4.0.json, dora_2022_2554.json |
Everything else (~105 files across 11 providers) |
When to use which
Use universal when (any of these):
- The framework is new to Prowler — no existing attribute class, no
existing formatter. This is the default: zero Python changes needed.
- The framework spans (or will span) more than one provider — DORA, CSA
CCM, CIS Controls. One file covers all providers; extending to a new
provider is a one-line
checks edit.
- The attribute shape is unique to this framework — declare it in
attributes_metadata instead of adding a Pydantic class to the Union.
Use legacy only when extending an existing legacy family:
- A new version of a shipped legacy framework (CIS 8.0 for AWS → new
cis_8.0_aws.json, same CIS_Requirement_Attribute, same cis/ formatter).
- An existing legacy framework for a new provider (ENS for m365 → new
ens_rd2022_m365.json + ens_m365.py transformer).
- Consistency with the family matters more than the universal benefits — a
lone
cis_8.0_aws in universal format while 20+ CIS files stay legacy
would fragment the family.
Never: start a brand-new single-provider framework as legacy "because it's
only AWS today". Universal handles single-provider fine (the checks dict
just has one key) and you skip 3 output files + 3 registrations.
The same requirement in both schemas
Universal (prowler/compliance/my_framework_1.0.json):
{
"framework": "My-Framework",
"name": "My Framework 1.0",
"version": "1.0",
"description": "...",
"attributes_metadata": [
{"key": "Section", "type": "str", "required": true},
{"key": "Service", "type": "str"}
],
"outputs": {"table_config": {"group_by": "Section"}},
"requirements": [
{
"id": "MF-1.1",
"name": "Root MFA",
"description": "Root account must have MFA enabled.",
"attributes": {"Section": "IAM", "Service": "iam"},
"checks": {
"aws": ["iam_root_mfa_enabled"],
"azure": []
}
}
]
}
Legacy (prowler/compliance/aws/my_framework_1.0_aws.json — plus a second
file per extra provider, plus formatter + registrations):
{
"Framework": "My-Framework",
"Name": "My Framework 1.0 for AWS",
"Version": "1.0",
"Provider": "AWS",
"Description": "...",
"Requirements": [
{
"Id": "MF-1.1",
"Name": "Root MFA",
"Description": "Root account must have MFA enabled.",
"Attributes": [
{"ItemId": "MF-1.1", "Section": "IAM", "Service": "iam"}
],
"Checks": ["iam_root_mfa_enabled"]
}
]
}
Same control, but the universal file already covers Azure, validates its own
attribute schema, and renders table/CSV/OCSF with no code. Field-by-field
references for each schema follow below.
Architecture (Mental Model)
Prowler compliance is a four-layer system. Bugs usually happen where one layer
doesn't match another, so know all four before touching anything.
Layer 1: SDK / Core Models — prowler/lib/check/
All in Pydantic v1 (from pydantic.v1 import ...). Three model groups live
in compliance_models.py:
Legacy tree — Compliance → Compliance_Requirement / Mitre_Requirement:
- One
*_Requirement_Attribute class per framework family. Registered today (Union order matters):
ASDEssentialEight, CIS, ENS, ISO27001_2013, AWS_Well_Architected,
KISA_ISMSP, Prowler_ThreatScore, CCC, C5Germany, CSA_CCM, STIG
(Okta IDaaS), and Generic_Compliance_Requirement_Attribute as fallback.
- Generic MUST stay LAST in
Compliance_Requirement.Attributes: list[Union[...]] —
Pydantic v1 tries union members in order; Generic first would swallow every
framework-specific attribute. NIST 800-53/CSF, PCI DSS, GDPR, HIPAA, SOC2,
FedRAMP, SecNumCloud etc. intentionally use Generic.
- A
root_validator rejects empty Framework, Provider or Name.
- MITRE uses the separate
Mitre_Requirement model (Tactics, SubTechniques,
Platforms, TechniqueURL at requirement top level, per-provider
Mitre_Requirement_Attribute_{AWS,Azure,GCP}).
Universal tree — ComplianceFramework → UniversalComplianceRequirement:
- Flat
attributes: dict per requirement, schema declared in
attributes_metadata (key, label, type, enum, required, enum_display,
enum_order, output_formats). A root_validator rejects missing required
keys, unknown keys (drift guard), enum violations, and int/float/bool type
mismatches. If attributes_metadata is omitted, no validation runs.
checks: dict[provider, list[check_id]] — the provider list of the framework
is derived from these keys (get_providers() / supports_provider());
the top-level provider field is only a fallback.
outputs.table_config (group_by, split_by, scoring, labels) drives the CLI
table; outputs.pdf_config exists in the model but is not consumed by the
API PDF pipeline yet (see Layer 4).
Guardrails — Compliance_Requirement_ConfigConstraint:
- Fields
Check, ConfigKey, Operator (lte|gte|eq|in|subset|superset),
Value, optional Provider (required in universal multi-provider files).
- A
root_validator rejects Value/Operator type mismatches at load time.
- Evaluation is centralized in
prowler/lib/check/compliance_config_eval.py
(evaluate_config_constraints, apply_config_status, get_effective_status,
CONFIG_NOT_VALID_PREFIX = "Configuration not valid for this requirement."),
shared by CSV/OCSF/table outputs and the API backend. A violated
constraint forces the requirement to FAIL and prepends the reason to
status_extended. Constraints whose ConfigKey is absent from
audit_config are skipped (defaults assumed compliant).
Loaders:
Compliance.get_bulk(provider) — legacy: scans only
prowler/compliance/{provider}/ (+ external JSONs via the
prowler.compliance entry-point group). Does NOT see top-level universal files.
get_bulk_compliance_frameworks_universal(provider) — scans both the
top-level prowler/compliance/ and every provider subdirectory, adapting
legacy files via adapt_legacy_to_universal() (flattens Attributes[0] to a
dict, wraps Checks as {provider: [...]}, infers attributes_metadata).
Also loads external universal frameworks via the
prowler.compliance.universal entry-point group (built-ins win collisions).
get_check_compliance(finding, provider_type, bulk_checks_metadata) lives in
prowler/lib/outputs/compliance/compliance_check.py (not in
lib/check/compliance.py). It builds the per-finding dict keyed
f"{Framework}-{Version}" only when Version is non-empty — an empty
Version silently produces the key "{Framework}" and breaks downstream
filters and tests.
prowler/lib/check/compliance.py now contains only
update_checks_metadata_with_compliance().
Layer 2: JSON Catalogs — prowler/compliance/
See "Compliance Catalog Coverage" below.
Layer 3: Output Formatters — prowler/lib/outputs/compliance/
Universal path (no Python needed per framework):
universal/universal_table.py — get_universal_table(), renders the CLI
table from outputs.table_config + attributes_metadata.
universal/universal_output.py — UniversalComplianceOutput, builds the CSV
Pydantic model dynamically from attributes_metadata.
universal/ocsf_compliance.py — OCSFComplianceOutput; OCSF output is
always generated for universal frameworks regardless of --output-formats.
- Orchestrated by
process_universal_compliance_frameworks() in
compliance.py, which runs before any legacy dispatch and removes the
processed frameworks from the set.
Legacy path — per-framework directory, usually:
{framework}/
├── __init__.py
├── {framework}.py # get_{framework}_table() summary-table function
├── {framework}_{provider}.py # One ComplianceOutput subclass per provider
└── models.py # One Pydantic CSV row model per provider
Directories today: asd_essential_eight, aws_well_architected, c5, ccc,
cis, cisa_scuba, ens, generic, iso27001, kisa_ismsp,
mitre_attack, okta_idaas_stig, prowler_threatscore, universal.
Known deviations (don't "fix" them without a reason): iso27001/ has no table
file (falls to the generic table), aws_well_architected/ has no per-provider
files, cisa_scuba/ only ships googleworkspace.
- CSV writers emit
;-delimited files with UPPERCASE headers
(ComplianceOutput.batch_write_data_to_file). Field names in models.py
are public API — renaming breaks downstream consumers.
- Circular import rule: the table file (
{framework}.py) must not import
Finding directly or transitively (compliance.compliance → table module →
ComplianceOutput → Finding → get_check_compliance → cycle). Keep table
files bare (colorama, tabulate, prowler.config.config); when a module
genuinely needs both, use if TYPE_CHECKING: or function-local imports (see
universal_output.py / process_universal_compliance_frameworks).
- Legacy table functions have no docstrings; the universal ones do. Match the
style of the file family you're touching.
- Dispatcher
display_compliance_table() in compliance.py order:
universal (table_config) first → cis_ → ens_ → mitre_attack →
kisa → prowler_threatscore_ → c5_ → ccc_ → asd_essential_eight
(substring) → okta_idaas_stig → else provider hook
(provider.display_compliance_table(), may raise NotImplementedError) →
get_generic_compliance_table(). iso27001, aws_well_architected and
cisa_scuba ride the fallback on purpose.
Layer 4: API / UI
- API lazy loaders:
api/src/backend/api/compliance.py —
LazyComplianceTemplate / LazyChecksMapping (per-provider lazy caches over
get_bulk_compliance_frameworks_universal, with Gunicorn background warm-up).
- API CSV export dispatch:
COMPLIANCE_CLASS_MAP in
api/src/backend/tasks/jobs/export.py, consumed from tasks/tasks.py. It is
a dict provider → [(predicate, exporter_class)] with GenericCompliance as
fallback. Predicates mix startswith for multi-version families
(cis_, ens_, iso27001_, ccc_, cisa_scuba_, ...) and exact
name == ... for true singletons (mitre_attack_aws,
prowler_threatscore_*, asd_essential_eight_aws — and inconsistently
c5_azure/c5_gcp, while aws uses startswith("c5_")). Rule of thumb: if
the framework can ever grow versions or variants, use startswith.
- API overview ingestion:
create_compliance_requirements() in
api/src/backend/tasks/jobs/scan.py builds per-region rows from the lazy
template and persists ComplianceRequirementOverview (COPY with bulk-create
fallback) plus ComplianceOverviewSummary.
- API PDF reports:
api/src/backend/tasks/jobs/reports/ — hardcoded
FRAMEWORK_REGISTRY (own FrameworkConfig dataclass, NOT the SDK
PDFConfig) with one generator class per framework. Only
prowler_threatscore, ens, nis2, csa_ccm and cis have PDFs today;
adding one means a generator class + registry entry + wiring in report.py.
- UI mapper routing:
ui/lib/compliance/compliance-mapper.ts —
getComplianceMappers() keyed by the JSON's framework value
(e.g. "CIS", "CIS-Controls", "DORA", "Okta-IDaaS-STIG"). Unregistered
frameworks fall back to the generic mapper + GenericCustomDetails
automatically — a dedicated mapper/detail panel is a first-class upgrade,
not a requirement to render.
- UI grouping varies per mapper: generic/cis group by
Section/SubSection, iso by Category, ccc by FamilyName. All read
attributes[0] — inconsistent values within one JSON become separate tree
branches, so normalize before shipping.
- UI types:
ui/types/compliance.ts — one *AttributesMetadata interface
per framework, added to the AttributesItemData metadata union.
- UI icons:
ui/components/icons/compliance/ + IconCompliance.tsx.
Registration is an ordered substring match (COMPLIANCE_LOGOS): put
framework-specific keywords before generic ones (nist before nis2,
cisa before cis; aws deliberately last).
The CLI Pipeline (end-to-end)
prowler aws --compliance cis_7.0_aws # framework key = JSON basename
↓
Compliance.get_bulk("aws") # legacy frameworks
get_bulk_compliance_frameworks_universal("aws") # legacy (adapted) + universal
↓
update_checks_metadata_with_compliance() # attaches compliance to CheckMetadata
↓
execute_checks() → Finding objects
↓
get_check_compliance(finding, "aws", bulk) # dict "{Framework}-{Version}" → [req_ids]
↓
process_universal_compliance_frameworks() # universal: CSV + OCSF, then removed from set
per-provider elif branches in __main__.py # legacy: AWSCIS(...).batch_write_data_to_file()
↓
display_compliance_table() # universal table first, then legacy elifs,
# then generic fallback
Compliance Catalog Coverage
Counts as of 2026-07 (109 JSON files). Regenerate before trusting them:
for d in prowler/compliance/*/; do printf "%s: %s\n" "$(basename $d)" "$(ls $d*.json 2>/dev/null | wc -l)"; done
ls prowler/compliance/*.json # universal, top-level
Universal (top-level, multi-provider): cis_controls_8.1.json (18
providers), csa_ccm_4.0.json (aws/azure/gcp/alibabacloud/oraclecloud),
dora_2022_2554.json (aws/azure/gcp/alibabacloud/cloudflare).
Legacy per-provider (families, not exhaustive versions):
| Provider |
# |
Framework families |
| aws |
45 |
CIS 1.4–7.0, NIST 800-53 r4/r5, NIST 800-171 r2, NIST CSF 1.1/2.0, PCI 3.2.1/4.0, ISO 27001 2013/2022, HIPAA, GDPR, SOC2, FedRAMP low/moderate r4 + 20x KSI low, ENS RD2022, MITRE ATT&CK, C5, CCC, CISA, FFIEC, RBI, Well-Architected (security/reliability), FTR, FSBP, AWS AI Security Framework, AWS Account Security Onboarding, Audit Manager Control Tower, GxP 21 CFR 11 / EU Annex 11, KISA ISMS-P 2023 (en+ko), NIS2, ASD Essential Eight, SecNumCloud 3.2, Prowler ThreatScore |
| azure |
19 |
CIS 2.0–6.0, ISO 27001 2022, ENS RD2022, MITRE ATT&CK, PCI 4.0, HIPAA, SOC2, NIS2, RBI, C5, CCC, FedRAMP 20x KSI low, SecNumCloud 3.2, Prowler ThreatScore |
| gcp |
17 |
CIS 2.0–5.0, ISO 27001 2022, ENS RD2022, MITRE ATT&CK, PCI 4.0, HIPAA, SOC2, NIS2, RBI, C5, CCC, FedRAMP 20x KSI low, SecNumCloud 3.2, Prowler ThreatScore |
| kubernetes |
8 |
CIS 1.8–2.0.1, ISO 27001 2022, PCI 4.0, Prowler ThreatScore |
| m365 |
5 |
CIS 4.0/6.0/7.0, ISO 27001 2022, Prowler ThreatScore |
| alibabacloud |
3 |
CIS 2.0, SecNumCloud 3.2, Prowler ThreatScore |
| oraclecloud |
3 |
CIS 3.0/3.1, SecNumCloud 3.2 |
| github |
2 |
CIS 1.0/1.2.0 |
| googleworkspace |
2 |
CIS 1.3, CISA SCuBA 0.6 |
| okta |
1 |
Okta IDaaS STIG V1R2 |
| nhn |
1 |
ISO 27001 2022 |
Providers with a compliance directory but no frameworks yet: cloudflare, iac,
linode, llm, mongodbatlas, openstack, stackit. Provider keys inside universal
checks dicts must match directory names under prowler/providers/ (lowercase).
Universal Schema Reference
Full spec in docs/developer-guide/security-compliance-framework.mdx. Skeleton:
{
"framework": "DORA",
"name": "Digital Operational Resilience Act (DORA) 2022/2554",
"version": "2022/2554",
"description": "Shown in --list-compliance and PDF reports.",
"icon": "dora",
"attributes_metadata": [
{"key": "Pillar", "label": "Pillar", "type": "str", "required": true,
"enum": ["ICT Risk Management", "..."],
"output_formats": {"csv": true, "ocsf": true}},
{"key": "Article", "type": "str", "required": true}
],
"outputs": {
"table_config": {"group_by": "Pillar"},
"pdf_config": {"group_by_field": "Pillar", "charts": ["..."]}
},
"requirements": [
{
"id": "DORA-Art5",
"name": "Governance and organisation",
"description": "Requirement text verbatim from the source.",
"attributes": {"Pillar": "ICT Risk Management", "Article": "Article 5"},
"checks": {
"aws": ["iam_no_root_access_key"],
"azure": [],
"gcp": []
},
"config_requirements": [
{"Check": "iam_user_accesskey_unused", "Provider": "aws",
"ConfigKey": "max_unused_access_keys_days", "Operator": "lte", "Value": 45}
]
}
]
}
Universal fields, top level (ComplianceFramework)
| Field |
Type |
Required |
Notes |
framework |
string |
Yes |
Short identifier (DORA, CSA-CCM, CIS-Controls). This is the key the UI mapper routes on. |
name |
string |
Yes |
Human-readable full name. |
version |
string |
No (never leave empty) |
Framework version/edition (8.1, 2022/2554). |
description |
string |
Yes |
Shown in --list-compliance and PDF reports. |
provider |
string |
No |
Fallback only — the effective provider list is derived from checks keys across requirements (get_providers()). |
icon |
string |
No |
Short icon slug. |
attributes_metadata |
array |
No (strongly recommended) |
Declares the schema of every attributes key. If omitted, no attribute validation runs at all. |
outputs |
object |
No |
table_config (CLI table) + pdf_config (modeled, not yet consumed by the API). |
requirements |
array |
Yes |
List of requirement objects (below). |
Universal fields, per requirement (UniversalComplianceRequirement)
| Field |
Type |
Required |
Notes |
id |
string |
Yes |
Unique within the framework. |
description |
string |
Yes |
Requirement text verbatim from the source. |
name |
string |
No |
Short title. |
attributes |
dict |
No (default {}) |
Flat dict; every key must be declared in attributes_metadata (unknown keys are rejected at load when metadata exists). |
checks |
dict |
No (default {}) |
{provider: [check_ids]}, lowercase keys matching prowler/providers/ dirs. Empty list = manual requirement for that provider. |
config_requirements |
array |
No |
Guardrails; each constraint must carry Provider. |
tactics, sub_techniques, platforms, technique_url |
— |
No |
MITRE-style extras (auto-populated when adapting legacy MITRE files). |
attributes_metadata entry fields (AttributeMetadata)
| Field |
Type |
Notes |
key |
string (required) |
Attribute name as used in requirement.attributes. |
label |
string |
Human-readable label for CSV headers / PDF. |
type |
string |
str (default), int, float, bool, list_str, list_dict. Only int/float/bool are enforced at load; the rest are documentation. |
enum |
list |
Allowed values — enforced at load. Use it whenever the value set is closed. |
required |
bool |
Enforced at load: every requirement must carry the key non-null. |
enum_display / enum_order |
dict / list |
Per-enum-value visual metadata (label, abbreviation, color, icon) and ordering for PDF rendering. |
chart_label |
string |
Axis label when the attribute is used in charts. |
output_formats |
object |
{"csv": bool, "ocsf": bool}, both default true — toggles inclusion per output. |
Key rules:
--compliance key = JSON basename without .json (dora_2022_2554).
- Auto-discovered: no
__init__.py, no formatter, no dispatcher registration.
table_config.group_by, pdf_config.group_by_field and every
charts[].group_by must reference a key declared in attributes_metadata.
- Runtime type validation only covers
int/float/bool; str/list_str/
list_dict are documentation-only.
- Extending to a new provider = adding a key to
requirement.checks. Nothing else.
- No automatic check-existence validation at load time — a typo'd check id
silently produces a requirement with no findings. Always run the
check-existence cross-check (see Validation).
- In universal files, always set
Provider on every config constraint so a
guardrail authored for an AWS check never affects Azure/GCP scans of the
same requirement.
Legacy Schema Reference
Base legacy file structure:
{
"Framework": "FRAMEWORK_NAME",
"Name": "Full Framework Name with Version",
"Version": "X.X",
"Provider": "AWS",
"Description": "Framework description...",
"Requirements": [
{
"Id": "requirement_id",
"Name": "Optional requirement name",
"Description": "Requirement description",
"Attributes": [ ... ],
"Checks": ["check_name_1"],
"ConfigRequirements": [ ... ]
}
]
}
Legacy fields, top level (Compliance)
| Field |
Type |
Required |
Notes |
Framework |
string |
Yes (non-empty, validated) |
Canonical identifier (CIS, ENS, NIST-800-53-Revision-5). |
Name |
string |
Yes (non-empty, validated) |
Human-readable name with version. |
Version |
string |
Optional in the model — never leave it empty in practice |
Empty Version silently degrades the get_check_compliance() key to "{Framework}" (gotcha #4). Must match the version substring in the filename. |
Provider |
string |
Yes (non-empty, validated) |
Upper-cased single provider (AWS, AZURE, GCP, M365, ...). One file = one provider. |
Description |
string |
Yes |
Framework scope and purpose. |
Requirements |
array |
Yes |
Requirement objects (below), or Mitre_Requirement objects for MITRE files. |
Legacy fields, per requirement (Compliance_Requirement)
| Field |
Type |
Required |
Notes |
Id |
string |
Yes |
Unique within the framework; follow the source numbering exactly (1.1, A.5.1, CCC.Core.CN01.AR01). |
Description |
string |
Yes |
Verbatim from the source catalog. |
Name |
string |
No |
Optional short title (NIST-style catalogs use it). |
Attributes |
array of objects |
Yes |
Parsed against the Union of attribute classes below; only Attributes[0] survives the universal adaptation and drives UI grouping. |
Checks |
array of strings |
Yes |
Check ids automating the requirement; [] = manual. |
ConfigRequirements |
array |
No |
Guardrails; Provider is omitted (the file is single-provider). |
MITRE files use Mitre_Requirement instead, which adds Tactics,
SubTechniques, Platforms, TechniqueURL at the requirement top level.
Attribute shapes per framework family
Unlike universal (schema in-file), a legacy requirement's Attributes must
match one of the Pydantic classes registered in
Compliance_Requirement.Attributes — a shape matching no class silently
falls through to Generic, dropping its specific fields. The most common
shapes (full field sets in compliance_models.py):
CIS — cis_{version}_{provider}
{
"Section": "1 Identity and Access Management",
"SubSection": "Optional subsection",
"Profile": "Level 1",
"AssessmentStatus": "Automated",
"Description": "...", "RationaleStatement": "...", "ImpactStatement": "...",
"RemediationProcedure": "...", "AuditProcedure": "...",
"AdditionalInformation": "...", "DefaultValue": "...", "References": "https://..."
}
Profile: Level 1|Level 2|E3 Level 1|E3 Level 2|E5 Level 1|E5 Level 2.
AssessmentStatus: Automated|Manual.
ENS — ens_rd2022_{provider}
{
"IdGrupoControl": "op.acc.1", "Marco": "operacional",
"Categoria": "control de acceso", "DescripcionControl": "...",
"Nivel": "alto", "Tipo": "requisito",
"Dimensiones": ["trazabilidad", "autenticidad"],
"ModoEjecucion": "automatico", "Dependencias": []
}
Nivel: opcional|bajo|medio|alto. Tipo: refuerzo|requisito|recomendacion|medida.
Dimensiones: confidencialidad|integridad|trazabilidad|autenticidad|disponibilidad.
ISO 27001 — iso27001_{year}_{provider}
{
"Category": "A.5 Organizational controls",
"Objetive_ID": "A.5.1", "Objetive_Name": "Policies for information security",
"Check_Summary": "Summary of what is being checked"
}
Note: Objetive_ID / Objetive_Name use this exact (mis)spelling.
MITRE ATT&CK — mitre_attack_{provider} (separate requirement model)
{
"Name": "Exploit Public-Facing Application", "Id": "T1190",
"Tactics": ["Initial Access"], "SubTechniques": [],
"Platforms": ["IaaS"], "Description": "...",
"TechniqueURL": "https://attack.mitre.org/techniques/T1190/",
"Checks": ["guardduty_is_enabled"],
"Attributes": [
{"AWSService": "Amazon GuardDuty", "Category": "Detect",
"Value": "Minimal", "Comment": "..."}
]
}
AzureService/GCPService for the other providers. Category:
Detect|Protect|Respond. Value: Minimal|Partial|Significant.
CCC — ccc_{provider}
{
"FamilyName": "Data", "FamilyDescription": "...",
"Section": "CCC.Core.CN01 Encrypt Data for Transmission", "SubSection": "",
"SubSectionObjective": "...",
"Applicability": ["tlp-green", "tlp-amber", "tlp-red"],
"Recommendation": "...",
"SectionThreatMappings": [{"ReferenceId": "CCC", "Identifiers": ["CCC.Core.TH02"]}],
"SectionGuidelineMappings": [{"ReferenceId": "NIST-CSF", "Identifiers": ["PR.DS-02"]}]
}
Applicability holds TLP tags (tlp-clear|tlp-green|tlp-amber|tlp-red).
ASD Essential Eight — asd_essential_eight_aws
{
"Section": "Patch applications", "MaturityLevel": "ML1",
"AssessmentStatus": "Automated", "CloudApplicability": "partial",
"MitigatedThreats": ["..."], "Description": "...",
"RationaleStatement": "...", "ImpactStatement": "...",
"RemediationProcedure": "...", "AuditProcedure": "...",
"AdditionalInformation": "...", "References": "..."
}
MaturityLevel: ML1|ML2|ML3. CloudApplicability: full|partial|limited|non-applicable.
DISA STIG — okta_idaas_stig_v1r2_okta
{
"Section": "...", "Severity": "high", "RuleID": "...", "StigID": "...",
"CCI": ["CCI-000015"], "CheckText": "...", "FixText": "..."
}
Severity: high|medium|low (maps to CAT I/II/III).
Other registered shapes
- AWS Well-Architected (
aws_well_architected_framework_{pillar}_pillar_aws):
Name, WellArchitectedQuestionId, WellArchitectedPracticeId, Section,
SubSection, LevelOfRisk, AssessmentMethod, Description,
ImplementationGuidanceUrl.
- KISA ISMS-P (
kisa_isms_p_2023_{provider}): Domain, Subdomain,
Section, AuditChecklist, RelatedRegulations, AuditEvidence,
NonComplianceCases.
- C5 (
c5_{provider}): Section, SubSection, Type, AboutCriteria,
ComplementaryCriteria.
- CSA CCM (legacy shape; the shipped CSA CCM 4.0 is universal):
Section,
CCMLite, IaaS, PaaS, SaaS, ScopeApplicability.
- Prowler ThreatScore (
prowler_threatscore_{provider}): Title,
Section, SubSection, AttributeDescription, AdditionalInformation,
LevelOfRisk (1–5), Weight (1/8/10/100/1000). Pillars: 1 IAM, 2 Attack
Surface, 3 Logging and Monitoring, 4 Encryption. Available for aws,
azure, gcp, kubernetes, m365, alibabacloud.
- Generic (fallback):
ItemId, Section, SubSection, SubGroup,
Service, Type, Comment — all optional. Used by NIST, PCI, GDPR,
HIPAA, SOC2, FedRAMP, CISA, FFIEC, RBI, NIS2, GxP, SecNumCloud, etc.
Config Guardrails (ConfigRequirements)
Requirements backed by configurable checks
can be silently "satisfied" by a loosened audit_config (e.g. CIS demands
45-day unused credentials but the scan ran with max_unused_access_keys_days: 120).
Guardrails force such requirements to FAIL:
"ConfigRequirements": [
{"Check": "iam_user_accesskey_unused",
"ConfigKey": "max_unused_access_keys_days", "Operator": "lte", "Value": 45}
]
- Operators:
lte/gte (numeric thresholds), eq (toggles/exact — use JSON
booleans, not 0/1), in (scalar in allowed set), subset (allowlists —
widening breaks it), superset (denylists — removing an entry breaks it).
Value must be the strictest setting the control text tolerates.
ConfigKey must be spelled exactly as the check reads it; unknown keys are
silently skipped (defaults assumed OK).
- Guardrails only tighten (PASS→FAIL), never relax.
- Universal files: lowercase
config_requirements + mandatory Provider per
constraint.
- Tests:
tests/lib/check/compliance_config_eval_test.py,
compliance_config_constraint_model_test.py,
compliance_config_requirements_data_test.py, plus per-output tests under
tests/lib/outputs/compliance/.
Workflow A: Sync a Framework With an Upstream Catalog
Use when the framework is maintained upstream (CIS Benchmarks, FINOS CCC, CSA
CCM, NIST, ENS, etc.) and Prowler needs to catch up.
Step 1 — Cache the upstream source
Download every upstream file to a local cache so iterations don't hit the
network. For FINOS CCC:
mkdir -p /tmp/ccc_upstream
catalogs="core/ccc storage/object management/auditlog management/logging ..."
for p in $catalogs; do
safe=$(echo "$p" | tr '/' '_')
gh api "repos/finos/common-cloud-controls/contents/catalogs/$p/controls.yaml" \
-H "Accept: application/vnd.github.raw" > "/tmp/ccc_upstream/${safe}.yaml"
done
Step 2 — Run the generic sync runner against a framework config
The sync tooling is three layers, so adding a framework only takes a YAML
config (plus a parser module for an unfamiliar upstream format):
skills/prowler-compliance/assets/
├── sync_framework.py # generic runner — works for any framework
├── configs/ccc.yaml # per-framework config (canonical example)
└── parsers/finos_ccc.py # parser module for FINOS CCC YAML
python skills/prowler-compliance/assets/sync_framework.py \
skills/prowler-compliance/assets/configs/ccc.yaml
The runner loads the config, dynamically imports parser.module, calls
parse_upstream(config) -> list[dict], then applies generic post-processing
(id-uniqueness safety net, FamilyName normalization, legacy check-mapping
preservation with config-driven fallback keys) and writes the provider JSONs
with Pydantic post-validation.
To add a new framework sync:
- Write
assets/configs/{framework}.yaml (see ccc.yaml). Required sections:
framework — name, display_name, version (never empty — the
runner refuses to start, because empty Version breaks the
get_check_compliance() key), description_template.
providers — list of {key, display} pairs.
output.path_template — e.g.
"prowler/compliance/{provider}/cis_{version}_{provider}.json".
upstream.dir — local cache (Step 1).
parser.module — module under parsers/; the rest of parser. is
passed through opaque.
post_processing.check_preservation.primary_key (almost always Id) and
fallback_keys — lists of Attributes[0] field names composed into
tuples for recovering mappings when ids change. CCC:
- [Section, Applicability]; CIS: - [Section, Profile]; NIST:
- [ItemId]. List-valued fields are frozen to frozenset automatically.
post_processing.family_name_normalization (optional) — raw → canonical
map; the UI groups by the exact attribute value, so upstream variants
otherwise become separate tree branches.
- Reuse an existing parser or write
parsers/{name}.py implementing
parse_upstream(config) -> list[dict] returning Prowler-format
requirements with guaranteed-unique ids. The runner raises on
duplicates — it never silently renumbers, because mutating a canonical
upstream id (CIS 1.1.1, NIST AC-2(1)) would be catastrophic. The parser
owns all upstream quirks: foreign-prefix rewriting, genuine collision
renumbering, multi-shape handling.
Gotchas the runner already handles (from the FINOS CCC v2025.10 sync):
- Multiple upstream YAML shapes. Most FINOS CCC catalogs use
control-families: [...] but storage/object uses top-level
controls: [...]. A single-shape parser silently drops entire catalogs —
this exact bug dropped ObjStor for a full iteration. Test with one file of
each shape.
- Whitespace collapse. Upstream
| block scalars keep newlines; Prowler
stores single-line. Collapse with " ".join(value.split()).
- Foreign-prefix id rewriting. Upstream aliases requirements across
catalogs keeping the original prefix (
CCC.AuditLog.CN08.AR01 nested under
CCC.Logging.CN03) — rewrite to fit the parent (CCC.Logging.CN03.AR01).
- Genuine upstream collisions. Two different requirements sharing one id
(upstream typo): renumber the second to the next free number; check-mapping
preservation recovers by the fallback keys.
- Populate
Version — fail-fast beats the silent broken-key bug.
Step 3 — Validate before committing
Run the full Validation section below (universal loader + check existence +
CLI smoke + pytest).
Step 4 — Add an attribute model if needed
Only if the framework has fields beyond
Generic_Compliance_Requirement_Attribute and must stay legacy. Add the class
to compliance_models.py and register it in the
Compliance_Requirement.Attributes Union before Generic (Generic stays
last). For new frameworks, prefer universal attributes_metadata instead.
Workflow B: Audit Check Mappings as a Cloud Auditor
Use when the user asks to review existing mappings. This is the
highest-value compliance task — it surfaces padded mappings with zero actual
coverage and missing mappings for legitimate coverage.
The golden rule
A Prowler check's title/risk MUST literally describe what the requirement
text says. "Related" is not enough. If no check actually addresses the
requirement, leave the checks list empty (MANUAL) — honest MANUAL is worth
more than padded coverage.
Audit process
Build a per-provider check inventory — assets/build_inventory.py
(writes /tmp/checks_{provider}.json for every provider discovered under
prowler/providers/).
Query it — assets/query_checks.py (run from the repository root):
python skills/prowler-compliance/assets/query_checks.py aws encryption transit # keyword AND-search
python skills/prowler-compliance/assets/query_checks.py aws --service iam # all iam checks
python skills/prowler-compliance/assets/query_checks.py aws --id kms_cmk_rotation_enabled
Dump a framework section with current mappings — assets/dump_section.py:
python skills/prowler-compliance/assets/dump_section.py ccc "CCC.Core."
python skills/prowler-compliance/assets/dump_section.py cis_5.0_aws "1."
Encode explicit REPLACE decisions — assets/audit_framework_template.py:
DECISIONS = {}
DECISIONS["CCC.Core.CN01.AR01"] = {
"aws": ["cloudfront_distributions_https_enabled", ...],
"azure": ["storage_secure_transfer_required_is_enabled", ...],
"gcp": ["cloudsql_instance_ssl_connections"],
# Missing provider key = leave the legacy mapping untouched
}
# Empty list = EXPLICITLY MANUAL (overwrites legacy)
DECISIONS["CCC.Core.CN01.AR07"] = {"aws": [], "azure": [], "gcp": []}
REPLACE, not PATCH. Full lists make the audit reproducible and surface
hidden assumptions in the legacy data.
Pre-validate every check id against the inventory; the script MUST
abort with stderr listing typos (real audits caught
storage_secure_transfer_required_enabled →
storage_secure_transfer_required_is_enabled,
sqlserver_minimum_tls_version_12 →
sqlserver_recommended_minimal_tls_version, and several checks that
simply don't exist).
Apply + validate + test:
python /path/to/audit_script.py
uv run pytest -n auto tests/lib/outputs/compliance/ tests/lib/check/ -q
For the curated mapping table (requirement text → AWS/Azure/GCP checks) and
the list of controls Prowler genuinely cannot verify, see
references/check-mapping-reference.md.
Workflow C: Add a New Universal Framework
- Author
prowler/compliance/{framework}_{version}.json following the
Universal Schema Reference above (use dora_2022_2554.json or
csa_ccm_4.0.json as template).
- Declare every attribute in
attributes_metadata (with required/enum
where possible — that's your load-time validation) and a
outputs.table_config.group_by.
- Map checks per provide
…(truncated)
1---
2name: prowler-compliance
3description: >
4 Creates, syncs, audits and manages Prowler compliance frameworks end-to-end.
5 Covers the two supported JSON schemas (universal multi-provider and legacy
6 per-provider), the SDK model tree (legacy attribute classes, universal
7 ComplianceFramework, ConfigRequirements guardrails), output formatters
8 (legacy per-framework + universal data-driven), API/UI consumption, upstream
9 sync workflows, and cloud-auditor check-mapping reviews.
10 Trigger: When working with compliance frameworks (CIS, CIS Controls, NIST,
11 PCI-DSS, SOC2, GDPR, ISO27001, ENS, MITRE ATT&CK, CCC, C5, CSA CCM, DORA,
12 KISA ISMS-P, ASD Essential Eight, DISA STIG, CISA SCuBA, SecNumCloud,
13 FedRAMP, HIPAA, NIS2, Prowler ThreatScore), creating a universal
14 multi-provider framework, adding ConfigRequirements guardrails, syncing with
15 upstream catalogs, auditing check-to-requirement mappings, adding output
16 formatters, or fixing compliance JSON bugs (duplicate IDs, empty Version,
17 wrong Section, stale check refs).
18license: Apache-2.0
19metadata:
20 author: prowler-cloud
21 version: "2.0"
22 scope: [root, sdk]
23 auto_invoke:
24 - "Creating/updating compliance frameworks"
25 - "Creating a universal (multi-provider) compliance framework"
26 - "Mapping checks to compliance controls"
27 - "Adding ConfigRequirements guardrails to compliance requirements"
28 - "Syncing compliance framework with upstream catalog"
29 - "Auditing check-to-requirement mappings as a cloud auditor"
30 - "Adding a compliance output formatter (per-provider class + table dispatcher)"
31 - "Fixing compliance JSON bugs (duplicate IDs, empty Section, stale refs)"
32allowed-tools: Read, Edit, Write, Glob, Grep, Bash, WebFetch, WebSearch, Task
33---
34
35## When to Use
36
37Use this skill when:
38
39- Creating a new compliance framework for any provider — **decide universal vs legacy first** (see below)
40- **Syncing an existing framework with an upstream source of truth** (CIS, FINOS CCC, CSA CCM, NIST, ENS, etc.)
41- Adding requirements to existing frameworks, or extending a universal framework to a new provider
42- Mapping checks to compliance controls
43- **Adding `ConfigRequirements` guardrails** so configurable checks can't silently satisfy a requirement with a loosened config
44- **Auditing existing check mappings as a cloud auditor** ("are these mappings correct?", "which checks apply?", "review the mappings")
45- **Adding a new legacy output formatter** (table dispatcher + per-provider classes + CSV models)
46- **Fixing JSON bugs**: duplicate IDs, empty Version, wrong Section, stale check refs, inconsistent FamilyName, padded tangential check mappings
47- Investigating why a finding/check isn't showing under the expected compliance framework in the UI
48- Understanding compliance framework structures and attributes
49
50The authoritative contributor doc is `docs/developer-guide/security-compliance-framework.mdx` —
51keep this skill and that doc consistent when either changes. For **reviewing**
52a compliance PR, use the sister skill
53[prowler-compliance-review](../prowler-compliance-review/SKILL.md) instead.
54
55## Universal vs Legacy: The First Decision
56
57Prowler supports **two JSON schemas**. Choosing wrong means unnecessary Python
58code, so decide this before anything else. At load time both converge: legacy
59files are adapted into the universal `ComplianceFramework` model
60(`adapt_legacy_to_universal()`), so the difference is about **authoring cost
61and capabilities**, not about what the rest of Prowler sees.
62
63### Side-by-side comparison
64
65| | Universal (recommended for new frameworks) | Legacy provider-specific |
66|---|---|---|
67| File location | `prowler/compliance/<framework>.json` (top level) | `prowler/compliance/<provider>/<framework>_<version>_<provider>.json` |
68| Providers | Any number, one file (`checks` dict keyed by provider) | Exactly one provider per file (one file per provider to multi-cover) |
69| Key style | lowercase (`framework`, `requirements`, `checks`) | Capitalized (`Framework`, `Requirements`, `Checks`) |
70| Attribute schema | Declared **in the JSON itself** via `attributes_metadata`, validated at load | Pydantic class per framework family in `compliance_models.py` (code change for new shapes) |
71| Attributes per requirement | One flat dict (`attributes: {...}`) | List of objects (`Attributes: [{...}]`) — only `Attributes[0]` is used downstream |
72| Table/CSV/OCSF output | Data-driven from `outputs.table_config` — **zero Python changes** | Formatter package + registrations in `compliance.py`, `__main__.py`, `export.py` |
73| Guardrails field | `config_requirements` (+ mandatory `Provider` per constraint) | `ConfigRequirements` (`Provider` omitted) |
74| Loader behavior on error | Lenient: logs + skips file (`load_compliance_framework_universal`) | Fail-fast: `sys.exit(1)` (`load_compliance_framework`) |
75| Loaded by | Only `get_bulk_compliance_frameworks_universal()` | Both loaders (`Compliance.get_bulk()` + universal, via adapter) |
76| Shipped examples | `cis_controls_8.1.json`, `csa_ccm_4.0.json`, `dora_2022_2554.json` | Everything else (~105 files across 11 providers) |
77
78### When to use which
79
80**Use universal when** (any of these):
81
82- The framework is **new to Prowler** — no existing attribute class, no
83 existing formatter. This is the default: zero Python changes needed.
84- The framework spans (or will span) **more than one provider** — DORA, CSA
85 CCM, CIS Controls. One file covers all providers; extending to a new
86 provider is a one-line `checks` edit.
87- The attribute shape is **unique to this framework** — declare it in
88 `attributes_metadata` instead of adding a Pydantic class to the Union.
89
90**Use legacy only when extending an existing legacy family**:
91
92- A new **version** of a shipped legacy framework (CIS 8.0 for AWS → new
93 `cis_8.0_aws.json`, same `CIS_Requirement_Attribute`, same `cis/` formatter).
94- An existing legacy framework for a **new provider** (ENS for m365 → new
95 `ens_rd2022_m365.json` + `ens_m365.py` transformer).
96- Consistency with the family matters more than the universal benefits — a
97 lone `cis_8.0_aws` in universal format while 20+ CIS files stay legacy
98 would fragment the family.
99
100**Never**: start a brand-new single-provider framework as legacy "because it's
101only AWS today". Universal handles single-provider fine (the `checks` dict
102just has one key) and you skip 3 output files + 3 registrations.
103
104### The same requirement in both schemas
105
106Universal (`prowler/compliance/my_framework_1.0.json`):
107
108```json
109{
110 "framework": "My-Framework",
111 "name": "My Framework 1.0",
112 "version": "1.0",
113 "description": "...",
114 "attributes_metadata": [
115 {"key": "Section", "type": "str", "required": true},
116 {"key": "Service", "type": "str"}
117 ],
118 "outputs": {"table_config": {"group_by": "Section"}},
119 "requirements": [
120 {
121 "id": "MF-1.1",
122 "name": "Root MFA",
123 "description": "Root account must have MFA enabled.",
124 "attributes": {"Section": "IAM", "Service": "iam"},
125 "checks": {
126 "aws": ["iam_root_mfa_enabled"],
127 "azure": []
128 }
129 }
130 ]
131}
132```
133
134Legacy (`prowler/compliance/aws/my_framework_1.0_aws.json` — plus a second
135file per extra provider, plus formatter + registrations):
136
137```json
138{
139 "Framework": "My-Framework",
140 "Name": "My Framework 1.0 for AWS",
141 "Version": "1.0",
142 "Provider": "AWS",
143 "Description": "...",
144 "Requirements": [
145 {
146 "Id": "MF-1.1",
147 "Name": "Root MFA",
148 "Description": "Root account must have MFA enabled.",
149 "Attributes": [
150 {"ItemId": "MF-1.1", "Section": "IAM", "Service": "iam"}
151 ],
152 "Checks": ["iam_root_mfa_enabled"]
153 }
154 ]
155}
156```
157
158Same control, but the universal file already covers Azure, validates its own
159attribute schema, and renders table/CSV/OCSF with no code. Field-by-field
160references for each schema follow below.
161
162## Architecture (Mental Model)
163
164Prowler compliance is a four-layer system. Bugs usually happen where one layer
165doesn't match another, so know all four before touching anything.
166
167### Layer 1: SDK / Core Models — `prowler/lib/check/`
168
169All in **Pydantic v1** (`from pydantic.v1 import ...`). Three model groups live
170in `compliance_models.py`:
171
172**Legacy tree** — `Compliance` → `Compliance_Requirement` / `Mitre_Requirement`:
173
174- One `*_Requirement_Attribute` class per framework family. Registered today (Union order matters):
175 `ASDEssentialEight`, `CIS`, `ENS`, `ISO27001_2013`, `AWS_Well_Architected`,
176 `KISA_ISMSP`, `Prowler_ThreatScore`, `CCC`, `C5Germany`, `CSA_CCM`, `STIG`
177 (Okta IDaaS), and `Generic_Compliance_Requirement_Attribute` as fallback.
178- **Generic MUST stay LAST** in `Compliance_Requirement.Attributes: list[Union[...]]` —
179 Pydantic v1 tries union members in order; Generic first would swallow every
180 framework-specific attribute. NIST 800-53/CSF, PCI DSS, GDPR, HIPAA, SOC2,
181 FedRAMP, SecNumCloud etc. intentionally use Generic.
182- A `root_validator` rejects empty `Framework`, `Provider` or `Name`.
183- MITRE uses the separate `Mitre_Requirement` model (`Tactics`, `SubTechniques`,
184 `Platforms`, `TechniqueURL` at requirement top level, per-provider
185 `Mitre_Requirement_Attribute_{AWS,Azure,GCP}`).
186
187**Universal tree** — `ComplianceFramework` → `UniversalComplianceRequirement`:
188
189- Flat `attributes: dict` per requirement, schema declared in
190 `attributes_metadata` (key, label, type, enum, required, `enum_display`,
191 `enum_order`, `output_formats`). A `root_validator` rejects missing required
192 keys, unknown keys (drift guard), enum violations, and int/float/bool type
193 mismatches. If `attributes_metadata` is omitted, **no validation runs**.
194- `checks: dict[provider, list[check_id]]` — the provider list of the framework
195 is **derived** from these keys (`get_providers()` / `supports_provider()`);
196 the top-level `provider` field is only a fallback.
197- `outputs.table_config` (group_by, split_by, scoring, labels) drives the CLI
198 table; `outputs.pdf_config` exists in the model but **is not consumed by the
199 API PDF pipeline yet** (see Layer 4).
200
201**Guardrails** — `Compliance_Requirement_ConfigConstraint`:
202
203- Fields `Check`, `ConfigKey`, `Operator` (`lte|gte|eq|in|subset|superset`),
204 `Value`, optional `Provider` (required in universal multi-provider files).
205- A `root_validator` rejects Value/Operator type mismatches at load time.
206- Evaluation is centralized in `prowler/lib/check/compliance_config_eval.py`
207 (`evaluate_config_constraints`, `apply_config_status`, `get_effective_status`,
208 `CONFIG_NOT_VALID_PREFIX = "Configuration not valid for this requirement."`),
209 shared by CSV/OCSF/table outputs **and** the API backend. A violated
210 constraint forces the requirement to FAIL and prepends the reason to
211 `status_extended`. Constraints whose `ConfigKey` is absent from
212 `audit_config` are skipped (defaults assumed compliant).
213
214**Loaders**:
215
216- `Compliance.get_bulk(provider)` — legacy: scans only
217 `prowler/compliance/{provider}/` (+ external JSONs via the
218 `prowler.compliance` entry-point group). Does NOT see top-level universal files.
219- `get_bulk_compliance_frameworks_universal(provider)` — scans **both** the
220 top-level `prowler/compliance/` and every provider subdirectory, adapting
221 legacy files via `adapt_legacy_to_universal()` (flattens `Attributes[0]` to a
222 dict, wraps `Checks` as `{provider: [...]}`, infers `attributes_metadata`).
223 Also loads external universal frameworks via the
224 `prowler.compliance.universal` entry-point group (built-ins win collisions).
225- `get_check_compliance(finding, provider_type, bulk_checks_metadata)` lives in
226 **`prowler/lib/outputs/compliance/compliance_check.py`** (not in
227 `lib/check/compliance.py`). It builds the per-finding dict keyed
228 `f"{Framework}-{Version}"` **only when Version is non-empty** — an empty
229 Version silently produces the key `"{Framework}"` and breaks downstream
230 filters and tests.
231- `prowler/lib/check/compliance.py` now contains only
232 `update_checks_metadata_with_compliance()`.
233
234### Layer 2: JSON Catalogs — `prowler/compliance/`
235
236See "Compliance Catalog Coverage" below.
237
238### Layer 3: Output Formatters — `prowler/lib/outputs/compliance/`
239
240**Universal path** (no Python needed per framework):
241
242- `universal/universal_table.py` — `get_universal_table()`, renders the CLI
243 table from `outputs.table_config` + `attributes_metadata`.
244- `universal/universal_output.py` — `UniversalComplianceOutput`, builds the CSV
245 Pydantic model **dynamically** from `attributes_metadata`.
246- `universal/ocsf_compliance.py` — `OCSFComplianceOutput`; OCSF output is
247 **always generated** for universal frameworks regardless of `--output-formats`.
248- Orchestrated by `process_universal_compliance_frameworks()` in
249 `compliance.py`, which runs **before** any legacy dispatch and removes the
250 processed frameworks from the set.
251
252**Legacy path** — per-framework directory, usually:
253
254```text
255{framework}/
256├── __init__.py
257├── {framework}.py # get_{framework}_table() summary-table function
258├── {framework}_{provider}.py # One ComplianceOutput subclass per provider
259└── models.py # One Pydantic CSV row model per provider
260```
261
262Directories today: `asd_essential_eight`, `aws_well_architected`, `c5`, `ccc`,
263`cis`, `cisa_scuba`, `ens`, `generic`, `iso27001`, `kisa_ismsp`,
264`mitre_attack`, `okta_idaas_stig`, `prowler_threatscore`, `universal`.
265Known deviations (don't "fix" them without a reason): `iso27001/` has no table
266file (falls to the generic table), `aws_well_architected/` has no per-provider
267files, `cisa_scuba/` only ships googleworkspace.
268
269- CSV writers emit `;`-delimited files with UPPERCASE headers
270 (`ComplianceOutput.batch_write_data_to_file`). Field names in `models.py`
271 are **public API** — renaming breaks downstream consumers.
272- **Circular import rule**: the table file (`{framework}.py`) must not import
273 `Finding` directly or transitively (`compliance.compliance` → table module →
274 `ComplianceOutput` → `Finding` → `get_check_compliance` → cycle). Keep table
275 files bare (`colorama`, `tabulate`, `prowler.config.config`); when a module
276 genuinely needs both, use `if TYPE_CHECKING:` or function-local imports (see
277 `universal_output.py` / `process_universal_compliance_frameworks`).
278- Legacy table functions have no docstrings; the universal ones do. Match the
279 style of the file family you're touching.
280- Dispatcher `display_compliance_table()` in `compliance.py` order:
281 universal (`table_config`) first → `cis_` → `ens_` → `mitre_attack` →
282 `kisa` → `prowler_threatscore_` → `c5_` → `ccc_` → `asd_essential_eight`
283 (substring) → `okta_idaas_stig` → else provider hook
284 (`provider.display_compliance_table()`, may raise `NotImplementedError`) →
285 `get_generic_compliance_table()`. iso27001, aws_well_architected and
286 cisa_scuba ride the fallback on purpose.
287
288### Layer 4: API / UI
289
290- **API lazy loaders**: `api/src/backend/api/compliance.py` —
291 `LazyComplianceTemplate` / `LazyChecksMapping` (per-provider lazy caches over
292 `get_bulk_compliance_frameworks_universal`, with Gunicorn background warm-up).
293- **API CSV export dispatch**: `COMPLIANCE_CLASS_MAP` in
294 `api/src/backend/tasks/jobs/export.py`, consumed from `tasks/tasks.py`. It is
295 a dict `provider → [(predicate, exporter_class)]` with `GenericCompliance` as
296 fallback. Predicates mix **`startswith` for multi-version families**
297 (`cis_`, `ens_`, `iso27001_`, `ccc_`, `cisa_scuba_`, ...) and **exact
298 `name == ...` for true singletons** (`mitre_attack_aws`,
299 `prowler_threatscore_*`, `asd_essential_eight_aws` — and inconsistently
300 `c5_azure`/`c5_gcp`, while aws uses `startswith("c5_")`). Rule of thumb: if
301 the framework can ever grow versions or variants, use `startswith`.
302- **API overview ingestion**: `create_compliance_requirements()` in
303 `api/src/backend/tasks/jobs/scan.py` builds per-region rows from the lazy
304 template and persists `ComplianceRequirementOverview` (COPY with bulk-create
305 fallback) plus `ComplianceOverviewSummary`.
306- **API PDF reports**: `api/src/backend/tasks/jobs/reports/` — hardcoded
307 `FRAMEWORK_REGISTRY` (own `FrameworkConfig` dataclass, NOT the SDK
308 `PDFConfig`) with one generator class per framework. Only
309 `prowler_threatscore`, `ens`, `nis2`, `csa_ccm` and `cis` have PDFs today;
310 adding one means a generator class + registry entry + wiring in `report.py`.
311- **UI mapper routing**: `ui/lib/compliance/compliance-mapper.ts` —
312 `getComplianceMappers()` keyed by the JSON's `framework` value
313 (e.g. `"CIS"`, `"CIS-Controls"`, `"DORA"`, `"Okta-IDaaS-STIG"`). Unregistered
314 frameworks **fall back to the generic mapper + `GenericCustomDetails`
315 automatically** — a dedicated mapper/detail panel is a first-class upgrade,
316 not a requirement to render.
317- **UI grouping varies per mapper**: generic/cis group by
318 `Section`/`SubSection`, iso by `Category`, ccc by `FamilyName`. All read
319 `attributes[0]` — inconsistent values within one JSON become separate tree
320 branches, so normalize before shipping.
321- **UI types**: `ui/types/compliance.ts` — one `*AttributesMetadata` interface
322 per framework, added to the `AttributesItemData` metadata union.
323- **UI icons**: `ui/components/icons/compliance/` + `IconCompliance.tsx`.
324 Registration is an ordered substring match (`COMPLIANCE_LOGOS`): put
325 framework-specific keywords **before** generic ones (`nist` before `nis2`,
326 `cisa` before `cis`; `aws` deliberately last).
327
328### The CLI Pipeline (end-to-end)
329
330```text
331prowler aws --compliance cis_7.0_aws # framework key = JSON basename
332 ↓
333Compliance.get_bulk("aws") # legacy frameworks
334get_bulk_compliance_frameworks_universal("aws") # legacy (adapted) + universal
335 ↓
336update_checks_metadata_with_compliance() # attaches compliance to CheckMetadata
337 ↓
338execute_checks() → Finding objects
339 ↓
340get_check_compliance(finding, "aws", bulk) # dict "{Framework}-{Version}" → [req_ids]
341 ↓
342process_universal_compliance_frameworks() # universal: CSV + OCSF, then removed from set
343per-provider elif branches in __main__.py # legacy: AWSCIS(...).batch_write_data_to_file()
344 ↓
345display_compliance_table() # universal table first, then legacy elifs,
346 # then generic fallback
347```
348
349---
350
351## Compliance Catalog Coverage
352
353Counts as of 2026-07 (109 JSON files). Regenerate before trusting them:
354
355```bash
356for d in prowler/compliance/*/; do printf "%s: %s\n" "$(basename $d)" "$(ls $d*.json 2>/dev/null | wc -l)"; done
357ls prowler/compliance/*.json # universal, top-level
358```
359
360**Universal (top-level, multi-provider)**: `cis_controls_8.1.json` (18
361providers), `csa_ccm_4.0.json` (aws/azure/gcp/alibabacloud/oraclecloud),
362`dora_2022_2554.json` (aws/azure/gcp/alibabacloud/cloudflare).
363
364**Legacy per-provider** (families, not exhaustive versions):
365
366| Provider | # | Framework families |
367|---|---|---|
368| aws | 45 | CIS 1.4–7.0, NIST 800-53 r4/r5, NIST 800-171 r2, NIST CSF 1.1/2.0, PCI 3.2.1/4.0, ISO 27001 2013/2022, HIPAA, GDPR, SOC2, FedRAMP low/moderate r4 + 20x KSI low, ENS RD2022, MITRE ATT&CK, C5, CCC, CISA, FFIEC, RBI, Well-Architected (security/reliability), FTR, FSBP, AWS AI Security Framework, AWS Account Security Onboarding, Audit Manager Control Tower, GxP 21 CFR 11 / EU Annex 11, KISA ISMS-P 2023 (en+ko), NIS2, ASD Essential Eight, SecNumCloud 3.2, Prowler ThreatScore |
369| azure | 19 | CIS 2.0–6.0, ISO 27001 2022, ENS RD2022, MITRE ATT&CK, PCI 4.0, HIPAA, SOC2, NIS2, RBI, C5, CCC, FedRAMP 20x KSI low, SecNumCloud 3.2, Prowler ThreatScore |
370| gcp | 17 | CIS 2.0–5.0, ISO 27001 2022, ENS RD2022, MITRE ATT&CK, PCI 4.0, HIPAA, SOC2, NIS2, RBI, C5, CCC, FedRAMP 20x KSI low, SecNumCloud 3.2, Prowler ThreatScore |
371| kubernetes | 8 | CIS 1.8–2.0.1, ISO 27001 2022, PCI 4.0, Prowler ThreatScore |
372| m365 | 5 | CIS 4.0/6.0/7.0, ISO 27001 2022, Prowler ThreatScore |
373| alibabacloud | 3 | CIS 2.0, SecNumCloud 3.2, Prowler ThreatScore |
374| oraclecloud | 3 | CIS 3.0/3.1, SecNumCloud 3.2 |
375| github | 2 | CIS 1.0/1.2.0 |
376| googleworkspace | 2 | CIS 1.3, CISA SCuBA 0.6 |
377| okta | 1 | Okta IDaaS STIG V1R2 |
378| nhn | 1 | ISO 27001 2022 |
379
380Providers with a compliance directory but no frameworks yet: cloudflare, iac,
381linode, llm, mongodbatlas, openstack, stackit. Provider keys inside universal
382`checks` dicts must match directory names under `prowler/providers/` (lowercase).
383
384---
385
386## Universal Schema Reference
387
388Full spec in `docs/developer-guide/security-compliance-framework.mdx`. Skeleton:
389
390```json
391{
392 "framework": "DORA",
393 "name": "Digital Operational Resilience Act (DORA) 2022/2554",
394 "version": "2022/2554",
395 "description": "Shown in --list-compliance and PDF reports.",
396 "icon": "dora",
397 "attributes_metadata": [
398 {"key": "Pillar", "label": "Pillar", "type": "str", "required": true,
399 "enum": ["ICT Risk Management", "..."],
400 "output_formats": {"csv": true, "ocsf": true}},
401 {"key": "Article", "type": "str", "required": true}
402 ],
403 "outputs": {
404 "table_config": {"group_by": "Pillar"},
405 "pdf_config": {"group_by_field": "Pillar", "charts": ["..."]}
406 },
407 "requirements": [
408 {
409 "id": "DORA-Art5",
410 "name": "Governance and organisation",
411 "description": "Requirement text verbatim from the source.",
412 "attributes": {"Pillar": "ICT Risk Management", "Article": "Article 5"},
413 "checks": {
414 "aws": ["iam_no_root_access_key"],
415 "azure": [],
416 "gcp": []
417 },
418 "config_requirements": [
419 {"Check": "iam_user_accesskey_unused", "Provider": "aws",
420 "ConfigKey": "max_unused_access_keys_days", "Operator": "lte", "Value": 45}
421 ]
422 }
423 ]
424}
425```
426
427### Universal fields, top level (`ComplianceFramework`)
428
429| Field | Type | Required | Notes |
430|---|---|---|---|
431| `framework` | string | Yes | Short identifier (`DORA`, `CSA-CCM`, `CIS-Controls`). This is the key the UI mapper routes on. |
432| `name` | string | Yes | Human-readable full name. |
433| `version` | string | No (never leave empty) | Framework version/edition (`8.1`, `2022/2554`). |
434| `description` | string | Yes | Shown in `--list-compliance` and PDF reports. |
435| `provider` | string | No | Fallback only — the effective provider list is derived from `checks` keys across requirements (`get_providers()`). |
436| `icon` | string | No | Short icon slug. |
437| `attributes_metadata` | array | No (strongly recommended) | Declares the schema of every `attributes` key. **If omitted, no attribute validation runs at all.** |
438| `outputs` | object | No | `table_config` (CLI table) + `pdf_config` (modeled, not yet consumed by the API). |
439| `requirements` | array | Yes | List of requirement objects (below). |
440
441### Universal fields, per requirement (`UniversalComplianceRequirement`)
442
443| Field | Type | Required | Notes |
444|---|---|---|---|
445| `id` | string | Yes | Unique within the framework. |
446| `description` | string | Yes | Requirement text verbatim from the source. |
447| `name` | string | No | Short title. |
448| `attributes` | dict | No (default `{}`) | Flat dict; every key must be declared in `attributes_metadata` (unknown keys are rejected at load when metadata exists). |
449| `checks` | dict | No (default `{}`) | `{provider: [check_ids]}`, lowercase keys matching `prowler/providers/` dirs. Empty list = manual requirement for that provider. |
450| `config_requirements` | array | No | Guardrails; each constraint **must** carry `Provider`. |
451| `tactics`, `sub_techniques`, `platforms`, `technique_url` | — | No | MITRE-style extras (auto-populated when adapting legacy MITRE files). |
452
453### `attributes_metadata` entry fields (`AttributeMetadata`)
454
455| Field | Type | Notes |
456|---|---|---|
457| `key` | string (required) | Attribute name as used in `requirement.attributes`. |
458| `label` | string | Human-readable label for CSV headers / PDF. |
459| `type` | string | `str` (default), `int`, `float`, `bool`, `list_str`, `list_dict`. Only int/float/bool are enforced at load; the rest are documentation. |
460| `enum` | list | Allowed values — enforced at load. Use it whenever the value set is closed. |
461| `required` | bool | Enforced at load: every requirement must carry the key non-null. |
462| `enum_display` / `enum_order` | dict / list | Per-enum-value visual metadata (label, abbreviation, color, icon) and ordering for PDF rendering. |
463| `chart_label` | string | Axis label when the attribute is used in charts. |
464| `output_formats` | object | `{"csv": bool, "ocsf": bool}`, both default `true` — toggles inclusion per output. |
465
466Key rules:
467
468- `--compliance` key = JSON basename without `.json` (`dora_2022_2554`).
469- Auto-discovered: no `__init__.py`, no formatter, no dispatcher registration.
470- `table_config.group_by`, `pdf_config.group_by_field` and every
471 `charts[].group_by` must reference a key declared in `attributes_metadata`.
472- Runtime type validation only covers `int`/`float`/`bool`; `str`/`list_str`/
473 `list_dict` are documentation-only.
474- Extending to a new provider = adding a key to `requirement.checks`. Nothing else.
475- **No automatic check-existence validation at load time** — a typo'd check id
476 silently produces a requirement with no findings. Always run the
477 check-existence cross-check (see Validation).
478- In universal files, always set `Provider` on every config constraint so a
479 guardrail authored for an AWS check never affects Azure/GCP scans of the
480 same requirement.
481
482## Legacy Schema Reference
483
484Base legacy file structure:
485
486```json
487{
488 "Framework": "FRAMEWORK_NAME",
489 "Name": "Full Framework Name with Version",
490 "Version": "X.X",
491 "Provider": "AWS",
492 "Description": "Framework description...",
493 "Requirements": [
494 {
495 "Id": "requirement_id",
496 "Name": "Optional requirement name",
497 "Description": "Requirement description",
498 "Attributes": [ ... ],
499 "Checks": ["check_name_1"],
500 "ConfigRequirements": [ ... ]
501 }
502 ]
503}
504```
505
506### Legacy fields, top level (`Compliance`)
507
508| Field | Type | Required | Notes |
509|---|---|---|---|
510| `Framework` | string | Yes (non-empty, validated) | Canonical identifier (`CIS`, `ENS`, `NIST-800-53-Revision-5`). |
511| `Name` | string | Yes (non-empty, validated) | Human-readable name with version. |
512| `Version` | string | Optional in the model — **never leave it empty in practice** | Empty Version silently degrades the `get_check_compliance()` key to `"{Framework}"` (gotcha #4). Must match the version substring in the filename. |
513| `Provider` | string | Yes (non-empty, validated) | Upper-cased single provider (`AWS`, `AZURE`, `GCP`, `M365`, ...). One file = one provider. |
514| `Description` | string | Yes | Framework scope and purpose. |
515| `Requirements` | array | Yes | Requirement objects (below), or `Mitre_Requirement` objects for MITRE files. |
516
517### Legacy fields, per requirement (`Compliance_Requirement`)
518
519| Field | Type | Required | Notes |
520|---|---|---|---|
521| `Id` | string | Yes | Unique within the framework; follow the source numbering exactly (`1.1`, `A.5.1`, `CCC.Core.CN01.AR01`). |
522| `Description` | string | Yes | Verbatim from the source catalog. |
523| `Name` | string | No | Optional short title (NIST-style catalogs use it). |
524| `Attributes` | array of objects | Yes | Parsed against the Union of attribute classes below; only `Attributes[0]` survives the universal adaptation and drives UI grouping. |
525| `Checks` | array of strings | Yes | Check ids automating the requirement; `[]` = manual. |
526| `ConfigRequirements` | array | No | Guardrails; `Provider` is omitted (the file is single-provider). |
527
528MITRE files use `Mitre_Requirement` instead, which adds `Tactics`,
529`SubTechniques`, `Platforms`, `TechniqueURL` at the requirement top level.
530
531### Attribute shapes per framework family
532
533Unlike universal (schema in-file), a legacy requirement's `Attributes` must
534match one of the Pydantic classes registered in
535`Compliance_Requirement.Attributes` — a shape matching no class **silently
536falls through to Generic**, dropping its specific fields. The most common
537shapes (full field sets in `compliance_models.py`):
538
539### CIS — `cis_{version}_{provider}`
540
541```json
542{
543 "Section": "1 Identity and Access Management",
544 "SubSection": "Optional subsection",
545 "Profile": "Level 1",
546 "AssessmentStatus": "Automated",
547 "Description": "...", "RationaleStatement": "...", "ImpactStatement": "...",
548 "RemediationProcedure": "...", "AuditProcedure": "...",
549 "AdditionalInformation": "...", "DefaultValue": "...", "References": "https://..."
550}
551```
552
553`Profile`: `Level 1|Level 2|E3 Level 1|E3 Level 2|E5 Level 1|E5 Level 2`.
554`AssessmentStatus`: `Automated|Manual`.
555
556### ENS — `ens_rd2022_{provider}`
557
558```json
559{
560 "IdGrupoControl": "op.acc.1", "Marco": "operacional",
561 "Categoria": "control de acceso", "DescripcionControl": "...",
562 "Nivel": "alto", "Tipo": "requisito",
563 "Dimensiones": ["trazabilidad", "autenticidad"],
564 "ModoEjecucion": "automatico", "Dependencias": []
565}
566```
567
568`Nivel`: `opcional|bajo|medio|alto`. `Tipo`: `refuerzo|requisito|recomendacion|medida`.
569`Dimensiones`: `confidencialidad|integridad|trazabilidad|autenticidad|disponibilidad`.
570
571### ISO 27001 — `iso27001_{year}_{provider}`
572
573```json
574{
575 "Category": "A.5 Organizational controls",
576 "Objetive_ID": "A.5.1", "Objetive_Name": "Policies for information security",
577 "Check_Summary": "Summary of what is being checked"
578}
579```
580
581Note: `Objetive_ID` / `Objetive_Name` use this exact (mis)spelling.
582
583### MITRE ATT&CK — `mitre_attack_{provider}` (separate requirement model)
584
585```json
586{
587 "Name": "Exploit Public-Facing Application", "Id": "T1190",
588 "Tactics": ["Initial Access"], "SubTechniques": [],
589 "Platforms": ["IaaS"], "Description": "...",
590 "TechniqueURL": "https://attack.mitre.org/techniques/T1190/",
591 "Checks": ["guardduty_is_enabled"],
592 "Attributes": [
593 {"AWSService": "Amazon GuardDuty", "Category": "Detect",
594 "Value": "Minimal", "Comment": "..."}
595 ]
596}
597```
598
599`AzureService`/`GCPService` for the other providers. `Category`:
600`Detect|Protect|Respond`. `Value`: `Minimal|Partial|Significant`.
601
602### CCC — `ccc_{provider}`
603
604```json
605{
606 "FamilyName": "Data", "FamilyDescription": "...",
607 "Section": "CCC.Core.CN01 Encrypt Data for Transmission", "SubSection": "",
608 "SubSectionObjective": "...",
609 "Applicability": ["tlp-green", "tlp-amber", "tlp-red"],
610 "Recommendation": "...",
611 "SectionThreatMappings": [{"ReferenceId": "CCC", "Identifiers": ["CCC.Core.TH02"]}],
612 "SectionGuidelineMappings": [{"ReferenceId": "NIST-CSF", "Identifiers": ["PR.DS-02"]}]
613}
614```
615
616`Applicability` holds TLP tags (`tlp-clear|tlp-green|tlp-amber|tlp-red`).
617
618### ASD Essential Eight — `asd_essential_eight_aws`
619
620```json
621{
622 "Section": "Patch applications", "MaturityLevel": "ML1",
623 "AssessmentStatus": "Automated", "CloudApplicability": "partial",
624 "MitigatedThreats": ["..."], "Description": "...",
625 "RationaleStatement": "...", "ImpactStatement": "...",
626 "RemediationProcedure": "...", "AuditProcedure": "...",
627 "AdditionalInformation": "...", "References": "..."
628}
629```
630
631`MaturityLevel`: `ML1|ML2|ML3`. `CloudApplicability`: `full|partial|limited|non-applicable`.
632
633### DISA STIG — `okta_idaas_stig_v1r2_okta`
634
635```json
636{
637 "Section": "...", "Severity": "high", "RuleID": "...", "StigID": "...",
638 "CCI": ["CCI-000015"], "CheckText": "...", "FixText": "..."
639}
640```
641
642`Severity`: `high|medium|low` (maps to CAT I/II/III).
643
644### Other registered shapes
645
646- **AWS Well-Architected** (`aws_well_architected_framework_{pillar}_pillar_aws`):
647 `Name`, `WellArchitectedQuestionId`, `WellArchitectedPracticeId`, `Section`,
648 `SubSection`, `LevelOfRisk`, `AssessmentMethod`, `Description`,
649 `ImplementationGuidanceUrl`.
650- **KISA ISMS-P** (`kisa_isms_p_2023_{provider}`): `Domain`, `Subdomain`,
651 `Section`, `AuditChecklist`, `RelatedRegulations`, `AuditEvidence`,
652 `NonComplianceCases`.
653- **C5** (`c5_{provider}`): `Section`, `SubSection`, `Type`, `AboutCriteria`,
654 `ComplementaryCriteria`.
655- **CSA CCM** (legacy shape; the shipped CSA CCM 4.0 is universal): `Section`,
656 `CCMLite`, `IaaS`, `PaaS`, `SaaS`, `ScopeApplicability`.
657- **Prowler ThreatScore** (`prowler_threatscore_{provider}`): `Title`,
658 `Section`, `SubSection`, `AttributeDescription`, `AdditionalInformation`,
659 `LevelOfRisk` (1–5), `Weight` (1/8/10/100/1000). Pillars: 1 IAM, 2 Attack
660 Surface, 3 Logging and Monitoring, 4 Encryption. Available for aws,
661 azure, gcp, kubernetes, m365, alibabacloud.
662- **Generic (fallback)**: `ItemId`, `Section`, `SubSection`, `SubGroup`,
663 `Service`, `Type`, `Comment` — all optional. Used by NIST, PCI, GDPR,
664 HIPAA, SOC2, FedRAMP, CISA, FFIEC, RBI, NIS2, GxP, SecNumCloud, etc.
665
666## Config Guardrails (`ConfigRequirements`)
667
668Requirements backed by [configurable checks](https://docs.prowler.com/developer-guide/configurable-checks)
669can be silently "satisfied" by a loosened `audit_config` (e.g. CIS demands
67045-day unused credentials but the scan ran with `max_unused_access_keys_days: 120`).
671Guardrails force such requirements to FAIL:
672
673```json
674"ConfigRequirements": [
675 {"Check": "iam_user_accesskey_unused",
676 "ConfigKey": "max_unused_access_keys_days", "Operator": "lte", "Value": 45}
677]
678```
679
680- Operators: `lte`/`gte` (numeric thresholds), `eq` (toggles/exact — use JSON
681 booleans, not 0/1), `in` (scalar in allowed set), `subset` (allowlists —
682 widening breaks it), `superset` (denylists — removing an entry breaks it).
683- `Value` must be the **strictest** setting the control text tolerates.
684- `ConfigKey` must be spelled exactly as the check reads it; unknown keys are
685 silently skipped (defaults assumed OK).
686- Guardrails only tighten (PASS→FAIL), never relax.
687- Universal files: lowercase `config_requirements` + mandatory `Provider` per
688 constraint.
689- Tests: `tests/lib/check/compliance_config_eval_test.py`,
690 `compliance_config_constraint_model_test.py`,
691 `compliance_config_requirements_data_test.py`, plus per-output tests under
692 `tests/lib/outputs/compliance/`.
693
694---
695
696## Workflow A: Sync a Framework With an Upstream Catalog
697
698Use when the framework is maintained upstream (CIS Benchmarks, FINOS CCC, CSA
699CCM, NIST, ENS, etc.) and Prowler needs to catch up.
700
701### Step 1 — Cache the upstream source
702
703Download every upstream file to a local cache so iterations don't hit the
704network. For FINOS CCC:
705
706```bash
707mkdir -p /tmp/ccc_upstream
708catalogs="core/ccc storage/object management/auditlog management/logging ..."
709for p in $catalogs; do
710 safe=$(echo "$p" | tr '/' '_')
711 gh api "repos/finos/common-cloud-controls/contents/catalogs/$p/controls.yaml" \
712 -H "Accept: application/vnd.github.raw" > "/tmp/ccc_upstream/${safe}.yaml"
713done
714```
715
716### Step 2 — Run the generic sync runner against a framework config
717
718The sync tooling is three layers, so adding a framework only takes a YAML
719config (plus a parser module for an unfamiliar upstream format):
720
721```text
722skills/prowler-compliance/assets/
723├── sync_framework.py # generic runner — works for any framework
724├── configs/ccc.yaml # per-framework config (canonical example)
725└── parsers/finos_ccc.py # parser module for FINOS CCC YAML
726```
727
728```bash
729python skills/prowler-compliance/assets/sync_framework.py \
730 skills/prowler-compliance/assets/configs/ccc.yaml
731```
732
733The runner loads the config, dynamically imports `parser.module`, calls
734`parse_upstream(config) -> list[dict]`, then applies generic post-processing
735(id-uniqueness safety net, `FamilyName` normalization, legacy check-mapping
736preservation with config-driven fallback keys) and writes the provider JSONs
737with Pydantic post-validation.
738
739**To add a new framework sync**:
740
7411. Write `assets/configs/{framework}.yaml` (see `ccc.yaml`). Required sections:
742 - `framework` — `name`, `display_name`, `version` (**never empty** — the
743 runner refuses to start, because empty Version breaks the
744 `get_check_compliance()` key), `description_template`.
745 - `providers` — list of `{key, display}` pairs.
746 - `output.path_template` — e.g.
747 `"prowler/compliance/{provider}/cis_{version}_{provider}.json"`.
748 - `upstream.dir` — local cache (Step 1).
749 - `parser.module` — module under `parsers/`; the rest of `parser.` is
750 passed through opaque.
751 - `post_processing.check_preservation.primary_key` (almost always `Id`) and
752 `fallback_keys` — lists of `Attributes[0]` field names composed into
753 tuples for recovering mappings when ids change. CCC:
754 `- [Section, Applicability]`; CIS: `- [Section, Profile]`; NIST:
755 `- [ItemId]`. List-valued fields are frozen to `frozenset` automatically.
756 - `post_processing.family_name_normalization` (optional) — raw → canonical
757 map; the UI groups by the exact attribute value, so upstream variants
758 otherwise become separate tree branches.
7592. Reuse an existing parser or write `parsers/{name}.py` implementing
760 `parse_upstream(config) -> list[dict]` returning Prowler-format
761 requirements with **guaranteed-unique ids**. The runner raises on
762 duplicates — it never silently renumbers, because mutating a canonical
763 upstream id (CIS `1.1.1`, NIST `AC-2(1)`) would be catastrophic. The parser
764 owns all upstream quirks: foreign-prefix rewriting, genuine collision
765 renumbering, multi-shape handling.
766
767**Gotchas the runner already handles** (from the FINOS CCC v2025.10 sync):
768
769- **Multiple upstream YAML shapes.** Most FINOS CCC catalogs use
770 `control-families: [...]` but `storage/object` uses top-level
771 `controls: [...]`. A single-shape parser silently drops entire catalogs —
772 this exact bug dropped ObjStor for a full iteration. Test with one file of
773 each shape.
774- **Whitespace collapse.** Upstream `|` block scalars keep newlines; Prowler
775 stores single-line. Collapse with `" ".join(value.split())`.
776- **Foreign-prefix id rewriting.** Upstream aliases requirements across
777 catalogs keeping the original prefix (`CCC.AuditLog.CN08.AR01` nested under
778 `CCC.Logging.CN03`) — rewrite to fit the parent (`CCC.Logging.CN03.AR01`).
779- **Genuine upstream collisions.** Two different requirements sharing one id
780 (upstream typo): renumber the second to the next free number; check-mapping
781 preservation recovers by the fallback keys.
782- **Populate `Version`** — fail-fast beats the silent broken-key bug.
783
784### Step 3 — Validate before committing
785
786Run the full Validation section below (universal loader + check existence +
787CLI smoke + pytest).
788
789### Step 4 — Add an attribute model if needed
790
791Only if the framework has fields beyond
792`Generic_Compliance_Requirement_Attribute` and must stay legacy. Add the class
793to `compliance_models.py` and register it in the
794`Compliance_Requirement.Attributes` Union **before Generic** (Generic stays
795last). For new frameworks, prefer universal `attributes_metadata` instead.
796
797---
798
799## Workflow B: Audit Check Mappings as a Cloud Auditor
800
801Use when the user asks to review existing mappings. This is the
802highest-value compliance task — it surfaces padded mappings with zero actual
803coverage and missing mappings for legitimate coverage.
804
805### The golden rule
806
807> A Prowler check's title/risk MUST **literally describe what the requirement
808> text says**. "Related" is not enough. If no check actually addresses the
809> requirement, leave the checks list empty (MANUAL) — **honest MANUAL is worth
810> more than padded coverage**.
811
812### Audit process
813
8141. **Build a per-provider check inventory** — `assets/build_inventory.py`
815 (writes `/tmp/checks_{provider}.json` for every provider discovered under
816 `prowler/providers/`).
8172. **Query it** — `assets/query_checks.py` (run from the repository root):
818
819 ```bash
820 python skills/prowler-compliance/assets/query_checks.py aws encryption transit # keyword AND-search
821 python skills/prowler-compliance/assets/query_checks.py aws --service iam # all iam checks
822 python skills/prowler-compliance/assets/query_checks.py aws --id kms_cmk_rotation_enabled
823 ```
824
8253. **Dump a framework section with current mappings** — `assets/dump_section.py`:
826
827 ```bash
828 python skills/prowler-compliance/assets/dump_section.py ccc "CCC.Core."
829 python skills/prowler-compliance/assets/dump_section.py cis_5.0_aws "1."
830 ```
831
8324. **Encode explicit REPLACE decisions** — `assets/audit_framework_template.py`:
833
834 ```python
835 DECISIONS = {}
836 DECISIONS["CCC.Core.CN01.AR01"] = {
837 "aws": ["cloudfront_distributions_https_enabled", ...],
838 "azure": ["storage_secure_transfer_required_is_enabled", ...],
839 "gcp": ["cloudsql_instance_ssl_connections"],
840 # Missing provider key = leave the legacy mapping untouched
841 }
842 # Empty list = EXPLICITLY MANUAL (overwrites legacy)
843 DECISIONS["CCC.Core.CN01.AR07"] = {"aws": [], "azure": [], "gcp": []}
844 ```
845
846 **REPLACE, not PATCH.** Full lists make the audit reproducible and surface
847 hidden assumptions in the legacy data.
8485. **Pre-validate** every check id against the inventory; the script MUST
849 abort with stderr listing typos (real audits caught
850 `storage_secure_transfer_required_enabled` →
851 `storage_secure_transfer_required_is_enabled`,
852 `sqlserver_minimum_tls_version_12` →
853 `sqlserver_recommended_minimal_tls_version`, and several checks that
854 simply don't exist).
8556. **Apply + validate + test**:
856
857 ```bash
858 python /path/to/audit_script.py
859 uv run pytest -n auto tests/lib/outputs/compliance/ tests/lib/check/ -q
860 ```
861
862For the curated mapping table (requirement text → AWS/Azure/GCP checks) and
863the list of controls Prowler genuinely cannot verify, see
864[references/check-mapping-reference.md](references/check-mapping-reference.md).
865
866---
867
868## Workflow C: Add a New Universal Framework
869
8701. Author `prowler/compliance/{framework}_{version}.json` following the
871 Universal Schema Reference above (use `dora_2022_2554.json` or
872 `csa_ccm_4.0.json` as template).
8732. Declare every attribute in `attributes_metadata` (with `required`/`enum`
874 where possible — that's your load-time validation) and a
875 `outputs.table_config.group_by`.
8763. Map checks per provider; add `config_requirements` (with `Provider`) for
877 configurable checks; leave empty lists for manual requirements — **include
878 every requirement of the source catalog** (coverage percentages depend on
879 the full denominator).
8804. Validate (section below). No Python registration of any kind is needed for
881 CLI table/CSV/OCSF.
8825. Optional first-class UI: mapper in `ui/lib/compliance/{framework}.tsx`,
883 registration in `getComplianceMappers()` under the JSON's `framework` value,
884 detail panel, `*AttributesMetadata` type, and icon (ordered keyword!). Until
885 then the generic mapper renders it.
8866. Optional API extras: CSV exporter entry in `COMPLIANCE_CLASS_MAP`; PDF
887 generator + `FRAMEWORK_REGISTRY` entry if a PDF is required.
8887. Tests: extend `tests/lib/check/universal_compliance_models_test.py` with a
889 case loading the new JSON. The parametrized `test_loads_as_universal`
890 already picks the file up automatically.
8918. Changelog fragment `prowler/changelog.d/<slug>.added.md` + user-guide
892 tutorial under `docs/user-guide/compliance/tutorials/` for high-profile
893 frameworks.
894
895## Workflow D: Add a New Legacy Output Formatter
896
897Only for new members of an existing legacy family. Follow the `c5/` or `ccc/`
898layout exactly:
899
9001. `mkdir prowler/lib/outputs/compliance/{framework}` with `__init__.py`.
9012. `{framework}.py` — copy `c5/c5.py`, change function name + framework
902 string; the diff should be just those lines. No docstring (legacy style).
9033. `models.py` — one Pydantic CSV row model per provider. Column sets differ
904 per provider (`AccountId`/`Region` vs `SubscriptionId`/`Location` vs
905 `ProjectId`/`Location`); per-provider files are the convention — don't
906 collapse them into a parameterized class, reviewers will reject it.
9074. `{framework}_{provider}.py` — `{Framework}_{Provider}(ComplianceOutput)`
908 with `transform()`; this file may import `Finding`.
9095. Register:
910 - `compliance.py` → `display_compliance_table()` `elif` branch (+ top import).
911 - `prowler/__main__.py` → per-provider `elif compliance_name.startswith(...)`
912 branches instantiating the writer classes.
913 - `api/src/backend/tasks/jobs/export.py` → `COMPLIANCE_CLASS_MAP` entries
914 (`startswith` for families, exact match only for true singletons).
9156. Tests under `tests/lib/outputs/compliance/{framework}/` + fixtures in
916 `tests/lib/outputs/compliance/fixtures.py` (1 evaluated + 1 manual
917 requirement to exercise both `transform()` paths).
918
919**Circular import warning**: the table file must not import `Finding` directly
920or transitively (cycle: `compliance.compliance` → table → `ComplianceOutput` →
921`Finding` → `get_check_compliance` → `compliance.compliance`). Keep it bare;
922use `TYPE_CHECKING`/function-local imports where both are genuinely needed.
923
924---
925
926## Validation (run before every commit)
927
9281. **Schema load (both formats)**:
929
930 ```python
931 from prowler.lib.check.compliance_models import (
932 load_compliance_framework_universal,
933 get_bulk_compliance_frameworks_universal,
934 )
935 fw = load_compliance_framework_universal("prowler/compliance/<file>.json")
936 assert fw is not None, "check logs for the ValidationError"
937 print(fw.framework, len(fw.requirements), fw.get_providers())
938 assert "<file_basename>" in get_bulk_compliance_frameworks_universal("aws")
939 ```
940
941 Remember: the universal loader is lenient (skips broken files with a log
942 line) — an `assert fw is not None` is mandatory, a green scan is not proof.
943
9442. **Check existence** — no loader validates this; a stale id is silent dead
945 weight:
946
947 ```python
948 import json
949 from pathlib import Path
950 for prov in ["aws", "azure", "gcp"]:
951 real = {p.stem.replace(".metadata", "")
952 for p in Path(f"prowler/providers/{prov}/services").rglob("*.metadata.json")}
953 data = json.load(open(f"prowler/compliance/{prov}/<file>.json"))
954 refs = {c for r in data["Requirements"] for c in r["Checks"]}
955 missing = refs - real
956 assert not missing, f"{prov} missing: {missing}"
957 ```
958
959 (For universal files use `r.get("checks", {}).get(prov, [])` instead —
960 requirements may legitimately omit a provider key.)
961
9623. **CLI smoke test**:
963
964 ```bash
965 uv run python prowler-cli.py <provider> --list-compliance # appears?
966 uv run python prowler-cli.py <provider> --compliance <key> --log-level ERROR
967 ```
968
969 Verify the CSV under `output/compliance/`, the summary table sections, and
970 the findings roll-up.
971
9724. **Tests**:
973
974 ```bash
975 uv run pytest -n auto tests/lib/check/universal_compliance_models_test.py \
976 tests/lib/outputs/compliance/
977 ```
978
979 `test_loads_as_universal` is parametrized over **every** JSON in
980 `prowler/compliance/` (top-level + subdirectories) — a malformed file fails
981 CI here even if you never wrote a dedicated test.
982
9835. **What CI/pre-commit do and don't cover**: pre-commit only guarantees
984 well-formed/pretty JSON (`check-json`, `pretty-format-json`) — no semantic
985 validation. The workflow `.github/workflows/pr-check-compliance-mapping.yml`
986 flags PRs adding new checks without mapping them to any framework (label
987 `needs-compliance-review`; skip with label `no-compliance-check`). Semantic
988 validation happens in the pytest suite above and manually via
989 `skills/prowler-compliance-review/assets/validate_compliance.py` (note:
990 that validator assumes the **legacy** schema).
991
9926. **Prowler Local Server**: `docker compose up` and confirm the compliance
993 page renders requirements, sections and widgets.
994
995---
996
997## Conventions and Hard-Won Gotchas
998
9991. **Universal first.** A new framework that starts as legacy needs 3 output
1000 files + 3 registrations; the same framework as universal needs zero. Only
1001 extend legacy families.
10022. **`Generic_Compliance_Requirement_Attribute` stays LAST** in the legacy
1003 Attributes Union — Pydantic v1 tries members in order; Generic first
1004 silently swallows every specific shape.
10053. **Pydantic v1 everywhere in `compliance_models.py`**
1006 (`from pydantic.v1 import ...`). Don't mix in v2.
10074. **`get_check_compliance()` lives in
1008 `prowler/lib/outputs/compliance/compliance_check.py`** and keys the dict
1009 `f"{Framework}-{Version}"` only when Version is non-empty. Never ship
1010 `Version: ""` — the key silently degrades to `"{Framework}"` and breaks
1011 filters, tests and `--compliance`. For legacy files the filename version
1012 substring must match `Version` (the CLI reads
1013 `compliance_framework.split("_")[1]`).
10145. **`Compliance.get_bulk()` does not see top-level universal files** — only
1015 `get_bulk_compliance_frameworks_universal()` does. Wire new code paths
1016 against the universal loader.
10176. **Loader leniency differs**: legacy loader exits the process on a broken
1018 JSON; universal loader logs and skips. A missing framework after your edit
1019 usually means the universal loader dropped it — check the logs.
10207. **Circular import protection**: legacy table dispatcher files must not
1021 import `Finding` (directly or transitively). Use `TYPE_CHECKING` or
1022 function-local imports when a module needs both sides (that's how the
1023 universal formatter does it).
10248. **Per-provider formatter files are the legacy convention** — but know the
1025 exceptions before flagging them (iso27001 has no table file,
1026 aws_well_architected has no per-provider files, cisa_scuba is
1027 googleworkspace-only). CSV model field names are public API.
10289. **CSV output**: `;` delimiter, UPPERCASE headers. OCSF compliance output is
1029 always generated for universal frameworks regardless of `--output-formats`.
103010. **`COMPLIANCE_CLASS_MAP` mixes predicate styles**: `startswith` for
1031 multi-version families, exact `==` for singletons. When in doubt use
1032 `startswith` — exact match blocked versioned CCC variants until 2026.
103311. **UI grouping is per-mapper, always on `attributes[0]`**: generic/cis →
1034 `Section`/`SubSection`, iso → `Category`, ccc → `FamilyName`. Inconsistent
1035 values (or empty Section) create orphan/duplicate tree branches — normalize
1036 before shipping.
103712. **UI has a generic fallback** — an unregistered framework still renders.
1038 A dedicated mapper/panel/icon is an upgrade, not a prerequisite.
103913. **Icon registration is ordered substring matching** in
1040 `IconCompliance.tsx` — specific keywords before generic (`nist` before
1041 `nis2`, `cisa` before `cis`, `aws` last).
104214. **API PDF pipeline is not `PDFConfig`-driven yet** — it has its own
1043 `FRAMEWORK_REGISTRY` (5 frameworks). Don't assume adding `pdf_config` to a
1044 JSON produces a PDF in Prowler App.
104515. **Pre-validate every check id** against the per-provider inventory before
1046 writing JSON. No loader will catch a typo; the requirement just never
1047 matches a finding.
104816. **REPLACE beats PATCH** for audit decisions — full explicit lists are
1049 reproducible and surface legacy assumptions.
105017. **When no check applies, MANUAL is correct.** Don't pad mappings with
1051 tangential checks; compliance reports must stay actionable.
105218. **Include every requirement of the source catalog**, automated or not —
1053 compliance percentages use the full requirement count as denominator.
105419. **Provider coverage is asymmetric** (AWS dense; Azure/GCP thinner; new
1055 providers minimal). Accept it — don't force parity Prowler can't verify.
105620. **Guardrail authoring**: strictest tolerated `Value`, exact `ConfigKey`
1057 spelling, `Provider` mandatory in universal files, booleans as JSON
1058 booleans. Malformed constraints are treated as satisfied — validate with
1059 the config tests, don't trust silence.
1060
1061---
1062
1063## Useful One-Liners
1064
1065```bash
1066# Find duplicate requirement IDs (legacy | universal)
1067jq -r '.Requirements[].Id' file.json | sort | uniq -d
1068jq -r '.requirements[].id' file.json | sort | uniq -d
1069
1070# Count manual requirements (legacy | universal, per provider)
1071jq '[.Requirements[] | select((.Checks | length) == 0)] | length' file.json
1072jq '[.requirements[] | select((.checks.aws // [] | length) == 0)] | length' file.json
1073
1074# List unique check references (legacy | universal)
1075jq -r '.Requirements[].Checks[]' file.json | sort -u
1076jq -r '.requirements[].checks[]? | .[]' file.json | sort -u
1077
1078# Providers covered by a universal framework
1079jq '[.requirements[].checks | keys[]] | unique' file.json
1080
1081# Spot inconsistent grouping values (UI tree branches)
1082jq '[.Requirements[].Attributes[0].Section] | unique' file.json
1083jq '[.Requirements[].Attributes[0].FamilyName] | unique' file.json
1084
1085# Requirements with config guardrails (empty arrays are truthy in jq — check length)
1086jq '[.Requirements[] | select((.ConfigRequirements // []) | length > 0)] | length' file.json
1087
1088# Diff requirement ids between two versions
1089diff <(jq -r '.Requirements[].Id' a.json | sort) <(jq -r '.Requirements[].Id' b.json | sort)
1090
1091# Where is a check mapped across all frameworks?
1092grep -rl "my_check_name" prowler/compliance/
1093
1094# Does a check exist?
1095find prowler/providers/aws/services -name "{check_id}.metadata.json"
1096
1097# Validate one file with the universal loader
1098python -c "from prowler.lib.check.compliance_models import load_compliance_framework_universal as l; fw=l('prowler/compliance/aws/cis_7.0_aws.json'); print(fw.framework, len(fw.requirements))"
1099```
1100
1101## Commands
1102
1103```bash
1104prowler {provider} --list-compliance
1105prowler {provider} --compliance cis_7.0_aws
1106prowler aws --compliance cis_7.0_aws pci_4.0_aws
1107prowler aws --compliance dora_2022_2554 # universal key = file basename
1108prowler aws --list-compliance-requirements cis_7.0_aws
1109prowler aws --compliance cis_7.0_aws -M csv json html
1110```
1111
1112## Code References
1113
1114### Layer 1 — SDK / Core
1115
1116- `prowler/lib/check/compliance_models.py` — legacy + universal model trees,
1117 `Compliance_Requirement_ConfigConstraint`, all loaders and the
1118 legacy→universal adapter
1119- `prowler/lib/check/compliance.py` — `update_checks_metadata_with_compliance`
1120- `prowler/lib/check/compliance_config_eval.py` — guardrail evaluation
1121 (shared with the API)
1122- `prowler/lib/outputs/compliance/compliance_check.py` — `get_check_compliance`
1123- `prowler/lib/check/utils.py` — `list_compliance_modules`
1124
1125### Layer 2 — JSON Catalogs
1126
1127- `prowler/compliance/*.json` — universal, multi-provider (auto-discovered)
1128- `prowler/compliance/{provider}/` — legacy, per-provider (auto-discovered)
1129
1130### Layer 3 — Output Formatters
1131
1132- `prowler/lib/outputs/compliance/universal/` — `universal_table.py`,
1133 `universal_output.py`, `ocsf_compliance.py`
1134- `prowler/lib/outputs/compliance/{framework}/` — legacy per-framework packages
1135- `prowler/lib/outputs/compliance/compliance.py` —
1136 `process_universal_compliance_frameworks`, `display_compliance_table`
1137- `prowler/lib/outputs/compliance/compliance_output.py` — `ComplianceOutput`
1138 base + CSV writer
1139- `prowler/__main__.py` — universal processing + per-provider legacy writer
1140 branches
1141
1142### Layer 4 — API / UI
1143
1144- `api/src/backend/api/compliance.py` — `LazyComplianceTemplate`,
1145 `LazyChecksMapping`, cache warm-up
1146- `api/src/backend/tasks/jobs/export.py` — `COMPLIANCE_CLASS_MAP`
1147- `api/src/backend/tasks/jobs/scan.py` — `create_compliance_requirements`
1148 (overview ingestion)
1149- `api/src/backend/tasks/jobs/reports/` — PDF generators + `FRAMEWORK_REGISTRY`
1150- `ui/lib/compliance/compliance-mapper.ts` — mapper routing + generic fallback
1151- `ui/lib/compliance/{framework}.tsx` — per-framework mappers
1152- `ui/components/compliance/compliance-custom-details/` — detail panels
1153- `ui/types/compliance.ts` — attribute metadata types
1154- `ui/components/icons/compliance/` + `IconCompliance.tsx` — icons (ordered)
1155
1156### Tests
1157
1158- `tests/lib/check/universal_compliance_models_test.py` — includes the
1159 parametrized `test_loads_as_universal` over every shipped JSON
1160- `tests/lib/check/compliance_check_test.py`,
1161 `compliance_config_eval_test.py`, `compliance_config_constraint_model_test.py`,
1162 `compliance_config_requirements_data_test.py`, `mitre_config_requirements_test.py`
1163- `tests/lib/outputs/compliance/` — per-framework + universal + dispatcher +
1164 config-status coverage tests; shared `fixtures.py`
1165
1166## Resources
1167
1168- **Docs (source of truth for contributors)**:
1169 `docs/developer-guide/security-compliance-framework.mdx` (both schemas,
1170 guardrails, validation, PR process),
1171 `docs/user-guide/compliance/tutorials/compliance.mdx`,
1172 `docs/user-guide/compliance/tutorials/cross-provider-compliance.mdx`
1173- **Repo tooling** (`util/compliance/`): CSV→JSON generators
1174 (`generate_json_from_csv/`), `ccc/from_yaml_to_json.py`,
1175 `compliance_mapper/`, `threatscore/`
1176- **Skill assets** ([assets/](assets/)):
1177 - `sync_framework.py` + `configs/ccc.yaml` + `parsers/finos_ccc.py` —
1178 config-driven upstream sync (Workflow A)
1179 - `build_inventory.py`, `query_checks.py`, `dump_section.py`,
1180 `audit_framework_template.py` — audit tooling (Workflow B)
1181 - Legacy JSON templates: `cis_framework.json`, `ens_framework.json`,
1182 `iso27001_framework.json`, `mitre_attack_framework.json`,
1183 `prowler_threatscore_framework.json`, `generic_framework.json`
1184- **References**:
1185 [references/compliance-docs.md](references/compliance-docs.md) — model/loader
1186 quick reference;
1187 [references/check-mapping-reference.md](references/check-mapping-reference.md)
1188 — curated requirement-text → checks mapping table + honest-MANUAL list
1189- **Sister skill**:
1190 [prowler-compliance-review](../prowler-compliance-review/SKILL.md) — PR
1191 review checklist + `validate_compliance.py` (legacy-schema validator)
1192- After editing this skill's frontmatter, run
1193 `./skills/skill-sync/assets/sync.sh` to regenerate the AGENTS.md auto-invoke
1194 tables.