opencode-skills-collection 4.0.68 → 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 +266 -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/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/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/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/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/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/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/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/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/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/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/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/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/zero-trust/SKILL.md +461 -0
- package/package.json +1 -1
- package/skills_index.json +6943 -323
|
@@ -0,0 +1,412 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: asset-inventory
|
|
3
|
+
description: Maintain IT asset inventory and configuration management database. Track
|
|
4
|
+
hardware, software, and cloud resources. Use when managing IT assets.
|
|
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
|
+
# Asset Inventory
|
|
21
|
+
|
|
22
|
+
Maintain comprehensive IT asset inventory using automated discovery, AWS Config rules, cloud asset discovery scripts, CMDB integration, and tagging enforcement for compliance and operational visibility.
|
|
23
|
+
|
|
24
|
+
## Asset Categories and Schema
|
|
25
|
+
|
|
26
|
+
```yaml
|
|
27
|
+
asset_categories:
|
|
28
|
+
compute:
|
|
29
|
+
cloud:
|
|
30
|
+
- EC2 instances / Azure VMs / GCE instances
|
|
31
|
+
- Lambda functions / Azure Functions / Cloud Functions
|
|
32
|
+
- ECS/EKS clusters and tasks
|
|
33
|
+
- Container images in registries
|
|
34
|
+
on_premise:
|
|
35
|
+
- Physical servers
|
|
36
|
+
- Virtual machines (VMware, Hyper-V)
|
|
37
|
+
|
|
38
|
+
storage:
|
|
39
|
+
- S3 buckets / Azure Storage / GCS buckets
|
|
40
|
+
- EBS volumes / Managed Disks / Persistent Disks
|
|
41
|
+
- RDS instances / Azure SQL / Cloud SQL
|
|
42
|
+
- DynamoDB tables / Cosmos DB / Firestore
|
|
43
|
+
- EFS / Azure Files / Filestore
|
|
44
|
+
|
|
45
|
+
network:
|
|
46
|
+
- VPCs / VNets / VPC Networks
|
|
47
|
+
- Load balancers (ALB, NLB, Azure LB, GCP LB)
|
|
48
|
+
- DNS zones and records
|
|
49
|
+
- VPN gateways and connections
|
|
50
|
+
- CDN distributions
|
|
51
|
+
|
|
52
|
+
security:
|
|
53
|
+
- IAM users, roles, and policies
|
|
54
|
+
- KMS keys / Key Vault keys
|
|
55
|
+
- Certificates (ACM, Key Vault, Certificate Manager)
|
|
56
|
+
- Security groups / NSGs / Firewall rules
|
|
57
|
+
- WAF configurations
|
|
58
|
+
|
|
59
|
+
applications:
|
|
60
|
+
- SaaS subscriptions
|
|
61
|
+
- Licensed software
|
|
62
|
+
- Custom applications
|
|
63
|
+
- APIs and integrations
|
|
64
|
+
|
|
65
|
+
endpoints:
|
|
66
|
+
- Laptops and desktops
|
|
67
|
+
- Mobile devices
|
|
68
|
+
- Printers and peripherals
|
|
69
|
+
|
|
70
|
+
asset_record_schema:
|
|
71
|
+
required_fields:
|
|
72
|
+
asset_id: "Unique identifier (auto-generated)"
|
|
73
|
+
name: "Human-readable name"
|
|
74
|
+
type: "Category from above taxonomy"
|
|
75
|
+
provider: "AWS / Azure / GCP / On-Premise / SaaS"
|
|
76
|
+
account_or_subscription: "Cloud account ID"
|
|
77
|
+
region: "Deployment region/location"
|
|
78
|
+
owner: "Team or individual responsible"
|
|
79
|
+
data_classification: "Public / Internal / Confidential / Restricted"
|
|
80
|
+
environment: "Production / Staging / Development / Sandbox"
|
|
81
|
+
status: "Active / Decommissioning / Retired"
|
|
82
|
+
created_date: "When the asset was provisioned"
|
|
83
|
+
last_seen: "Last automated discovery timestamp"
|
|
84
|
+
|
|
85
|
+
optional_fields:
|
|
86
|
+
cost_center: "For cost allocation"
|
|
87
|
+
compliance_scope: "SOC2 / HIPAA / PCI / None"
|
|
88
|
+
backup_policy: "Backup schedule reference"
|
|
89
|
+
dr_tier: "Critical / Essential / Standard / Non-essential"
|
|
90
|
+
expiration_date: "For time-limited resources"
|
|
91
|
+
tags: "Key-value pairs from cloud provider"
|
|
92
|
+
dependencies: "Upstream and downstream services"
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## AWS Resource Discovery Script
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
#!/usr/bin/env bash
|
|
99
|
+
# aws-asset-discovery.sh - Discover and inventory all AWS resources
|
|
100
|
+
|
|
101
|
+
OUTPUT_DIR="./asset-inventory/aws/$(date +%Y-%m-%d)"
|
|
102
|
+
mkdir -p "$OUTPUT_DIR"
|
|
103
|
+
ACCOUNT_ID=$(aws sts get-caller-identity --query Account --output text)
|
|
104
|
+
|
|
105
|
+
echo "=== AWS Asset Discovery for Account $ACCOUNT_ID ==="
|
|
106
|
+
|
|
107
|
+
# EC2 Instances
|
|
108
|
+
echo "--- EC2 Instances ---"
|
|
109
|
+
aws ec2 describe-instances \
|
|
110
|
+
--query 'Reservations[*].Instances[*].{
|
|
111
|
+
InstanceId:InstanceId,
|
|
112
|
+
Type:InstanceType,
|
|
113
|
+
State:State.Name,
|
|
114
|
+
AZ:Placement.AvailabilityZone,
|
|
115
|
+
VpcId:VpcId,
|
|
116
|
+
PrivateIP:PrivateIpAddress,
|
|
117
|
+
PublicIP:PublicIpAddress,
|
|
118
|
+
LaunchTime:LaunchTime,
|
|
119
|
+
Name:Tags[?Key==`Name`].Value|[0],
|
|
120
|
+
Owner:Tags[?Key==`Owner`].Value|[0],
|
|
121
|
+
Environment:Tags[?Key==`Environment`].Value|[0]
|
|
122
|
+
}' --output json | jq 'flatten' > "$OUTPUT_DIR/ec2-instances.json"
|
|
123
|
+
|
|
124
|
+
# RDS Databases
|
|
125
|
+
echo "--- RDS Instances ---"
|
|
126
|
+
aws rds describe-db-instances \
|
|
127
|
+
--query 'DBInstances[*].{
|
|
128
|
+
DBInstanceId:DBInstanceIdentifier,
|
|
129
|
+
Engine:Engine,
|
|
130
|
+
EngineVersion:EngineVersion,
|
|
131
|
+
Class:DBInstanceClass,
|
|
132
|
+
Status:DBInstanceStatus,
|
|
133
|
+
MultiAZ:MultiAZ,
|
|
134
|
+
Encrypted:StorageEncrypted,
|
|
135
|
+
Endpoint:Endpoint.Address,
|
|
136
|
+
BackupRetention:BackupRetentionPeriod
|
|
137
|
+
}' --output json > "$OUTPUT_DIR/rds-instances.json"
|
|
138
|
+
|
|
139
|
+
# S3 Buckets
|
|
140
|
+
echo "--- S3 Buckets ---"
|
|
141
|
+
aws s3api list-buckets --query 'Buckets[*].{Name:Name,Created:CreationDate}' --output json | \
|
|
142
|
+
jq -c '.[]' | while read -r bucket; do
|
|
143
|
+
name=$(echo "$bucket" | jq -r '.Name')
|
|
144
|
+
region=$(aws s3api get-bucket-location --bucket "$name" --query 'LocationConstraint' --output text 2>/dev/null)
|
|
145
|
+
encryption=$(aws s3api get-bucket-encryption --bucket "$name" 2>/dev/null | jq -r '.ServerSideEncryptionConfiguration.Rules[0].ApplyServerSideEncryptionByDefault.SSEAlgorithm' 2>/dev/null)
|
|
146
|
+
versioning=$(aws s3api get-bucket-versioning --bucket "$name" --query 'Status' --output text 2>/dev/null)
|
|
147
|
+
echo "{\"Name\":\"$name\",\"Region\":\"${region:-us-east-1}\",\"Encryption\":\"${encryption:-none}\",\"Versioning\":\"${versioning:-Disabled}\"}"
|
|
148
|
+
done | jq -s '.' > "$OUTPUT_DIR/s3-buckets.json"
|
|
149
|
+
|
|
150
|
+
# Lambda Functions
|
|
151
|
+
echo "--- Lambda Functions ---"
|
|
152
|
+
aws lambda list-functions \
|
|
153
|
+
--query 'Functions[*].{
|
|
154
|
+
Name:FunctionName,
|
|
155
|
+
Runtime:Runtime,
|
|
156
|
+
MemorySize:MemorySize,
|
|
157
|
+
Timeout:Timeout,
|
|
158
|
+
LastModified:LastModified,
|
|
159
|
+
CodeSize:CodeSize
|
|
160
|
+
}' --output json > "$OUTPUT_DIR/lambda-functions.json"
|
|
161
|
+
|
|
162
|
+
# VPCs and Security Groups
|
|
163
|
+
echo "--- VPCs ---"
|
|
164
|
+
aws ec2 describe-vpcs \
|
|
165
|
+
--query 'Vpcs[*].{
|
|
166
|
+
VpcId:VpcId,
|
|
167
|
+
CidrBlock:CidrBlock,
|
|
168
|
+
State:State,
|
|
169
|
+
IsDefault:IsDefault,
|
|
170
|
+
Name:Tags[?Key==`Name`].Value|[0]
|
|
171
|
+
}' --output json > "$OUTPUT_DIR/vpcs.json"
|
|
172
|
+
|
|
173
|
+
echo "--- Security Groups ---"
|
|
174
|
+
aws ec2 describe-security-groups \
|
|
175
|
+
--query 'SecurityGroups[*].{
|
|
176
|
+
GroupId:GroupId,
|
|
177
|
+
GroupName:GroupName,
|
|
178
|
+
VpcId:VpcId,
|
|
179
|
+
Description:Description,
|
|
180
|
+
IngressRuleCount:length(IpPermissions),
|
|
181
|
+
EgressRuleCount:length(IpPermissionsEgress)
|
|
182
|
+
}' --output json > "$OUTPUT_DIR/security-groups.json"
|
|
183
|
+
|
|
184
|
+
# IAM Users and Roles
|
|
185
|
+
echo "--- IAM Users ---"
|
|
186
|
+
aws iam list-users \
|
|
187
|
+
--query 'Users[*].{UserName:UserName,Created:CreateDate,PasswordLastUsed:PasswordLastUsed}' \
|
|
188
|
+
--output json > "$OUTPUT_DIR/iam-users.json"
|
|
189
|
+
|
|
190
|
+
echo "--- IAM Roles ---"
|
|
191
|
+
aws iam list-roles \
|
|
192
|
+
--query 'Roles[*].{RoleName:RoleName,Created:CreateDate,LastUsed:RoleLastUsed.LastUsedDate}' \
|
|
193
|
+
--output json > "$OUTPUT_DIR/iam-roles.json"
|
|
194
|
+
|
|
195
|
+
# EKS Clusters
|
|
196
|
+
echo "--- EKS Clusters ---"
|
|
197
|
+
aws eks list-clusters --query 'clusters' --output json | jq -r '.[]' | while read -r cluster; do
|
|
198
|
+
aws eks describe-cluster --name "$cluster" \
|
|
199
|
+
--query 'cluster.{Name:name,Version:version,Status:status,Endpoint:endpoint,Created:createdAt}'
|
|
200
|
+
done | jq -s '.' > "$OUTPUT_DIR/eks-clusters.json" 2>/dev/null
|
|
201
|
+
|
|
202
|
+
# KMS Keys
|
|
203
|
+
echo "--- KMS Keys ---"
|
|
204
|
+
aws kms list-keys --query 'Keys[*].KeyId' --output text | tr '\t' '\n' | while read -r key_id; do
|
|
205
|
+
aws kms describe-key --key-id "$key_id" \
|
|
206
|
+
--query 'KeyMetadata.{KeyId:KeyId,Description:Description,State:KeyState,Created:CreationDate,Manager:KeyManager}' 2>/dev/null
|
|
207
|
+
done | jq -s '.' > "$OUTPUT_DIR/kms-keys.json"
|
|
208
|
+
|
|
209
|
+
# Generate summary
|
|
210
|
+
echo "=== Inventory Summary ==="
|
|
211
|
+
echo "EC2 Instances: $(jq 'length' "$OUTPUT_DIR/ec2-instances.json")"
|
|
212
|
+
echo "RDS Instances: $(jq 'length' "$OUTPUT_DIR/rds-instances.json")"
|
|
213
|
+
echo "S3 Buckets: $(jq 'length' "$OUTPUT_DIR/s3-buckets.json")"
|
|
214
|
+
echo "Lambda Functions: $(jq 'length' "$OUTPUT_DIR/lambda-functions.json")"
|
|
215
|
+
echo "VPCs: $(jq 'length' "$OUTPUT_DIR/vpcs.json")"
|
|
216
|
+
echo "Security Groups: $(jq 'length' "$OUTPUT_DIR/security-groups.json")"
|
|
217
|
+
echo "IAM Users: $(jq 'length' "$OUTPUT_DIR/iam-users.json")"
|
|
218
|
+
echo "IAM Roles: $(jq 'length' "$OUTPUT_DIR/iam-roles.json")"
|
|
219
|
+
|
|
220
|
+
echo "Inventory saved to $OUTPUT_DIR"
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
## AWS Config Rules for Inventory Compliance
|
|
224
|
+
|
|
225
|
+
```bash
|
|
226
|
+
# Enable AWS Config recorder
|
|
227
|
+
aws configservice put-configuration-recorder \
|
|
228
|
+
--configuration-recorder name=default,roleARN=arn:aws:iam::123456789012:role/aws-config-role \
|
|
229
|
+
--recording-group allSupported=true,includeGlobalResourceTypes=true
|
|
230
|
+
|
|
231
|
+
# Start recording
|
|
232
|
+
aws configservice start-configuration-recorder --configuration-recorder-name default
|
|
233
|
+
|
|
234
|
+
# Enable required-tags Config rule
|
|
235
|
+
aws configservice put-config-rule --config-rule '{
|
|
236
|
+
"ConfigRuleName": "required-tags",
|
|
237
|
+
"Source": {
|
|
238
|
+
"Owner": "AWS",
|
|
239
|
+
"SourceIdentifier": "REQUIRED_TAGS"
|
|
240
|
+
},
|
|
241
|
+
"InputParameters": "{\"tag1Key\":\"Owner\",\"tag2Key\":\"Environment\",\"tag3Key\":\"CostCenter\",\"tag4Key\":\"DataClassification\"}",
|
|
242
|
+
"Scope": {
|
|
243
|
+
"ComplianceResourceTypes": [
|
|
244
|
+
"AWS::EC2::Instance",
|
|
245
|
+
"AWS::RDS::DBInstance",
|
|
246
|
+
"AWS::S3::Bucket",
|
|
247
|
+
"AWS::Lambda::Function"
|
|
248
|
+
]
|
|
249
|
+
}
|
|
250
|
+
}'
|
|
251
|
+
|
|
252
|
+
# Config rule for encryption compliance
|
|
253
|
+
aws configservice put-config-rule --config-rule '{
|
|
254
|
+
"ConfigRuleName": "encrypted-volumes",
|
|
255
|
+
"Source": {
|
|
256
|
+
"Owner": "AWS",
|
|
257
|
+
"SourceIdentifier": "ENCRYPTED_VOLUMES"
|
|
258
|
+
}
|
|
259
|
+
}'
|
|
260
|
+
|
|
261
|
+
aws configservice put-config-rule --config-rule '{
|
|
262
|
+
"ConfigRuleName": "rds-storage-encrypted",
|
|
263
|
+
"Source": {
|
|
264
|
+
"Owner": "AWS",
|
|
265
|
+
"SourceIdentifier": "RDS_STORAGE_ENCRYPTED"
|
|
266
|
+
}
|
|
267
|
+
}'
|
|
268
|
+
|
|
269
|
+
aws configservice put-config-rule --config-rule '{
|
|
270
|
+
"ConfigRuleName": "s3-bucket-server-side-encryption-enabled",
|
|
271
|
+
"Source": {
|
|
272
|
+
"Owner": "AWS",
|
|
273
|
+
"SourceIdentifier": "S3_BUCKET_SERVER_SIDE_ENCRYPTION_ENABLED"
|
|
274
|
+
}
|
|
275
|
+
}'
|
|
276
|
+
|
|
277
|
+
# Query AWS Config for all resources of a type
|
|
278
|
+
aws configservice list-discovered-resources --resource-type AWS::EC2::Instance
|
|
279
|
+
aws configservice list-discovered-resources --resource-type AWS::RDS::DBInstance
|
|
280
|
+
|
|
281
|
+
# Advanced query with AWS Config SQL
|
|
282
|
+
aws configservice select-resource-config \
|
|
283
|
+
--expression "SELECT resourceId, resourceType, tags, configuration.instanceType
|
|
284
|
+
WHERE resourceType = 'AWS::EC2::Instance'
|
|
285
|
+
AND tags.tag('Environment') = 'production'"
|
|
286
|
+
|
|
287
|
+
# Get compliance summary
|
|
288
|
+
aws configservice get-compliance-summary-by-config-rule
|
|
289
|
+
aws configservice get-compliance-summary-by-resource-type
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
## Tagging Enforcement
|
|
293
|
+
|
|
294
|
+
```yaml
|
|
295
|
+
# AWS Tag Policy (applied via AWS Organizations)
|
|
296
|
+
tag_policy:
|
|
297
|
+
tags:
|
|
298
|
+
Owner:
|
|
299
|
+
tag_key:
|
|
300
|
+
"@@assign": "Owner"
|
|
301
|
+
enforced_for:
|
|
302
|
+
"@@assign":
|
|
303
|
+
- "ec2:instance"
|
|
304
|
+
- "rds:db"
|
|
305
|
+
- "s3:bucket"
|
|
306
|
+
- "lambda:function"
|
|
307
|
+
|
|
308
|
+
Environment:
|
|
309
|
+
tag_key:
|
|
310
|
+
"@@assign": "Environment"
|
|
311
|
+
tag_value:
|
|
312
|
+
"@@assign":
|
|
313
|
+
- "production"
|
|
314
|
+
- "staging"
|
|
315
|
+
- "development"
|
|
316
|
+
- "sandbox"
|
|
317
|
+
|
|
318
|
+
DataClassification:
|
|
319
|
+
tag_key:
|
|
320
|
+
"@@assign": "DataClassification"
|
|
321
|
+
tag_value:
|
|
322
|
+
"@@assign":
|
|
323
|
+
- "public"
|
|
324
|
+
- "internal"
|
|
325
|
+
- "confidential"
|
|
326
|
+
- "restricted"
|
|
327
|
+
|
|
328
|
+
CostCenter:
|
|
329
|
+
tag_key:
|
|
330
|
+
"@@assign": "CostCenter"
|
|
331
|
+
```
|
|
332
|
+
|
|
333
|
+
```hcl
|
|
334
|
+
# Terraform - Enforce tags on all resources with default_tags
|
|
335
|
+
provider "aws" {
|
|
336
|
+
region = "us-east-1"
|
|
337
|
+
|
|
338
|
+
default_tags {
|
|
339
|
+
tags = {
|
|
340
|
+
ManagedBy = "terraform"
|
|
341
|
+
Environment = var.environment
|
|
342
|
+
Owner = var.team_name
|
|
343
|
+
CostCenter = var.cost_center
|
|
344
|
+
DataClassification = var.data_classification
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
```
|
|
349
|
+
|
|
350
|
+
## Multi-Cloud Discovery
|
|
351
|
+
|
|
352
|
+
```bash
|
|
353
|
+
#!/usr/bin/env bash
|
|
354
|
+
# multi-cloud-discovery.sh - Discover assets across AWS, Azure, and GCP
|
|
355
|
+
|
|
356
|
+
OUTPUT_DIR="./asset-inventory/multi-cloud/$(date +%Y-%m-%d)"
|
|
357
|
+
mkdir -p "$OUTPUT_DIR"
|
|
358
|
+
|
|
359
|
+
echo "=== Multi-Cloud Asset Discovery ==="
|
|
360
|
+
|
|
361
|
+
# AWS - using Resource Groups Tagging API
|
|
362
|
+
echo "--- AWS Resources ---"
|
|
363
|
+
aws resourcegroupstaggingapi get-resources \
|
|
364
|
+
--query 'ResourceTagMappingList[*].{ARN:ResourceARN,Tags:Tags}' \
|
|
365
|
+
--output json > "$OUTPUT_DIR/aws-all-resources.json"
|
|
366
|
+
echo "AWS resources: $(jq 'length' "$OUTPUT_DIR/aws-all-resources.json")"
|
|
367
|
+
|
|
368
|
+
# Azure - using Resource Graph
|
|
369
|
+
echo "--- Azure Resources ---"
|
|
370
|
+
az graph query -q "Resources | project name, type, location, resourceGroup, subscriptionId, tags" \
|
|
371
|
+
--output json > "$OUTPUT_DIR/azure-all-resources.json" 2>/dev/null
|
|
372
|
+
|
|
373
|
+
# GCP - using Cloud Asset Inventory
|
|
374
|
+
echo "--- GCP Resources ---"
|
|
375
|
+
gcloud asset search-all-resources \
|
|
376
|
+
--scope="organizations/ORG_ID" \
|
|
377
|
+
--format=json > "$OUTPUT_DIR/gcp-all-resources.json" 2>/dev/null
|
|
378
|
+
|
|
379
|
+
# Find untagged resources
|
|
380
|
+
echo "=== Untagged Resources ==="
|
|
381
|
+
jq '[.[] | select(.Tags == null or .Tags == [])] | length' "$OUTPUT_DIR/aws-all-resources.json"
|
|
382
|
+
|
|
383
|
+
echo "Discovery complete. Results in $OUTPUT_DIR"
|
|
384
|
+
```
|
|
385
|
+
|
|
386
|
+
|
|
387
|
+
## Contents
|
|
388
|
+
|
|
389
|
+
- [CMDB Integration](references/details.md)
|
|
390
|
+
- [Asset Inventory Checklist](references/details.md)
|
|
391
|
+
- [Best Practices](references/details.md)
|
|
392
|
+
|
|
393
|
+
## When to Use
|
|
394
|
+
|
|
395
|
+
- Building or maintaining an IT asset inventory for compliance frameworks (ISO 27001, SOC 2, FedRAMP)
|
|
396
|
+
- Implementing automated cloud resource discovery across accounts and regions
|
|
397
|
+
- Enforcing tagging standards for cost allocation, ownership, and data classification
|
|
398
|
+
- Integrating asset data with a CMDB for operational workflows
|
|
399
|
+
- Preparing for audits that require a complete system component inventory
|
|
400
|
+
|
|
401
|
+
## Limitations
|
|
402
|
+
|
|
403
|
+
- Guidance and checklists only; not legal advice and not a substitute for a qualified auditor.
|
|
404
|
+
- Docs-only import: upstream templates and scripts not bundled.
|
|
405
|
+
|
|
406
|
+
### Example
|
|
407
|
+
|
|
408
|
+
```markdown
|
|
409
|
+
Map this skill's control checklist to our current evidence and list gaps.
|
|
410
|
+
```
|
|
411
|
+
|
|
412
|
+
> 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.
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
# Details (moved from SKILL.md)
|
|
2
|
+
|
|
3
|
+
> Extended reference content for `asset-inventory`, kept under `references/` so the entrypoint stays within the audit budget.
|
|
4
|
+
|
|
5
|
+
## CMDB Integration
|
|
6
|
+
|
|
7
|
+
```python
|
|
8
|
+
"""
|
|
9
|
+
CMDB sync script - Normalize cloud assets and push to CMDB API.
|
|
10
|
+
"""
|
|
11
|
+
import json
|
|
12
|
+
import requests
|
|
13
|
+
from datetime import datetime, timezone
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class CMDBSync:
|
|
17
|
+
def __init__(self, cmdb_url, api_token):
|
|
18
|
+
self.cmdb_url = cmdb_url
|
|
19
|
+
self.headers = {
|
|
20
|
+
"Authorization": f"Bearer {api_token}",
|
|
21
|
+
"Content-Type": "application/json",
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
def normalize_aws_instance(self, instance):
|
|
25
|
+
"""Convert AWS EC2 instance to common asset schema."""
|
|
26
|
+
tags = {t["Key"]: t["Value"] for t in (instance.get("Tags") or [])}
|
|
27
|
+
return {
|
|
28
|
+
"asset_id": f"aws:{instance['InstanceId']}",
|
|
29
|
+
"name": tags.get("Name", instance["InstanceId"]),
|
|
30
|
+
"type": "compute",
|
|
31
|
+
"provider": "aws",
|
|
32
|
+
"region": instance.get("AZ", "unknown")[:-1],
|
|
33
|
+
"configuration": {
|
|
34
|
+
"instance_type": instance.get("Type"),
|
|
35
|
+
"state": instance.get("State"),
|
|
36
|
+
"vpc_id": instance.get("VpcId"),
|
|
37
|
+
},
|
|
38
|
+
"owner": tags.get("Owner", "unassigned"),
|
|
39
|
+
"environment": tags.get("Environment", "unknown"),
|
|
40
|
+
"data_classification": tags.get("DataClassification", "unknown"),
|
|
41
|
+
"status": "active" if instance.get("State") == "running" else "stopped",
|
|
42
|
+
"last_seen": datetime.now(timezone.utc).isoformat(),
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
def sync_assets(self, assets):
|
|
46
|
+
"""Push normalized assets to CMDB."""
|
|
47
|
+
results = {"created": 0, "updated": 0, "errors": 0}
|
|
48
|
+
for asset in assets:
|
|
49
|
+
try:
|
|
50
|
+
resp = requests.get(
|
|
51
|
+
f"{self.cmdb_url}/assets/{asset['asset_id']}",
|
|
52
|
+
headers=self.headers,
|
|
53
|
+
)
|
|
54
|
+
if resp.status_code == 200:
|
|
55
|
+
requests.put(
|
|
56
|
+
f"{self.cmdb_url}/assets/{asset['asset_id']}",
|
|
57
|
+
headers=self.headers,
|
|
58
|
+
json=asset,
|
|
59
|
+
)
|
|
60
|
+
results["updated"] += 1
|
|
61
|
+
else:
|
|
62
|
+
requests.post(
|
|
63
|
+
f"{self.cmdb_url}/assets",
|
|
64
|
+
headers=self.headers,
|
|
65
|
+
json=asset,
|
|
66
|
+
)
|
|
67
|
+
results["created"] += 1
|
|
68
|
+
except Exception:
|
|
69
|
+
results["errors"] += 1
|
|
70
|
+
return results
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
## Asset Inventory Checklist
|
|
75
|
+
|
|
76
|
+
```yaml
|
|
77
|
+
asset_inventory_checklist:
|
|
78
|
+
discovery:
|
|
79
|
+
- [ ] Automated discovery scripts running for all cloud accounts
|
|
80
|
+
- [ ] Discovery covers all resource types (compute, storage, network, IAM)
|
|
81
|
+
- [ ] Multi-region discovery enabled
|
|
82
|
+
- [ ] On-premise assets cataloged
|
|
83
|
+
- [ ] SaaS subscriptions inventoried
|
|
84
|
+
- [ ] Discovery runs daily (minimum weekly)
|
|
85
|
+
|
|
86
|
+
classification:
|
|
87
|
+
- [ ] Required tags defined (Owner, Environment, DataClassification, CostCenter)
|
|
88
|
+
- [ ] Tag enforcement via AWS Organizations tag policies
|
|
89
|
+
- [ ] Tag enforcement via Terraform default_tags
|
|
90
|
+
- [ ] Tag enforcement via CI/CD policy checks (Checkov, OPA)
|
|
91
|
+
- [ ] Untagged resource reports generated and tracked
|
|
92
|
+
|
|
93
|
+
configuration_management:
|
|
94
|
+
- [ ] AWS Config enabled in all regions
|
|
95
|
+
- [ ] Config rules enforce encryption, tagging, and security baselines
|
|
96
|
+
- [ ] Configuration compliance summary reviewed weekly
|
|
97
|
+
- [ ] Drift detection enabled for IaC-managed resources
|
|
98
|
+
|
|
99
|
+
cmdb:
|
|
100
|
+
- [ ] CMDB sync automated from cloud discovery
|
|
101
|
+
- [ ] Common schema defined across all providers
|
|
102
|
+
- [ ] Reconciliation process identifies orphaned records
|
|
103
|
+
- [ ] New resources auto-assigned default owner
|
|
104
|
+
- [ ] Asset lifecycle tracked (created, active, decommissioning, retired)
|
|
105
|
+
|
|
106
|
+
governance:
|
|
107
|
+
- [ ] Asset owners assigned and current
|
|
108
|
+
- [ ] Quarterly inventory reconciliation conducted
|
|
109
|
+
- [ ] Compliance scope tagging accurate (SOC2, HIPAA, PCI)
|
|
110
|
+
- [ ] Asset inventory available for auditor review
|
|
111
|
+
- [ ] Decommissioned assets tracked for data retention compliance
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
## Best Practices
|
|
116
|
+
|
|
117
|
+
- Automate discovery rather than relying on manual inventory: cloud environments change too fast for spreadsheets
|
|
118
|
+
- Use AWS Config, Azure Resource Graph, and GCP Cloud Asset Inventory as authoritative data sources
|
|
119
|
+
- Enforce tagging at provisioning time through IaC defaults and policy-as-code guardrails
|
|
120
|
+
- Assign every asset an owner: unowned resources become security and cost liabilities
|
|
121
|
+
- Reconcile inventory regularly and investigate orphaned assets (CMDB record with no real resource and vice versa)
|
|
122
|
+
- Track data classification as a mandatory tag to support compliance scoping decisions
|
|
123
|
+
- Maintain asset lifecycle states to distinguish active resources from those being decommissioned
|
|
124
|
+
- Integrate asset inventory with incident response to quickly identify affected systems during investigations
|
|
125
|
+
- Export inventory data for compliance audits in accessible formats (CSV, JSON)
|
|
126
|
+
- Review untagged and unclassified resource reports weekly to maintain inventory quality
|
|
127
|
+
|