דילוג לתוכן
New

DeepSeek V4.1 Flash free for 7 days: 10M tokens a day after a top-up of $10 or more. Until Nov 30.

How it works
securityskills/container-image-hardeningLinux, ענן וקונטיינרים

container-image-hardening

⁨Harden Dockerfiles and container images — multi-stage builds, non-root users, minimal base images, and vulnerability gates. Use when building production containers or reviewing Dockerfiles.⁩

v2026.8.26-b2b6b523 התקנות⁦+3⁩ ב-7 ימים0 כוכביםסונכרן לפני 19 שעות

התקנה

עדיין אין לכם את ה-CLI של NotHoly? התקינו אותו קודם.

$ curl -fsSL https://notholy.com/install.sh | sh
$ notholy skills install securityskills/container-image-hardening

נכתב אל ⁦~/.notholy/skills⁩ אחרי בדיקת החתימה וה-SHA-256.

חתימהחתום, ed25519
0lbGfqXjie…1lkhNDCw==ה-CLI בודק את ה-SHA-256 ואת החתימה לפני שהוא כותב קובץ כלשהו.
חבילה3b9b73b2…dc5aa40a
3b9b73b2cb51…804bdc5aa40aקובץ אחד · ⁦1.1 KB⁩
סריקהבינוניממצא אחד
  • לא נמצא רישיון
לסריקה המלאה
מקורgithub.com/securityskills/skills/tree/main/container-security/docker/container-image-hardening@b2b6b52

הפריט הזה עדיין לא נכתב בעברית, ולכן הוא מוצג בשפה אחרת: English.

Review and fix Dockerfiles and images for production safety.

Dockerfile Review Checklist

  • Base image: official, specific tag or digest, minimal variant (alpine, distroless, slim); never latest
  • Multi-stage builds: build toolchains (compilers, package managers) excluded from final image
  • Non-root user: USER directive with a dedicated UID; no sudo in image
  • No secrets: no ENV with credentials, no COPY .env, no secrets baked into layers (they persist even if deleted later)
  • Pinned dependencies: lockfiles used (npm ci, pip install -r requirements.txt with hashes)
  • Healthchecks defined; ENTRYPOINT over CMD for enforced init
  • Layer hygiene: combine apt operations and clean lists in one layer; .dockerignore covers .git, build artifacts

Scan and Gate

bash
trivy image --severity HIGH,CRITICAL --exit-code 1 <image>
grype <image>
docker scout cves <image>
  • Fail CI on critical CVEs with available fixes
  • Track base image updates (renovate/dependabot for Dockerfiles)

Runtime Hardening

yaml
read_only: true
cap_drop: ["ALL"]
security_opt: ["no-new-privileges:true"]
tmpfs: [/tmp]
  • Resource limits set (CPU/memory) to blunt DoS
  • Root filesystem read-only; writable paths explicit tmpfs

Verification

  • docker history <image> — no secret-looking layers
  • dive <image> — image efficiency and wasted space
  • Run as the image user: docker run --rm <image> id shows non-root

Output

Hardened Dockerfile, scan report before/after, and CI gate configuration.

הקבצים בגרסה הזו

הרשאות

הרשאההוצהרנמצא בסריקה
קורא קבציםלאלא
כותב קבציםלאלא
מריץ פקודות shellכןכן
משתמש ברשתלאלא
משתמש במחבריםלאלא
שולט בדפדפןלאלא

ממצאי הסריקה

נבדק ב-13 בנוב׳ 2026

  1. בינוניתרישיון · לא נמצא רישיון

סריקה נקייה מורידה את הסיכון, אבל לא מוכיחה שהחבילה בטוחה. כדאי לקרוא מה מתקינים.

גרסהפורסמהCommitSHA-256חתימהשינוי בהרשאות
v2026.8.26-b2b6b5213 בנוב׳ 2026b2b6b523b9b73b2חתומה–

שאלו כל מה שהסקופ מאפשר.

יוצרים חשבון, מוסיפים קרדיטים ושואלים את השאלה הראשונה בצ׳אט או בטרמינל.

  1. 1/3

    יצירת חשבון

    פרטי או חברה. אפשר לעבור לחשבון חברה אחר כך בלי לאבד יתרה או מפתחות.

    פרטיחברה
  2. 2/3

    הוספת קרדיטים

    בכרטיס אשראי. תשלום לפי טוקן, בלי מנוי.

    $5.00טעינה מינימלית
  3. 3/3

    שאלה ראשונה

    בצ׳אט, או להתקין את ה-CLI ולהריץ notholy login בטרמינל.

    $ notholy login