[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7AB9ECMGR9R95GZPHAR7VGD":3,"skill-same:01M7AB9ECMGR9R95GZPHAR7VGD":85},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":16,"sourceHtmlUrl":17,"categories":18,"keywords":19,"publishedAt":20,"linkOnly":21,"markdownContent":22,"markdownBody":23,"frontMatter":24,"refName":48,"commitSha":49,"skillDirectory":50,"forksCount":14,"repositoryHtmlUrl":51,"repositoryHomepageUrl":6,"ownerHtmlUrl":52,"ownerBlogUrl":6,"ownerDescription":53,"updatedAt":54,"install":55,"resources":68},"01M7AB9ECMGR9R95GZPHAR7VGD","securing-container-registry-images",null,"Secures container registry images (ECR, ACR, GCR, Docker Hub) by scanning with Trivy and Grype, signing with Cosign and Sigstore, configuring registry access controls, and building CI\u002FCD pipelines that block unscanned or unsigned images. Use when establishing registry security controls or enforcing scan\u002Fsignature checks before image promotion.","NeelakshSaxena\u002FVayu","NeelakshSaxena","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F87892838?v=4","01M7A3B9YFS6F6N9DD1787DT86","Neelaksh Saxena","01M7A3B9ZKBT09MNMPX2XN69BY",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fsecuring-container-registry-images\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fsecuring-container-registry-images\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: securing-container-registry-images\ndescription: 'Secures container registry images (ECR, ACR, GCR, Docker Hub) by scanning\n  with Trivy and Grype, signing with Cosign and Sigstore, configuring registry access\n  controls, and building CI\u002FCD pipelines that block unscanned or unsigned images.\n  Use when establishing registry security controls or enforcing scan\u002Fsignature checks\n  before image promotion.\n\n  '\ndomain: cybersecurity\nsubdomain: cloud-security\ntags:\n- cloud-security\n- containers\n- registry\n- image-scanning\n- trivy\n- cosign\n- supply-chain\nversion: '1.0'\nauthor: mahipal\nlicense: Apache-2.0\nnist_csf:\n- PR.IR-01\n- ID.AM-08\n- GV.SC-06\n- DE.CM-01\nmitre_attack:\n- T1078.004\n- T1530\n- T1537\n- T1580\n- T1610\n---\n\n# Securing Container Registry Images\n\n## When to Use\n\n- When establishing security controls for container image registries (ECR, ACR, GCR, Docker Hub)\n- When building CI\u002FCD pipelines that enforce vulnerability scanning before image promotion\n- When implementing image signing and verification to prevent supply chain attacks\n- When auditing existing registries for vulnerable, unscanned, or unsigned images\n- When compliance requires software bill of materials (SBOM) for deployed container images\n\n**Do not use** for runtime container security (use Falco or Sysdig), for Kubernetes admission control (use OPA Gatekeeper or Kyverno after establishing registry controls), or for host-level vulnerability scanning (use Amazon Inspector or Qualys).\n\n## Prerequisites\n\n- Trivy installed (`brew install trivy` or `apt install trivy`)\n- Grype installed (`curl -sSfL https:\u002F\u002Fraw.githubusercontent.com\u002Fanchore\u002Fgrype\u002Fmain\u002Finstall.sh | sh`)\n- Cosign installed for image signing (`go install github.com\u002Fsigstore\u002Fcosign\u002Fv2\u002Fcmd\u002Fcosign@latest`)\n- Syft installed for SBOM generation (`curl -sSfL https:\u002F\u002Fraw.githubusercontent.com\u002Fanchore\u002Fsyft\u002Fmain\u002Finstall.sh | sh`)\n- Container registry access (ECR, ACR, GCR, or private registry)\n\n## Workflow\n\n### Step 1: Scan Images for Vulnerabilities with Trivy\n\nRun comprehensive vulnerability scans against container images before and after pushing to the registry.\n\n```bash\n# Scan a local image for vulnerabilities\ntrivy image --severity HIGH,CRITICAL myapp:latest\n\n# Scan a remote registry image\ntrivy image --severity HIGH,CRITICAL 123456789012.dkr.ecr.us-east-1.amazonaws.com\u002Fmyapp:latest\n\n# Scan with JSON output for CI\u002FCD processing\ntrivy image --format json --output trivy-results.json myapp:latest\n\n# Scan for vulnerabilities AND misconfigurations\ntrivy image --scanners vuln,misconfig,secret myapp:latest\n\n# Scan a specific image with SBOM output\ntrivy image --format spdx-json --output sbom.json myapp:latest\n\n# Fail CI\u002FCD if critical vulnerabilities found\ntrivy image --exit-code 1 --severity CRITICAL myapp:latest\n```\n\n### Step 2: Scan with Grype for Additional Coverage\n\nUse Grype as a complementary scanner for broader vulnerability database coverage.\n\n```bash\n# Scan image with Grype\ngrype myapp:latest\n\n# Scan with severity threshold\ngrype myapp:latest --fail-on critical\n\n# Output in JSON for processing\ngrype myapp:latest -o json > grype-results.json\n\n# Scan an SBOM instead of the image directly\nsyft myapp:latest -o spdx-json > sbom.json\ngrype sbom:sbom.json\n\n# Scan a directory-based image export\ngrype dir:\u002Fpath\u002Fto\u002Fimage-rootfs\n```\n\n### Step 3: Generate Software Bill of Materials (SBOM)\n\nCreate SBOMs for all images to maintain an inventory of software components and dependencies.\n\n```bash\n# Generate SBOM with Syft in SPDX format\nsyft myapp:latest -o spdx-json > sbom-spdx.json\n\n# Generate SBOM in CycloneDX format\nsyft myapp:latest -o cyclonedx-json > sbom-cyclonedx.json\n\n# Attach SBOM to the image as an OCI artifact\ncosign attach sbom --sbom sbom-spdx.json \\\n  123456789012.dkr.ecr.us-east-1.amazonaws.com\u002Fmyapp:latest\n\n# Verify SBOM contents\nsyft myapp:latest -o table | head -50\n```\n\n### Step 4: Sign Images with Cosign and Sigstore\n\nImplement image signing to ensure image integrity and authenticity in the supply chain.\n\n```bash\n# Generate a key pair for signing\ncosign generate-key-pair\n\n# Sign an image in the registry\ncosign sign --key cosign.key \\\n  123456789012.dkr.ecr.us-east-1.amazonaws.com\u002Fmyapp:latest\n\n# Sign using keyless signing with Sigstore (OIDC-based)\ncosign sign --yes \\\n  123456789012.dkr.ecr.us-east-1.amazonaws.com\u002Fmyapp:latest\n\n# Verify image signature\ncosign verify --key cosign.pub \\\n  123456789012.dkr.ecr.us-east-1.amazonaws.com\u002Fmyapp:latest\n\n# Verify keyless signature\ncosign verify \\\n  --certificate-identity developer@company.com \\\n  --certificate-oidc-issuer https:\u002F\u002Faccounts.google.com \\\n  123456789012.dkr.ecr.us-east-1.amazonaws.com\u002Fmyapp:latest\n\n# Add attestation with scan results\ncosign attest --predicate trivy-results.json \\\n  --key cosign.key \\\n  123456789012.dkr.ecr.us-east-1.amazonaws.com\u002Fmyapp:latest\n```\n\n### Step 5: Configure Registry-Level Security Controls\n\nSet up registry-specific security features for ECR, ACR, and GCR.\n\n```bash\n# AWS ECR: Enable image scanning on push\naws ecr put-image-scanning-configuration \\\n  --repository-name myapp \\\n  --image-scanning-configuration scanOnPush=true\n\n# ECR: Set image tag immutability (prevent tag overwrites)\naws ecr put-image-tag-mutability \\\n  --repository-name myapp \\\n  --image-tag-mutability IMMUTABLE\n\n# ECR: Set lifecycle policy to clean up untagged images\naws ecr put-lifecycle-policy \\\n  --repository-name myapp \\\n  --lifecycle-policy-text '{\n    \"rules\": [{\n      \"rulePriority\": 1,\n      \"description\": \"Remove untagged images after 7 days\",\n      \"selection\": {\"tagStatus\": \"untagged\", \"countType\": \"sinceImagePushed\", \"countUnit\": \"days\", \"countNumber\": 7},\n      \"action\": {\"type\": \"expire\"}\n    }]\n  }'\n\n# ECR: Get scan findings for an image\naws ecr describe-image-scan-findings \\\n  --repository-name myapp \\\n  --image-id imageTag=latest \\\n  --query 'imageScanFindings.findingSeverityCounts'\n\n# Azure ACR: Enable Defender for container registries\naz security pricing create --name ContainerRegistry --tier standard\n\n# GCR: Enable Container Analysis\ngcloud services enable containeranalysis.googleapis.com\ngcloud artifacts docker images list-vulnerabilities \\\n  LOCATION-docker.pkg.dev\u002FPROJECT\u002FREPO\u002FIMAGE@sha256:DIGEST\n```\n\n### Step 6: Build CI\u002FCD Pipeline with Security Gates\n\nIntegrate scanning and signing into the CI\u002FCD pipeline as mandatory gates.\n\n```yaml\n# GitHub Actions: Scan, sign, and push image\nname: Container Security Pipeline\non: push\n\njobs:\n  build-scan-sign:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions\u002Fcheckout@v4\n\n      - name: Build image\n        run: docker build -t myapp:${{ github.sha }} .\n\n      - name: Trivy vulnerability scan\n        uses: aquasecurity\u002Ftrivy-action@master\n        with:\n          image-ref: myapp:${{ github.sha }}\n          format: json\n          output: trivy-results.json\n          severity: CRITICAL,HIGH\n          exit-code: 1\n\n      - name: Generate SBOM\n        run: syft myapp:${{ github.sha }} -o spdx-json > sbom.json\n\n      - name: Push to ECR\n        run: |\n          aws ecr get-login-password | docker login --username AWS --password-stdin $ECR_REGISTRY\n          docker tag myapp:${{ github.sha }} $ECR_REGISTRY\u002Fmyapp:${{ github.sha }}\n          docker push $ECR_REGISTRY\u002Fmyapp:${{ github.sha }}\n\n      - name: Sign image with Cosign\n        run: |\n          cosign sign --key env:\u002F\u002FCOSIGN_PRIVATE_KEY \\\n            $ECR_REGISTRY\u002Fmyapp:${{ github.sha }}\n\n      - name: Attach SBOM\n        run: |\n          cosign attach sbom --sbom sbom.json \\\n            $ECR_REGISTRY\u002Fmyapp:${{ github.sha }}\n```\n\n## Key Concepts\n\n| Term | Definition |\n|------|------------|\n| Container Image Scanning | Automated analysis of container image layers to identify known vulnerabilities in OS packages and application dependencies |\n| Image Signing | Cryptographic attestation that verifies the authenticity and integrity of a container image using Cosign or Notation |\n| SBOM | Software Bill of Materials, a comprehensive inventory of software components, libraries, and dependencies in a container image |\n| Tag Immutability | Registry setting that prevents overwriting existing image tags, ensuring that a tag always refers to the same image digest |\n| Sigstore | Open-source project providing keyless signing, transparency logs, and verification tooling for software supply chain security |\n| Image Attestation | Cryptographically signed metadata attached to an image (scan results, SBOM, build provenance) that can be verified before deployment |\n\n## Tools & Systems\n\n- **Trivy**: Comprehensive vulnerability scanner for container images, filesystems, git repos, and Kubernetes resources\n- **Grype**: Anchore's vulnerability scanner with broad vulnerability database coverage for container images and SBOMs\n- **Cosign**: Sigstore tool for signing, verifying, and attesting container images with key-based or keyless workflows\n- **Syft**: SBOM generation tool supporting SPDX and CycloneDX formats for container images and filesystems\n- **AWS ECR**: Container registry with built-in scanning, tag immutability, and lifecycle policies\n\n## Common Scenarios\n\n### Scenario: Implementing a Secure Image Promotion Pipeline\n\n**Context**: A development team pushes images to a dev registry without security controls. The security team needs to implement a promotion pipeline that scans, signs, and promotes only approved images to the production registry.\n\n**Approach**:\n1. Configure ECR scanning on push for the development repository\n2. Add Trivy scanning as a CI\u002FCD gate that blocks images with CRITICAL vulnerabilities\n3. Generate SBOMs with Syft and store alongside image scan results\n4. Sign approved images with Cosign after scanning passes\n5. Configure the production registry to require image signatures for all pushes\n6. Set up Kyverno or OPA Gatekeeper in production Kubernetes to verify signatures before pod creation\n7. Implement lifecycle policies to clean up untagged and old images in both registries\n\n**Pitfalls**: Vulnerability databases are updated constantly. An image that passes scanning today may have new CRITICAL vulnerabilities discovered tomorrow. Implement continuous scanning of already-deployed images, not just at build time. Image signing keys must be securely stored in KMS or Vault, not in CI\u002FCD environment variables.\n\n## Output Format\n\n```\nContainer Registry Security Report\n=====================================\nRegistry: 123456789012.dkr.ecr.us-east-1.amazonaws.com\nRepositories: 24\nReport Date: 2026-02-23\n\nIMAGE INVENTORY:\n  Total images: 342\n  Images scanned: 298 (87%)\n  Images signed: 156 (46%)\n  Images with SBOM: 134 (39%)\n\nVULNERABILITY SUMMARY:\n  Critical vulnerabilities:    23 (across 8 images)\n  High vulnerabilities:       145 (across 34 images)\n  Medium vulnerabilities:     456 (across 67 images)\n  Images with no vulns:       89\n\nCRITICAL IMAGES REQUIRING REMEDIATION:\n  myapp:1.2.3           - 5 CRITICAL (CVE-2026-xxxx in openssl)\n  api-gateway:2.0.1     - 3 CRITICAL (CVE-2026-yyyy in log4j)\n  worker:latest         - 4 CRITICAL (CVE-2026-zzzz in glibc)\n\nREGISTRY CONFIGURATION:\n  Scan on push enabled:     18 \u002F 24 repositories\n  Tag immutability:         12 \u002F 24 repositories\n  Lifecycle policies:       20 \u002F 24 repositories\n  Image signing enforced:    8 \u002F 24 repositories\n```\n","# Securing Container Registry Images\n\n## When to Use\n\n- When establishing security controls for container image registries (ECR, ACR, GCR, Docker Hub)\n- When building CI\u002FCD pipelines that enforce vulnerability scanning before image promotion\n- When implementing image signing and verification to prevent supply chain attacks\n- When auditing existing registries for vulnerable, unscanned, or unsigned images\n- When compliance requires software bill of materials (SBOM) for deployed container images\n\n**Do not use** for runtime container security (use Falco or Sysdig), for Kubernetes admission control (use OPA Gatekeeper or Kyverno after establishing registry controls), or for host-level vulnerability scanning (use Amazon Inspector or Qualys).\n\n## Prerequisites\n\n- Trivy installed (`brew install trivy` or `apt install trivy`)\n- Grype installed (`curl -sSfL https:\u002F\u002Fraw.githubusercontent.com\u002Fanchore\u002Fgrype\u002Fmain\u002Finstall.sh | sh`)\n- Cosign installed for image signing (`go install github.com\u002Fsigstore\u002Fcosign\u002Fv2\u002Fcmd\u002Fcosign@latest`)\n- Syft installed for SBOM generation (`curl -sSfL https:\u002F\u002Fraw.githubusercontent.com\u002Fanchore\u002Fsyft\u002Fmain\u002Finstall.sh | sh`)\n- Container registry access (ECR, ACR, GCR, or private registry)\n\n## Workflow\n\n### Step 1: Scan Images for Vulnerabilities with Trivy\n\nRun comprehensive vulnerability scans against container images before and after pushing to the registry.\n\n```bash\n# Scan a local image for vulnerabilities\ntrivy image --severity HIGH,CRITICAL myapp:latest\n\n# Scan a remote registry image\ntrivy image --severity HIGH,CRITICAL 123456789012.dkr.ecr.us-east-1.amazonaws.com\u002Fmyapp:latest\n\n# Scan with JSON output for CI\u002FCD processing\ntrivy image --format json --output trivy-results.json myapp:latest\n\n# Scan for vulnerabilities AND misconfigurations\ntrivy image --scanners vuln,misconfig,secret myapp:latest\n\n# Scan a specific image with SBOM output\ntrivy image --format spdx-json --output sbom.json myapp:latest\n\n# Fail CI\u002FCD if critical vulnerabilities found\ntrivy image --exit-code 1 --severity CRITICAL myapp:latest\n```\n\n### Step 2: Scan with Grype for Additional Coverage\n\nUse Grype as a complementary scanner for broader vulnerability database coverage.\n\n```bash\n# Scan image with Grype\ngrype myapp:latest\n\n# Scan with severity threshold\ngrype myapp:latest --fail-on critical\n\n# Output in JSON for processing\ngrype myapp:latest -o json > grype-results.json\n\n# Scan an SBOM instead of the image directly\nsyft myapp:latest -o spdx-json > sbom.json\ngrype sbom:sbom.json\n\n# Scan a directory-based image export\ngrype dir:\u002Fpath\u002Fto\u002Fimage-rootfs\n```\n\n### Step 3: Generate Software Bill of Materials (SBOM)\n\nCreate SBOMs for all images to maintain an inventory of software components and dependencies.\n\n```bash\n# Generate SBOM with Syft in SPDX format\nsyft myapp:latest -o spdx-json > sbom-spdx.json\n\n# Generate SBOM in CycloneDX format\nsyft myapp:latest -o cyclonedx-json > sbom-cyclonedx.json\n\n# Attach SBOM to the image as an OCI artifact\ncosign attach sbom --sbom sbom-spdx.json \\\n  123456789012.dkr.ecr.us-east-1.amazonaws.com\u002Fmyapp:latest\n\n# Verify SBOM contents\nsyft myapp:latest -o table | head -50\n```\n\n### Step 4: Sign Images with Cosign and Sigstore\n\nImplement image signing to ensure image integrity and authenticity in the supply chain.\n\n```bash\n# Generate a key pair for signing\ncosign generate-key-pair\n\n# Sign an image in the registry\ncosign sign --key cosign.key \\\n  123456789012.dkr.ecr.us-east-1.amazonaws.com\u002Fmyapp:latest\n\n# Sign using keyless signing with Sigstore (OIDC-based)\ncosign sign --yes \\\n  123456789012.dkr.ecr.us-east-1.amazonaws.com\u002Fmyapp:latest\n\n# Verify image signature\ncosign verify --key cosign.pub \\\n  123456789012.dkr.ecr.us-east-1.amazonaws.com\u002Fmyapp:latest\n\n# Verify keyless signature\ncosign verify \\\n  --certificate-identity developer@company.com \\\n  --certificate-oidc-issuer https:\u002F\u002Faccounts.google.com \\\n  123456789012.dkr.ecr.us-east-1.amazonaws.com\u002Fmyapp:latest\n\n# Add attestation with scan results\ncosign attest --predicate trivy-results.json \\\n  --key cosign.key \\\n  123456789012.dkr.ecr.us-east-1.amazonaws.com\u002Fmyapp:latest\n```\n\n### Step 5: Configure Registry-Level Security Controls\n\nSet up registry-specific security features for ECR, ACR, and GCR.\n\n```bash\n# AWS ECR: Enable image scanning on push\naws ecr put-image-scanning-configuration \\\n  --repository-name myapp \\\n  --image-scanning-configuration scanOnPush=true\n\n# ECR: Set image tag immutability (prevent tag overwrites)\naws ecr put-image-tag-mutability \\\n  --repository-name myapp \\\n  --image-tag-mutability IMMUTABLE\n\n# ECR: Set lifecycle policy to clean up untagged images\naws ecr put-lifecycle-policy \\\n  --repository-name myapp \\\n  --lifecycle-policy-text '{\n    \"rules\": [{\n      \"rulePriority\": 1,\n      \"description\": \"Remove untagged images after 7 days\",\n      \"selection\": {\"tagStatus\": \"untagged\", \"countType\": \"sinceImagePushed\", \"countUnit\": \"days\", \"countNumber\": 7},\n      \"action\": {\"type\": \"expire\"}\n    }]\n  }'\n\n# ECR: Get scan findings for an image\naws ecr describe-image-scan-findings \\\n  --repository-name myapp \\\n  --image-id imageTag=latest \\\n  --query 'imageScanFindings.findingSeverityCounts'\n\n# Azure ACR: Enable Defender for container registries\naz security pricing create --name ContainerRegistry --tier standard\n\n# GCR: Enable Container Analysis\ngcloud services enable containeranalysis.googleapis.com\ngcloud artifacts docker images list-vulnerabilities \\\n  LOCATION-docker.pkg.dev\u002FPROJECT\u002FREPO\u002FIMAGE@sha256:DIGEST\n```\n\n### Step 6: Build CI\u002FCD Pipeline with Security Gates\n\nIntegrate scanning and signing into the CI\u002FCD pipeline as mandatory gates.\n\n```yaml\n# GitHub Actions: Scan, sign, and push image\nname: Container Security Pipeline\non: push\n\njobs:\n  build-scan-sign:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions\u002Fcheckout@v4\n\n      - name: Build image\n        run: docker build -t myapp:${{ github.sha }} .\n\n      - name: Trivy vulnerability scan\n        uses: aquasecurity\u002Ftrivy-action@master\n        with:\n          image-ref: myapp:${{ github.sha }}\n          format: json\n          output: trivy-results.json\n          severity: CRITICAL,HIGH\n          exit-code: 1\n\n      - name: Generate SBOM\n        run: syft myapp:${{ github.sha }} -o spdx-json > sbom.json\n\n      - name: Push to ECR\n        run: |\n          aws ecr get-login-password | docker login --username AWS --password-stdin $ECR_REGISTRY\n          docker tag myapp:${{ github.sha }} $ECR_REGISTRY\u002Fmyapp:${{ github.sha }}\n          docker push $ECR_REGISTRY\u002Fmyapp:${{ github.sha }}\n\n      - name: Sign image with Cosign\n        run: |\n          cosign sign --key env:\u002F\u002FCOSIGN_PRIVATE_KEY \\\n            $ECR_REGISTRY\u002Fmyapp:${{ github.sha }}\n\n      - name: Attach SBOM\n        run: |\n          cosign attach sbom --sbom sbom.json \\\n            $ECR_REGISTRY\u002Fmyapp:${{ github.sha }}\n```\n\n## Key Concepts\n\n| Term | Definition |\n|------|------------|\n| Container Image Scanning | Automated analysis of container image layers to identify known vulnerabilities in OS packages and application dependencies |\n| Image Signing | Cryptographic attestation that verifies the authenticity and integrity of a container image using Cosign or Notation |\n| SBOM | Software Bill of Materials, a comprehensive inventory of software components, libraries, and dependencies in a container image |\n| Tag Immutability | Registry setting that prevents overwriting existing image tags, ensuring that a tag always refers to the same image digest |\n| Sigstore | Open-source project providing keyless signing, transparency logs, and verification tooling for software supply chain security |\n| Image Attestation | Cryptographically signed metadata attached to an image (scan results, SBOM, build provenance) that can be verified before deployment |\n\n## Tools & Systems\n\n- **Trivy**: Comprehensive vulnerability scanner for container images, filesystems, git repos, and Kubernetes resources\n- **Grype**: Anchore's vulnerability scanner with broad vulnerability database coverage for container images and SBOMs\n- **Cosign**: Sigstore tool for signing, verifying, and attesting container images with key-based or keyless workflows\n- **Syft**: SBOM generation tool supporting SPDX and CycloneDX formats for container images and filesystems\n- **AWS ECR**: Container registry with built-in scanning, tag immutability, and lifecycle policies\n\n## Common Scenarios\n\n### Scenario: Implementing a Secure Image Promotion Pipeline\n\n**Context**: A development team pushes images to a dev registry without security controls. The security team needs to implement a promotion pipeline that scans, signs, and promotes only approved images to the production registry.\n\n**Approach**:\n1. Configure ECR scanning on push for the development repository\n2. Add Trivy scanning as a CI\u002FCD gate that blocks images with CRITICAL vulnerabilities\n3. Generate SBOMs with Syft and store alongside image scan results\n4. Sign approved images with Cosign after scanning passes\n5. Configure the production registry to require image signatures for all pushes\n6. Set up Kyverno or OPA Gatekeeper in production Kubernetes to verify signatures before pod creation\n7. Implement lifecycle policies to clean up untagged and old images in both registries\n\n**Pitfalls**: Vulnerability databases are updated constantly. An image that passes scanning today may have new CRITICAL vulnerabilities discovered tomorrow. Implement continuous scanning of already-deployed images, not just at build time. Image signing keys must be securely stored in KMS or Vault, not in CI\u002FCD environment variables.\n\n## Output Format\n\n```\nContainer Registry Security Report\n=====================================\nRegistry: 123456789012.dkr.ecr.us-east-1.amazonaws.com\nRepositories: 24\nReport Date: 2026-02-23\n\nIMAGE INVENTORY:\n  Total images: 342\n  Images scanned: 298 (87%)\n  Images signed: 156 (46%)\n  Images with SBOM: 134 (39%)\n\nVULNERABILITY SUMMARY:\n  Critical vulnerabilities:    23 (across 8 images)\n  High vulnerabilities:       145 (across 34 images)\n  Medium vulnerabilities:     456 (across 67 images)\n  Images with no vulns:       89\n\nCRITICAL IMAGES REQUIRING REMEDIATION:\n  myapp:1.2.3           - 5 CRITICAL (CVE-2026-xxxx in openssl)\n  api-gateway:2.0.1     - 3 CRITICAL (CVE-2026-yyyy in log4j)\n  worker:latest         - 4 CRITICAL (CVE-2026-zzzz in glibc)\n\nREGISTRY CONFIGURATION:\n  Scan on push enabled:     18 \u002F 24 repositories\n  Tag immutability:         12 \u002F 24 repositories\n  Lifecycle policies:       20 \u002F 24 repositories\n  Image signing enforced:    8 \u002F 24 repositories\n```\n",{"name":5,"tags":25,"author":33,"domain":34,"license":15,"version":35,"nist_csf":36,"subdomain":26,"description":41,"mitre_attack":42},[26,27,28,29,30,31,32],"cloud-security","containers","registry","image-scanning","trivy","cosign","supply-chain","mahipal","cybersecurity","1.0",[37,38,39,40],"PR.IR-01","ID.AM-08","GV.SC-06","DE.CM-01","Secures container registry images (ECR, ACR, GCR, Docker Hub) by scanning with Trivy and Grype, signing with Cosign and Sigstore, configuring registry access controls, and building CI\u002FCD pipelines that block unscanned or unsigned images. Use when establishing registry security controls or enforcing scan\u002Fsignature checks before image promotion.\n",[43,44,45,46,47],"T1078.004","T1530","T1537","T1580","T1610","main","7540bbccf0c1ded6156a467b02c95b61ad62413f",".agents\u002Fskills\u002Fsecuring-container-registry-images","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena","Currently exploring the intersection of tech","2026-09-11 03:02:31",{"source":8,"skillName":5,"commands":56,"prompt":66,"zipAvailable":67},[57,60,63],{"tool":58,"command":59},"npx","npx skills add NeelakshSaxena\u002FVayu --skill securing-container-registry-images",{"tool":61,"command":62},"bunx","bunx skills add NeelakshSaxena\u002FVayu --skill securing-container-registry-images",{"tool":64,"command":65},"pnpm","pnpm dlx skills add NeelakshSaxena\u002FVayu --skill securing-container-registry-images","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fsecuring-container-registry-images\u002FSKILL.md",true,[69,73,79],{"path":70,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":72,"sourceHtmlUrl":16},"LICENSE","许可证",11255,{"path":74,"resourceType":75,"resourceTypeDesc":76,"sizeBytes":77,"sourceHtmlUrl":78},"references\u002Fapi-reference.md","REFERENCE","参考文档",1987,"https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fsecuring-container-registry-images\u002Freferences\u002Fapi-reference.md",{"path":80,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":83,"sourceHtmlUrl":84},"scripts\u002Fagent.py","SCRIPT","脚本",8151,"https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fsecuring-container-registry-images\u002Fscripts\u002Fagent.py",[86,93,100,107,114,121],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":20},"01M7ACCCVNCFKMA9X6D15X6G98","runpodctl","Runpod CLI for managing GPU\u002FCPU workloads from the terminal — pods, serverless endpoints, templates, network volumes, Hub deploys, models, SSH, and file transfer (send\u002Freceive). Use for terminal\u002FCI\u002Fscripting, Hub browse\u002Fdeploy, SSH setup, `doctor`, or when the Runpod MCP tools are not connected. For structured tool calls in an MCP-enabled session, prefer runpod-mcp.","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frunpodctl\u002FSKILL.md",[],[],{"skillNo":94,"name":95,"nameZh":6,"description":96,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":20},"01M7ACC63SRHEA5KMCHSMZK2TC","runpod","Start here for any Runpod task — running GPU\u002FCPU pods, deploying serverless endpoints, templates, network volumes, building images, or understanding how Runpod works. Routes to the right skill (runpod-mcp, runpodctl, flash, companion-clis, runpod-usage, runpod-templates, runpod-migrate) and indexes two dozen live-verified end-to-end examples (golden paths) — use it when the lane is unclear, and for any multi-step or provisioning task even when it is not.","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frunpod\u002FSKILL.md",[],[],{"skillNo":101,"name":102,"nameZh":6,"description":103,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":104,"categories":105,"keywords":106,"publishedAt":20},"01M7ACC0Q1C89N9BZBV91CTQTF","runpod-usage","How Runpod works and how to work it — pods vs serverless, GPU\u002FVRAM selection, storage, building a container, networking, plus the agentic pod development loop (provision → ssh-exec → set up → poll readiness) and on-pod install hygiene (uv\u002Fapt). Use to answer \"how does X work\", \"which GPU\", \"how do I build a container\", or \"how do I stand up a workload on a pod\". Guidance, not a tool — execute with runpodctl, runpod-mcp, or flash.","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frunpod-usage\u002FSKILL.md",[],[],{"skillNo":108,"name":109,"nameZh":6,"description":110,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":111,"categories":112,"keywords":113,"publishedAt":20},"01M7ACBRPE345GF5GM5B8P8RRC","runpod-templates","Runpod's official prebuilt pod templates (ComfyUI, PyTorch, and others): what each image ships, which ports and paths it uses, how to pick one, how to pin a version, and what is missing on first boot. Use when a task says \"run \u003CX> on a pod\" and an official template already covers it, instead of building an image — and when a user needs help with or wants to fix something about a Runpod template they are already running (won't boot, can't reach the UI, missing models, wrong CUDA line, broken ComfyUI workflow metadata on imported workflows): start here and route onward. Deploy with runpodctl or runpod-mcp; end-to-end walkthroughs live in the runpod router's golden paths.","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frunpod-templates\u002FSKILL.md",[],[],{"skillNo":115,"name":116,"nameZh":6,"description":117,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":118,"categories":119,"keywords":120,"publishedAt":20},"01M7ACBJATHKVX1TWES2F44GY8","runpod-migrate","Migrate a codebase from the Runpod GraphQL API or REST v1 to REST v2 — inventory which parts use which API version, rewrite the call sites, flag breaking changes, and verify. Use when someone asks to move to v2, asks what v2 would change, or asks which Runpod API their code is on. For managing infrastructure rather than migrating code, use runpod-mcp or runpodctl.","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frunpod-migrate\u002FSKILL.md",[],[],{"skillNo":122,"name":123,"nameZh":6,"description":124,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":125,"categories":126,"keywords":127,"publishedAt":20},"01M7ACBC7GHVH6T9YEAPCG2AP8","runpod-mcp","Manage Runpod infrastructure — pods, serverless endpoints, jobs, templates, network volumes, container-registry auth, GPU\u002FCPU catalog, and billing — via the Runpod MCP server's structured tool calls. Use when the Runpod MCP tools (create-pod, list-endpoints, …) are connected in this session, or to connect them (hosted OAuth or local npx). Prefer this over runpodctl for plain infra CRUD when MCP is available; use runpodctl for the terminal, file transfer, or SSH setup.","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frunpod-mcp\u002FSKILL.md",[],[]]