Contract
- Input: cloud provider (AWS / GCP / Azure), workload architecture, compliance requirements.
- Output: cloud security architecture + IAM review + compliance matrix + CSPM runbook.
- Scope: designs and audits cloud security; does not provision resources.
- Rule: designs and audits cloud security; does not provision resources.
- Rule: documented standards override defaults; explicit project rules take precedence.
- Rule: if blocked by missing context or dependencies, surface the blocker before proceeding.
Provenance
| Question |
Answer |
| What is the source of truth? |
The user's request, originating spec/issue, and the skill's declared outputs |
| What is in scope? |
Work covered by the skill's acceptance criteria and completion rules |
| What is explicitly out of scope? |
Files, behaviors, and decisions outside the skill's declared boundary |
| Who or what consumes this artifact afterward? |
The next skill in the workflow or the user |
| What evidence proves it is done? |
Completion criteria met, artifact saved, validation passed |
| What risk remains? |
Subjective judgment calls, missing context, or external dependency failures |
Artifact
Emit CloudSecurityArtifact as both:
- JSON:
.agents/skills/platform/artifacts/cloud-security/{identifier}.json
- Markdown view: same filename with
.md extension
Cloud Security
Design and audit cloud security for AWS, GCP, and Azure — IAM, KMS, network controls, compliance, and posture management.
Process
1. Asset and data inventory
- Enumerate cloud resources: compute, storage, databases, networking, serverless, containers.
- Classify data by sensitivity (public, internal, confidential, secret).
- Map data flows across regions and accounts.
Completion criterion: cloud asset inventory and data classification saved.
2. IAM design and review
- Identity sources: IdP (SAML, OIDC, LDAP); avoid local users where possible.
- Roles and permissions: least-privilege; separate duties; no wildcard actions on sensitive services.
- Service accounts: disable default credentials; use workload identity / IAM roles for service accounts (IRSA / Workload Identity).
- Cross-account access: use roles with explicit trust policies; avoid long-lived keys.
- MFA: enforce MFA for all human users; MFA-protected API access.
- Access reviews: periodic review of unused permissions and stale accounts.
Completion criterion: IAM design reviewed; least-privilege gaps documented.
3. Key management and encryption
- KMS: use cloud KMS (AWS KMS, GCP Cloud KMS, Azure Key Vault); envelope encryption for large datasets.
- Key rotation: automatic rotation (annual for data keys; more frequent for session keys).
- Access control on keys: restrict key usage to specific roles and services; use key policies / IAM conditions.
- At-rest encryption: enable by default for storage (S3, GCS, Blob), databases (RDS, Cloud SQL, Cosmos), block storage.
- In-transit encryption: TLS 1.3 for all endpoints; disable unencrypted protocols.
Completion criterion: KMS and encryption design documented; rotation schedule defined.
4. Network security
- Security groups / firewall rules: deny all by default; allow only required ports and sources; avoid 0.0.0.0/0 on sensitive ports.
- NACLs and network policies: layer-4 controls for subnet-level restrictions.
- Private connectivity: use VPC endpoints / Private Service Connect; avoid public IPs for internal services.
- DNS security: enable DNS logging; use private DNS zones; protect against DNS hijacking.
- DDoS protection: enable cloud-native DDoS (Shield, Cloud Armor, DDoS Protection Standard).
Completion criterion: network security baseline documented; exceptions justified.
5. Compliance mapping
- Frameworks: SOC 2 (CC6, CC7), PCI-DSS (req 2, 3, 6, 8, 10, 12), HIPAA (164.312), CIS Controls (IG1/IG2), FedRAMP (Moderate / High).
- Control mapping: map each cloud control (encryption, logging, IAM, network) to framework requirements.
- Evidence collection: enable audit logs (CloudTrail, Cloud Audit Logs, Activity Log); store logs immutably.
- Gap analysis: identify controls not met; document compensating controls or remediation plans.
Completion criterion: compliance matrix complete; gaps and compensating controls documented.
6. Cloud security posture management (CSPM)
- Tooling: enable native CSPM (AWS Security Hub, GCP Security Command Center, Azure Defender) and/or third-party (Wiz, Prisma, Lacework).
- Checks: misconfigured storage (public S3/GCS/Blob), overly permissive IAM, unencrypted services, exposed secrets.
- Automation: auto-remediate low-severity findings (e.g., public bucket alerts); manual review for high-severity.
- Continuous monitoring: dashboards for open findings, trend analysis, mean-time-to-remediate (MTTR).
Completion criterion: CSPM runbook complete; dashboards and alerting configured.
7. Incident response and logging
- Logging: enable and centralise audit logs, VPC flow logs, application logs, Kubernetes audit logs.
- Alerting: define alert thresholds for anomalous IAM activity, data exfiltration indicators, privilege escalation.
- Runbooks: document response playbooks for common incidents (public bucket, compromised IAM key, DDoS, data breach).
- Forensics: enable immutable log storage; snapshot capabilities for compute and storage.
Completion criterion: incident response runbook saved; logging and alerting verified.
Rules
- Rule: enforce least-privilege IAM with deny-by-default; review and remove excess permissions quarterly.
- Rule: enable encryption at rest and in transit for all sensitive data; never store secrets in resource names or tags.
- Rule: use cloud-native security tools before third-party solutions; document exceptions.
- Rule: map every compliance requirement to a verifiable control and evidence source.
- Rule: never grant cloud admin / owner role to service accounts or CI/CD pipelines without explicit approval and just-in-time access.
- Rule: enable multi-factor authentication (MFA) for all human identities; use workload identity for machines.
- Rule: implement network segmentation and private connectivity for all internal traffic; public exposure must be explicitly justified.
Completion
- the skill's completion criteria are explicitly checked
- the artifact is saved and validated
- any blockers or skipped validations are documented
- the next consumer is identified or the work is handed off
@include .agents/skills/platform/contract-base.xml
1---2name: "cloud-security"3category: "sec"4maturity: "stable"5version: "1"6description: "Cloud security (AWS, GCP, Azure, IAM, KMS, security groups, compliance, posture management)"7license: "MIT"8capabilities:9 - apply cloud security methods within explicit sec boundaries10 - analyze cloud security (aws, gcp, azure, iam, kms, security groups, compliance, posture management) with assumptions, constraints, and failure modes11 - produce and validate a sec artifact with evidence, decisions, and next steps12outputs: "cloud security architecture + IAM review + compliance matrix + CSPM runbook."13sideEffects: []14dependencies: []15stopCondition: "Security architecture saved; IAM reviewed; compliance matrix complete; posture runbook documented."16risk: "medium"17trustTier: "3"18maxIterations: "6"19promptVersion: "2.0"20artifactType: "security"21modelTier: "reasoning"22evaluators: ["behavioral", "regression"]23fixturesPath: .agents/skills/platform/fixtures/behavioral/cloud-security.json24diataxis: "how-to"25tags: ["sec"]26compatibility: []27approvalRequired: "true"28approvalFor: []29metadata:30 source: https://skillmd.com/skills/quantumquirkxyz/cloud-security31---3233## Contract3435- Input: cloud provider (AWS / GCP / Azure), workload architecture, compliance requirements.36- Output: cloud security architecture + IAM review + compliance matrix + CSPM runbook.37- Scope: designs and audits cloud security; does not provision resources.38- Rule: designs and audits cloud security; does not provision resources.39- Rule: documented standards override defaults; explicit project rules take precedence.40- Rule: if blocked by missing context or dependencies, surface the blocker before proceeding.4142## Provenance4344| Question | Answer |45|---|---|46| What is the source of truth? | The user's request, originating spec/issue, and the skill's declared outputs |47| What is in scope? | Work covered by the skill's acceptance criteria and completion rules |48| What is explicitly out of scope? | Files, behaviors, and decisions outside the skill's declared boundary |49| Who or what consumes this artifact afterward? | The next skill in the workflow or the user |50| What evidence proves it is done? | Completion criteria met, artifact saved, validation passed |51| What risk remains? | Subjective judgment calls, missing context, or external dependency failures525354## Artifact5556Emit `CloudSecurityArtifact` as both:57- JSON: `.agents/skills/platform/artifacts/cloud-security/{identifier}.json`58- Markdown view: same filename with `.md` extension596061# 62# 63# Cloud Security6465Design and audit **cloud security** for AWS, GCP, and Azure — IAM, KMS, network controls, compliance, and posture management.6667## Process6869### 1. Asset and data inventory70- Enumerate cloud resources: compute, storage, databases, networking, serverless, containers.71- Classify data by sensitivity (public, internal, confidential, secret).72- Map data flows across regions and accounts.7374**Completion criterion:** cloud asset inventory and data classification saved.7576### 2. IAM design and review77- **Identity sources:** IdP (SAML, OIDC, LDAP); avoid local users where possible.78- **Roles and permissions:** least-privilege; separate duties; no wildcard actions on sensitive services.79- **Service accounts:** disable default credentials; use workload identity / IAM roles for service accounts (IRSA / Workload Identity).80- **Cross-account access:** use roles with explicit trust policies; avoid long-lived keys.81- **MFA:** enforce MFA for all human users; MFA-protected API access.82- **Access reviews:** periodic review of unused permissions and stale accounts.8384**Completion criterion:** IAM design reviewed; least-privilege gaps documented.8586### 3. Key management and encryption87- **KMS:** use cloud KMS (AWS KMS, GCP Cloud KMS, Azure Key Vault); envelope encryption for large datasets.88- **Key rotation:** automatic rotation (annual for data keys; more frequent for session keys).89- **Access control on keys:** restrict key usage to specific roles and services; use key policies / IAM conditions.90- **At-rest encryption:** enable by default for storage (S3, GCS, Blob), databases (RDS, Cloud SQL, Cosmos), block storage.91- **In-transit encryption:** TLS 1.3 for all endpoints; disable unencrypted protocols.9293**Completion criterion:** KMS and encryption design documented; rotation schedule defined.9495### 4. Network security96- **Security groups / firewall rules:** deny all by default; allow only required ports and sources; avoid 0.0.0.0/0 on sensitive ports.97- **NACLs and network policies:** layer-4 controls for subnet-level restrictions.98- **Private connectivity:** use VPC endpoints / Private Service Connect; avoid public IPs for internal services.99- **DNS security:** enable DNS logging; use private DNS zones; protect against DNS hijacking.100- **DDoS protection:** enable cloud-native DDoS (Shield, Cloud Armor, DDoS Protection Standard).101102**Completion criterion:** network security baseline documented; exceptions justified.103104### 5. Compliance mapping105- **Frameworks:** SOC 2 (CC6, CC7), PCI-DSS (req 2, 3, 6, 8, 10, 12), HIPAA (164.312), CIS Controls (IG1/IG2), FedRAMP (Moderate / High).106- **Control mapping:** map each cloud control (encryption, logging, IAM, network) to framework requirements.107- **Evidence collection:** enable audit logs (CloudTrail, Cloud Audit Logs, Activity Log); store logs immutably.108- **Gap analysis:** identify controls not met; document compensating controls or remediation plans.109110**Completion criterion:** compliance matrix complete; gaps and compensating controls documented.111112### 6. Cloud security posture management (CSPM)113- **Tooling:** enable native CSPM (AWS Security Hub, GCP Security Command Center, Azure Defender) and/or third-party (Wiz, Prisma, Lacework).114- **Checks:** misconfigured storage (public S3/GCS/Blob), overly permissive IAM, unencrypted services, exposed secrets.115- **Automation:** auto-remediate low-severity findings (e.g., public bucket alerts); manual review for high-severity.116- **Continuous monitoring:** dashboards for open findings, trend analysis, mean-time-to-remediate (MTTR).117118**Completion criterion:** CSPM runbook complete; dashboards and alerting configured.119120### 7. Incident response and logging121- **Logging:** enable and centralise audit logs, VPC flow logs, application logs, Kubernetes audit logs.122- **Alerting:** define alert thresholds for anomalous IAM activity, data exfiltration indicators, privilege escalation.123- **Runbooks:** document response playbooks for common incidents (public bucket, compromised IAM key, DDoS, data breach).124- **Forensics:** enable immutable log storage; snapshot capabilities for compute and storage.125126**Completion criterion:** incident response runbook saved; logging and alerting verified.127128## Rules129130- Rule: enforce least-privilege IAM with deny-by-default; review and remove excess permissions quarterly.131- Rule: enable encryption at rest and in transit for all sensitive data; never store secrets in resource names or tags.132- Rule: use cloud-native security tools before third-party solutions; document exceptions.133- Rule: map every compliance requirement to a verifiable control and evidence source.134- Rule: never grant cloud admin / owner role to service accounts or CI/CD pipelines without explicit approval and just-in-time access.135- Rule: enable multi-factor authentication (MFA) for all human identities; use workload identity for machines.136- Rule: implement network segmentation and private connectivity for all internal traffic; public exposure must be explicitly justified.137138## Completion139140- the skill's completion criteria are explicitly checked141- the artifact is saved and validated142- any blockers or skipped validations are documented143- the next consumer is identified or the work is handed off144---145@include .agents/skills/platform/contract-base.xml