This tool analyzes Service Control Policies (SCPs) in your AWS Organization to determine if they would prevent CrowdStrike Falcon Cloud Security from deploying successfully.
CrowdStrike Falcon Cloud Security requires various AWS permissions to deploy successfully in your AWS Organzation. This script:
- Fetches and analyzes all Service Control Policies attached to your AWS Organization
- Identifies conflicts between SCPs and required permissions
- Provides detailed reporting on what might fail during deployment
- Offers recommendations for resolving permission conflicts
This tool is READ-ONLY and does not modify any AWS resources but must have STS and Organizations permissions to complete the analysis.
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"organizations:DescribeOrganization",
"organizations:DescribePolicy",
"organizations:ListAccounts",
"organizations:ListOrganizationalUnitsForParent",
"organizations:ListParents",
"organizations:ListPoliciesForTarget",
"organizations:ListRoots",
"sts:GetCallerIdentity"
],
"Resource": "*"
}
]
}
- Download and Extract Repo:
curl -L -o source.zip https://github.com/CrowdStrike/aws-cspm-scp-analysis/archive/refs/tags/v1.0.1.zip
unzip source.zip
cd aws-cspm-scp-analysis-1.0.1/
- Install Python dependencies:
pip install -r requirements.txt
- Configure AWS credentials for AWS Org Management Account: Skip this step if running in AWS CloudShell
# Option 1: Using AWS CLI
aws configure
# Option 2: Using environment variables
export AWS_ACCESS_KEY_ID=your_access_key
export AWS_SECRET_ACCESS_KEY=your_secret_key
export AWS_DEFAULT_REGION=us-east-1
# Option 3: Using AWS profiles
aws configure --profile your-profile-name
python analyze_scp_crowdstrike.py
Note: The script automatically fetches the latest CrowdStrike template from the official S3 URL
# Show detailed permission requirements and exit
python analyze_scp_crowdstrike.py --show-permissions
# Validate permissions without running SCP analysis
python analyze_scp_crowdstrike.py --check-permissions
# Skip permission validation (not recommended)
python analyze_scp_crowdstrike.py --no-validate-permissions
# Use specific AWS profile
python analyze_scp_crowdstrike.py --profile production
# Use local template file instead of fetching latest from URL
python analyze_scp_crowdstrike.py --template-file /path/to/template.yaml
# All features enabled (default behavior)
python analyze_scp_crowdstrike.py
# Enable only Asset Inventory
python analyze_scp_crowdstrike.py --asset-inventory
# Enable only Asset Inventory and DSPM
python analyze_scp_crowdstrike.py --asset-inventory --dspm
# Enable multiple specific features
python analyze_scp_crowdstrike.py --sensor-management --realtime-visibility
================================================================================
π‘οΈ CROWDSTRIKE CLOUDFORMATION TEMPLATE - SCP ANALYSIS REPORT
================================================================================
π ACCOUNT INFORMATION:
Account ID: 123456789012
Region: us-east-1
Profile: default
Organization ID: o-abc1234567
Master Account: 123456789012
π§ ANALYZED CSPM FEATURES:
Asset Inventory: β
Enabled
Sensor Management: β
Enabled
Realtime Visibility: β
Enabled
Dspm: β
Enabled
Organization Deployment: β
Enabled
π SCP ANALYSIS RESULTS:
Total Policies Analyzed: 2
Blocking Policies: 0
Severity: LOW
π‘ RECOMMENDATIONS:
β
No SCP conflicts detected. The CrowdStrike template should deploy successfully.
================================================================================
π‘οΈ CROWDSTRIKE CSPM - SCP ANALYSIS REPORT
================================================================================
π ACCOUNT INFORMATION:
Account ID: 123456789012
Region: us-east-1
Profile: default
Organization ID: o-abc1234567
Master Account: 123456789012
π§ ANALYZED CSPM FEATURES:
Asset Inventory: β
Enabled
Sensor Management: β
Enabled
Realtime Visibility: β
Enabled
Dspm: β
Enabled
Organization Deployment: β
Enabled
π SCP ANALYSIS RESULTS:
Total Policies Analyzed: 6
Blocking Policies: 2
Severity: HIGH
π BLOCKING POLICIES:
Policy: block-external-stacksets (p-123456)
Attached to: Root
Description:
Blocked Actions: 1
- cloudformation:CreateStackSet
π§ Recommendations for this policy:
π΄ CRITICAL: This policy blocks 1 CloudFormation permissions.
β Add exceptions for CrowdStrike CloudFormation operations:
β’ Allow cloudformation:* on resources: arn:aws:cloudformation:*:*:stack/CrowdStrike*
β’ Allow cloudformation:* on resources: arn:aws:cloudformation:*:*:stackset/CrowdStrike*
Policy: block-region (p-987654)
Attached to: OU
Description:
Blocked Actions: 278
- ec2:CreateTags
- aoss:BatchGetCollection
- cloudformation:DeleteStackSet
... and 275 more
π§ Recommendations for this policy:
π΄ CRITICAL: This policy blocks 16 CloudFormation permissions.
β Add exceptions for CrowdStrike CloudFormation operations:
β’ Allow cloudformation:* on resources: arn:aws:cloudformation:*:*:stack/CrowdStrike*
β’ Allow cloudformation:* on resources: arn:aws:cloudformation:*:*:stackset/CrowdStrike*
π‘ MEDIUM: This policy blocks 8 EventBridge permissions.
β Add exceptions for CrowdStrike EventBridge rules:
β’ Allow events:* on resources: arn:aws:events:*:*:rule/cs-*
β’ Allow events:* on resources: arn:aws:events:*:*:rule/CrowdStrike*
π‘ MEDIUM: This policy blocks 12 Lambda permissions.
β Add exceptions for CrowdStrike Lambda functions:
β’ Allow lambda:* on resources: arn:aws:lambda:*:*:function:CrowdStrike*
π REGION RESTRICTIONS:
Policy: block-region (p-987654)
Attached to: OU
π« Blocks regions: ap-south-1 (StringEquals on aws:RequestedRegion)
π‘ RECOMMENDATIONS:
β Blocking policy is based on resource names:
β’ Use the ResourcePrefix and/or ResourceSuffix parameters in the template to apply your naming convention to CrowdStrike resources.
β Blocking policy is based on AWS region:
β’ If you intend to protect this region with CrowdStrike CSPM, add an exception for CrowdStrike resources.
β’ If you do not intend to protect this region with CrowdStrike CSPM:
β’ Use the RealtimeVisibilityRegions and/or DSPMRegions parameters in the template to target your allowed regions.
================================================================================
π Results written to JSON file: fcs_scp_analysis_o-abc123.json
- π’ LOW: No conflicts detected - template should deploy successfully
- π‘ MEDIUM: Minor conflicts that may affect optional features
- π΄ HIGH: Critical conflicts that will prevent deployment
The script will write comprehensive analysis results to a JSON file for automation and programmatic analysis:
Auto-generated filename format: fcs_scp_analysis_{organization_id}.json
For example:
- Organization
o-abc1234567
βfcs_scp_analysis_o-abc1234567.json
- Standalone account
123456789012
βfcs_scp_analysis_123456789012.json
The JSON output file contains:
- Account Information: Account ID, region, organization details
- Summary Statistics: Total policies, severity, blocked services count
- Analysis Results: Complete policy analysis with blocked actions and restrictions
- Policy Details: Full policy content and metadata for each blocking policy
The script returns different exit codes for automation:
0
: No issues (LOW severity)1
: Minor issues (MEDIUM severity)2
: Critical issues (HIGH severity)
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Deny",
"Action": [
"iam:CreateRole",
"iam:PutRolePolicy",
"iam:AttachRolePolicy"
],
"Resource": "*",
"Condition": {
"StringNotLike": {
"aws:RequestedResourceName": "CompanyPrefix-*"
}
}
}
]
}
Impact: This policy requires all IAM roles to start with "CompanyPrefix-" but CrowdStrike creates roles with names like "CrowdStrikeCSPMRole". This will block CrowdStrike deployment entirely unless you add the "CompanyPrefix-" to the ResourcePrefix parameter in the CrowdStrike template.
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Deny",
"Action": "cloudformation:*",
"Resource": "*",
"Condition": {
"StringNotEquals": {
"aws:RequestedRegion": [
"us-east-1",
"us-west-2"
]
}
}
}
]
}
Impact: This policy restricts all Cloudformation operations to only us-east-1 and us-west-2 regions. CrowdStrike's Real-time Visibility and DSPM features require deployment across all active regions. Use the RealtimeVisibilityRegions and/or DSPMRegions parameters in the template to target your allowed regions.
To allow CrowdStrike deployment, consider these SCP exception patterns:
{
"Effect": "Allow",
"Action": [
"iam:CreateRole",
"iam:AttachRolePolicy",
"iam:PutRolePolicy",
"iam:PassRole"
],
"Resource": [
"arn:aws:iam::*:role/CrowdStrike*",
"arn:aws:iam::*:policy/CrowdStrike*"
]
}
{
"Effect": "Allow",
"Action": "cloudformation:*",
"Resource": [
"arn:aws:cloudformation:*:*:stack/CrowdStrike*",
"arn:aws:cloudformation:*:*:stackset/CrowdStrike*"
]
}
{
"Effect": "Allow",
"Action": "events:*",
"Resource": "arn:aws:events:*:*:rule/cs-*"
}
β Error: No AWS credentials configured. Please configure your credentials.
Solution: Configure AWS credentials using aws configure
or environment variables.
Error getting organization info: AccessDenied
Solution: Ensure your user/role has organizations:DescribeOrganization
permission.
β οΈ Account is not part of an organization. SCPs may not apply.
Note: This is normal for standalone accounts. SCPs only apply to accounts in AWS Organizations.
analyze_scp_crowdstrike.py
: Main analysis scriptrequirements.txt
: Python dependenciesREADME.md
: This documentation
For issues related to:
- Script functionality: Check this repository's issues
- CrowdStrike template: Contact CrowdStrike support
- AWS Organizations/SCPs: Consult AWS documentation