[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6AFQ4JJEDMVD1NZYSSCWNBJ":3,"skill-same:01M6AFQ4JJEDMVD1NZYSSCWNBJ":130},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":18,"categories":19,"keywords":30,"publishedAt":51,"linkOnly":52,"markdownContent":53,"markdownBody":54,"frontMatter":55,"refName":71,"commitSha":72,"skillDirectory":73,"forksCount":74,"repositoryHtmlUrl":75,"repositoryHomepageUrl":76,"ownerHtmlUrl":77,"ownerBlogUrl":78,"ownerDescription":79,"updatedAt":80,"install":81,"resources":94},"01M6AFQ4JJEDMVD1NZYSSCWNBJ","performing-container-image-hardening","容器镜像安全加固","Harden container images by minimizing attack surface, stripping unnecessary packages, implementing multi-stage builds, configuring non-root users, and applying CIS Docker Benchmark recommendations to produce secure, production-ready images. Use when building production container images, when compliance requires CIS Docker Benchmark adherence, or when shrinking image size to reduce vulnerability exposure from unused packages.","通过最小化攻击面、剥离不必要的软件包、实施多阶段构建、配置非 root 用户，以及应用 CIS Docker Benchmark 建议来加固容器镜像，以生成安全、可用于生产的镜像。在构建生产容器镜像、合规要求遵循 CIS Docker Benchmark，或需要缩小镜像体积以减少未使用软件包带来的漏洞暴露时使用。","mukul975\u002FAnthropic-Cybersecurity-Skills","mukul975","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F42860185?v=4","01M6ADEQR8T5M4EEG6C67BQCWF","Mahipal","01M6ADJPMYWG1E5GM1FWBE3128",36146,"Apache-2.0",null,"https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fperforming-container-image-hardening\u002FSKILL.md",[20,25],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BR4MYFKGCC4WCWVJ50KJ2C","安全工程师","PROFESSION","适用职业",{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8C664K3JQN4CNXKYKQEDRQK","云平台安全加固","SCENARIO","使用场景",[31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50],"performing container image hardening","hardening","image","compliance","container-hardening","secure-sdlc","cicd","t1195","t1059","Production","cis-benchmark","produce","benchmark","container images","packages","pr","secure","cybersecurity","devsecops","docker","2026-11-10 10:12:30",false,"---\nname: performing-container-image-hardening\ndescription: 'Harden container images by minimizing attack surface, stripping unnecessary\n  packages, implementing multi-stage builds, configuring non-root users, and applying\n  CIS Docker Benchmark recommendations to produce secure, production-ready images.\n  Use when building production container images, when compliance requires CIS Docker\n  Benchmark adherence, or when shrinking image size to reduce vulnerability exposure\n  from unused packages.\n\n  '\ndomain: cybersecurity\nsubdomain: devsecops\ntags:\n- devsecops\n- cicd\n- container-hardening\n- docker\n- cis-benchmark\n- secure-sdlc\nversion: 1.0.0\nauthor: mahipal\nlicense: Apache-2.0\nnist_csf:\n- PR.PS-01\n- GV.SC-07\n- ID.IM-04\n- PR.PS-04\nmitre_attack:\n- T1195\n- T1554\n- T1059.004\n- T1610\n- T1611\n---\n\n# Performing Container Image Hardening\n\n## When to Use\n\n- When building production container images that need minimal attack surface\n- When compliance requires CIS Docker Benchmark adherence for container configurations\n- When reducing image size to minimize vulnerability exposure from unused packages\n- When implementing defense-in-depth for containerized workloads\n- When migrating from fat base images to distroless or minimal images\n\n**Do not use** for runtime container security monitoring (use Falco), for host-level Docker daemon hardening (use CIS Docker Benchmark host checks), or for container orchestration security (use Kubernetes security scanning).\n\n## Prerequisites\n\n- Docker or BuildKit for multi-stage builds\n- Base image options: distroless, Alpine, slim, or scratch\n- Container scanning tool (Trivy) for validation\n- CIS Docker Benchmark reference\n\n## Workflow\n\n### Step 1: Use Multi-Stage Builds to Minimize Image Size\n\n```dockerfile\n# Build stage with all dependencies\nFROM python:3.12-bookworm AS builder\nWORKDIR \u002Fbuild\nCOPY requirements.txt .\nRUN pip install --no-cache-dir --prefix=\u002Finstall -r requirements.txt\nCOPY src\u002F .\u002Fsrc\u002F\nRUN python -m compileall src\u002F\n\n# Production stage with minimal base\nFROM python:3.12-slim-bookworm AS production\nRUN apt-get update && \\\n    apt-get install -y --no-install-recommends libpq5 && \\\n    rm -rf \u002Fvar\u002Flib\u002Fapt\u002Flists\u002F* && \\\n    apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false\n\nCOPY --from=builder \u002Finstall \u002Fusr\u002Flocal\nCOPY --from=builder \u002Fbuild\u002Fsrc \u002Fapp\u002Fsrc\n\nRUN groupadd -r appuser && useradd -r -g appuser -d \u002Fapp -s \u002Fsbin\u002Fnologin appuser\nRUN chown -R appuser:appuser \u002Fapp\n\nUSER appuser\nWORKDIR \u002Fapp\n\nHEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \\\n  CMD python -c \"import urllib.request; urllib.request.urlopen('http:\u002F\u002Flocalhost:8080\u002Fhealth')\" || exit 1\n\nEXPOSE 8080\nENTRYPOINT [\"python\", \"-m\", \"src.main\"]\n```\n\n### Step 2: Use Distroless Base Images\n\n```dockerfile\n# Go application with distroless\nFROM golang:1.22 AS builder\nWORKDIR \u002Fapp\nCOPY go.* .\u002F\nRUN go mod download\nCOPY . .\nRUN CGO_ENABLED=0 GOOS=linux go build -ldflags=\"-w -s\" -o \u002Fserver .\n\nFROM gcr.io\u002Fdistroless\u002Fstatic-debian12:nonroot\nCOPY --from=builder \u002Fserver \u002Fserver\nUSER nonroot:nonroot\nENTRYPOINT [\"\u002Fserver\"]\n```\n\n### Step 3: Remove Unnecessary Components\n\n```dockerfile\n# Hardened image checklist\nFROM ubuntu:24.04 AS base\n\nRUN apt-get update && \\\n    apt-get install -y --no-install-recommends \\\n      ca-certificates \\\n      libssl3 && \\\n    # Remove package manager to prevent runtime package installation\n    apt-get purge -y --auto-remove apt dpkg && \\\n    rm -rf \u002Fvar\u002Flib\u002Fapt\u002Flists\u002F* \\\n           \u002Fvar\u002Fcache\u002Fapt\u002F* \\\n           \u002Ftmp\u002F* \\\n           \u002Fvar\u002Ftmp\u002F* \\\n           \u002Fusr\u002Fshare\u002Fdoc\u002F* \\\n           \u002Fusr\u002Fshare\u002Fman\u002F* \\\n           \u002Fusr\u002Fshare\u002Finfo\u002F* \\\n           \u002Froot\u002F.cache\n\n# Remove shells if not needed\nRUN rm -f \u002Fbin\u002Fsh \u002Fbin\u002Fbash \u002Fusr\u002Fbin\u002Fsh 2>\u002Fdev\u002Fnull || true\n\n# Remove setuid\u002Fsetgid binaries\nRUN find \u002F -perm \u002F6000 -type f -exec chmod a-s {} + 2>\u002Fdev\u002Fnull || true\n```\n\n### Step 4: Configure Read-Only Filesystem\n\n```yaml\n# Kubernetes deployment with read-only root filesystem\napiVersion: apps\u002Fv1\nkind: Deployment\nmetadata:\n  name: hardened-app\nspec:\n  template:\n    spec:\n      securityContext:\n        runAsNonRoot: true\n        runAsUser: 65534\n        fsGroup: 65534\n        seccompProfile:\n          type: RuntimeDefault\n      containers:\n        - name: app\n          image: app:hardened\n          securityContext:\n            allowPrivilegeEscalation: false\n            readOnlyRootFilesystem: true\n            capabilities:\n              drop: [\"ALL\"]\n          volumeMounts:\n            - name: tmp\n              mountPath: \u002Ftmp\n            - name: cache\n              mountPath: \u002Fapp\u002Fcache\n      volumes:\n        - name: tmp\n          emptyDir:\n            sizeLimit: 100Mi\n        - name: cache\n          emptyDir:\n            sizeLimit: 50Mi\n```\n\n### Step 5: Pin Base Image by Digest\n\n```dockerfile\n# Pin to exact image digest for reproducibility\nFROM python:3.12-slim-bookworm@sha256:abcdef1234567890 AS production\n# This ensures the exact same base image is used every time\n```\n\n### Step 6: Validate Hardening with Automated Scanning\n\n```bash\n# Scan hardened image with Trivy\ntrivy image --severity HIGH,CRITICAL hardened-app:latest\n\n# Check CIS Docker Benchmark compliance\ndocker run --rm -v \u002Fvar\u002Frun\u002Fdocker.sock:\u002Fvar\u002Frun\u002Fdocker.sock \\\n  aquasec\u002Fdocker-bench-security\n\n# Verify no root processes\ndocker run --rm hardened-app:latest whoami\n# Expected: appuser (NOT root)\n\n# Verify read-only filesystem\ndocker run --rm hardened-app:latest touch \u002Ftest 2>&1\n# Expected: Read-only file system error\n```\n\n## Key Concepts\n\n| Term | Definition |\n|------|------------|\n| Multi-Stage Build | Docker build technique using multiple FROM stages to separate build and runtime, reducing final image size |\n| Distroless | Google-maintained minimal container images containing only the application and runtime dependencies |\n| Non-Root User | Running container processes as unprivileged user to limit impact of container escape exploits |\n| Read-Only Root | Mounting the container root filesystem as read-only to prevent runtime modification |\n| Image Digest | SHA256 hash uniquely identifying an exact image version, more precise than mutable tags |\n| Scratch Image | Empty Docker base image used for statically compiled binaries requiring no OS |\n| Security Context | Kubernetes pod\u002Fcontainer-level security settings controlling privileges, filesystem, and capabilities |\n\n## Tools & Systems\n\n- **Docker BuildKit**: Advanced Docker build engine supporting multi-stage builds and build secrets\n- **Distroless Images**: Google's minimal container base images (static, base, java, python, nodejs)\n- **docker-bench-security**: Script checking CIS Docker Benchmark compliance\n- **Trivy**: Container image vulnerability and misconfiguration scanner\n- **Hadolint**: Dockerfile linter enforcing best practices\n\n## Common Scenarios\n\n### Scenario: Reducing a 1.2GB Python Image to Under 150MB\n\n**Context**: A data science team uses `python:3.12` as base image (1.2GB) with scientific computing packages. The image has 200+ known CVEs from unnecessary system packages.\n\n**Approach**:\n1. Switch to `python:3.12-slim-bookworm` as base (150MB) and install only required system libraries\n2. Use multi-stage build: compile C extensions in builder stage, copy wheels to production\n3. Pin numpy, pandas, and scipy to pre-built wheels to avoid build dependencies in production\n4. Remove pip, setuptools, and wheel from the final image\n5. Create non-root user and set filesystem permissions\n6. Validate with Trivy: expect CVE count to drop from 200+ to under 20\n\n**Pitfalls**: Some Python packages require shared libraries at runtime (libgomp, libstdc++). Test the application thoroughly after removing system packages. Alpine-based images use musl libc which can cause compatibility issues with numpy and pandas.\n\n## Output Format\n\n```\nContainer Image Hardening Report\n==================================\nImage: app:hardened\nBase: python:3.12-slim-bookworm\nDate: 2026-02-23\n\nSIZE COMPARISON:\n  Before hardening: 1,247 MB (python:3.12)\n  After hardening:  143 MB  (python:3.12-slim + multi-stage)\n  Reduction: 88.5%\n\nSECURITY CHECKS:\n  [PASS] Non-root user configured (appuser:1000)\n  [PASS] HEALTHCHECK instruction present\n  [PASS] No setuid\u002Fsetgid binaries found\n  [PASS] Package manager removed\n  [PASS] Base image pinned by digest\n  [PASS] No shell access (\u002Fbin\u002Fsh removed)\n  [WARN] \u002Ftmp writable (emptyDir mounted)\n\nVULNERABILITY COMPARISON:\n  Before: 234 CVEs (12 Critical, 45 High)\n  After:  18 CVEs (0 Critical, 3 High)\n  Reduction: 92.3%\n```\n","# Performing Container Image Hardening\n\n## When to Use\n\n- When building production container images that need minimal attack surface\n- When compliance requires CIS Docker Benchmark adherence for container configurations\n- When reducing image size to minimize vulnerability exposure from unused packages\n- When implementing defense-in-depth for containerized workloads\n- When migrating from fat base images to distroless or minimal images\n\n**Do not use** for runtime container security monitoring (use Falco), for host-level Docker daemon hardening (use CIS Docker Benchmark host checks), or for container orchestration security (use Kubernetes security scanning).\n\n## Prerequisites\n\n- Docker or BuildKit for multi-stage builds\n- Base image options: distroless, Alpine, slim, or scratch\n- Container scanning tool (Trivy) for validation\n- CIS Docker Benchmark reference\n\n## Workflow\n\n### Step 1: Use Multi-Stage Builds to Minimize Image Size\n\n```dockerfile\n# Build stage with all dependencies\nFROM python:3.12-bookworm AS builder\nWORKDIR \u002Fbuild\nCOPY requirements.txt .\nRUN pip install --no-cache-dir --prefix=\u002Finstall -r requirements.txt\nCOPY src\u002F .\u002Fsrc\u002F\nRUN python -m compileall src\u002F\n\n# Production stage with minimal base\nFROM python:3.12-slim-bookworm AS production\nRUN apt-get update && \\\n    apt-get install -y --no-install-recommends libpq5 && \\\n    rm -rf \u002Fvar\u002Flib\u002Fapt\u002Flists\u002F* && \\\n    apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false\n\nCOPY --from=builder \u002Finstall \u002Fusr\u002Flocal\nCOPY --from=builder \u002Fbuild\u002Fsrc \u002Fapp\u002Fsrc\n\nRUN groupadd -r appuser && useradd -r -g appuser -d \u002Fapp -s \u002Fsbin\u002Fnologin appuser\nRUN chown -R appuser:appuser \u002Fapp\n\nUSER appuser\nWORKDIR \u002Fapp\n\nHEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \\\n  CMD python -c \"import urllib.request; urllib.request.urlopen('http:\u002F\u002Flocalhost:8080\u002Fhealth')\" || exit 1\n\nEXPOSE 8080\nENTRYPOINT [\"python\", \"-m\", \"src.main\"]\n```\n\n### Step 2: Use Distroless Base Images\n\n```dockerfile\n# Go application with distroless\nFROM golang:1.22 AS builder\nWORKDIR \u002Fapp\nCOPY go.* .\u002F\nRUN go mod download\nCOPY . .\nRUN CGO_ENABLED=0 GOOS=linux go build -ldflags=\"-w -s\" -o \u002Fserver .\n\nFROM gcr.io\u002Fdistroless\u002Fstatic-debian12:nonroot\nCOPY --from=builder \u002Fserver \u002Fserver\nUSER nonroot:nonroot\nENTRYPOINT [\"\u002Fserver\"]\n```\n\n### Step 3: Remove Unnecessary Components\n\n```dockerfile\n# Hardened image checklist\nFROM ubuntu:24.04 AS base\n\nRUN apt-get update && \\\n    apt-get install -y --no-install-recommends \\\n      ca-certificates \\\n      libssl3 && \\\n    # Remove package manager to prevent runtime package installation\n    apt-get purge -y --auto-remove apt dpkg && \\\n    rm -rf \u002Fvar\u002Flib\u002Fapt\u002Flists\u002F* \\\n           \u002Fvar\u002Fcache\u002Fapt\u002F* \\\n           \u002Ftmp\u002F* \\\n           \u002Fvar\u002Ftmp\u002F* \\\n           \u002Fusr\u002Fshare\u002Fdoc\u002F* \\\n           \u002Fusr\u002Fshare\u002Fman\u002F* \\\n           \u002Fusr\u002Fshare\u002Finfo\u002F* \\\n           \u002Froot\u002F.cache\n\n# Remove shells if not needed\nRUN rm -f \u002Fbin\u002Fsh \u002Fbin\u002Fbash \u002Fusr\u002Fbin\u002Fsh 2>\u002Fdev\u002Fnull || true\n\n# Remove setuid\u002Fsetgid binaries\nRUN find \u002F -perm \u002F6000 -type f -exec chmod a-s {} + 2>\u002Fdev\u002Fnull || true\n```\n\n### Step 4: Configure Read-Only Filesystem\n\n```yaml\n# Kubernetes deployment with read-only root filesystem\napiVersion: apps\u002Fv1\nkind: Deployment\nmetadata:\n  name: hardened-app\nspec:\n  template:\n    spec:\n      securityContext:\n        runAsNonRoot: true\n        runAsUser: 65534\n        fsGroup: 65534\n        seccompProfile:\n          type: RuntimeDefault\n      containers:\n        - name: app\n          image: app:hardened\n          securityContext:\n            allowPrivilegeEscalation: false\n            readOnlyRootFilesystem: true\n            capabilities:\n              drop: [\"ALL\"]\n          volumeMounts:\n            - name: tmp\n              mountPath: \u002Ftmp\n            - name: cache\n              mountPath: \u002Fapp\u002Fcache\n      volumes:\n        - name: tmp\n          emptyDir:\n            sizeLimit: 100Mi\n        - name: cache\n          emptyDir:\n            sizeLimit: 50Mi\n```\n\n### Step 5: Pin Base Image by Digest\n\n```dockerfile\n# Pin to exact image digest for reproducibility\nFROM python:3.12-slim-bookworm@sha256:abcdef1234567890 AS production\n# This ensures the exact same base image is used every time\n```\n\n### Step 6: Validate Hardening with Automated Scanning\n\n```bash\n# Scan hardened image with Trivy\ntrivy image --severity HIGH,CRITICAL hardened-app:latest\n\n# Check CIS Docker Benchmark compliance\ndocker run --rm -v \u002Fvar\u002Frun\u002Fdocker.sock:\u002Fvar\u002Frun\u002Fdocker.sock \\\n  aquasec\u002Fdocker-bench-security\n\n# Verify no root processes\ndocker run --rm hardened-app:latest whoami\n# Expected: appuser (NOT root)\n\n# Verify read-only filesystem\ndocker run --rm hardened-app:latest touch \u002Ftest 2>&1\n# Expected: Read-only file system error\n```\n\n## Key Concepts\n\n| Term | Definition |\n|------|------------|\n| Multi-Stage Build | Docker build technique using multiple FROM stages to separate build and runtime, reducing final image size |\n| Distroless | Google-maintained minimal container images containing only the application and runtime dependencies |\n| Non-Root User | Running container processes as unprivileged user to limit impact of container escape exploits |\n| Read-Only Root | Mounting the container root filesystem as read-only to prevent runtime modification |\n| Image Digest | SHA256 hash uniquely identifying an exact image version, more precise than mutable tags |\n| Scratch Image | Empty Docker base image used for statically compiled binaries requiring no OS |\n| Security Context | Kubernetes pod\u002Fcontainer-level security settings controlling privileges, filesystem, and capabilities |\n\n## Tools & Systems\n\n- **Docker BuildKit**: Advanced Docker build engine supporting multi-stage builds and build secrets\n- **Distroless Images**: Google's minimal container base images (static, base, java, python, nodejs)\n- **docker-bench-security**: Script checking CIS Docker Benchmark compliance\n- **Trivy**: Container image vulnerability and misconfiguration scanner\n- **Hadolint**: Dockerfile linter enforcing best practices\n\n## Common Scenarios\n\n### Scenario: Reducing a 1.2GB Python Image to Under 150MB\n\n**Context**: A data science team uses `python:3.12` as base image (1.2GB) with scientific computing packages. The image has 200+ known CVEs from unnecessary system packages.\n\n**Approach**:\n1. Switch to `python:3.12-slim-bookworm` as base (150MB) and install only required system libraries\n2. Use multi-stage build: compile C extensions in builder stage, copy wheels to production\n3. Pin numpy, pandas, and scipy to pre-built wheels to avoid build dependencies in production\n4. Remove pip, setuptools, and wheel from the final image\n5. Create non-root user and set filesystem permissions\n6. Validate with Trivy: expect CVE count to drop from 200+ to under 20\n\n**Pitfalls**: Some Python packages require shared libraries at runtime (libgomp, libstdc++). Test the application thoroughly after removing system packages. Alpine-based images use musl libc which can cause compatibility issues with numpy and pandas.\n\n## Output Format\n\n```\nContainer Image Hardening Report\n==================================\nImage: app:hardened\nBase: python:3.12-slim-bookworm\nDate: 2026-02-23\n\nSIZE COMPARISON:\n  Before hardening: 1,247 MB (python:3.12)\n  After hardening:  143 MB  (python:3.12-slim + multi-stage)\n  Reduction: 88.5%\n\nSECURITY CHECKS:\n  [PASS] Non-root user configured (appuser:1000)\n  [PASS] HEALTHCHECK instruction present\n  [PASS] No setuid\u002Fsetgid binaries found\n  [PASS] Package manager removed\n  [PASS] Base image pinned by digest\n  [PASS] No shell access (\u002Fbin\u002Fsh removed)\n  [WARN] \u002Ftmp writable (emptyDir mounted)\n\nVULNERABILITY COMPARISON:\n  Before: 234 CVEs (12 Critical, 45 High)\n  After:  18 CVEs (0 Critical, 3 High)\n  Reduction: 92.3%\n```\n",{"name":5,"tags":56,"author":57,"domain":48,"license":16,"version":58,"nist_csf":59,"subdomain":49,"description":64,"mitre_attack":65},[49,37,35,50,41,36],"mahipal","1.0.0",[60,61,62,63],"PR.PS-01","GV.SC-07","ID.IM-04","PR.PS-04","Harden container images by minimizing attack surface, stripping unnecessary packages, implementing multi-stage builds, configuring non-root users, and applying CIS Docker Benchmark recommendations to produce secure, production-ready images. Use when building production container images, when compliance requires CIS Docker Benchmark adherence, or when shrinking image size to reduce vulnerability exposure from unused packages.\n",[66,67,68,69,70],"T1195","T1554","T1059.004","T1610","T1611","main","54a798831d2266a3ca61ce68a7acb80b81160d57","skills\u002Fperforming-container-image-hardening",4425,"https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills","https:\u002F\u002Fmahipal.engineer\u002FAnthropic-Cybersecurity-Skills\u002F","https:\u002F\u002Fgithub.com\u002Fmukul975","Mahipal.engineer","🔐 Cybersecurity | 💻 Dev | 📷 Street Photographer\r\n🎓 MSc | 📚 Research & AI Security","2026-08-31 12:32:44",{"source":9,"skillName":5,"commands":82,"prompt":92,"zipAvailable":93},[83,86,89],{"tool":84,"command":85},"npx","npx skills add mukul975\u002FAnthropic-Cybersecurity-Skills --skill performing-container-image-hardening",{"tool":87,"command":88},"bunx","bunx skills add mukul975\u002FAnthropic-Cybersecurity-Skills --skill performing-container-image-hardening",{"tool":90,"command":91},"pnpm","pnpm dlx skills add mukul975\u002FAnthropic-Cybersecurity-Skills --skill performing-container-image-hardening","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fperforming-container-image-hardening\u002FSKILL.md",true,[95,101,106,112,116,120,126],{"path":96,"resourceType":97,"resourceTypeDesc":98,"sizeBytes":99,"sourceHtmlUrl":100},"assets\u002Ftemplate.md","ASSET","资产文件",1391,"https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fperforming-container-image-hardening\u002Fassets\u002Ftemplate.md",{"path":102,"resourceType":102,"resourceTypeDesc":103,"sizeBytes":104,"sourceHtmlUrl":105},"LICENSE","许可证",11255,"https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fperforming-container-image-hardening\u002FLICENSE",{"path":107,"resourceType":108,"resourceTypeDesc":109,"sizeBytes":110,"sourceHtmlUrl":111},"references\u002Fapi-reference.md","REFERENCE","参考文档",5250,"https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fperforming-container-image-hardening\u002Freferences\u002Fapi-reference.md",{"path":113,"resourceType":108,"resourceTypeDesc":109,"sizeBytes":114,"sourceHtmlUrl":115},"references\u002Fstandards.md",953,"https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fperforming-container-image-hardening\u002Freferences\u002Fstandards.md",{"path":117,"resourceType":108,"resourceTypeDesc":109,"sizeBytes":118,"sourceHtmlUrl":119},"references\u002Fworkflows.md",1827,"https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fperforming-container-image-hardening\u002Freferences\u002Fworkflows.md",{"path":121,"resourceType":122,"resourceTypeDesc":123,"sizeBytes":124,"sourceHtmlUrl":125},"scripts\u002Fagent.py","SCRIPT","脚本",11579,"https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fperforming-container-image-hardening\u002Fscripts\u002Fagent.py",{"path":127,"resourceType":122,"resourceTypeDesc":123,"sizeBytes":128,"sourceHtmlUrl":129},"scripts\u002Fprocess.py",7102,"https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fperforming-container-image-hardening\u002Fscripts\u002Fprocess.py",[131,161,190,221,252,284],{"skillNo":132,"name":133,"nameZh":134,"description":135,"descriptionZh":136,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":137,"categories":138,"keywords":143,"publishedAt":51},"01M6AGDM3HJXTKXX15ZZ0ZVCJ3","verifying-build-provenance-with-slsa-sigstore","SLSA 构建来源验证","Verifies artifact signatures and SLSA provenance using Sigstore's cosign (verify, verify-attestation, verify-blob-attestation) and slsa-verifier (verify-artifact), enforcing keyless OIDC builder identity and source repo against SLSA Build levels. Use in CI\u002FCD before deploying artifacts, when consuming third-party attestations, establishing a SLSA Build L3 pipeline, or confirming provenance during incident response or admission control.","使用 Sigstore 的 cosign（verify、verify-attestation、verify-blob-attestation）和 slsa-verifier（verify-artifact）验证工件签名和 SLSA 来源（provenance），强制校验 keyless OIDC 构建者身份和源仓库是否符合 SLSA Build 级别。适用于 CI\u002FCD 中部署工件前、消费第三方证明时、建立 SLSA Build L3 管道，或在事件响应或准入控制期间确认来源的场景。","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fverifying-build-provenance-with-slsa-sigstore\u002FSKILL.md",[139,140],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":141,"categoryName":142,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8C32Q37WAMK06SGMFC02VFP","软件供应链安全",[144,145,146,147,148,48,149,150,46,151,152,153,154,155,156,38,157,158,159,160],"sigstore","provenance","slsa","verifying build provenance with slsa sigstore","security","incident response","identity","code","artifacts","ci","supply-chain","pipeline","supply-chain-security","attestation","code-signing","cosign","keyless",{"skillNo":162,"name":163,"nameZh":164,"description":165,"descriptionZh":166,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":167,"categories":168,"keywords":173,"publishedAt":51},"01M6AGDGBPWYVZ2F11GFKJ4HZ9","validating-tpm-measured-boot-attestation","TPM 测量启动验证","Verifies TPM 2.0 measured-boot integrity and remote attestation with tpm2-tools -- reading PCRs (tpm2_pcrread), replaying the boot event log, generating and checking signed quotes (tpm2_quote\u002Ftpm2_checkquote), and sealing secrets to a PCR policy. Use to confirm a system booted trusted firmware\u002Fkernel for Zero Trust device posture, detect boot-chain tampering via PCR drift, or build a golden-value baseline for fleet attestation.","使用 tpm2-tools 验证 TPM 2.0 测量启动（measured boot）的完整性和远程证明：读取 PCR（tpm2_pcrread）、重放启动事件日志、生成并检查签名报价（tpm2_quote\u002Ftpm2_checkquote），以及将机密封印（seal）到 PCR 策略。适用于确认系统已启动可信固件\u002F内核以实现零信任（Zero Trust）设备状态、通过 PCR 漂移检测启动链篡改，或构建黄金值基线用于机群（fleet）证明。","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fvalidating-tpm-measured-boot-attestation\u002FSKILL.md",[169,170],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":171,"categoryName":172,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8C89JJEXGGRGHS6XVXDA46K","终端安全加固",[174,157,175,176,148,177,48,46,178,179,180,181,182,183,184,185,186,187,188,189],"boot","TPM","validating tpm measured boot attestation","policy","verification","ZeRO","firmware","Tools","measured-boot","PCR","integrity","secrets","remote-attestation","tpm2-tools","integrity-verification","trusted-computing",{"skillNo":191,"name":192,"nameZh":193,"description":194,"descriptionZh":195,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":196,"categories":197,"keywords":204,"publishedAt":51},"01M6AGDCW0Y4FXZ3362GT1941M","validating-backup-integrity-for-recovery","备份完整性验证","Validates backup integrity through cryptographic hash verification, automated restore testing, corruption detection, and recoverability checks to confirm backups are reliable for disaster recovery and ransomware response. Use before relying on backups for recovery, when building post-backup validation pipelines, auditing backup infrastructure for compliance, or checking immutable\u002Fair-gapped backups for silent corruption or tampering.","通过加密哈希验证、自动化恢复测试、损坏检测和可恢复性检查来验证备份完整性，确认备份对于灾难恢复和勒索软件响应是可靠的。适用于在依赖备份进行恢复之前、构建备份后验证管道、审计备份基础设施以满足合规要求，或检查不可变\u002Fair-gapped（气隙）备份是否存在静默损坏或篡改的场景。","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fvalidating-backup-integrity-for-recovery\u002FSKILL.md",[198,201],{"categoryNo":199,"categoryName":200,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQGD4WETX0HM3SM9QKQ15B","SRE 工程师",{"categoryNo":202,"categoryName":203,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BSSTY86MWS6W5GDQWB1ADQ","备份与灾难恢复",[184,205,206,207,208,48,209,210,178,34,211,212,213,214,215,216,217,218,219,220],"backup","recovery","validating backup integrity for recovery","testing","infrastructure","validation","hash-verification","incident-response","ransomware","cryptocurrency","detection","t1078","t1490","immutable","disaster-recovery","restore-testing",{"skillNo":222,"name":223,"nameZh":224,"description":225,"descriptionZh":226,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":227,"categories":228,"keywords":233,"publishedAt":51},"01M6AGD9GBG2KZ336AE763J3WH","triaging-windows-with-kape","KAPE Windows 取证收集","Runs KAPE (Kroll Artifact Parser and Extractor) to collect targeted forensic artifacts (registry hives, $MFT, event logs, prefetch, browser data) via Targets and parse them with Modules wrapping Eric Zimmerman's EZ Tools (PECmd, MFTECmd, RECmd). Use during early incident containment\u002Ftriage when full disk imaging is impractical but a defensible, parseable Windows artifact set is needed quickly, including at-scale remote collection.","运行 KAPE（Kroll Artifact Parser and Extractor），通过 Targets 收集目标取证工件（注册表配置单元、$MFT、事件日志、prefetch、浏览器数据），并使用封装 Eric Zimmerman 的 EZ Tools（PECmd、MFTECmd、RECmd）的 Modules 进行解析。适用于事件遏制\u002F分诊早期阶段——此时完整磁盘镜像不切实际，但需要快速获得可采信、可解析的 Windows 工件集，包括大规模远程收集。","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Ftriaging-windows-with-kape\u002FSKILL.md",[229,230],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":231,"categoryName":232,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8C9JZH3GWXPJ6CQG5P7J48Y","数字取证与电子证据分析",[234,235,236,48,237,238,239,240,241,242,243,244,245,246,247,248,181,249,250,251],"windows","kape","triaging windows with kape","registry","browser","logs","windows-forensics","dfir","mft","mftecmd","data","prefetch","eric-zimmerman","digital-forensics","SET","collection","pecmd","artifact-collection",{"skillNo":253,"name":254,"nameZh":255,"description":256,"descriptionZh":257,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":258,"categories":259,"keywords":264,"publishedAt":51},"01M6AGD5PW5J4EVZM958WD74ZQ","triaging-vulnerabilities-with-ssvc-framework","SSVC 漏洞优先级分诊","Triages and prioritizes vulnerabilities with CISA's Stakeholder-Specific Vulnerability Categorization (SSVC) decision tree, weighing exploitation status (via the CISA KEV catalog and FIRST EPSS API), technical impact, automatability, and mission prevalence to output Track\u002FTrack*\u002FAttend\u002FAct decisions. Use when prioritizing vulnerability scan results (OpenVAS, Nessus, Qualys) for remediation planning beyond raw CVSS scores.","使用 CISA 的 Stakeholder-Specific Vulnerability Categorization（SSVC，利益相关方特定漏洞分类）决策树对漏洞进行分诊和优先级排序，权衡利用状态（通过 CISA KEV 目录和 FIRST EPSS API）、技术影响、自动化程度和任务普遍性，输出 Track\u002FTrack*\u002FAttend\u002FAct 决策。适用于对漏洞扫描结果（OpenVAS、Nessus、Qualys）进行优先级排序以制定修复计划，而不局限于原始 CVSS 分数的场景。","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Ftriaging-vulnerabilities-with-ssvc-framework\u002FSKILL.md",[260,263],{"categoryNo":261,"categoryName":262,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BQV98CYQ7TEW2D1MRQ00TE","安全公告与漏洞管理",{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},[265,266,267,48,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283],"vulnerabilities","framework","triaging vulnerabilities with ssvc framework","status","planning","CISA","vulnerability-management","risk-management","nessus","qualys","openvas","cvss","remediation","risk","vulnerability","api","prioritization","ssvc","decision-tree",{"skillNo":285,"name":286,"nameZh":287,"description":288,"descriptionZh":289,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":290,"categories":291,"keywords":296,"publishedAt":51},"01M6AGD24TTQQM4CXG69E3B9TJ","triaging-security-incident","安全事件初步分诊","Performs initial triage of security incidents using the NIST SP 800-61r3 and SANS PICERL frameworks, classifying incident type, assigning priority by business impact, and routing to the appropriate response team. Use when a SIEM\u002FEDR alert needs human classification, concurrent alerts must be prioritized, or a user report or threat-intel IOC match requires initial incident categorization.","使用 NIST SP 800-61r3 和 SANS PICERL 框架对安全事件进行初步分诊，分类事件类型、按业务影响分配优先级，并路由到相应的响应团队。适用于 SIEM\u002FEDR 告警需要人工分类、并发告警必须确定优先级，或用户报告或威胁情报 IOC 匹配需要初步事件分类的场景。","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Ftriaging-security-incident\u002FSKILL.md",[292,293],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":294,"categoryName":295,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BTHYSJPJ500X64JJ5CH06D","安全事件响应与威胁狩猎",[148,297,48,298,299,300,301,302,303,304,305,216,306,217,307,308,309,310,311,312],"triaging security incident","siem","file","ioc","soc","NIST-800-61","NIST","severity","edr","execution","analysis","classification","severity-classification","incident-triage","SANS-PICERL","SOC-operations"]