Skip to content
KitploitKITPLOIT
أدواتالمدونة
إرسال
أدواتالمدونة
إرسال

أدوات الاختراق واختبار الاختراق والأمن السيبراني لترسانتك الأمنية!

Kitploit هو دليل لأدوات الاختراق والأمن السيبراني واختبار الاختراق. اكتشف آخر تحديثات المشاريع للعثور على الثغرات وتحليل الأنظمة وأتمتة الاختبارات وتعزيز أمنك.

··الخلاصات·اتصال·الخصوصية·© 2026 Kitploit

دليل الأدوات

الفئات

عرض جميع الفئات
Loading categories
kube-score — تحليل كائنات Kubernetes مع توصيات لتحسين الموثوقية والأمان. kube-score يمنع بشكل فعال التوقف والعيوب في YAML و Charts الخاصة بـ Kubernetes. تحليل ثابت للكود لـ Kubernetes. | Kitploit
أدوات/GitHubGitHub/zegl/kube-score
ماسحات الثغرات الأمنيةتحليل الشفرة الثابت (SAST)أمن السحابةDevSecOpsسوء التكوين
GitHubzegl/kube-score

kube-score

تحليل كائنات Kubernetes مع توصيات لتحسين الموثوقية والأمان. kube-score يمنع بشكل فعال التوقف والعيوب في YAML و Charts الخاصة بـ Kubernetes. تحليل ثابت للكود لـ Kubernetes.

عرض المستودع
3.1k198منذ 3 أشهرتمت المراجعة من قبل Kitploit

الأكثر شعبية

عرض الكل →

اكتشف الأدوات الأكثر استخدامًا من قبل مجتمعنا.

استكشف جميع الأدوات

تصفح مجموعتنا من الأدوات

عرض جميع الأدوات →
مشاركة
الموقع الإلكتروني

kube-score

Go Report Card Test Go Releases GitHub stars Downloads License


kube-score هي أداة تقوم بتحليل ثابت لشفرة تعريفات كائنات Kubernetes الخاصة بك.

المخرجات هي قائمة من التوصيات حول ما يمكنك تحسينه لجعل تطبيقك أكثر أماناً ومرونة.

يمكنك اختبار kube-score في المتصفح من خلال العرض التوضيحي عبر الإنترنت (المصدر).

التثبيت

kube-score سهلة التثبيت، وهي متاحة من المصادر التالية:

الرعاة

شركتك هنا؟

الفحوصات

للحصول على قائمة كاملة بالفحوصات، راجع README_CHECKS.md.

  • حدود الحاوية (يجب تعيينها)
  • الـ Pod مستهدف بواسطة NetworkPolicy، يُوصى باستخدام قواعد الإرسال والاستقبال
  • يجب أن تحتوي Deployments وStatefulSets على PodDisruptionPolicy
  • يجب أن تحتوي Deployments وStatefulSets على PodAntiAffinity مُهيأ
  • استقصاءات الحاوية، يجب تكوين readiness probe، ويجب ألا تكون مطابقة لـ liveness probe. اقرأ المزيد في README_PROBES.md.
  • securityContext للحاوية، قم بالتشغيل كمستخدم/مجموعة بأرقام عالية، لا تقم بالتشغيل كجذر أو بنظام ملفات جذر مُمتاز. اقرأ المزيد في README_SECURITYCONTEXT.md.
  • واجهات برمجة تطبيقات مستقرة، استخدم واجهة برمجة تطبيقات مستقرة إذا كانت متاحة (مدعومة: Deployments, StatefulSets, DaemonSet)

مثال على المخرجات

الاستخدام في CI

يمكن تشغيل kube-score في بيئة CI/CD الخاصة بك وسيخرج برمز خروج 1 إذا تم العثور على خطأ حرج. يمكن تغيير مستوى التشغيل إلى تحذير باستخدام الوسيطة --exit-one-on-warning.

يجب أن يكون الإدخال إلى kube-score جميع التطبيقات التي تنشرها في نفس namespace للحصول على أفضل نتيجة.

مثال مع Helm

root@kitploit:~
helm template my-app | kube-score score -

مثال مع Kustomize

root@kitploit:~
kustomize build . | kube-score score -

مثال مع YAML ثابت

root@kitploit:~
kube-score score my-app/*.yaml
root@kitploit:~
kube-score score my-app/deployment.yaml my-app/service.yaml

مثال مع كتلة موجودة

root@kitploit:~
kubectl api-resources --verbs=list --namespaced -o name \
  | xargs -n1 -I{} bash -c "kubectl get {} --all-namespaces -oyaml && echo ---" \
  | kube-score score -

مثال مع Docker

root@kitploit:~
docker run -v $(pwd):/project zegl/kube-score:latest score my-app/*.yaml

الإعدادات

root@kitploit:~
Usage of kube-score:
kube-score [action] --flags

Actions:
	score	Checks all files in the input, and gives them a score and recommendations
	list	Prints a CSV list of all available score checks
	version	Print the version of kube-score
	help	Print this message

Flags for score:
      --disable-ignore-checks-annotations   Set to true to disable the effect of the 'kube-score/ignore' annotations
      --disable-optional-checks-annotations Set to true to disable the effect of the 'kube-score/enable' annotations
      --enable-optional-test strings        Enable an optional test, can be set multiple times
      --exit-one-on-warning                 Exit with code 1 in case of warnings
      --help                                Print help
      --ignore-container-cpu-limit          Disables the requirement of setting a container CPU limit
      --ignore-container-memory-limit       Disables the requirement of setting a container memory limit
      --ignore-test strings                 Disable a test, can be set multiple times
      --kubernetes-version string           Setting the kubernetes-version will affect the checks ran against the manifests. Set this to the version of Kubernetes that you're using in production for the best results. (default "v1.18")
  -o, --output-format string                Set to 'human', 'json', 'ci' or 'sarif'. If set to ci, kube-score will output the program in a format that is easier to parse by other programs. Sarif output allows for easier integration with CI platforms. (default "human")
      --output-version string               Changes the version of the --output-format. The 'json' format has version 'v2' (default) and 'v1' (deprecated, will be removed in v1.7.0). The 'human' and 'ci' formats has only version 'v1' (default). If not explicitly set, the default version for that particular output format will be used.
  -v, --verbose count                       Enable verbose output, can be set multiple times for increased verbosity.

تجاهل فحص

يمكن تجاهل الفحوصات في تشغيل البرنامج بالكامل، باستخدام العلامة --ignore-test.

يمكن أيضًا تجاهل فحص على أساس كل كائن، عن طريق إضافة التعليق التوضيحي kube-score/ignore إلى الكائن. يجب أن تكون القيمة سلسلة مفصولة بفواصل من معرفات الفحص.

مثال:

اختبار هذا الكائن سيعطل مؤقتاً فحص service-type، الذي يحذر من استخدام خدمات من نوع NodePort.

root@kitploit:~
apiVersion: v1
kind: Service
metadata:
  name: node-port-service-with-ignore
  namespace: foospace
  annotations:
    kube-score/ignore: service-type
spec:
  selector:
    app: my-app
  ports:
  - protocol: TCP
    port: 80
    targetPort: 8080
  type: NodePort

تفعيل فحص اختياري

يمكن تفعيل الفحوصات الاختيارية في تشغيل البرنامج بالكامل، باستخدام العلامة --enable-optional-test.

يمكن أيضًا تفعيل فحص على أساس كل كائن، عن طريق إضافة التعليق التوضيحي kube-score/enable إلى الكائن. يجب أن تكون القيمة سلسلة مفصولة بفواصل من معرفات الفحص.

مثال:

اختبار هذا الكائن سيفعل فحص container-seccomp-profile. أيضاً، يتم تجاهل عدة فحوصات معرفة بواسطة kube-score/ignore في نفس الوقت.

root@kitploit:~
apiVersion: apps/v1
kind: Deployment
metadata:
  name: optional-test-manifest-deployment
  labels:
    app: optional-test-manifest
  annotations:
    kube-score/ignore: pod-networkpolicy,container-resources,container-image-pull-policy,container-security-context-privileged,container-security-context-user-group-id,container-security-context-readonlyrootfilesystem,container-ephemeral-storage-request-and-limit
    kube-score/enable: container-seccomp-profile
spec:
  replicas: 1
  selector:
    matchLabels:
      app: optional-test-manifest
  template:
    metadata:
      labels:
        app: optional-test-manifest
    spec:
      containers:
      - name: optional-test-manifest
        image: busybox:1.34
        command:
        - /bin/sh
        - -c
        - date; env; tail -f /dev/null

البناء من المصدر

kube-score يتطلب Go 1.21 أو أحدث للبناء. استنسخ هذا المستودع، ثم:

root@kitploit:~
# بناء المشروع
go build ./cmd/kube-score

# تشغيل جميع الاختبارات
go test -v ./...

هل ترغب في المساهمة؟

هل تريد المساعدة؟ ألق نظرة على إرشادات المساهمة لمزيد من المعلومات. 🤩

التبعيات

المشروعالإصدار
go.dev^1.21

من صنع

تنزيل الأداة
التوزيعالأمر / الرابط
ملفات ثنائية مُجمَّعة مسبقاً لأنظمة macOS وLinux وWindowsإصدارات GitHub
Dockerdocker pull zegl/kube-score (Docker Hub)
Homebrew (macOS وLinux)brew install kube-score
Krew (macOS وLinux)kubectl krew install score