본문으로 건너뛰기
Skillpedia
보안48k · #4244

container-security-hardening

하는 일

이 도구는 프로그램(‘컨테이너’라고 부릅니다)을 더 안전하게 만들도록 돕습니다. 알려진 보안 결함을 확인하고, 프로그램이 최소한의 권한으로 실행되도록 하며, 공격으로부터 보호하도록 돕습니다.

사용하는 경우

  • ✓컨테이너를 만드는 코드가 안전한지 확인하고 싶을 때.
  • ✓기존 컨테이너의 보안 결함을 찾아 고쳐야 할 때.
  • ✓운영 환경에서 컨테이너가 안전하게 실행되도록 하고 싶은 경우.

스킬 링크

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/container-security-hardening/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/container-security-hardening/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“Docker 컨테이너를 공격에 더 안전하게 만들려면 어떻게 해야 할까요?”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

도구는 컨테이너 빌드 코드(Dockerfile)와 실행 중인 컨테이너를 분석합니다. 안전하지 않은 설정, 알려진 결함(CVE)을 확인하고, 관리자 권한 없이 실행하는 것 같은 보안 조치를 적용합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Container Security Hardening Skill

A production-focused guide for building, scanning, and running containers securely — from Dockerfile authoring through runtime enforcement and supply chain integrity.


Detailed Guide

Read the detailed guide before executing this skill. It retains the complete procedure and reference material. Treat its safety, prerequisites, and validation requirements as mandatory. For focused work, load the relevant sections; for end-to-end work, read the guide completely.

When to Use This Skill

  • User mentions Docker security, container hardening, or Dockerfile security review
  • User asks about distroless images, non-root containers, or read-only filesystems
  • User wants to scan images for CVEs with Trivy, Grype, or Snyk
  • User mentions seccomp, AppArmor, Linux capabilities, or runtime security
  • User asks "is my Dockerfile secure?" or "how do I reduce my image attack surface?"
  • User wants to sign/verify images with Cosign or generate SBOMs
  • User asks about Kubernetes pod security, NetworkPolicy, or RBAC hardening
  • User says "fix container CVEs" or "harden my container for production"

When NOT to Use This Skill

  • The user is primarily asking about GitHub Actions CI/CD → recommend github-actions-advanced
  • The user needs general Docker usage help (not security) → recommend docker-expert
  • The user is working with Kubernetes orchestration beyond security → recommend kubernetes-architect
  • The user needs application-level security (SQL injection, XSS) → recommend api-security-best-practices

Security Checklist

Dockerfile

  • Minimal base image (distroless, slim, or alpine — not full debian/ubuntu)
  • Multi-stage build — no build tools, devDependencies, or compilers in runtime image
  • Non-root USER declared before CMD/ENTRYPOINT
  • Base image pinned to @sha256:... digest (not just tag)
  • No secrets in ENV, ARG, or RUN commands
  • HEALTHCHECK defined
  • OCI labels present (org.opencontainers.image.*)
  • .dockerignore excludes .git, .env, secrets, tests
  • ENTRYPOINT uses exec form, not shell form

Image Scanning

  • Trivy or Grype scan in CI (fails on HIGH/CRITICAL)
  • Hadolint passes with no warnings
  • Secret scan run on image (trivy --scanners secret)
  • SBOM generated and stored
  • .trivyignore has justified entries for accepted CVEs

Runtime

  • --read-only filesystem
  • --cap-drop ALL (add back only what's documented as required)
  • --security-opt no-new-privileges:true
  • --security-opt seccomp=<profile> applied
  • Resource limits set (--memory, --cpus, --pids-limit)
  • Image signed with Cosign; verified before deploy

Kubernetes

  • readOnlyRootFilesystem: true
  • allowPrivilegeEscalation: false
  • runAsNonRoot: true with explicit UID
  • capabilities.drop: ["ALL"]
  • Resource requests and limits defined
  • automountServiceAccountToken: false
  • Namespace PSA enforced at restricted level
  • NetworkPolicy default-deny applied
  • RBAC uses specific resource names and minimal verbs

Limitations

  • Use this skill only when the task clearly matches the scope described above.
  • Do not treat the output as a substitute for environment-specific penetration testing or a formal security audit.
  • Seccomp profiles and AppArmor are Linux-only; macOS/Windows Docker Desktop uses different mechanisms.
  • Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
자주 묻는 질문

‘컨테이너’란 무엇인가요?

프로그램을 실행하는 데 필요한 라이브러리와 설정 등을 프로그램과 함께 묶은 패키지입니다. 서로 다른 컴퓨터에서도 일관되게 작동하도록 해 줍니다.

‘CVE’란 무엇인가요?

‘Common Vulnerabilities and Exposures’의 약자입니다. 공격자가 악용할 수 있는 소프트웨어의 확인된 보안 결함을 뜻합니다.

‘강화(hardening)’란 무엇인가요?

공격 표면을 줄이고 취약점으로부터 보호해 시스템이나 소프트웨어를 더 안전하게 만드는 과정입니다.

상세 정보

작성자의 원본 설명

Harden Docker/container images and runtime deployments with secure base images, non-root users, CVE scanning, SBOM/signing, seccomp/AppArmor, and Kubernetes pod security controls. Use for Dockerfile security reviews, container CVEs, image scanning, distroless images, or production hardening.

repo: sickn33/agentic-awesome-skills

인기도

GitHub 스타
48k
순위
#4244
라이선스
MIT
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬