[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M78QJMJJX514M681X8TJDXH4":3,"skill-same:01M78QJMJJX514M681X8TJDXH4":75},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":16,"sourceHtmlUrl":17,"categories":18,"keywords":19,"publishedAt":20,"linkOnly":21,"markdownContent":22,"markdownBody":23,"frontMatter":24,"refName":36,"commitSha":37,"skillDirectory":38,"forksCount":39,"repositoryHtmlUrl":40,"repositoryHomepageUrl":6,"ownerHtmlUrl":41,"ownerBlogUrl":42,"ownerDescription":43,"updatedAt":44,"install":45,"resources":58},"01M78QJMJJX514M681X8TJDXH4","implementing-cloud-dlp-for-data-protection",null,"Implementing Cloud Data Loss Prevention (DLP) using Amazon Macie, Azure Information Protection, and Google Cloud DLP API to discover, classify, and protect sensitive data across cloud storage, databases, and data pipelines.","jukeyman\u002Fjukeyman-skills","jukeyman","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F142960420?v=4","01M78FR4Y3DHMMCBCC0GXXNB3F","RICK JEFFERSON","01M78FR4Z8RVQRAD31Y5J7V6EB",1,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fimplementing-cloud-dlp-for-data-protection\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fimplementing-cloud-dlp-for-data-protection\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: implementing-cloud-dlp-for-data-protection\ndescription: >\n  Implementing Cloud Data Loss Prevention (DLP) using Amazon Macie, Azure Information\n  Protection, and Google Cloud DLP API to discover, classify, and protect sensitive data\n  across cloud storage, databases, and data pipelines.\ndomain: cybersecurity\nsubdomain: cloud-security\ntags: [cloud-security, dlp, data-protection, macie, data-classification, privacy]\nversion: \"1.0\"\nauthor: mahipal\nlicense: Apache-2.0\n---\n\n# Implementing Cloud DLP for Data Protection\n\n## When to Use\n\n- When compliance frameworks (GDPR, HIPAA, PCI DSS) require automated sensitive data discovery and protection\n- When building data governance programs that classify and label data across cloud storage\n- When implementing data loss prevention controls for cloud-based data pipelines\n- When auditing cloud environments for unprotected sensitive data (PII, PHI, financial data)\n- When integrating DLP scanning into CI\u002FCD pipelines to prevent sensitive data from reaching production\n\n**Do not use** for endpoint DLP (use Microsoft Purview or Symantec DLP agents), for email DLP (use Microsoft 365 DLP or Google Workspace DLP), or for network-level data exfiltration prevention (use VPC endpoint policies and network firewalls).\n\n## Prerequisites\n\n- Amazon Macie enabled with appropriate S3 bucket permissions\n- Google Cloud DLP API enabled (`gcloud services enable dlp.googleapis.com`)\n- Azure Information Protection or Microsoft Purview configured\n- IAM permissions for DLP service administration and data access\n- Knowledge of data sensitivity categories relevant to the organization (PII, PHI, PCI, proprietary)\n\n## Workflow\n\n### Step 1: Deploy Amazon Macie for S3 Data Discovery\n\nEnable Macie and configure automated sensitive data discovery jobs for S3 buckets.\n\n```bash\n# Enable Amazon Macie\naws macie2 enable-macie\n\n# List all S3 buckets Macie can scan\naws macie2 describe-buckets \\\n  --query 'buckets[*].[bucketName,classifiableSizeInBytes,unclassifiableObjectCount.total]' \\\n  --output table\n\n# Create a classification job for specific buckets\naws macie2 create-classification-job \\\n  --job-type SCHEDULED \\\n  --name \"weekly-pii-scan\" \\\n  --schedule-frequency-details '{\"weekly\":{\"dayOfWeek\":\"MONDAY\"}}' \\\n  --s3-job-definition '{\n    \"bucketDefinitions\": [{\n      \"accountId\": \"ACCOUNT_ID\",\n      \"buckets\": [\"customer-data-bucket\", \"analytics-data-lake\", \"backup-bucket\"]\n    }],\n    \"scoping\": {\n      \"includes\": {\n        \"and\": [{\n          \"simpleScopeTerm\": {\n            \"key\": \"OBJECT_EXTENSION\",\n            \"values\": [\"csv\", \"json\", \"parquet\", \"txt\", \"xlsx\"],\n            \"comparator\": \"EQ\"\n          }\n        }]\n      }\n    }\n  }' \\\n  --managed-data-identifier-ids '[\"SSN\",\"CREDIT_CARD_NUMBER\",\"EMAIL_ADDRESS\",\"AWS_CREDENTIALS\",\"PHONE_NUMBER\"]'\n\n# Create custom data identifier for internal employee IDs\naws macie2 create-custom-data-identifier \\\n  --name \"EmployeeID\" \\\n  --regex \"EMP-[0-9]{6}\" \\\n  --description \"Internal employee ID format\"\n\n# Check job status and results\naws macie2 list-classification-jobs \\\n  --query 'items[*].[name,jobStatus,statistics.approximateNumberOfObjectsToProcess]' \\\n  --output table\n```\n\n### Step 2: Configure Google Cloud DLP API for Data Inspection\n\nUse Google Cloud DLP to inspect and de-identify sensitive data across GCP resources.\n\n```bash\n# Inspect a Cloud Storage bucket for sensitive data\ngcloud dlp inspect-content \\\n  --content-type=TEXT_PLAIN \\\n  --min-likelihood=LIKELY \\\n  --info-types=PHONE_NUMBER,EMAIL_ADDRESS,CREDIT_CARD_NUMBER,US_SOCIAL_SECURITY_NUMBER \\\n  --storage-type=CLOUD_STORAGE \\\n  --gcs-uri=\"gs:\u002F\u002Fsensitive-data-bucket\u002Fdata\u002F*.csv\"\n\n# Create an inspection job for BigQuery\ncat > dlp-job.json \u003C\u003C 'EOF'\n{\n  \"inspectJob\": {\n    \"storageConfig\": {\n      \"bigQueryOptions\": {\n        \"tableReference\": {\n          \"projectId\": \"PROJECT_ID\",\n          \"datasetId\": \"customer_data\",\n          \"tableId\": \"transactions\"\n        },\n        \"sampleMethod\": \"RANDOM_START\",\n        \"rowsLimit\": 10000\n      }\n    },\n    \"inspectConfig\": {\n      \"infoTypes\": [\n        {\"name\": \"CREDIT_CARD_NUMBER\"},\n        {\"name\": \"US_SOCIAL_SECURITY_NUMBER\"},\n        {\"name\": \"EMAIL_ADDRESS\"},\n        {\"name\": \"PHONE_NUMBER\"},\n        {\"name\": \"PERSON_NAME\"}\n      ],\n      \"minLikelihood\": \"LIKELY\",\n      \"limits\": {\"maxFindingsPerRequest\": 1000}\n    },\n    \"actions\": [{\n      \"saveFindings\": {\n        \"outputConfig\": {\n          \"table\": {\n            \"projectId\": \"PROJECT_ID\",\n            \"datasetId\": \"dlp_results\",\n            \"tableId\": \"findings\"\n          }\n        }\n      }\n    }]\n  }\n}\nEOF\n\ngcloud dlp jobs create --project=PROJECT_ID --body-from-file=dlp-job.json\n```\n\n### Step 3: Implement Data De-identification with Cloud DLP\n\nConfigure de-identification transforms to mask, tokenize, or redact sensitive data.\n\n```python\n# deidentify_pipeline.py - De-identify sensitive data using Google Cloud DLP\nfrom google.cloud import dlp_v2\n\ndef deidentify_data(project_id, text):\n    \"\"\"De-identify PII in text using Cloud DLP.\"\"\"\n    client = dlp_v2.DlpServiceClient()\n\n    inspect_config = {\n        \"info_types\": [\n            {\"name\": \"EMAIL_ADDRESS\"},\n            {\"name\": \"PHONE_NUMBER\"},\n            {\"name\": \"CREDIT_CARD_NUMBER\"},\n            {\"name\": \"US_SOCIAL_SECURITY_NUMBER\"},\n        ],\n        \"min_likelihood\": dlp_v2.Likelihood.LIKELY,\n    }\n\n    deidentify_config = {\n        \"info_type_transformations\": {\n            \"transformations\": [\n                {\n                    \"info_types\": [{\"name\": \"EMAIL_ADDRESS\"}],\n                    \"primitive_transformation\": {\n                        \"character_mask_config\": {\n                            \"masking_character\": \"*\",\n                            \"number_to_mask\": 0,\n                            \"characters_to_ignore\": [\n                                {\"common_characters_to_ignore\": \"PUNCTUATION\"}\n                            ],\n                        }\n                    },\n                },\n                {\n                    \"info_types\": [{\"name\": \"CREDIT_CARD_NUMBER\"}],\n                    \"primitive_transformation\": {\n                        \"crypto_replace_ffx_fpe_config\": {\n                            \"crypto_key\": {\n                                \"kms_wrapped\": {\n                                    \"wrapped_key\": \"WRAPPED_KEY_BASE64\",\n                                    \"crypto_key_name\": \"projects\u002FPROJECT\u002Flocations\u002Fglobal\u002FkeyRings\u002Fdlp\u002FcryptoKeys\u002Ftokenization\",\n                                }\n                            },\n                            \"common_alphabet\": \"NUMERIC\",\n                        }\n                    },\n                },\n                {\n                    \"info_types\": [{\"name\": \"US_SOCIAL_SECURITY_NUMBER\"}],\n                    \"primitive_transformation\": {\n                        \"redact_config\": {}\n                    },\n                },\n            ]\n        }\n    }\n\n    item = {\"value\": text}\n    parent = f\"projects\u002F{project_id}\u002Flocations\u002Fglobal\"\n\n    response = client.deidentify_content(\n        request={\n            \"parent\": parent,\n            \"deidentify_config\": deidentify_config,\n            \"inspect_config\": inspect_config,\n            \"item\": item,\n        }\n    )\n    return response.item.value\n```\n\n### Step 4: Configure Azure Information Protection\n\nSet up sensitivity labels and DLP policies in Microsoft Purview for Azure resources.\n\n```powershell\n# Connect to Microsoft Purview compliance\nConnect-IPPSSession\n\n# Create sensitivity labels\nNew-Label -DisplayName \"Confidential - PII\" \\\n  -Name \"Confidential-PII\" \\\n  -Tooltip \"Contains personally identifiable information\" \\\n  -ContentType \"File, Email\"\n\nNew-Label -DisplayName \"Highly Confidential - Financial\" \\\n  -Name \"HighlyConfidential-Financial\" \\\n  -Tooltip \"Contains financial data subject to PCI DSS\" \\\n  -ContentType \"File, Email\"\n\n# Create auto-labeling policy for Azure Storage\nNew-AutoSensitivityLabelPolicy -Name \"Auto-Label-PII\" \\\n  -ExchangeLocation All \\\n  -SharePointLocation All \\\n  -OneDriveLocation All \\\n  -Mode Enable\n\nNew-AutoSensitivityLabelRule -Policy \"Auto-Label-PII\" \\\n  -Name \"Detect-SSN\" \\\n  -ContentContainsSensitiveInformation @{\n    Name = \"U.S. Social Security Number (SSN)\";\n    MinCount = 1;\n    MinConfidence = 85\n  } \\\n  -ApplySensitivityLabel \"Confidential-PII\"\n```\n\n```bash\n# Azure: Configure DLP policy for Storage accounts\naz security assessment create \\\n  --name \"storage-sensitive-data\" \\\n  --assessed-resource-type \"Microsoft.Storage\u002FstorageAccounts\"\n\n# Enable Microsoft Defender for Storage with sensitive data threat detection\naz security pricing create --name StorageAccounts --tier standard \\\n  --subplan DefenderForStorageV2 \\\n  --extensions '[{\"name\":\"SensitiveDataDiscovery\",\"isEnabled\":\"True\"}]'\n```\n\n### Step 5: Integrate DLP into Data Pipelines\n\nAdd DLP scanning to ETL and data pipeline workflows to prevent sensitive data leakage.\n\n```python\n# pipeline_dlp_gate.py - DLP gate for data pipelines\nimport boto3\nimport json\n\nmacie_client = boto3.client('macie2')\ns3_client = boto3.client('s3')\n\ndef scan_pipeline_output(bucket, prefix):\n    \"\"\"Scan pipeline output data for sensitive content before promotion.\"\"\"\n    job_response = macie_client.create_classification_job(\n        jobType='ONE_TIME',\n        name=f'pipeline-scan-{prefix}',\n        s3JobDefinition={\n            'bucketDefinitions': [{\n                'accountId': boto3.client('sts').get_caller_identity()['Account'],\n                'buckets': [bucket]\n            }],\n            'scoping': {\n                'includes': {\n                    'and': [{\n                        'simpleScopeTerm': {\n                            'key': 'OBJECT_KEY',\n                            'comparator': 'STARTS_WITH',\n                            'values': [prefix]\n                        }\n                    }]\n                }\n            }\n        },\n        managedDataIdentifierSelector='ALL'\n    )\n\n    return job_response['jobId']\n\ndef check_scan_results(job_id):\n    \"\"\"Check if DLP scan found sensitive data.\"\"\"\n    response = macie_client.list_findings(\n        findingCriteria={\n            'criterion': {\n                'classificationDetails.jobId': {'eq': [job_id]},\n                'severity.description': {'eq': ['High', 'Critical']}\n            }\n        }\n    )\n    return len(response.get('findingIds', [])) > 0\n\ndef gate_decision(bucket, prefix):\n    \"\"\"DLP gate: block pipeline if sensitive data found.\"\"\"\n    job_id = scan_pipeline_output(bucket, prefix)\n    has_sensitive_data = check_scan_results(job_id)\n\n    if has_sensitive_data:\n        return {\n            'decision': 'BLOCK',\n            'reason': 'Sensitive data detected in pipeline output',\n            'action': 'Apply de-identification before promoting to production'\n        }\n    return {'decision': 'ALLOW', 'reason': 'No sensitive data detected'}\n```\n\n### Step 6: Monitor DLP Findings and Generate Reports\n\nAggregate DLP findings across cloud providers and generate compliance reports.\n\n```bash\n# Macie: Get finding statistics\naws macie2 get-finding-statistics \\\n  --group-by \"severity.description\" \\\n  --finding-criteria '{\"criterion\":{\"category\":{\"eq\":[\"CLASSIFICATION\"]}}}'\n\n# Macie: List findings by sensitivity type\naws macie2 list-findings \\\n  --finding-criteria '{\n    \"criterion\": {\n      \"classificationDetails.result.sensitiveData.category\": {\"eq\": [\"PERSONAL_INFORMATION\"]},\n      \"severity.description\": {\"eq\": [\"High\"]}\n    }\n  }' \\\n  --sort-criteria '{\"attributeName\": \"updatedAt\", \"orderBy\": \"DESC\"}'\n\n# GCP DLP: List job results\ngcloud dlp jobs list --project=PROJECT_ID --filter=\"state=DONE\" \\\n  --format=\"table(name, createTime, inspectDetails.result.processedBytes, inspectDetails.result.totalEstimatedTransformations)\"\n\n# Export Macie findings to S3 for compliance reporting\naws macie2 create-findings-report \\\n  --finding-criteria '{\"criterion\":{\"category\":{\"eq\":[\"CLASSIFICATION\"]}}}' \\\n  --sort-criteria '{\"attributeName\":\"severity.score\",\"orderBy\":\"DESC\"}'\n```\n\n## Key Concepts\n\n| Term | Definition |\n|------|------------|\n| Data Loss Prevention | Security controls and technologies that detect and prevent unauthorized disclosure of sensitive data from cloud environments |\n| Amazon Macie | AWS service using machine learning to discover, classify, and protect sensitive data stored in S3 buckets |\n| Google Cloud DLP | GCP API for inspecting, classifying, and de-identifying sensitive data across Cloud Storage, BigQuery, and Datastore |\n| Data De-identification | Transforming sensitive data using masking, tokenization, encryption, or redaction to remove identifying characteristics while preserving utility |\n| Sensitivity Label | Classification tag applied to data (Confidential, Highly Confidential) that triggers DLP policy enforcement and access controls |\n| Custom Data Identifier | Organization-specific pattern (regex or keyword) added to DLP services to detect proprietary sensitive data formats |\n\n## Tools & Systems\n\n- **Amazon Macie**: ML-powered sensitive data discovery and classification for S3 with automated finding generation\n- **Google Cloud DLP API**: Programmable API for inspecting, classifying, de-identifying, and redacting sensitive data\n- **Microsoft Purview**: Data governance platform with sensitivity labeling, auto-classification, and DLP policy enforcement\n- **Azure Information Protection**: Data classification and labeling service integrated with Microsoft 365 and Azure storage\n- **Nightfall AI**: Third-party cloud DLP tool supporting scanning across SaaS applications and cloud infrastructure\n\n## Common Scenarios\n\n### Scenario: Discovering PII in an Unprotected S3 Data Lake\n\n**Context**: A compliance audit reveals that the analytics team's S3 data lake contains customer PII (names, emails, SSNs) in CSV files without encryption or access controls. The organization must classify all data and implement DLP controls.\n\n**Approach**:\n1. Enable Macie and create a one-time classification job against the data lake bucket\n2. Review Macie findings to identify which objects contain PII and what types\n3. Create custom data identifiers for organization-specific formats (employee IDs, account numbers)\n4. Implement a weekly scheduled Macie job for ongoing discovery\n5. Build a data pipeline gate that scans new data before promotion to the data lake\n6. Apply de-identification transforms (masking SSNs, tokenizing emails) for analytics use cases\n7. Configure S3 bucket policies to restrict access to classified data to authorized roles only\n\n**Pitfalls**: Macie charges per GB scanned. Large data lakes can generate significant costs. Use scoping rules to focus on high-risk object types (CSV, JSON, Parquet) and exclude known-safe formats (compressed archives, binary files). De-identification must preserve data utility for analytics while removing re-identification risk.\n\n## Output Format\n\n```\nCloud DLP Compliance Report\n==============================\nOrganization: Acme Corp\nScan Period: 2026-02-01 to 2026-02-23\nEnvironments: AWS (12 buckets), GCP (3 datasets), Azure (5 storage accounts)\n\nDATA DISCOVERY SUMMARY:\n  Total objects\u002Frecords scanned:    2,847,000\n  Objects with sensitive data:        45,200 (1.6%)\n  Unique sensitivity categories:      8\n\nSENSITIVE DATA FINDINGS:\n  PII (names, emails, phone):       23,400 objects\n  Financial (credit cards, bank):     8,700 objects\n  Health (PHI, medical records):      3,200 objects\n  Credentials (API keys, tokens):     1,400 objects\n  Government ID (SSN, passport):      5,800 objects\n  Custom (employee ID, account):      2,700 objects\n\nFINDINGS BY SEVERITY:\n  Critical:    1,400 (exposed credentials)\n  High:       14,200 (unprotected PII\u002FPHI)\n  Medium:     18,600 (standard PII)\n  Low:        11,000 (non-sensitive patterns)\n\nPROTECTION STATUS:\n  Data with encryption at rest:       78%\n  Data with access controls:          65%\n  Data with sensitivity labels:       12%\n  Pipeline data with DLP gates:       30%\n\nREMEDIATION ACTIONS:\n  Objects quarantined:                1,400\n  De-identification applied:          8,200\n  Access controls tightened:         14,200\n  Sensitivity labels applied:        45,200\n```\n","# Implementing Cloud DLP for Data Protection\n\n## When to Use\n\n- When compliance frameworks (GDPR, HIPAA, PCI DSS) require automated sensitive data discovery and protection\n- When building data governance programs that classify and label data across cloud storage\n- When implementing data loss prevention controls for cloud-based data pipelines\n- When auditing cloud environments for unprotected sensitive data (PII, PHI, financial data)\n- When integrating DLP scanning into CI\u002FCD pipelines to prevent sensitive data from reaching production\n\n**Do not use** for endpoint DLP (use Microsoft Purview or Symantec DLP agents), for email DLP (use Microsoft 365 DLP or Google Workspace DLP), or for network-level data exfiltration prevention (use VPC endpoint policies and network firewalls).\n\n## Prerequisites\n\n- Amazon Macie enabled with appropriate S3 bucket permissions\n- Google Cloud DLP API enabled (`gcloud services enable dlp.googleapis.com`)\n- Azure Information Protection or Microsoft Purview configured\n- IAM permissions for DLP service administration and data access\n- Knowledge of data sensitivity categories relevant to the organization (PII, PHI, PCI, proprietary)\n\n## Workflow\n\n### Step 1: Deploy Amazon Macie for S3 Data Discovery\n\nEnable Macie and configure automated sensitive data discovery jobs for S3 buckets.\n\n```bash\n# Enable Amazon Macie\naws macie2 enable-macie\n\n# List all S3 buckets Macie can scan\naws macie2 describe-buckets \\\n  --query 'buckets[*].[bucketName,classifiableSizeInBytes,unclassifiableObjectCount.total]' \\\n  --output table\n\n# Create a classification job for specific buckets\naws macie2 create-classification-job \\\n  --job-type SCHEDULED \\\n  --name \"weekly-pii-scan\" \\\n  --schedule-frequency-details '{\"weekly\":{\"dayOfWeek\":\"MONDAY\"}}' \\\n  --s3-job-definition '{\n    \"bucketDefinitions\": [{\n      \"accountId\": \"ACCOUNT_ID\",\n      \"buckets\": [\"customer-data-bucket\", \"analytics-data-lake\", \"backup-bucket\"]\n    }],\n    \"scoping\": {\n      \"includes\": {\n        \"and\": [{\n          \"simpleScopeTerm\": {\n            \"key\": \"OBJECT_EXTENSION\",\n            \"values\": [\"csv\", \"json\", \"parquet\", \"txt\", \"xlsx\"],\n            \"comparator\": \"EQ\"\n          }\n        }]\n      }\n    }\n  }' \\\n  --managed-data-identifier-ids '[\"SSN\",\"CREDIT_CARD_NUMBER\",\"EMAIL_ADDRESS\",\"AWS_CREDENTIALS\",\"PHONE_NUMBER\"]'\n\n# Create custom data identifier for internal employee IDs\naws macie2 create-custom-data-identifier \\\n  --name \"EmployeeID\" \\\n  --regex \"EMP-[0-9]{6}\" \\\n  --description \"Internal employee ID format\"\n\n# Check job status and results\naws macie2 list-classification-jobs \\\n  --query 'items[*].[name,jobStatus,statistics.approximateNumberOfObjectsToProcess]' \\\n  --output table\n```\n\n### Step 2: Configure Google Cloud DLP API for Data Inspection\n\nUse Google Cloud DLP to inspect and de-identify sensitive data across GCP resources.\n\n```bash\n# Inspect a Cloud Storage bucket for sensitive data\ngcloud dlp inspect-content \\\n  --content-type=TEXT_PLAIN \\\n  --min-likelihood=LIKELY \\\n  --info-types=PHONE_NUMBER,EMAIL_ADDRESS,CREDIT_CARD_NUMBER,US_SOCIAL_SECURITY_NUMBER \\\n  --storage-type=CLOUD_STORAGE \\\n  --gcs-uri=\"gs:\u002F\u002Fsensitive-data-bucket\u002Fdata\u002F*.csv\"\n\n# Create an inspection job for BigQuery\ncat > dlp-job.json \u003C\u003C 'EOF'\n{\n  \"inspectJob\": {\n    \"storageConfig\": {\n      \"bigQueryOptions\": {\n        \"tableReference\": {\n          \"projectId\": \"PROJECT_ID\",\n          \"datasetId\": \"customer_data\",\n          \"tableId\": \"transactions\"\n        },\n        \"sampleMethod\": \"RANDOM_START\",\n        \"rowsLimit\": 10000\n      }\n    },\n    \"inspectConfig\": {\n      \"infoTypes\": [\n        {\"name\": \"CREDIT_CARD_NUMBER\"},\n        {\"name\": \"US_SOCIAL_SECURITY_NUMBER\"},\n        {\"name\": \"EMAIL_ADDRESS\"},\n        {\"name\": \"PHONE_NUMBER\"},\n        {\"name\": \"PERSON_NAME\"}\n      ],\n      \"minLikelihood\": \"LIKELY\",\n      \"limits\": {\"maxFindingsPerRequest\": 1000}\n    },\n    \"actions\": [{\n      \"saveFindings\": {\n        \"outputConfig\": {\n          \"table\": {\n            \"projectId\": \"PROJECT_ID\",\n            \"datasetId\": \"dlp_results\",\n            \"tableId\": \"findings\"\n          }\n        }\n      }\n    }]\n  }\n}\nEOF\n\ngcloud dlp jobs create --project=PROJECT_ID --body-from-file=dlp-job.json\n```\n\n### Step 3: Implement Data De-identification with Cloud DLP\n\nConfigure de-identification transforms to mask, tokenize, or redact sensitive data.\n\n```python\n# deidentify_pipeline.py - De-identify sensitive data using Google Cloud DLP\nfrom google.cloud import dlp_v2\n\ndef deidentify_data(project_id, text):\n    \"\"\"De-identify PII in text using Cloud DLP.\"\"\"\n    client = dlp_v2.DlpServiceClient()\n\n    inspect_config = {\n        \"info_types\": [\n            {\"name\": \"EMAIL_ADDRESS\"},\n            {\"name\": \"PHONE_NUMBER\"},\n            {\"name\": \"CREDIT_CARD_NUMBER\"},\n            {\"name\": \"US_SOCIAL_SECURITY_NUMBER\"},\n        ],\n        \"min_likelihood\": dlp_v2.Likelihood.LIKELY,\n    }\n\n    deidentify_config = {\n        \"info_type_transformations\": {\n            \"transformations\": [\n                {\n                    \"info_types\": [{\"name\": \"EMAIL_ADDRESS\"}],\n                    \"primitive_transformation\": {\n                        \"character_mask_config\": {\n                            \"masking_character\": \"*\",\n                            \"number_to_mask\": 0,\n                            \"characters_to_ignore\": [\n                                {\"common_characters_to_ignore\": \"PUNCTUATION\"}\n                            ],\n                        }\n                    },\n                },\n                {\n                    \"info_types\": [{\"name\": \"CREDIT_CARD_NUMBER\"}],\n                    \"primitive_transformation\": {\n                        \"crypto_replace_ffx_fpe_config\": {\n                            \"crypto_key\": {\n                                \"kms_wrapped\": {\n                                    \"wrapped_key\": \"WRAPPED_KEY_BASE64\",\n                                    \"crypto_key_name\": \"projects\u002FPROJECT\u002Flocations\u002Fglobal\u002FkeyRings\u002Fdlp\u002FcryptoKeys\u002Ftokenization\",\n                                }\n                            },\n                            \"common_alphabet\": \"NUMERIC\",\n                        }\n                    },\n                },\n                {\n                    \"info_types\": [{\"name\": \"US_SOCIAL_SECURITY_NUMBER\"}],\n                    \"primitive_transformation\": {\n                        \"redact_config\": {}\n                    },\n                },\n            ]\n        }\n    }\n\n    item = {\"value\": text}\n    parent = f\"projects\u002F{project_id}\u002Flocations\u002Fglobal\"\n\n    response = client.deidentify_content(\n        request={\n            \"parent\": parent,\n            \"deidentify_config\": deidentify_config,\n            \"inspect_config\": inspect_config,\n            \"item\": item,\n        }\n    )\n    return response.item.value\n```\n\n### Step 4: Configure Azure Information Protection\n\nSet up sensitivity labels and DLP policies in Microsoft Purview for Azure resources.\n\n```powershell\n# Connect to Microsoft Purview compliance\nConnect-IPPSSession\n\n# Create sensitivity labels\nNew-Label -DisplayName \"Confidential - PII\" \\\n  -Name \"Confidential-PII\" \\\n  -Tooltip \"Contains personally identifiable information\" \\\n  -ContentType \"File, Email\"\n\nNew-Label -DisplayName \"Highly Confidential - Financial\" \\\n  -Name \"HighlyConfidential-Financial\" \\\n  -Tooltip \"Contains financial data subject to PCI DSS\" \\\n  -ContentType \"File, Email\"\n\n# Create auto-labeling policy for Azure Storage\nNew-AutoSensitivityLabelPolicy -Name \"Auto-Label-PII\" \\\n  -ExchangeLocation All \\\n  -SharePointLocation All \\\n  -OneDriveLocation All \\\n  -Mode Enable\n\nNew-AutoSensitivityLabelRule -Policy \"Auto-Label-PII\" \\\n  -Name \"Detect-SSN\" \\\n  -ContentContainsSensitiveInformation @{\n    Name = \"U.S. Social Security Number (SSN)\";\n    MinCount = 1;\n    MinConfidence = 85\n  } \\\n  -ApplySensitivityLabel \"Confidential-PII\"\n```\n\n```bash\n# Azure: Configure DLP policy for Storage accounts\naz security assessment create \\\n  --name \"storage-sensitive-data\" \\\n  --assessed-resource-type \"Microsoft.Storage\u002FstorageAccounts\"\n\n# Enable Microsoft Defender for Storage with sensitive data threat detection\naz security pricing create --name StorageAccounts --tier standard \\\n  --subplan DefenderForStorageV2 \\\n  --extensions '[{\"name\":\"SensitiveDataDiscovery\",\"isEnabled\":\"True\"}]'\n```\n\n### Step 5: Integrate DLP into Data Pipelines\n\nAdd DLP scanning to ETL and data pipeline workflows to prevent sensitive data leakage.\n\n```python\n# pipeline_dlp_gate.py - DLP gate for data pipelines\nimport boto3\nimport json\n\nmacie_client = boto3.client('macie2')\ns3_client = boto3.client('s3')\n\ndef scan_pipeline_output(bucket, prefix):\n    \"\"\"Scan pipeline output data for sensitive content before promotion.\"\"\"\n    job_response = macie_client.create_classification_job(\n        jobType='ONE_TIME',\n        name=f'pipeline-scan-{prefix}',\n        s3JobDefinition={\n            'bucketDefinitions': [{\n                'accountId': boto3.client('sts').get_caller_identity()['Account'],\n                'buckets': [bucket]\n            }],\n            'scoping': {\n                'includes': {\n                    'and': [{\n                        'simpleScopeTerm': {\n                            'key': 'OBJECT_KEY',\n                            'comparator': 'STARTS_WITH',\n                            'values': [prefix]\n                        }\n                    }]\n                }\n            }\n        },\n        managedDataIdentifierSelector='ALL'\n    )\n\n    return job_response['jobId']\n\ndef check_scan_results(job_id):\n    \"\"\"Check if DLP scan found sensitive data.\"\"\"\n    response = macie_client.list_findings(\n        findingCriteria={\n            'criterion': {\n                'classificationDetails.jobId': {'eq': [job_id]},\n                'severity.description': {'eq': ['High', 'Critical']}\n            }\n        }\n    )\n    return len(response.get('findingIds', [])) > 0\n\ndef gate_decision(bucket, prefix):\n    \"\"\"DLP gate: block pipeline if sensitive data found.\"\"\"\n    job_id = scan_pipeline_output(bucket, prefix)\n    has_sensitive_data = check_scan_results(job_id)\n\n    if has_sensitive_data:\n        return {\n            'decision': 'BLOCK',\n            'reason': 'Sensitive data detected in pipeline output',\n            'action': 'Apply de-identification before promoting to production'\n        }\n    return {'decision': 'ALLOW', 'reason': 'No sensitive data detected'}\n```\n\n### Step 6: Monitor DLP Findings and Generate Reports\n\nAggregate DLP findings across cloud providers and generate compliance reports.\n\n```bash\n# Macie: Get finding statistics\naws macie2 get-finding-statistics \\\n  --group-by \"severity.description\" \\\n  --finding-criteria '{\"criterion\":{\"category\":{\"eq\":[\"CLASSIFICATION\"]}}}'\n\n# Macie: List findings by sensitivity type\naws macie2 list-findings \\\n  --finding-criteria '{\n    \"criterion\": {\n      \"classificationDetails.result.sensitiveData.category\": {\"eq\": [\"PERSONAL_INFORMATION\"]},\n      \"severity.description\": {\"eq\": [\"High\"]}\n    }\n  }' \\\n  --sort-criteria '{\"attributeName\": \"updatedAt\", \"orderBy\": \"DESC\"}'\n\n# GCP DLP: List job results\ngcloud dlp jobs list --project=PROJECT_ID --filter=\"state=DONE\" \\\n  --format=\"table(name, createTime, inspectDetails.result.processedBytes, inspectDetails.result.totalEstimatedTransformations)\"\n\n# Export Macie findings to S3 for compliance reporting\naws macie2 create-findings-report \\\n  --finding-criteria '{\"criterion\":{\"category\":{\"eq\":[\"CLASSIFICATION\"]}}}' \\\n  --sort-criteria '{\"attributeName\":\"severity.score\",\"orderBy\":\"DESC\"}'\n```\n\n## Key Concepts\n\n| Term | Definition |\n|------|------------|\n| Data Loss Prevention | Security controls and technologies that detect and prevent unauthorized disclosure of sensitive data from cloud environments |\n| Amazon Macie | AWS service using machine learning to discover, classify, and protect sensitive data stored in S3 buckets |\n| Google Cloud DLP | GCP API for inspecting, classifying, and de-identifying sensitive data across Cloud Storage, BigQuery, and Datastore |\n| Data De-identification | Transforming sensitive data using masking, tokenization, encryption, or redaction to remove identifying characteristics while preserving utility |\n| Sensitivity Label | Classification tag applied to data (Confidential, Highly Confidential) that triggers DLP policy enforcement and access controls |\n| Custom Data Identifier | Organization-specific pattern (regex or keyword) added to DLP services to detect proprietary sensitive data formats |\n\n## Tools & Systems\n\n- **Amazon Macie**: ML-powered sensitive data discovery and classification for S3 with automated finding generation\n- **Google Cloud DLP API**: Programmable API for inspecting, classifying, de-identifying, and redacting sensitive data\n- **Microsoft Purview**: Data governance platform with sensitivity labeling, auto-classification, and DLP policy enforcement\n- **Azure Information Protection**: Data classification and labeling service integrated with Microsoft 365 and Azure storage\n- **Nightfall AI**: Third-party cloud DLP tool supporting scanning across SaaS applications and cloud infrastructure\n\n## Common Scenarios\n\n### Scenario: Discovering PII in an Unprotected S3 Data Lake\n\n**Context**: A compliance audit reveals that the analytics team's S3 data lake contains customer PII (names, emails, SSNs) in CSV files without encryption or access controls. The organization must classify all data and implement DLP controls.\n\n**Approach**:\n1. Enable Macie and create a one-time classification job against the data lake bucket\n2. Review Macie findings to identify which objects contain PII and what types\n3. Create custom data identifiers for organization-specific formats (employee IDs, account numbers)\n4. Implement a weekly scheduled Macie job for ongoing discovery\n5. Build a data pipeline gate that scans new data before promotion to the data lake\n6. Apply de-identification transforms (masking SSNs, tokenizing emails) for analytics use cases\n7. Configure S3 bucket policies to restrict access to classified data to authorized roles only\n\n**Pitfalls**: Macie charges per GB scanned. Large data lakes can generate significant costs. Use scoping rules to focus on high-risk object types (CSV, JSON, Parquet) and exclude known-safe formats (compressed archives, binary files). De-identification must preserve data utility for analytics while removing re-identification risk.\n\n## Output Format\n\n```\nCloud DLP Compliance Report\n==============================\nOrganization: Acme Corp\nScan Period: 2026-02-01 to 2026-02-23\nEnvironments: AWS (12 buckets), GCP (3 datasets), Azure (5 storage accounts)\n\nDATA DISCOVERY SUMMARY:\n  Total objects\u002Frecords scanned:    2,847,000\n  Objects with sensitive data:        45,200 (1.6%)\n  Unique sensitivity categories:      8\n\nSENSITIVE DATA FINDINGS:\n  PII (names, emails, phone):       23,400 objects\n  Financial (credit cards, bank):     8,700 objects\n  Health (PHI, medical records):      3,200 objects\n  Credentials (API keys, tokens):     1,400 objects\n  Government ID (SSN, passport):      5,800 objects\n  Custom (employee ID, account):      2,700 objects\n\nFINDINGS BY SEVERITY:\n  Critical:    1,400 (exposed credentials)\n  High:       14,200 (unprotected PII\u002FPHI)\n  Medium:     18,600 (standard PII)\n  Low:        11,000 (non-sensitive patterns)\n\nPROTECTION STATUS:\n  Data with encryption at rest:       78%\n  Data with access controls:          65%\n  Data with sensitivity labels:       12%\n  Pipeline data with DLP gates:       30%\n\nREMEDIATION ACTIONS:\n  Objects quarantined:                1,400\n  De-identification applied:          8,200\n  Access controls tightened:         14,200\n  Sensitivity labels applied:        45,200\n```\n",{"name":5,"tags":25,"author":32,"domain":33,"license":15,"version":34,"subdomain":26,"description":35},[26,27,28,29,30,31],"cloud-security","dlp","data-protection","macie","data-classification","privacy","mahipal","cybersecurity","1.0","Implementing Cloud Data Loss Prevention (DLP) using Amazon Macie, Azure Information Protection, and Google Cloud DLP API to discover, classify, and protect sensitive data across cloud storage, databases, and data pipelines.\n","main","99825ad3f3bcc6597ddcc7294a14e6e922f2b67b","skills\u002Fimplementing-cloud-dlp-for-data-protection",0,"https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills","https:\u002F\u002Fgithub.com\u002Fjukeyman","https:\u002F\u002FRJBUSINESSSOLUTIONS.ORG","Credit and Finance Expert | Developer\r\n\r\nI'm Rick Jefferson, a seasoned credit and finance expert with over a decade of experience in financial literacy,","2026-07-13 07:03:29",{"source":8,"skillName":5,"commands":46,"prompt":56,"zipAvailable":57},[47,50,53],{"tool":48,"command":49},"npx","npx skills add jukeyman\u002Fjukeyman-skills --skill implementing-cloud-dlp-for-data-protection",{"tool":51,"command":52},"bunx","bunx skills add jukeyman\u002Fjukeyman-skills --skill implementing-cloud-dlp-for-data-protection",{"tool":54,"command":55},"pnpm","pnpm dlx skills add jukeyman\u002Fjukeyman-skills --skill implementing-cloud-dlp-for-data-protection","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fimplementing-cloud-dlp-for-data-protection\u002FSKILL.md",true,[59,63,69],{"path":60,"resourceType":60,"resourceTypeDesc":61,"sizeBytes":62,"sourceHtmlUrl":16},"LICENSE","许可证",11255,{"path":64,"resourceType":65,"resourceTypeDesc":66,"sizeBytes":67,"sourceHtmlUrl":68},"references\u002Fapi-reference.md","REFERENCE","参考文档",2179,"https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fimplementing-cloud-dlp-for-data-protection\u002Freferences\u002Fapi-reference.md",{"path":70,"resourceType":71,"resourceTypeDesc":72,"sizeBytes":73,"sourceHtmlUrl":74},"scripts\u002Fagent.py","SCRIPT","脚本",7377,"https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fimplementing-cloud-dlp-for-data-protection\u002Fscripts\u002Fagent.py",[76,84,91,98,105,113],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":80,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":20},"01M79ANS2SM329NEP5ZCX106RR","zustand-store-creator","Create zustand store creator operations. Auto-activating skill for Frontend Development.\nTriggers on: zustand store creator, zustand store creator\nPart of the Frontend Development skill category. Use when working with zustand store creator functionality. Trigger with phrases like \"zustand store creator\", \"zustand creator\", \"zustand\".","MIT","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzustand-store-creator\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":80,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":20},"01M79AMZKP4YDEZ7EHG1Y7PP74","zero-trust-config-helper","Configure with zero trust config helper operations. Auto-activating skill for Security Advanced.\nTriggers on: zero trust config helper, zero trust config helper\nPart of the Security Advanced skill category. Use when configuring systems or services. Trigger with phrases like \"zero trust config helper\", \"zero helper\", \"zero\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzero-trust-config-helper\u002FSKILL.md",[],[],{"skillNo":92,"name":93,"nameZh":6,"description":94,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":80,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":20},"01M79AMJSBCEJQNBTYNAHYN5HM","zapier-integration-helper","Assist with zapier integration helper operations. Auto-activating skill for Business Automation.\nTriggers on: zapier integration helper, zapier integration helper\nPart of the Business Automation skill category. Use when working with APIs or building integrations. Trigger with phrases like \"zapier integration helper\", \"zapier helper\", \"zapier\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzapier-integration-helper\u002FSKILL.md",[],[],{"skillNo":99,"name":100,"nameZh":6,"description":101,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":80,"licenseFileUrl":6,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":20},"01M79AHJZGVMARS13VFQYRR1MP","yaml-config-validator","Validate yaml config validator operations. Auto-activating skill for DevOps Basics.\nTriggers on: yaml config validator, yaml config validator\nPart of the DevOps Basics skill category. Use when configuring systems or services. Trigger with phrases like \"yaml config validator\", \"yaml validator\", \"yaml\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fyaml-config-validator\u002FSKILL.md",[],[],{"skillNo":106,"name":107,"nameZh":6,"description":108,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":80,"licenseFileUrl":109,"sourceHtmlUrl":110,"categories":111,"keywords":112,"publishedAt":20},"01M79AHGDZRN0020RDQSQDPAM8","xvary-stock-research","Thesis-driven equity analysis from public SEC EDGAR and market data; \u002Fanalyze, \u002Fscore, \u002Fcompare workflows with bundled Python tools (Claude Code, Cursor, Codex).","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fxvary-stock-research\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fxvary-stock-research\u002FSKILL.md",[],[],{"skillNo":114,"name":115,"nameZh":6,"description":116,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":80,"licenseFileUrl":6,"sourceHtmlUrl":117,"categories":118,"keywords":119,"publishedAt":20},"01M79AHCYJ9FV9RMHQ24HDRN33","xss-vulnerability-scanner","Scan xss vulnerability scanner operations. Auto-activating skill for Security Fundamentals.\nTriggers on: xss vulnerability scanner, xss vulnerability scanner\nPart of the Security Fundamentals skill category. Use when working with xss vulnerability scanner functionality. Trigger with phrases like \"xss vulnerability scanner\", \"xss scanner\", \"xss\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fxss-vulnerability-scanner\u002FSKILL.md",[],[]]