Skip to content
Skillpedia
Security35k · #5838

implementing-aws-security-hub-compliance

Teaches your AI agent to protect apps against attacks and ship projects and manage infrastructure.

What it does

This tool helps organize and monitor the security of your Amazon Web Services (AWS) cloud accounts. It gathers security information from different services and accounts, allowing you to see if everything complies with important rules like CIS and PCI DSS.

When to use it

  • ✓When you have multiple AWS accounts and want to see the security of all of them in one place.
  • ✓When you need to ensure your AWS accounts follow specific security rules (like CIS or PCI DSS).
  • ✓When you want to automate fixes for security issues that are found.

Example of what to ask your AI

“Set up centralized security monitoring for all my AWS accounts and show me compliance issues with the CIS standard.”

Want more? Open the sections below.

How to use

The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.

Skill link

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/implementing-aws-security-hub-compliance/SKILL.md

Ready-to-paste message

Use this skill to help me: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/implementing-aws-security-hub-compliance/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
How it works

It works by activating a service called Security Hub, which collects alerts from other security services. Then, it sets up rules to check if you are following security standards and can even trigger automatic actions to fix problems.

Installation

Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.

In the terminal (Claude Code, Codex, Cursor), in your project folder:

npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill implementing-aws-security-hub-compliance

Or download just the file:

curl -L https://raw.githubusercontent.com/mukul975/Anthropic-Cybersecurity-Skills/main/skills/implementing-aws-security-hub-compliance/SKILL.md -o SKILL.md
Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

Implementing AWS Security Hub Compliance

When to Use

  • When establishing centralized security posture management across multiple AWS accounts
  • When compliance requirements demand continuous monitoring against CIS, PCI DSS, or NIST 800-53 standards
  • When aggregating findings from GuardDuty, Inspector, Macie, Firewall Manager, and third-party tools
  • When building automated remediation workflows triggered by security findings
  • When executive stakeholders require a security compliance dashboard across the organization

Do not use for real-time threat detection (use GuardDuty), for vulnerability scanning (use Inspector), or for data classification (use Macie). Security Hub aggregates findings from these services but does not replace them.

Prerequisites

  • AWS Organizations with delegated administrator for Security Hub
  • IAM permissions for securityhub:*, config:*, events:*, and lambda:*
  • AWS Config enabled in all target accounts and regions (required by Security Hub)
  • CloudFormation StackSets or Terraform for multi-account deployment
  • SNS topics configured for alert routing to security team

Workflow

Step 1: Enable Security Hub with Compliance Standards

Enable Security Hub in the management account and select compliance standards to evaluate.

# Enable Security Hub in the current account/region
aws securityhub enable-security-hub \
  --enable-default-standards \
  --control-finding-generator SECURITY_CONTROL

# Enable specific compliance standards
aws securityhub batch-enable-standards --standards-subscription-requests \
  '[
    {"StandardsArn": "arn:aws:securityhub:us-east-1::standards/aws-foundational-security-best-practices/v/1.0.0"},
    {"StandardsArn": "arn:aws:securityhub:us-east-1::standards/cis-aws-foundations-benchmark/v/1.4.0"},
    {"StandardsArn": "arn:aws:securityhub:us-east-1::standards/pci-dss/v/3.2.1"},
    {"StandardsArn": "arn:aws:securityhub:us-east-1::standards/nist-800-53/v/5.0.0"}
  ]'

# Verify enabled standards
aws securityhub get-enabled-standards \
  --query 'StandardsSubscriptions[*].[StandardsArn,StandardsStatus]' --output table

Step 2: Configure Multi-Account Aggregation

Set up a delegated administrator and aggregate findings from all organization accounts.

# Designate a delegated admin (run from management account)
aws securityhub enable-organization-admin-account \
  --admin-account-id 111122223333

# From the delegated admin account, enable auto-enrollment
aws securityhub update-organization-configuration \
  --auto-enable \
  --auto-enable-standards DEFAULT

# Create a finding aggregator for cross-region aggregation
aws securityhub create-finding-aggregator \
  --region-linking-mode ALL_REGIONS

# List member accounts
aws securityhub list-members \
  --query 'Members[*].[AccountId,MemberStatus]' --output table

Step 3: Review Compliance Scores and Failed Controls

Query Security Hub for compliance posture across enabled standards and identify failing controls.

# Get overall compliance score for CIS benchmark
aws securityhub get-standards-control-associations \
  --security-control-id "IAM.1" \
  --query 'StandardsControlAssociationSummaries[*].[StandardsArn,AssociationStatus]' \
  --output table

# List all failed controls
aws securityhub get-findings \
  --filters '{
    "ComplianceStatus": [{"Value": "FAILED", "Comparison": "EQUALS"}],
    "RecordState": [{"Value": "ACTIVE", "Comparison": "EQUALS"}],
    "WorkflowStatus": [{"Value": "NEW", "Comparison": "EQUALS"}]
  }' \
  --sort-criteria '{"Field": "SeverityNormalized", "SortOrder": "desc"}' \
  --max-items 50 \
  --query 'Findings[*].[Title,Severity.Label,Compliance.Status,Resources[0].Id]' \
  --output table

# Get finding counts by severity
aws securityhub get-insight-results \
  --insight-arn "arn:aws:securityhub:us-east-1:111122223333:insight/111122223333/default/2"

Step 4: Create Custom Security Insights

Build custom insights to track organization-specific security priorities.

# Create insight for publicly accessible resources
aws securityhub create-insight \
  --name "Publicly Accessible Resources" \
  --filters '{
    "ResourceType": [
      {"Value": "AwsS3Bucket", "Comparison": "EQUALS"},
      {"Value": "AwsEc2SecurityGroup", "Comparison": "EQUALS"},
      {"Value": "AwsRdsDbInstance", "Comparison": "EQUALS"}
    ],
    "ComplianceStatus": [{"Value": "FAILED", "Comparison": "EQUALS"}],

…
FAQ

What is AWS Security Hub for?

It's for centralizing and organizing security alerts from various sources in AWS, making it easier to monitor compliance and identify issues.

Do I need to use GuardDuty, Inspector, or Macie if I use this tool?

No, you don't need to disable them. Security Hub collects information from these services but doesn't replace them. It's for monitoring and compliance, not real-time threat detection.

Can I automate the fixing of issues?

Yes, you can configure Security Hub to trigger automatic actions, like correcting misconfigurations, when a security issue is detected.

Details

Original description by the author

Deploy AWS Security Hub, backed by AWS Config, to aggregate findings from GuardDuty, Inspector, Macie, Firewall Manager, and Prowler across multi-account AWS Organizations, enable standards like CIS AWS Foundations and PCI DSS, and automate remediation via EventBridge and Lambda. Use for centralizing AWS compliance monitoring or executive compliance dashboards; not for threat detection (GuardDuty)

repo: mukul975/Anthropic-Cybersecurity-Skills

Popularity

GitHub stars
35k
Ranking position
#5838
License
Apache-2.0
Updated
8/31/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills