Перейти к содержанию
Skillpedia
Безопасность35k · #8365

securing-aws-iam-permissions

Что он делает

Этот инструмент помогает сделать права доступа в вашем облаке AWS более безопасными. Он проверяет и корректирует, кто к чему может обращаться, и следит за тем, чтобы у каждого человека или сервиса были только те права, которые действительно нужны для работы.

Когда использовать

  • ✓Когда вы настраиваете новые учетные записи или сервисы AWS.
  • ✓Когда вы подозреваете, что текущие права слишком широкие.
  • ✓Перед аудитом безопасности, чтобы подтвердить, что права ограничены.

Ссылка на скилл

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/securing-aws-iam-permissions/SKILL.md

Скопируйте и вставьте её в ваш ИИ (Claude, ChatGPT или Cursor) с просьбой следовать инструкциям.

Как использовать

Самый простой способ: скопируйте сообщение и вставьте его в свой ИИ. Он прочитает скилл и выполнит инструкции.

Готовое сообщение для вставки

Используй этот скилл, чтобы помочь мне: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/securing-aws-iam-permissions/SKILL.md Прочитай файл SKILL.md по этой ссылке и следуй его инструкциям в моей задаче.
Хотите, чтобы ваш ИИ сам находил такие скиллы?Установите бесплатный MCP Skillpedia: одна строка, и перед каждой задачей он ищет среди 15 000+ скиллов.Установить за 1 минуту →

Пример запроса к вашему ИИ

“Настрой мои права в AWS так, чтобы разрешалось только необходимое.”

5 новых скиллов в неделю. 1 минута чтения.

Как это работает

Инструмент анализирует ваши текущие права, находит лишний или избыточный доступ и предлагает или применяет более строгие политики. Он также помогает настроить дополнительные механизмы защиты, например границы разрешений и многофакторную аутентификацию.

Технический текст (оригинальный SKILL.md)

Оригинальный текст автора на английском, прямо с GitHub.

Securing AWS IAM Permissions

When to Use

  • When onboarding new AWS accounts or workloads that require scoped IAM policies
  • When IAM Access Analyzer reports overly permissive policies or unused permissions
  • When preparing for a compliance audit requiring least privilege evidence (SOC 2, PCI-DSS)
  • When migrating from long-lived access keys to short-lived role-based credentials
  • When remediating findings from AWS Security Hub related to IAM misconfigurations

Do not use for Azure AD or Google Cloud IAM configurations, application-level authorization logic, or federated identity provider setup (see managing-cloud-identity-with-okta).

Prerequisites

  • AWS account with administrative access or IAM:FullAccess permissions
  • AWS CLI v2 installed and configured with named profiles
  • AWS CloudTrail enabled for at least 90 days of API activity history
  • Familiarity with JSON-based IAM policy syntax and ARN resource notation

Workflow

Step 1: Inventory Existing IAM Entities and Policies

Generate a comprehensive inventory of all IAM users, roles, groups, and attached policies using the AWS CLI and IAM credential reports. Identify accounts with console access, programmatic access keys, and their last-used timestamps.

# Generate IAM credential report
aws iam generate-credential-report
aws iam get-credential-report --query 'Content' --output text | base64 -d > iam-report.csv

# List all IAM roles and their attached policies
aws iam list-roles --query 'Roles[*].[RoleName,Arn,CreateDate]' --output table

# Find users with access keys older than 90 days
aws iam list-users --query 'Users[*].UserName' --output text | while read user; do
  aws iam list-access-keys --user-name "$user" \
    --query "AccessKeyMetadata[?CreateDate<='$(date -d '-90 days' +%Y-%m-%d)'].[UserName,AccessKeyId,Status,CreateDate]" \
    --output table
done

Step 2: Enable and Analyze IAM Access Analyzer Findings

Activate IAM Access Analyzer at the organization or account level to identify resources shared externally and generate least-privilege policy recommendations based on CloudTrail activity.

# Create an Access Analyzer for the account
aws accessanalyzer create-analyzer \
  --analyzer-name account-analyzer \
  --type ACCOUNT

# List active findings for external access
aws accessanalyzer list-findings \
  --analyzer-arn arn:aws:access-analyzer:us-east-1:123456789012:analyzer/account-analyzer \
  --filter '{"status": {"eq": ["ACTIVE"]}}'

# Generate a policy based on CloudTrail activity for a specific role
aws accessanalyzer start-policy-generation \
  --policy-generation-details '{
    "principalArn": "arn:aws:iam::123456789012:role/AppRole",
    "cloudTrailDetails": {
      "trailArn": "arn:aws:cloudtrail:us-east-1:123456789012:trail/management-trail",
      "startTime": "2025-01-01T00:00:00Z",
      "endTime": "2025-03-01T00:00:00Z"
    }
  }'

Step 3: Scope Policies to Specific Resources and Conditions

Replace wildcard resource ARNs with specific resource identifiers. Add IAM policy conditions for MFA enforcement, source IP restrictions, and time-based access windows.

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "AllowS3ReadSpecificBucket",
      "Effect": "Allow",
      "Action": [
        "s3:GetObject",
        "s3:ListBucket"
      ],
      "Resource": [
        "arn:aws:s3:::production-data-bucket",
        "arn:aws:s3:::production-data-bucket/*"
      ],
      "Condition": {
        "Bool": {"aws:MultiFactorAuthPresent": "true"},
        "IpAddress": {"aws:SourceIp": "10.0.0.0/8"},
        "DateGreaterThan": {"aws:CurrentTime": "2025-01-01T00:00:00Z"}
      }
    }
  ]
}

Step 4: Implement Permission Boundaries

Attach permission boundaries to IAM roles and users to define the maximum scope of permissions an entity can receive, preventing privilege escalation even if an administrator attaches an overly permissive policy.

# Create a permission boundary policy
aws iam create-policy \
  --policy-name DeveloperPermissionBoundary \
  --policy-document file://developer-boundary.json

# Attach the boundary to an IAM role
aws iam put-role-permissions-boundary \
  --role-name DeveloperRole \
  --permissions-boundary "arn:aws:iam::123456789012:policy/DeveloperPermissionBoundary"
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "AllowCommonServices",
      "Effect": "Allow",
      "Action": [
        "s3:*",

…
Частые вопросы

Что такое принцип наименьших привилегий?

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

Что такое границы разрешений (permission boundaries)?

Это правила, которые определяют максимальный объем прав, которые может получить пользователь или сервис. Даже если другая политика выдает больше прав, это ограничение все равно соблюдается.

Нужно ли уметь программировать, чтобы пользоваться этим инструментом?

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

Подробности

Оригинальное описание автора

Hardens AWS IAM configurations to enforce least-privilege access, covering IAM policy scoping, permission boundaries, IAM Access Analyzer integration, and credential rotation strategies. Use when reducing the blast radius of compromised AWS identities, auditing overly permissive IAM policies, or setting up permission boundaries and Access Analyzer findings review across cloud accounts. '

repo: mukul975/Anthropic-Cybersecurity-Skills

Популярность

Звёзды на GitHub
35k
Место в рейтинге
#8365
Лицензия
Apache-2.0
Обновлён
31.08.2026

Полезен ли этот скилл?

0

Войдите , чтобы голосовать.

Комментарии

  • …

Другие скиллы из этого репозитория

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