/pbmm:data-residencyfrom pbmm
Verifies that Protected B data resides exclusively in Canadian AWS, Azure, or GCP regions per PBMM and Government of Canada policies. Runs checks or remediation across compute, storage, database, and networking services.
Ships in pbmm. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Verifies that all Protected B data resides exclusively in Canadian geographic regions as required by PBMM and Government of Canada policies.
Policy: All Protected B data must be stored, processed, and backed up exclusively within Canadian geographic boundaries.
Authority:
Primary Regions:
Services Verified:
Prohibited Regions: All non-Canadian regions
Edge Services:
Primary Regions:
Services Verified:
Prohibited Regions: All non-Canadian regions
Global Services:
Primary Regions:
Services Verified:
Prohibited Regions: All non-Canadian regions
Global Services:
S3 Bucket Locations:
# List all buckets with locations
for bucket in $(aws s3api list-buckets --query 'Buckets[*].Name' --output text); do
location=$(aws s3api get-bucket-location --bucket "$bucket" --query 'LocationConstraint' --output text)
if [[ "$location" == "ca-central-1" ]] || [[ "$location" == "ca-west-1" ]] || [[ "$location" == "null" && "$AWS_DEFAULT_REGION" =~ ^ca- ]]; then
echo "PASS: $bucket -> $location"
else
echo "FAIL: $bucket -> $location (NOT Canadian)"
fi
done
EC2 Instance Locations:
# Check all EC2 instances
aws ec2 describe-instances \
--query 'Reservations[*].Instances[*].{Id:InstanceId,AZ:Placement.AvailabilityZone,State:State.Name}' \
--output table
# Verify only Canadian availability zones (ca-central-1*, ca-west-1*)
RDS Database Locations:
# Check all RDS instances
aws rds describe-db-instances \
--query 'DBInstances[*].{Id:DBInstanceIdentifier,AZ:AvailabilityZone,MultiAZ:MultiAZ}' \
--output table
# Ensure all in ca-central-1 or ca-west-1
EBS Snapshots:
# Check snapshot locations (must be in Canadian regions)
aws ec2 describe-snapshots --owner-ids self \
--query 'Snapshots[*].{SnapshotId:SnapshotId,VolumeId:VolumeId}' \
--output table
All Resources:
# List all resources with locations
az resource list \
--query '[].{Name:name,Location:location,Type:type}' \
--output table
# Filter non-Canadian resources
az resource list \
--query "[?location!='canadacentral' && location!='canadaeast'].{Name:name,Location:location,Type:type}" \
--output table
Storage Accounts:
# Check storage account locations
az storage account list \
--query '[].{Name:name,Location:location,Kind:kind}' \
--output table
# Should only show: canadacentral or canadaeast
Virtual Machines:
# Check VM locations
az vm list \
--query '[].{Name:name,Location:location,ResourceGroup:resourceGroup}' \
--output table
Cloud Storage Buckets:
# List all buckets with locations
gcloud storage buckets list --format='table(name,location,locationType)'
# Verify: northamerica-northeast1 or northamerica-northeast2
Compute Instances:
# List all instances with zones
gcloud compute instances list \
--format='table(name,zone,status)'
# Verify zones: northamerica-northeast1-* or northamerica-northeast2-*
Cloud SQL Instances:
# Check database locations
gcloud sql instances list \
--format='table(name,region,databaseVersion)'
# Verify regions: northamerica-northeast1 or northamerica-northeast2
Finding: S3 bucket in us-east-1
FAIL: my-bucket -> us-east-1 (NOT Canadian)
Remediation:
# Create Canadian bucket
aws s3 mb s3://my-bucket-ca --region ca-central-1
# Copy data
aws s3 sync s3://my-bucket s3://my-bucket-ca --region ca-central-1
# Update application configuration
# Delete old bucket after verification
Finding: EC2 instance in us-west-2
Instance i-1234567890 in us-west-2a
Remediation:
# Create AMI
ami_id=$(aws ec2 create-image --instance-id i-1234567890 --name "Migration-AMI")
# Copy to Canadian region
aws ec2 copy-image \
--source-region us-west-2 \
--source-image-id $ami_id \
--region ca-central-1 \
--name "Canadian-AMI"
# Launch in ca-central-1
aws ec2 run-instances \
--image-id $canadian_ami_id \
--instance-type t3.medium \
--region ca-central-1 \
--subnet-id subnet-canadian-vpc
Finding: Storage account in eastus
my-storage | eastus | StorageV2
Remediation:
# Create Canadian storage account
az storage account create \
--name mystoragecanada \
--location canadacentral \
--resource-group myResourceGroup
# Migrate data with AzCopy
azcopy sync \
"https://mystorage.blob.core.windows.net" \
"https://mystoragecanada.blob.core.windows.net"
Prohibited Activities:
Permitted with Controls:
| Resource Type | Location Check | Backup Check | Replication Check |
|---|---|---|---|
| S3/Blob Storage | ✅ ca-central-1, canadacentral | ✅ Canadian regions only | ❌ No cross-border replication |
| EC2/VMs | ✅ ca-* / canadacentral/east | ✅ Snapshots in CA | ❌ No cross-region AMIs |
| RDS/SQL | ✅ Canadian AZs | ✅ Automated backups in CA | ❌ No read replicas outside CA |
| Load Balancers | ✅ Canadian regions | N/A | ✅ Multi-AZ within CA OK |
| CDN | ⚠️ Canadian edge only | N/A | ❌ No global distribution |
Prevent non-Canadian region usage:
{
"Version": "2012-10-17",
"Statement": [{
"Effect": "Deny",
"Action": "*",
"Resource": "*",
"Condition": {
"StringNotEquals": {
"aws:RequestedRegion": [
"ca-central-1",
"ca-west-1"
]
}
}
}]
}
Restrict resource deployment to Canadian regions:
{
"properties": {
"policyRule": {
"if": {
"not": {
"field": "location",
"in": ["canadacentral", "canadaeast"]
}
},
"then": {
"effect": "deny"
}
}
}
}
Restrict resource locations:
name: organizations/ORGANIZATION_ID/policies/gcp.resourceLocations
spec:
rules:
- values:
allowedValues:
- in:northamerica-northeast1-locations
- in:northamerica-northeast2-locations
# Verify all cloud providers
/pbmm:data-residency all check
# Check AWS only
/pbmm:data-residency aws check
# Remediation mode for Azure
/pbmm:data-residency azure remediate
# GCP verification
/pbmm:data-residency gcp check
For CCCS assessment, maintain:
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
5 skills in this plugin
/assessAssess Protected B compliance readiness against ITSG-33 controls/cccs-guidanceCCCS assessment process and certified cloud provider guidance/pbmm-expertCanadian PBMM (Protected B, Medium Integrity, Medium Availability) expert. Provides comprehensive guidance on ITSG-33 controls, CCCS assessment, Canadian data residency, and Government of Canada cloud security requirements./profile-selectDetermine appropriate Canadian classification level for your datanpx claudepluginhub grcengclub/claude-grc-engineering --plugin pbmmOther plugins' skills for the same job