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가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
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
USERdeclared beforeCMD/ENTRYPOINT - Base image pinned to
@sha256:...digest (not just tag) - No secrets in
ENV,ARG, orRUNcommands -
HEALTHCHECKdefined - OCI labels present (
org.opencontainers.image.*) -
.dockerignoreexcludes.git,.env, secrets, tests -
ENTRYPOINTuses 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
-
.trivyignorehas justified entries for accepted CVEs
Runtime
-
--read-onlyfilesystem -
--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: truewith explicit UID -
capabilities.drop: ["ALL"] - Resource
requestsandlimitsdefined -
automountServiceAccountToken: false - Namespace PSA enforced at
restrictedlevel -
NetworkPolicydefault-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.
인기도
- GitHub 스타
- 48k
- 순위
- #4244
- 라이선스
- MIT
- 업데이트
- 2026. 10. 15.
댓글
- …
이 저장소의 다른 스킬
00-andruia-consultant
48k에이전트가 AI 프로젝트를 시작하거나 개선할 수 있도록 코드를 분석하고 스페인어로 실행 계획을 세워 줍니다.
007
48k에이전트가 보안 감사와 위협 모델링을 수행해 공격과 취약점으로부터 프로젝트를 보호하도록 돕습니다.
10-andruia-skill-smith
48k에이전트가 AI 도구의 작동 방식을 정의하고 문서를 쓰며 구조를 검증하도록 돕습니다.
20-andruia-niche-intelligence
48k에이전트가 신뢰할 수 있는 자료를 바탕으로 특정 산업의 맥락, 규칙, 사용 패턴, 위험을 정리한 요약을 만들도록 돕습니다.