Przejdź do treści
Biblioteka skilli
Bezpieczeństwo · Przegląd i audyt

container-security

/container-security

Utwardza obrazy kontenerów i specyfikacje uruchomieniowe: minimalne obrazy bazowe, użytkownik bez roota, system plików tylko do odczytu i usunięte capabilities.

Repozytorium
AI-SKILLS ↗
Licencja
MIT
Ostatnia zmiana repozytorium
05.09.2026

Ocena i bezpieczeństwo

90/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść25 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
1
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 05.09.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co robi i kiedy

Utwardza obrazy kontenerów i specyfikacje uruchomieniowe: minimalne obrazy bazowe, użytkownik bez roota, system plików tylko do odczytu i usunięte capabilities.

Oryginalny opis (EN)

Harden container images and runtime specs with minimal bases, non-root users, read-only filesystems, and dropped capabilities. Use when writing image or Kubernetes security settings or reviewing a container for privilege risk.

Jak działa

  1. Method
  2. Checks
  3. Boundaries
Sekcje z nagłówków SKILL.md, w oryginale · 52 linii, 402 słów
Podgląd SKILL.md
---
name: container-security
description: Harden container images and runtime specs with minimal bases, non-root users, read-only filesystems, and dropped capabilities. Use when writing image or Kubernetes security settings or reviewing a container for privilege risk.
---

# Container security

A container shares the host kernel, so a breakout turns a compromised app into a
compromised node. What an attacker reaches for after landing is privilege and a
place to write, so the job is to take both away before they ever get there.

## Method

1. **Build from a minimal base.** Prefer distroless, alpine, or scratch over a
   full OS image: fewer packages mean fewer CVEs and no shell to pivot from.
   Scan the final image with Trivy or Grype and fail the build on fixable High
   or Critical findings.
2. **Run as a non-root user.** Add a `USER` directive with a fixed non-zero uid
   and set `runAsNonRoot: true` with an explicit `runAsUser` in the Kubernetes
   securityContext. A process running as uid 0 in the container is uid 0 against
   any kernel bug.
3. **Mount the root filesystem read-only.** Set `readOnlyRootFilesystem: true`
   and grant writable tmpfs or volumes only for the paths that truly need writes
   (`/tmp`, a cache dir). An attacker who cannot write cannot drop a binary to
   run.
4. **Drop all Linux capabilities and add none back by default.** Use
   `capabilities: drop: [ALL]` in the securityContext. Most services need zero;
   add one back only with a written reason, such as `NET_BIND_SERVICE` for a
   port below 1024.
5. **Forbid privilege escalation and privileged mode.** Set
   `allowPrivilegeEscalation: false` and `privileged: false`, and refuse
   `hostPID`, `hostNetwork`, and `hostPath` unless a specific need is
   reviewed. A privileged container is effectively root on the host.
6. **Set CPU and memory limits per container.** A compromised or runaway
   workload with no limit can starve every neighbor on the node. Unbounded
   resources are a denial-of-service condition waiting for a trigger.
7. **Keep secrets out of the image.** Mount them as files from the
   orchestrator's secret store, never bake them into layers or plain
   environment variables. Anything `COPY`ed in ships to everyone who can
   pull the image.

## Checks

- Does `docker history` or a layer scan turn up a shell, package manager, or
  secret in the final image?
- Does the container run as non-root with a read-only root filesystem in
  production?
- Are all capabilities dropped, with each one added back individually justified?

## Boundaries

This hardens the container and its runtime spec. Dockerfile build hygiene and
layer caching belong to containerization; cluster-wide enforcement (admission
controllers, Pod Security Standards, network policy) is a platform concern this
skill feeds rather than owns.

Wersje

RepozytoriumWynikLicencja
Ta strona · Amey-Thakur/AI-SKILLS90MIT
claude-dev-suite/claude-dev-suite100MIT
thisiskurubaran/DevSecOps100MIT
snyk/studio-recipes100Apache-2.0
uw-ssec/rse-plugins100BSD-3-Clause
chrishuffman5/domain-expert100MIT
kyleoliveiro/sg-gov-skills90MIT
susorov/agent-skills90MIT

Migawka bazy z 13.11.2026 · wersja paczki e17f8fe0848b (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100container-hardening
    Zabezpiecza obrazy Docker i konfiguracje uruchomieniowe kontenerów: użytkownicy bez uprawnień roota, systemy plików tylko do odczytu i konteksty bezpieczeństwa.
  • 100container-image-hardening
    Prowadzi przez budowę minimalnych, utwardzonych obrazów kontenerów bez roota: buildy wieloetapowe, bazy distroless, system plików tylko do odczytu, odrzucone capabilities Linuksa i bazy przypięte do digestów.
  • 100container-security-hardening
    Utwardza obrazy i wdrożenia kontenerów: bezpieczne obrazy bazowe, użytkownicy bez uprawnień roota, skanowanie CVE, SBOM i podpisy, seccomp, AppArmor oraz kontrole bezpieczeństwa podów Kubernetes.
  • 91container-security-hardening
    Utwardza obrazy Docker i wdrożenia kontenerowe: bezpieczne obrazy bazowe, użytkownicy bez roota, skanowanie CVE, SBOM i podpisy, seccomp, AppArmor i kontrola pod security w Kubernetes.
  • 100dockerfile-security-hardening-non-root
    Pomaga utwardzać Dockerfile, tworząc użytkownika bez roota, ograniczając capabilities i włączając systemy plików tylko do odczytu.
  • 100container-hardening
    Utwardza obrazy kontenerów i konfigurację uruchomieniową przy budowie, przeglądzie i audycie Containerfile, Dockerfile, plików compose i ustawień bezpieczeństwa podów Kubernetes.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.