Command Palette

Search for a command to run...

Назад к скиллам
скилл № 86895

cloud-native-security-defensive

Use when the user asks to harden an AWS account or Azure tenant, write SCP guardrails, CloudTrail or GuardDuty detections, enforce IMDSv2, apply…

БесплатноБез исполняемых скриптов
j4flmaoот j4flmao★ 47 звёзд на GitHub

Установить cloud-native-security-defensive в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

Cloud Security — Defensive Engineering

Purpose

Turn a cloud estate into one where dangerous actions are prevented by organization-level guardrails, everything else is logged centrally and immutably, and anomalous identity activity is detected quickly. Identity is the perimeter in cloud, so most controls are IAM controls.

Agent Protocol

Trigger

"harden aws account", "detect cloud intrusion", "cloudtrail", "SCP", "guardrails", "secure azure tenant", "cloud posture", "guardduty", "IMDSv2", "least privilege".

Input Context

  • Cloud(s) and org structure (AWS Organizations OUs, Azure management groups, GCP folders).
  • Existing logging destinations (SIEM, log archive account).
  • Compliance targets (CIS Benchmarks, SOC 2, ISO 27001).

Output Artifact

Policy-as-code (SCP/Azure Policy/Org Policy JSON or Terraform) and detection queries. No file unless requested.

Response Format

Layer: {preventive|detective|responsive}
Control: {name}
Scope: {org/OU/account/subscription/project}
Code: {policy or query}
Break-glass impact: {who is exempt and how}

Completion Criteria

  • Preventive guardrails applied at org/OU level with a documented break-glass exemption.
  • Org-wide audit logging to a separate, write-protected account/project.
  • Detections mapped to concrete log events.

Control Layers

Layer AWS Azure GCP
Org guardrails Service Control Policies, Resource Control Policies, declarative policies Azure Policy (deny), management-group RBAC Organization Policy constraints
Audit log CloudTrail organization trail (+ data events where needed) Activity Log + Microsoft Entra sign-in/audit logs via diagnostic settings Cloud Audit Logs (Admin Activity always on; Data Access opt-in)
Threat detection GuardDuty, Security Hub Microsoft Defender for Cloud, Sentinel Security Command Center
Unused access IAM Access Analyzer (unused access findings) Entra access reviews IAM Recommender

Preventive Guardrails (AWS SCP)

SCPs do not grant permissions; they cap what principals in member accounts can do. They never affect the management account.

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "ProtectAuditTrail",
      "Effect": "Deny",
      "Action": ["cloudtrail:StopLogging", "cloudtrail:DeleteTrail", "cloudtrail:UpdateTrail",
                 "guardduty:DeleteDetector", "guardduty:DisassociateFromMasterAccount",
                 "config:StopConfigurationRecorder", "config:DeleteConfigurationRecorder"],
      "Resource": "*",
      "Condition": { "ArnNotLike": { "aws:PrincipalArn": "arn:aws:iam::*:role/BreakGlassAdmin" } }
    },
    {
      "Sid": "RegionAllowList",
      "Effect": "Deny",
      "NotAction": ["iam:*", "organizations:*", "sts:*", "support:*", "cloudfront:*", "route53:*"],
      "Resource": "*",
      "Condition": { "StringNotEquals": { "aws:RequestedRegion": ["eu-west-1", "eu-central-1"] } }
    },
    {
      "Sid": "RequireIMDSv2",
      "Effect": "Deny",
      "Action": "ec2:RunInstances",
      "Resource": "arn:aws:ec2:*:*:instance/*",
      "Condition": { "StringNotEquals": { "ec2:MetadataHttpTokens": "required" } }
    }
  ]
}

Global services (IAM, Organizations, STS global endpoint, CloudFront, Route 53) must be excluded from region deny lists or they break.

Also enable at account level: S3 Block Public Access (account-wide), EBS encryption by default, and the EC2 account default HttpTokens=required for new instances.

Detective Controls — High-Signal Events

Signal Log event Why
Root user activity CloudTrail userIdentity.type = "Root" Root should be unused after setup
Console login without MFA ConsoleLogin with additionalEventData.MFAUsed = "No" Credential theft
Logging tampering StopLogging, DeleteTrail, PutEventSelectors Defense evasion
Persistence via IAM CreateAccessKey, CreateLoginProfile, AttachUserPolicy, PutRolePolicy, UpdateAssumeRolePolicy Backdoor creation
Enumeration burst Many List*/Describe*/Get* from one principal in minutes, especially AccessDenied Recon tooling (e.g. Pacu, ScoutSuite run by an attacker)
Credential exfil GuardDuty UnauthorizedAccess:IAMUser/InstanceCredentialExfiltration.OutsideAWS Stolen instance role creds used elsewhere

Example (CloudTrail Lake / Athena SQL):

SELECT eventTime, userIdentity.arn, sourceIPAddress, eventName
FROM cloudtrail_logs
WHERE eventName IN ('CreateAccessKey','CreateLoginProfile','AttachUserPolicy','PutUserPolicy')
  AND eventTime > now() - interval '1' day
ORDER BY eventTime DESC;

Least Privilege Workflow

  1. Start from AWS managed job-function policies only for humans; workloads get custom policies.
  2. Generate a policy from CloudTrail activity (IAM Access Analyzer policy generation) after a soak period.
  3. Remove unused roles, keys, and permissions using Access Analyzer unused-access fi
Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл cloud-native-security-defensive?

Use when the user asks to harden an AWS account or Azure tenant, write SCP guardrails, CloudTrail or GuardDuty detections, enforce IMDSv2, apply least-privilege IAM, or improve cloud posture. Produces preventive guardrails, detections and policy code for AWS/Azure/GCP. Not for cloud attack-path analysis (use cloud-native-security-offensive) or secret storage (use vault).

Как установить скилл cloud-native-security-defensive?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл cloud-native-security-defensive запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить cloud-native-security-defensive с