opencode-skills-collection 4.0.67 → 4.0.69
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundled-skills/.antigravity-install-manifest.json +281 -1
- package/bundled-skills/access-review/SKILL.md +394 -0
- package/bundled-skills/access-review/references/details.md +121 -0
- package/bundled-skills/agent-evals/SKILL.md +420 -0
- package/bundled-skills/agent-observability/SKILL.md +346 -0
- package/bundled-skills/agent-observability/references/details.md +786 -0
- package/bundled-skills/ai-agent-security/SKILL.md +393 -0
- package/bundled-skills/ai-agent-security/references/details.md +912 -0
- package/bundled-skills/ai-coding-agent-guardrails/SKILL.md +442 -0
- package/bundled-skills/ai-coding-agent-guardrails/references/details.md +753 -0
- package/bundled-skills/ai-inference-service-mesh/SKILL.md +449 -0
- package/bundled-skills/ai-pipeline-orchestration/SKILL.md +287 -0
- package/bundled-skills/ai-red-teaming/SKILL.md +409 -0
- package/bundled-skills/ai-security-hardening/SKILL.md +343 -0
- package/bundled-skills/ai-sre-incident-response/SKILL.md +336 -0
- package/bundled-skills/alerting-oncall/SKILL.md +458 -0
- package/bundled-skills/alerting-oncall/references/details.md +84 -0
- package/bundled-skills/anti-slop-design/SKILL.md +393 -0
- package/bundled-skills/antigravity-maintainer-batch-release/SKILL.md +1 -0
- package/bundled-skills/apk-redteam-pipeline/SKILL.md +446 -0
- package/bundled-skills/argocd-gitops/SKILL.md +469 -0
- package/bundled-skills/arm-templates/SKILL.md +438 -0
- package/bundled-skills/arm-templates/references/details.md +64 -0
- package/bundled-skills/artifact-yylo/SKILL.md +122 -0
- package/bundled-skills/asset-inventory/SKILL.md +412 -0
- package/bundled-skills/asset-inventory/references/details.md +127 -0
- package/bundled-skills/audit-logging/SKILL.md +476 -0
- package/bundled-skills/aws-cloudtrail/SKILL.md +486 -0
- package/bundled-skills/aws-cost-optimization/SKILL.md +331 -0
- package/bundled-skills/aws-ec2/SKILL.md +426 -0
- package/bundled-skills/aws-ecs-fargate/SKILL.md +388 -0
- package/bundled-skills/aws-iam/SKILL.md +463 -0
- package/bundled-skills/aws-lambda/SKILL.md +428 -0
- package/bundled-skills/aws-rds/SKILL.md +380 -0
- package/bundled-skills/aws-s3/SKILL.md +434 -0
- package/bundled-skills/aws-secrets-manager/SKILL.md +486 -0
- package/bundled-skills/aws-vpc/SKILL.md +436 -0
- package/bundled-skills/azure-ai-document-intelligence-ts/SKILL.md +1 -1
- package/bundled-skills/azure-aks/SKILL.md +423 -0
- package/bundled-skills/azure-devops/SKILL.md +457 -0
- package/bundled-skills/azure-functions-devsec/SKILL.md +436 -0
- package/bundled-skills/azure-keyvault/SKILL.md +455 -0
- package/bundled-skills/azure-keyvault/references/details.md +83 -0
- package/bundled-skills/azure-monitor-audit/SKILL.md +379 -0
- package/bundled-skills/azure-networking/SKILL.md +448 -0
- package/bundled-skills/azure-networking/references/details.md +135 -0
- package/bundled-skills/azure-sql/SKILL.md +413 -0
- package/bundled-skills/azure-sql/references/details.md +113 -0
- package/bundled-skills/azure-vms/SKILL.md +402 -0
- package/bundled-skills/azure-vms/references/details.md +134 -0
- package/bundled-skills/backup-recovery/SKILL.md +388 -0
- package/bundled-skills/bb-methodology/SKILL.md +451 -0
- package/bundled-skills/bb-methodology/references/details.md +120 -0
- package/bundled-skills/block-storage/SKILL.md +371 -0
- package/bundled-skills/blue-green-deploy/SKILL.md +453 -0
- package/bundled-skills/blue-green-deploy/references/details.md +90 -0
- package/bundled-skills/bug-bounty/SKILL.md +447 -0
- package/bundled-skills/bug-bounty/references/details.md +1316 -0
- package/bundled-skills/bugcrowd-reporting/SKILL.md +351 -0
- package/bundled-skills/business-continuity/SKILL.md +463 -0
- package/bundled-skills/career-ops/SKILL.md +186 -0
- package/bundled-skills/cdn-setup/SKILL.md +374 -0
- package/bundled-skills/change-management/SKILL.md +438 -0
- package/bundled-skills/change-management/references/details.md +105 -0
- package/bundled-skills/circleci/SKILL.md +475 -0
- package/bundled-skills/cis-benchmarks/SKILL.md +150 -0
- package/bundled-skills/cloudflare-pages/SKILL.md +318 -0
- package/bundled-skills/cloudflare-r2/SKILL.md +353 -0
- package/bundled-skills/cloudflare-workers/SKILL.md +415 -0
- package/bundled-skills/cloudflare-zero-trust/SKILL.md +361 -0
- package/bundled-skills/cloudformation/SKILL.md +461 -0
- package/bundled-skills/constraint-driven-development/SKILL.md +335 -0
- package/bundled-skills/constraint-driven-development/references/floor-guard.md +99 -0
- package/bundled-skills/container-hardening/SKILL.md +126 -0
- package/bundled-skills/container-registries/SKILL.md +435 -0
- package/bundled-skills/container-scanning/SKILL.md +416 -0
- package/bundled-skills/convex-backend/SKILL.md +338 -0
- package/bundled-skills/dast-scanning/SKILL.md +437 -0
- package/bundled-skills/database-backups/SKILL.md +425 -0
- package/bundled-skills/datadog/SKILL.md +487 -0
- package/bundled-skills/dependency-scanning/SKILL.md +457 -0
- package/bundled-skills/devcontainers-nix/SKILL.md +416 -0
- package/bundled-skills/disaster-recovery/SKILL.md +374 -0
- package/bundled-skills/disaster-recovery/references/details.md +219 -0
- package/bundled-skills/dns-management/SKILL.md +375 -0
- package/bundled-skills/docker-compose/SKILL.md +482 -0
- package/bundled-skills/docker-management/SKILL.md +426 -0
- package/bundled-skills/ebpf-observability/SKILL.md +436 -0
- package/bundled-skills/ebpf-observability/references/details.md +542 -0
- package/bundled-skills/elk-stack/SKILL.md +487 -0
- package/bundled-skills/enterprise-vpn-attack/SKILL.md +395 -0
- package/bundled-skills/evidence-hygiene/SKILL.md +404 -0
- package/bundled-skills/feature-flags/SKILL.md +426 -0
- package/bundled-skills/feature-flags/references/details.md +86 -0
- package/bundled-skills/fedramp-compliance/SKILL.md +453 -0
- package/bundled-skills/firebase-app-platform/SKILL.md +381 -0
- package/bundled-skills/firewall-config/SKILL.md +479 -0
- package/bundled-skills/gcp-audit-logs/SKILL.md +452 -0
- package/bundled-skills/gcp-audit-logs/references/details.md +56 -0
- package/bundled-skills/gcp-cloud-functions/SKILL.md +284 -0
- package/bundled-skills/gcp-cloud-sql/SKILL.md +277 -0
- package/bundled-skills/gcp-compute/SKILL.md +319 -0
- package/bundled-skills/gcp-gke/SKILL.md +307 -0
- package/bundled-skills/gcp-networking/SKILL.md +293 -0
- package/bundled-skills/gcp-secret-manager/SKILL.md +421 -0
- package/bundled-skills/gcp-secret-manager/references/details.md +131 -0
- package/bundled-skills/gdpr-compliance/SKILL.md +451 -0
- package/bundled-skills/gdpr-compliance/references/details.md +145 -0
- package/bundled-skills/geo-audit/SKILL.md +368 -0
- package/bundled-skills/geo-brand-mentions/SKILL.md +68 -0
- package/bundled-skills/geo-brand-mentions/references/details.md +471 -0
- package/bundled-skills/geo-citability/SKILL.md +350 -0
- package/bundled-skills/geo-compare/SKILL.md +340 -0
- package/bundled-skills/geo-content/SKILL.md +383 -0
- package/bundled-skills/geo-crawlers/SKILL.md +408 -0
- package/bundled-skills/geo-llmstxt/SKILL.md +464 -0
- package/bundled-skills/geo-platform-optimizer/SKILL.md +314 -0
- package/bundled-skills/geo-proposal/SKILL.md +378 -0
- package/bundled-skills/geo-prospect/SKILL.md +225 -0
- package/bundled-skills/geo-report/SKILL.md +436 -0
- package/bundled-skills/geo-report-pdf/SKILL.md +157 -0
- package/bundled-skills/geo-schema/SKILL.md +408 -0
- package/bundled-skills/geo-technical/SKILL.md +78 -0
- package/bundled-skills/geo-technical/references/details.md +543 -0
- package/bundled-skills/git-workflow/SKILL.md +460 -0
- package/bundled-skills/github-actions/SKILL.md +368 -0
- package/bundled-skills/gitlab-ci/SKILL.md +340 -0
- package/bundled-skills/google-no-code/SKILL.md +136 -0
- package/bundled-skills/gpu-kubernetes-operations/SKILL.md +468 -0
- package/bundled-skills/gpu-server-management/SKILL.md +236 -0
- package/bundled-skills/hashicorp-vault/SKILL.md +408 -0
- package/bundled-skills/helm-charts/SKILL.md +469 -0
- package/bundled-skills/hipaa-compliance/SKILL.md +451 -0
- package/bundled-skills/hunt-aspnet/SKILL.md +321 -0
- package/bundled-skills/hunt-ato/SKILL.md +184 -0
- package/bundled-skills/hunt-auth-bypass/SKILL.md +426 -0
- package/bundled-skills/hunt-auth-bypass/references/details.md +80 -0
- package/bundled-skills/hunt-brute-force/SKILL.md +341 -0
- package/bundled-skills/hunt-business-logic/SKILL.md +281 -0
- package/bundled-skills/hunt-cache-poison/SKILL.md +382 -0
- package/bundled-skills/hunt-captcha-bypass/SKILL.md +136 -0
- package/bundled-skills/hunt-cicd/SKILL.md +311 -0
- package/bundled-skills/hunt-clickjacking/SKILL.md +110 -0
- package/bundled-skills/hunt-cors/SKILL.md +335 -0
- package/bundled-skills/hunt-dom/SKILL.md +323 -0
- package/bundled-skills/hunt-exceptional-conditions/SKILL.md +111 -0
- package/bundled-skills/hunt-file-upload/SKILL.md +202 -0
- package/bundled-skills/hunt-fintech-graphql/SKILL.md +289 -0
- package/bundled-skills/hunt-forgot-password/SKILL.md +114 -0
- package/bundled-skills/hunt-grpc/SKILL.md +317 -0
- package/bundled-skills/hunt-host-header/SKILL.md +309 -0
- package/bundled-skills/hunt-html-injection/SKILL.md +106 -0
- package/bundled-skills/hunt-http-smuggling/SKILL.md +129 -0
- package/bundled-skills/hunt-http-smuggling/references/phase2h-smuggling-cachepoison.md +177 -0
- package/bundled-skills/hunt-idor/SKILL.md +434 -0
- package/bundled-skills/hunt-jwt-crypto/SKILL.md +221 -0
- package/bundled-skills/hunt-k8s/SKILL.md +337 -0
- package/bundled-skills/hunt-laravel/SKILL.md +255 -0
- package/bundled-skills/hunt-ldap/SKILL.md +351 -0
- package/bundled-skills/hunt-lfi/SKILL.md +311 -0
- package/bundled-skills/hunt-llm-ai/SKILL.md +289 -0
- package/bundled-skills/hunt-mfa-bypass/SKILL.md +177 -0
- package/bundled-skills/hunt-misc/SKILL.md +378 -0
- package/bundled-skills/hunt-nextjs/SKILL.md +299 -0
- package/bundled-skills/hunt-nodejs/SKILL.md +263 -0
- package/bundled-skills/hunt-nosqli/SKILL.md +210 -0
- package/bundled-skills/hunt-ntlm-info/SKILL.md +314 -0
- package/bundled-skills/hunt-oauth/SKILL.md +459 -0
- package/bundled-skills/hunt-open-redirect/SKILL.md +223 -0
- package/bundled-skills/hunt-race-condition/SKILL.md +381 -0
- package/bundled-skills/hunt-race-condition/references/details.md +159 -0
- package/bundled-skills/hunt-rag-vector/SKILL.md +212 -0
- package/bundled-skills/hunt-rce/SKILL.md +444 -0
- package/bundled-skills/hunt-rce/references/details.md +110 -0
- package/bundled-skills/hunt-saml/SKILL.md +156 -0
- package/bundled-skills/hunt-session/SKILL.md +342 -0
- package/bundled-skills/hunt-shadow-api/SKILL.md +198 -0
- package/bundled-skills/hunt-source-leak/SKILL.md +345 -0
- package/bundled-skills/hunt-spa-api/SKILL.md +163 -0
- package/bundled-skills/hunt-springboot/SKILL.md +285 -0
- package/bundled-skills/hunt-sqli/SKILL.md +466 -0
- package/bundled-skills/hunt-ssrf/SKILL.md +396 -0
- package/bundled-skills/hunt-ssrf/references/details.md +179 -0
- package/bundled-skills/hunt-ssti/SKILL.md +163 -0
- package/bundled-skills/hunt-subdomain/SKILL.md +379 -0
- package/bundled-skills/hunt-tls-network/SKILL.md +399 -0
- package/bundled-skills/hunt-xxe/SKILL.md +466 -0
- package/bundled-skills/i-have-adhd/SKILL.md +170 -0
- package/bundled-skills/idea-evaluator/SKILL.md +75 -0
- package/bundled-skills/idea-evaluator/idea-evaluator-con/SKILL.md +64 -0
- package/bundled-skills/idea-evaluator/idea-evaluator-pro/SKILL.md +64 -0
- package/bundled-skills/identity-access-management/SKILL.md +382 -0
- package/bundled-skills/identity-access-management/references/details.md +524 -0
- package/bundled-skills/incident-management/SKILL.md +484 -0
- package/bundled-skills/incident-response/SKILL.md +448 -0
- package/bundled-skills/incident-response/references/details.md +113 -0
- package/bundled-skills/interview-me/SKILL.md +248 -0
- package/bundled-skills/iso27001-compliance/SKILL.md +460 -0
- package/bundled-skills/jenkins/SKILL.md +462 -0
- package/bundled-skills/jev-use/SKILL.md +158 -0
- package/bundled-skills/kubernetes-hardening/SKILL.md +154 -0
- package/bundled-skills/kubernetes-ops/SKILL.md +449 -0
- package/bundled-skills/kubernetes-ops/references/details.md +108 -0
- package/bundled-skills/kustomize/SKILL.md +478 -0
- package/bundled-skills/ledger-tasks-yylo/SKILL.md +219 -0
- package/bundled-skills/linux-administration/SKILL.md +367 -0
- package/bundled-skills/linux-hardening/SKILL.md +154 -0
- package/bundled-skills/llm-app-security/SKILL.md +389 -0
- package/bundled-skills/llm-app-security/references/details.md +674 -0
- package/bundled-skills/llm-caching/SKILL.md +334 -0
- package/bundled-skills/llm-cost-optimization/SKILL.md +311 -0
- package/bundled-skills/llm-fine-tuning/SKILL.md +329 -0
- package/bundled-skills/llm-gateway/SKILL.md +282 -0
- package/bundled-skills/llm-inference-scaling/SKILL.md +286 -0
- package/bundled-skills/llmops-platform-engineering/SKILL.md +472 -0
- package/bundled-skills/load-balancing/SKILL.md +403 -0
- package/bundled-skills/loki-logging/SKILL.md +479 -0
- package/bundled-skills/loki-mode/examples/todo-app-generated/backend/package-lock.json +4 -4
- package/bundled-skills/loki-mode/examples/todo-app-generated/backend/package.json +1 -1
- package/bundled-skills/m365-entra-attack/SKILL.md +423 -0
- package/bundled-skills/mac-mini-llm-lab/SKILL.md +350 -0
- package/bundled-skills/mcp-server-security/SKILL.md +356 -0
- package/bundled-skills/mcp-server-security/references/details.md +745 -0
- package/bundled-skills/mdm-device-management/SKILL.md +404 -0
- package/bundled-skills/mdm-device-management/references/details.md +410 -0
- package/bundled-skills/meme-coin-audit/SKILL.md +402 -0
- package/bundled-skills/mid-engagement-ir-detection/SKILL.md +377 -0
- package/bundled-skills/model-registry-governance/SKILL.md +452 -0
- package/bundled-skills/model-serving-kubernetes/SKILL.md +339 -0
- package/bundled-skills/model-supply-chain-security/SKILL.md +427 -0
- package/bundled-skills/mongodb/SKILL.md +436 -0
- package/bundled-skills/multi-tenant-llm-hosting/SKILL.md +435 -0
- package/bundled-skills/multi-tenant-llm-hosting/references/details.md +211 -0
- package/bundled-skills/mysql/SKILL.md +390 -0
- package/bundled-skills/new-relic/SKILL.md +472 -0
- package/bundled-skills/nfs-storage/SKILL.md +356 -0
- package/bundled-skills/object-storage/SKILL.md +378 -0
- package/bundled-skills/offensive-osint/SKILL.md +443 -0
- package/bundled-skills/okta-attack/SKILL.md +436 -0
- package/bundled-skills/ollama-stack/SKILL.md +379 -0
- package/bundled-skills/openclaw-deployment-hardening/SKILL.md +135 -0
- package/bundled-skills/openclaw-local-mac-mini/SKILL.md +426 -0
- package/bundled-skills/openclaw-local-mac-mini/references/details.md +221 -0
- package/bundled-skills/openclaw-security-hardening/SKILL.md +135 -0
- package/bundled-skills/openshift/SKILL.md +485 -0
- package/bundled-skills/opentelemetry/SKILL.md +438 -0
- package/bundled-skills/opentelemetry/references/details.md +78 -0
- package/bundled-skills/opentofu-migration/SKILL.md +349 -0
- package/bundled-skills/osint-methodology/SKILL.md +460 -0
- package/bundled-skills/osint-methodology/references/details.md +1350 -0
- package/bundled-skills/pci-dss-compliance/SKILL.md +446 -0
- package/bundled-skills/penetration-testing/SKILL.md +152 -0
- package/bundled-skills/performance-tuning/SKILL.md +381 -0
- package/bundled-skills/plan-ledger-tasks-yylo/SKILL.md +52 -0
- package/bundled-skills/planetscale/SKILL.md +297 -0
- package/bundled-skills/platform-engineering/SKILL.md +348 -0
- package/bundled-skills/platform-engineering/references/details.md +944 -0
- package/bundled-skills/podman/SKILL.md +405 -0
- package/bundled-skills/policy-as-code/SKILL.md +434 -0
- package/bundled-skills/policy-as-code/references/details.md +204 -0
- package/bundled-skills/postgresql-devsec/SKILL.md +378 -0
- package/bundled-skills/prometheus-grafana/SKILL.md +469 -0
- package/bundled-skills/prompt-injection-defense/SKILL.md +483 -0
- package/bundled-skills/rag-infrastructure/SKILL.md +269 -0
- package/bundled-skills/rag-observability-evals/SKILL.md +444 -0
- package/bundled-skills/rag-observability-evals/references/details.md +92 -0
- package/bundled-skills/ralph-loop-yylo/SKILL.md +55 -0
- package/bundled-skills/ralph-loop-yylo/references/first_check.md +18 -0
- package/bundled-skills/ralph-loop-yylo/references/implement.md +60 -0
- package/bundled-skills/recon-scope-triage/SKILL.md +128 -0
- package/bundled-skills/redis/SKILL.md +421 -0
- package/bundled-skills/redteam-report-template/SKILL.md +370 -0
- package/bundled-skills/report-writing/SKILL.md +426 -0
- package/bundled-skills/report-writing/references/details.md +187 -0
- package/bundled-skills/resumable-implementation-contracts/SKILL.md +254 -0
- package/bundled-skills/reverse-proxy/SKILL.md +420 -0
- package/bundled-skills/runbook-creation/SKILL.md +438 -0
- package/bundled-skills/runbook-creation/references/details.md +71 -0
- package/bundled-skills/saas-security-posture/SKILL.md +415 -0
- package/bundled-skills/sast-scanning/SKILL.md +444 -0
- package/bundled-skills/sbom-supply-chain/SKILL.md +433 -0
- package/bundled-skills/security-arsenal/SKILL.md +446 -0
- package/bundled-skills/security-arsenal/references/details.md +540 -0
- package/bundled-skills/security-automation/SKILL.md +146 -0
- package/bundled-skills/semantic-versioning/SKILL.md +434 -0
- package/bundled-skills/semantic-versioning/references/details.md +83 -0
- package/bundled-skills/service-mesh/SKILL.md +422 -0
- package/bundled-skills/soc2-compliance/SKILL.md +409 -0
- package/bundled-skills/sops-encryption/SKILL.md +124 -0
- package/bundled-skills/sre-dashboards/SKILL.md +143 -0
- package/bundled-skills/ssh-configuration/SKILL.md +324 -0
- package/bundled-skills/ssl-tls-management/SKILL.md +428 -0
- package/bundled-skills/ssl-tls-management/references/details.md +99 -0
- package/bundled-skills/startup-it-troubleshooting/SKILL.md +415 -0
- package/bundled-skills/supply-chain-attack-recon/SKILL.md +453 -0
- package/bundled-skills/supply-chain-attack-recon/references/details.md +258 -0
- package/bundled-skills/systemd-services/SKILL.md +379 -0
- package/bundled-skills/terraform-aws/SKILL.md +125 -0
- package/bundled-skills/terraform-azure/SKILL.md +415 -0
- package/bundled-skills/terraform-azure/references/details.md +231 -0
- package/bundled-skills/terraform-gcp/SKILL.md +369 -0
- package/bundled-skills/threat-modeling/SKILL.md +487 -0
- package/bundled-skills/understand-project-yylo/SKILL.md +62 -0
- package/bundled-skills/user-management/SKILL.md +383 -0
- package/bundled-skills/using-agent-skills/SKILL.md +220 -0
- package/bundled-skills/vector-database-ops/SKILL.md +300 -0
- package/bundled-skills/vendor-management/SKILL.md +439 -0
- package/bundled-skills/vendor-management/references/details.md +109 -0
- package/bundled-skills/vercel-deployments/SKILL.md +296 -0
- package/bundled-skills/vllm-server/SKILL.md +236 -0
- package/bundled-skills/vmware-vcenter-attack/SKILL.md +412 -0
- package/bundled-skills/vpn-setup/SKILL.md +452 -0
- package/bundled-skills/vulnerability-scanning/SKILL.md +448 -0
- package/bundled-skills/waf-setup/SKILL.md +354 -0
- package/bundled-skills/waf-setup/references/details.md +211 -0
- package/bundled-skills/weather-model-data-fetching/SKILL.md +277 -0
- package/bundled-skills/weather-observation-fetching/SKILL.md +246 -0
- package/bundled-skills/web2-recon/SKILL.md +440 -0
- package/bundled-skills/web2-recon/references/details.md +319 -0
- package/bundled-skills/web3-audit/SKILL.md +445 -0
- package/bundled-skills/web3-audit/references/details.md +224 -0
- package/bundled-skills/wiki-yylo/SKILL.md +114 -0
- package/bundled-skills/windows-hardening/SKILL.md +454 -0
- package/bundled-skills/windows-hardening/references/details.md +204 -0
- package/bundled-skills/windows-server/SKILL.md +318 -0
- package/bundled-skills/workflow-yylo/SKILL.md +107 -0
- package/bundled-skills/zero-trust/SKILL.md +461 -0
- package/package.json +1 -1
- package/skills_index.json +6924 -0
|
@@ -0,0 +1,486 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: aws-cloudtrail
|
|
3
|
+
description: Configure AWS CloudTrail for audit logging. Set up organization trails
|
|
4
|
+
and event analysis. Use when auditing AWS activity.
|
|
5
|
+
category: security
|
|
6
|
+
risk: safe
|
|
7
|
+
source: https://github.com/BagelHole/DevOps-Security-Agent-Skills
|
|
8
|
+
source_repo: BagelHole/DevOps-Security-Agent-Skills
|
|
9
|
+
source_type: community
|
|
10
|
+
date_added: '2026-09-20'
|
|
11
|
+
license: MIT
|
|
12
|
+
license_source: https://github.com/BagelHole/DevOps-Security-Agent-Skills/blob/main/LICENSE
|
|
13
|
+
compatibility: Checklist and framework guidance; no privileged tooling required. Apply
|
|
14
|
+
controls through your own change process.
|
|
15
|
+
metadata:
|
|
16
|
+
author: devops-skills
|
|
17
|
+
version: '1.0'
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
# AWS CloudTrail
|
|
21
|
+
|
|
22
|
+
Audit AWS account activity with CloudTrail for compliance, security investigation, and operational troubleshooting.
|
|
23
|
+
|
|
24
|
+
## When to Use
|
|
25
|
+
|
|
26
|
+
- Enabling organization-wide audit logging across all AWS accounts
|
|
27
|
+
- Investigating security incidents or unauthorized API activity
|
|
28
|
+
- Meeting compliance requirements for SOC 2, HIPAA, PCI DSS, or FedRAMP
|
|
29
|
+
- Setting up automated alerting on sensitive AWS API calls
|
|
30
|
+
- Querying historical AWS activity for forensic analysis
|
|
31
|
+
|
|
32
|
+
## Create an Organization Trail
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
# Create the S3 bucket for log storage
|
|
36
|
+
aws s3api create-bucket \
|
|
37
|
+
--bucket org-cloudtrail-audit-logs \
|
|
38
|
+
--region us-east-1
|
|
39
|
+
|
|
40
|
+
# Apply bucket policy allowing CloudTrail to write
|
|
41
|
+
aws s3api put-bucket-policy \
|
|
42
|
+
--bucket org-cloudtrail-audit-logs \
|
|
43
|
+
--policy '{
|
|
44
|
+
"Version": "2012-10-17",
|
|
45
|
+
"Statement": [
|
|
46
|
+
{
|
|
47
|
+
"Sid": "AWSCloudTrailAclCheck",
|
|
48
|
+
"Effect": "Allow",
|
|
49
|
+
"Principal": {"Service": "cloudtrail.amazonaws.com"},
|
|
50
|
+
"Action": "s3:GetBucketAcl",
|
|
51
|
+
"Resource": "arn:aws:s3:::org-cloudtrail-audit-logs"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"Sid": "AWSCloudTrailWrite",
|
|
55
|
+
"Effect": "Allow",
|
|
56
|
+
"Principal": {"Service": "cloudtrail.amazonaws.com"},
|
|
57
|
+
"Action": "s3:PutObject",
|
|
58
|
+
"Resource": "arn:aws:s3:::org-cloudtrail-audit-logs/AWSLogs/*",
|
|
59
|
+
"Condition": {
|
|
60
|
+
"StringEquals": {"s3:x-amz-acl": "bucket-owner-full-control"}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
]
|
|
64
|
+
}'
|
|
65
|
+
|
|
66
|
+
# Block public access on the audit bucket
|
|
67
|
+
aws s3api put-public-access-block \
|
|
68
|
+
--bucket org-cloudtrail-audit-logs \
|
|
69
|
+
--public-access-block-configuration \
|
|
70
|
+
BlockPublicAcls=true,IgnorePublicAcls=true,BlockPublicPolicy=true,RestrictPublicBuckets=true
|
|
71
|
+
|
|
72
|
+
# Enable versioning for tamper protection
|
|
73
|
+
aws s3api put-bucket-versioning \
|
|
74
|
+
--bucket org-cloudtrail-audit-logs \
|
|
75
|
+
--versioning-configuration Status=Enabled
|
|
76
|
+
|
|
77
|
+
# Enable server-side encryption
|
|
78
|
+
aws s3api put-bucket-encryption \
|
|
79
|
+
--bucket org-cloudtrail-audit-logs \
|
|
80
|
+
--server-side-encryption-configuration '{
|
|
81
|
+
"Rules": [{"ApplyServerSideEncryptionByDefault": {"SSEAlgorithm": "aws:kms", "KMSMasterKeyID": "alias/cloudtrail-key"}}]
|
|
82
|
+
}'
|
|
83
|
+
|
|
84
|
+
# Set lifecycle policy for log retention
|
|
85
|
+
aws s3api put-bucket-lifecycle-configuration \
|
|
86
|
+
--bucket org-cloudtrail-audit-logs \
|
|
87
|
+
--lifecycle-configuration '{
|
|
88
|
+
"Rules": [
|
|
89
|
+
{
|
|
90
|
+
"ID": "TransitionToGlacier",
|
|
91
|
+
"Status": "Enabled",
|
|
92
|
+
"Filter": {"Prefix": "AWSLogs/"},
|
|
93
|
+
"Transitions": [
|
|
94
|
+
{"Days": 90, "StorageClass": "GLACIER"}
|
|
95
|
+
]
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"ID": "ExpireOldLogs",
|
|
99
|
+
"Status": "Enabled",
|
|
100
|
+
"Filter": {"Prefix": "AWSLogs/"},
|
|
101
|
+
"Expiration": {"Days": 2555}
|
|
102
|
+
}
|
|
103
|
+
]
|
|
104
|
+
}'
|
|
105
|
+
|
|
106
|
+
# Create the organization trail
|
|
107
|
+
aws cloudtrail create-trail \
|
|
108
|
+
--name org-audit-trail \
|
|
109
|
+
--s3-bucket-name org-cloudtrail-audit-logs \
|
|
110
|
+
--is-organization-trail \
|
|
111
|
+
--is-multi-region-trail \
|
|
112
|
+
--enable-log-file-validation \
|
|
113
|
+
--kms-key-id arn:aws:kms:us-east-1:123456789012:alias/cloudtrail-key \
|
|
114
|
+
--cloud-watch-logs-log-group-arn arn:aws:logs:us-east-1:123456789012:log-group:CloudTrail:* \
|
|
115
|
+
--cloud-watch-logs-role-arn arn:aws:iam::123456789012:role/CloudTrail-CWLogs-Role
|
|
116
|
+
|
|
117
|
+
# Start logging
|
|
118
|
+
aws cloudtrail start-logging --name org-audit-trail
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## Event Selectors for Management and Data Events
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
# Configure advanced event selectors for granular control
|
|
125
|
+
aws cloudtrail put-event-selectors \
|
|
126
|
+
--trail-name org-audit-trail \
|
|
127
|
+
--advanced-event-selectors '[
|
|
128
|
+
{
|
|
129
|
+
"Name": "AllManagementEvents",
|
|
130
|
+
"FieldSelectors": [
|
|
131
|
+
{"Field": "eventCategory", "Equals": ["Management"]}
|
|
132
|
+
]
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"Name": "S3DataEventsForSensitiveBuckets",
|
|
136
|
+
"FieldSelectors": [
|
|
137
|
+
{"Field": "eventCategory", "Equals": ["Data"]},
|
|
138
|
+
{"Field": "resources.type", "Equals": ["AWS::S3::Object"]},
|
|
139
|
+
{"Field": "resources.ARN", "StartsWith": [
|
|
140
|
+
"arn:aws:s3:::sensitive-data-bucket/",
|
|
141
|
+
"arn:aws:s3:::pii-bucket/",
|
|
142
|
+
"arn:aws:s3:::financial-data/"
|
|
143
|
+
]}
|
|
144
|
+
]
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"Name": "LambdaInvocations",
|
|
148
|
+
"FieldSelectors": [
|
|
149
|
+
{"Field": "eventCategory", "Equals": ["Data"]},
|
|
150
|
+
{"Field": "resources.type", "Equals": ["AWS::Lambda::Function"]}
|
|
151
|
+
]
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
"Name": "DynamoDBDataEvents",
|
|
155
|
+
"FieldSelectors": [
|
|
156
|
+
{"Field": "eventCategory", "Equals": ["Data"]},
|
|
157
|
+
{"Field": "resources.type", "Equals": ["AWS::DynamoDB::Table"]}
|
|
158
|
+
]
|
|
159
|
+
}
|
|
160
|
+
]'
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
## CloudWatch Alerts for Sensitive Activity
|
|
164
|
+
|
|
165
|
+
```bash
|
|
166
|
+
# Create metric filter for unauthorized API calls
|
|
167
|
+
aws logs put-metric-filter \
|
|
168
|
+
--log-group-name CloudTrail \
|
|
169
|
+
--filter-name UnauthorizedAPICalls \
|
|
170
|
+
--filter-pattern '{ ($.errorCode = "*UnauthorizedAccess*") || ($.errorCode = "AccessDenied*") }' \
|
|
171
|
+
--metric-transformations \
|
|
172
|
+
metricName=UnauthorizedAPICalls,metricNamespace=CloudTrailMetrics,metricValue=1
|
|
173
|
+
|
|
174
|
+
# Create alarm for unauthorized calls
|
|
175
|
+
aws cloudwatch put-metric-alarm \
|
|
176
|
+
--alarm-name UnauthorizedAPICallsAlarm \
|
|
177
|
+
--metric-name UnauthorizedAPICalls \
|
|
178
|
+
--namespace CloudTrailMetrics \
|
|
179
|
+
--statistic Sum \
|
|
180
|
+
--period 300 \
|
|
181
|
+
--threshold 5 \
|
|
182
|
+
--comparison-operator GreaterThanOrEqualToThreshold \
|
|
183
|
+
--evaluation-periods 1 \
|
|
184
|
+
--alarm-actions arn:aws:sns:us-east-1:123456789012:security-alerts
|
|
185
|
+
|
|
186
|
+
# Root account usage alarm
|
|
187
|
+
aws logs put-metric-filter \
|
|
188
|
+
--log-group-name CloudTrail \
|
|
189
|
+
--filter-name RootAccountUsage \
|
|
190
|
+
--filter-pattern '{ ($.userIdentity.type = "Root") && ($.userIdentity.invokedBy NOT EXISTS) && ($.eventType != "AwsServiceEvent") }' \
|
|
191
|
+
--metric-transformations \
|
|
192
|
+
metricName=RootAccountUsage,metricNamespace=CloudTrailMetrics,metricValue=1
|
|
193
|
+
|
|
194
|
+
aws cloudwatch put-metric-alarm \
|
|
195
|
+
--alarm-name RootAccountUsageAlarm \
|
|
196
|
+
--metric-name RootAccountUsage \
|
|
197
|
+
--namespace CloudTrailMetrics \
|
|
198
|
+
--statistic Sum \
|
|
199
|
+
--period 300 \
|
|
200
|
+
--threshold 1 \
|
|
201
|
+
--comparison-operator GreaterThanOrEqualToThreshold \
|
|
202
|
+
--evaluation-periods 1 \
|
|
203
|
+
--alarm-actions arn:aws:sns:us-east-1:123456789012:security-alerts
|
|
204
|
+
|
|
205
|
+
# Console login without MFA
|
|
206
|
+
aws logs put-metric-filter \
|
|
207
|
+
--log-group-name CloudTrail \
|
|
208
|
+
--filter-name ConsoleLoginWithoutMFA \
|
|
209
|
+
--filter-pattern '{ ($.eventName = "ConsoleLogin") && ($.additionalEventData.MFAUsed != "Yes") && ($.userIdentity.type = "IAMUser") }' \
|
|
210
|
+
--metric-transformations \
|
|
211
|
+
metricName=ConsoleLoginWithoutMFA,metricNamespace=CloudTrailMetrics,metricValue=1
|
|
212
|
+
|
|
213
|
+
# IAM policy changes
|
|
214
|
+
aws logs put-metric-filter \
|
|
215
|
+
--log-group-name CloudTrail \
|
|
216
|
+
--filter-name IAMPolicyChanges \
|
|
217
|
+
--filter-pattern '{ ($.eventName=CreatePolicy) || ($.eventName=DeletePolicy) || ($.eventName=AttachRolePolicy) || ($.eventName=DetachRolePolicy) || ($.eventName=AttachUserPolicy) || ($.eventName=PutUserPolicy) }' \
|
|
218
|
+
--metric-transformations \
|
|
219
|
+
metricName=IAMPolicyChanges,metricNamespace=CloudTrailMetrics,metricValue=1
|
|
220
|
+
|
|
221
|
+
# Security group changes
|
|
222
|
+
aws logs put-metric-filter \
|
|
223
|
+
--log-group-name CloudTrail \
|
|
224
|
+
--filter-name SecurityGroupChanges \
|
|
225
|
+
--filter-pattern '{ ($.eventName=AuthorizeSecurityGroupIngress) || ($.eventName=RevokeSecurityGroupIngress) || ($.eventName=CreateSecurityGroup) || ($.eventName=DeleteSecurityGroup) }' \
|
|
226
|
+
--metric-transformations \
|
|
227
|
+
metricName=SecurityGroupChanges,metricNamespace=CloudTrailMetrics,metricValue=1
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
## Athena Queries for CloudTrail Analysis
|
|
231
|
+
|
|
232
|
+
```sql
|
|
233
|
+
-- Create Athena table for CloudTrail logs
|
|
234
|
+
CREATE EXTERNAL TABLE IF NOT EXISTS cloudtrail_logs (
|
|
235
|
+
eventVersion STRING,
|
|
236
|
+
userIdentity STRUCT<
|
|
237
|
+
type: STRING,
|
|
238
|
+
principalId: STRING,
|
|
239
|
+
arn: STRING,
|
|
240
|
+
accountId: STRING,
|
|
241
|
+
invokedBy: STRING,
|
|
242
|
+
accessKeyId: STRING,
|
|
243
|
+
userName: STRING,
|
|
244
|
+
sessionContext: STRUCT<
|
|
245
|
+
attributes: STRUCT<mfaAuthenticated: STRING, creationDate: STRING>,
|
|
246
|
+
sessionIssuer: STRUCT<type: STRING, principalId: STRING, arn: STRING, accountId: STRING, userName: STRING>
|
|
247
|
+
>
|
|
248
|
+
>,
|
|
249
|
+
eventTime STRING,
|
|
250
|
+
eventSource STRING,
|
|
251
|
+
eventName STRING,
|
|
252
|
+
awsRegion STRING,
|
|
253
|
+
sourceIPAddress STRING,
|
|
254
|
+
userAgent STRING,
|
|
255
|
+
errorCode STRING,
|
|
256
|
+
errorMessage STRING,
|
|
257
|
+
requestParameters STRING,
|
|
258
|
+
responseElements STRING,
|
|
259
|
+
additionalEventData STRING,
|
|
260
|
+
requestId STRING,
|
|
261
|
+
eventId STRING,
|
|
262
|
+
readOnly STRING,
|
|
263
|
+
resources ARRAY<STRUCT<arn: STRING, accountId: STRING, type: STRING>>,
|
|
264
|
+
eventType STRING,
|
|
265
|
+
recipientAccountId STRING
|
|
266
|
+
)
|
|
267
|
+
PARTITIONED BY (region STRING, year STRING, month STRING, day STRING)
|
|
268
|
+
ROW FORMAT SERDE 'org.apache.hive.hcatalog.data.JsonSerDe'
|
|
269
|
+
LOCATION 's3://org-cloudtrail-audit-logs/AWSLogs/123456789012/CloudTrail/';
|
|
270
|
+
|
|
271
|
+
-- Find all delete operations in the last 7 days
|
|
272
|
+
SELECT eventTime, userIdentity.arn, eventName, sourceIPAddress,
|
|
273
|
+
requestParameters
|
|
274
|
+
FROM cloudtrail_logs
|
|
275
|
+
WHERE eventName LIKE '%Delete%'
|
|
276
|
+
AND eventTime > date_format(date_add('day', -7, current_date), '%Y-%m-%dT%H:%i:%sZ')
|
|
277
|
+
ORDER BY eventTime DESC
|
|
278
|
+
LIMIT 100;
|
|
279
|
+
|
|
280
|
+
-- Identify console logins from unusual IP addresses
|
|
281
|
+
SELECT eventTime, userIdentity.userName, sourceIPAddress,
|
|
282
|
+
additionalEventData
|
|
283
|
+
FROM cloudtrail_logs
|
|
284
|
+
WHERE eventName = 'ConsoleLogin'
|
|
285
|
+
AND sourceIPAddress NOT IN ('198.51.100.0/24', '203.0.113.0/24')
|
|
286
|
+
AND eventTime > date_format(date_add('day', -30, current_date), '%Y-%m-%dT%H:%i:%sZ')
|
|
287
|
+
ORDER BY eventTime DESC;
|
|
288
|
+
|
|
289
|
+
-- Access key usage patterns per principal
|
|
290
|
+
SELECT userIdentity.arn,
|
|
291
|
+
count(*) AS api_call_count,
|
|
292
|
+
count(DISTINCT eventName) AS unique_actions,
|
|
293
|
+
count(DISTINCT sourceIPAddress) AS unique_ips,
|
|
294
|
+
min(eventTime) AS first_seen,
|
|
295
|
+
max(eventTime) AS last_seen
|
|
296
|
+
FROM cloudtrail_logs
|
|
297
|
+
WHERE eventTime > date_format(date_add('day', -30, current_date), '%Y-%m-%dT%H:%i:%sZ')
|
|
298
|
+
GROUP BY userIdentity.arn
|
|
299
|
+
ORDER BY api_call_count DESC
|
|
300
|
+
LIMIT 50;
|
|
301
|
+
|
|
302
|
+
-- Failed API calls indicating permission issues or reconnaissance
|
|
303
|
+
SELECT eventTime, userIdentity.arn, eventName, errorCode, errorMessage,
|
|
304
|
+
sourceIPAddress
|
|
305
|
+
FROM cloudtrail_logs
|
|
306
|
+
WHERE errorCode IN ('AccessDenied', 'UnauthorizedAccess', 'Client.UnauthorizedAccess')
|
|
307
|
+
AND eventTime > date_format(date_add('day', -7, current_date), '%Y-%m-%dT%H:%i:%sZ')
|
|
308
|
+
ORDER BY eventTime DESC
|
|
309
|
+
LIMIT 200;
|
|
310
|
+
|
|
311
|
+
-- Track KMS key usage
|
|
312
|
+
SELECT eventTime, userIdentity.arn, eventName, requestParameters,
|
|
313
|
+
resources[1].arn AS key_arn
|
|
314
|
+
FROM cloudtrail_logs
|
|
315
|
+
WHERE eventSource = 'kms.amazonaws.com'
|
|
316
|
+
AND eventName IN ('Decrypt', 'Encrypt', 'GenerateDataKey', 'DisableKey', 'ScheduleKeyDeletion')
|
|
317
|
+
AND eventTime > date_format(date_add('day', -7, current_date), '%Y-%m-%dT%H:%i:%sZ')
|
|
318
|
+
ORDER BY eventTime DESC;
|
|
319
|
+
```
|
|
320
|
+
|
|
321
|
+
## CloudTrail Lake (Event Data Store)
|
|
322
|
+
|
|
323
|
+
```bash
|
|
324
|
+
# Create an event data store for long-term queryable storage
|
|
325
|
+
aws cloudtrail create-event-data-store \
|
|
326
|
+
--name org-audit-event-store \
|
|
327
|
+
--multi-region-enabled \
|
|
328
|
+
--organization-enabled \
|
|
329
|
+
--retention-period 2555 \
|
|
330
|
+
--advanced-event-selectors '[
|
|
331
|
+
{
|
|
332
|
+
"Name": "AllManagementEvents",
|
|
333
|
+
"FieldSelectors": [
|
|
334
|
+
{"Field": "eventCategory", "Equals": ["Management"]}
|
|
335
|
+
]
|
|
336
|
+
}
|
|
337
|
+
]'
|
|
338
|
+
```
|
|
339
|
+
|
|
340
|
+
```sql
|
|
341
|
+
-- CloudTrail Lake SQL queries (run in console or via StartQuery API)
|
|
342
|
+
-- Investigate a specific user's activity
|
|
343
|
+
SELECT eventTime, eventName, eventSource, sourceIPAddress,
|
|
344
|
+
errorCode, requestParameters
|
|
345
|
+
FROM EVENT_DATA_STORE_ID
|
|
346
|
+
WHERE userIdentity.arn = 'arn:aws:iam::123456789012:user/suspicious-user'
|
|
347
|
+
AND eventTime > '2024-01-01 00:00:00'
|
|
348
|
+
ORDER BY eventTime DESC;
|
|
349
|
+
|
|
350
|
+
-- Cross-account activity summary
|
|
351
|
+
SELECT recipientAccountId, userIdentity.arn,
|
|
352
|
+
count(*) AS event_count
|
|
353
|
+
FROM EVENT_DATA_STORE_ID
|
|
354
|
+
WHERE eventTime > '2024-01-01 00:00:00'
|
|
355
|
+
GROUP BY recipientAccountId, userIdentity.arn
|
|
356
|
+
ORDER BY event_count DESC;
|
|
357
|
+
```
|
|
358
|
+
|
|
359
|
+
## Validate Trail Integrity
|
|
360
|
+
|
|
361
|
+
```bash
|
|
362
|
+
# Validate log file integrity for a date range
|
|
363
|
+
aws cloudtrail validate-logs \
|
|
364
|
+
--trail-arn arn:aws:cloudtrail:us-east-1:123456789012:trail/org-audit-trail \
|
|
365
|
+
--start-time "2024-01-01T00:00:00Z" \
|
|
366
|
+
--end-time "2024-01-31T23:59:59Z"
|
|
367
|
+
|
|
368
|
+
# Check trail status
|
|
369
|
+
aws cloudtrail get-trail-status --name org-audit-trail
|
|
370
|
+
|
|
371
|
+
# Describe the trail configuration
|
|
372
|
+
aws cloudtrail describe-trails --trail-name-list org-audit-trail
|
|
373
|
+
```
|
|
374
|
+
|
|
375
|
+
## Terraform Configuration
|
|
376
|
+
|
|
377
|
+
```hcl
|
|
378
|
+
resource "aws_cloudtrail" "org_trail" {
|
|
379
|
+
name = "org-audit-trail"
|
|
380
|
+
s3_bucket_name = aws_s3_bucket.cloudtrail.id
|
|
381
|
+
is_organization_trail = true
|
|
382
|
+
is_multi_region_trail = true
|
|
383
|
+
enable_log_file_validation = true
|
|
384
|
+
kms_key_id = aws_kms_key.cloudtrail.arn
|
|
385
|
+
cloud_watch_logs_group_arn = "${aws_cloudwatch_log_group.cloudtrail.arn}:*"
|
|
386
|
+
cloud_watch_logs_role_arn = aws_iam_role.cloudtrail_cw.arn
|
|
387
|
+
include_global_service_events = true
|
|
388
|
+
|
|
389
|
+
advanced_event_selector {
|
|
390
|
+
name = "AllManagementEvents"
|
|
391
|
+
field_selector {
|
|
392
|
+
field = "eventCategory"
|
|
393
|
+
equals = ["Management"]
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
advanced_event_selector {
|
|
398
|
+
name = "SensitiveS3DataEvents"
|
|
399
|
+
field_selector {
|
|
400
|
+
field = "eventCategory"
|
|
401
|
+
equals = ["Data"]
|
|
402
|
+
}
|
|
403
|
+
field_selector {
|
|
404
|
+
field = "resources.type"
|
|
405
|
+
equals = ["AWS::S3::Object"]
|
|
406
|
+
}
|
|
407
|
+
field_selector {
|
|
408
|
+
field = "resources.ARN"
|
|
409
|
+
starts_with = ["arn:aws:s3:::sensitive-data-bucket/"]
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
tags = {
|
|
414
|
+
Environment = "production"
|
|
415
|
+
Compliance = "soc2,hipaa"
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
```
|
|
419
|
+
|
|
420
|
+
## Setup Checklist
|
|
421
|
+
|
|
422
|
+
```yaml
|
|
423
|
+
cloudtrail_checklist:
|
|
424
|
+
trail_configuration:
|
|
425
|
+
- [ ] Organization trail enabled across all accounts
|
|
426
|
+
- [ ] Multi-region trail enabled
|
|
427
|
+
- [ ] Log file validation enabled
|
|
428
|
+
- [ ] KMS encryption configured with dedicated key
|
|
429
|
+
- [ ] CloudWatch Logs integration active
|
|
430
|
+
- [ ] S3 bucket policy restricts access to CloudTrail service only
|
|
431
|
+
|
|
432
|
+
s3_bucket_hardening:
|
|
433
|
+
- [ ] Public access blocked
|
|
434
|
+
- [ ] Versioning enabled
|
|
435
|
+
- [ ] Server-side encryption enabled
|
|
436
|
+
- [ ] Lifecycle policy set for retention and archival
|
|
437
|
+
- [ ] Access logging enabled on the bucket itself
|
|
438
|
+
- [ ] Object Lock enabled for WORM compliance (if required)
|
|
439
|
+
|
|
440
|
+
monitoring_and_alerting:
|
|
441
|
+
- [ ] Metric filters for unauthorized API calls
|
|
442
|
+
- [ ] Alarm on root account usage
|
|
443
|
+
- [ ] Alarm on console login without MFA
|
|
444
|
+
- [ ] Alarm on IAM policy changes
|
|
445
|
+
- [ ] Alarm on security group and NACL changes
|
|
446
|
+
- [ ] Alarm on CloudTrail configuration changes
|
|
447
|
+
- [ ] Alarm on S3 bucket policy changes
|
|
448
|
+
|
|
449
|
+
analysis:
|
|
450
|
+
- [ ] Athena table created for ad-hoc queries
|
|
451
|
+
- [ ] CloudTrail Lake event data store for long-term queries
|
|
452
|
+
- [ ] Regular review of high-risk API patterns
|
|
453
|
+
- [ ] Automated reports for compliance evidence
|
|
454
|
+
|
|
455
|
+
operational:
|
|
456
|
+
- [ ] Trail status health check automated
|
|
457
|
+
- [ ] Log delivery latency monitored
|
|
458
|
+
- [ ] Log file validation run periodically
|
|
459
|
+
- [ ] SNS notification for trail configuration changes
|
|
460
|
+
```
|
|
461
|
+
|
|
462
|
+
## Best Practices
|
|
463
|
+
|
|
464
|
+
- Enable organization-wide trails from the management account for full coverage
|
|
465
|
+
- Always enable log file validation to detect tampering
|
|
466
|
+
- Encrypt logs with a customer-managed KMS key and restrict key usage
|
|
467
|
+
- Use advanced event selectors to capture data events on sensitive resources without logging everything
|
|
468
|
+
- Integrate with CloudWatch Logs for real-time metric filters and alarms
|
|
469
|
+
- Set up Athena or CloudTrail Lake for efficient querying during investigations
|
|
470
|
+
- Apply S3 lifecycle policies to transition old logs to Glacier and enforce retention
|
|
471
|
+
- Monitor the trail itself (delivery errors, configuration changes) as a meta-control
|
|
472
|
+
- Validate log integrity periodically as part of compliance evidence collection
|
|
473
|
+
- Restrict access to the CloudTrail S3 bucket and KMS key with least-privilege IAM policies
|
|
474
|
+
|
|
475
|
+
## Limitations
|
|
476
|
+
|
|
477
|
+
- Guidance and checklists only; not legal advice and not a substitute for a qualified auditor.
|
|
478
|
+
- Docs-only import: upstream templates and scripts not bundled.
|
|
479
|
+
|
|
480
|
+
### Example
|
|
481
|
+
|
|
482
|
+
```markdown
|
|
483
|
+
Map this skill's control checklist to our current evidence and list gaps.
|
|
484
|
+
```
|
|
485
|
+
|
|
486
|
+
> Adapted from [BagelHole/DevOps-Security-Agent-Skills](https://github.com/BagelHole/DevOps-Security-Agent-Skills) (MIT); frontmatter, When to Use/Limitations, and safety boundaries added for upstream compliance. Docs-only import: helper scripts and templates not bundled.
|