MCMMCM DocsEngineering (Internal)
HLDModulesGovernance
v1.2 is unreleased — see v1.1 for the current stable release.

Policies

CSP (Cloud Custodian) and Host (Shell Script) policy definitions and execution history.

Policies

Policies define what to check and how to evaluate compliance. MCM supports two policy types: CSP Policies targeting cloud provider resources, and Host Policies targeting managed hosts.


CSP Policy (Cloud Custodian)

CSP policies target cloud provider resources (AWS, Azure, GCP) using Cloud Custodian YAML. The evaluation engine runs the YAML against the connected account and records which resources are non-compliant.

CSP Policy Fields

FieldTypeDescription
namestringPolicy name
descriptionstringWhat this policy enforces
providerAWS / Azure / GCPTarget cloud provider
categoryenumSecurity, Cost, Compliance, Access, Networking, Tags
severityLow / Medium / HighRisk level if non-compliant
statusDraft / ActiveDraft policies are not evaluated
groupIdstring (optional)Parent policy group
scheduleEnabledbooleanWhether automated evaluation is enabled
schedulecron expressione.g. 0 2 * * * — daily at 02
scheduleTimezonestringe.g. UTC, America/New_York
resourceTargetstringCloud Custodian resource type, e.g. aws.ec2
yamlstringFull Cloud Custodian YAML policy definition

CSP Execution History Fields

Each evaluation run records the following:

FieldDescription
accountId / accountNameCloud account the policy ran against
statusSuccess, Partial, or Failed
durationWall-clock time to complete the evaluation
triggeredBy"System" for scheduled runs, or the user email for manual triggers
nonComplianceResourcesCount of cloud resources that violated the policy
errorError message if the run failed or was partial
executionTimeISO datetime of when the run started

Host Policy (Shell Script)

Host policies target managed hosts (Ubuntu, Windows) by running a shell script. Compliance is determined by comparing the script's stdout against a declared expected output string.

Host Policy Fields

FieldTypeDescription
namestringPolicy name
descriptionstringWhat this policy checks
providerUbuntu / WindowsTarget host OS
categoryenumSecurity, Cost, Compliance, Access, Networking, Tags
severityLow / Medium / HighRisk level if non-compliant
statusDraft / ActiveDraft policies are not evaluated
groupIdstring (optional)Parent policy group
scheduleEnabledbooleanWhether automated evaluation is enabled
schedulecron expressione.g. 0 0 * * * — daily at midnight
scheduleTimezonestringe.g. UTC
shellTypebash / sh / powershellShell interpreter
scriptstringShell script to execute on the host
complianceExpectedOutputstringIf script stdout matches this, the host is compliant
remediationAvailablebooleanWhether a remediation script is defined
remediationScriptstring (optional)Shell script to run when the host is non-compliant
autoRemediationbooleanWhether remediation runs automatically on failure

Host Execution History Fields

FieldDescription
accountId / accountNameHost identifier and display name
statusSuccess, Partial, or Failed
durationTime taken to run the script
triggeredBy"System" for scheduled, or user email for manual
errorError message if execution failed or output did not match
executionTimeISO datetime of the run

On this page