strix
Open-source AI penetration testing tool to find and fix your app’s vulnerabilities.
- 77k
- Python
- Apache-2.0
- 3 d ago
Open source Go CLI that scans Kubernetes AI workloads (vLLM, Ollama, KubeRay, KServe, Qdrant, Milvus) for security misconfigurations and writes DORA evidence reports in text, JSON, HTML, PDF and SARIF, with signed evidence bundles and Cilium, Tetragon and Kyverno remediation policies.
Repo sv222/kshield, read from GitHub 2 d ago. sv222 has not joined Take My Repo.
sv222/kshield is a public repo on GitHub by sv222. Open source Go CLI that scans Kubernetes AI workloads (vLLM, Ollama, KubeRay, KServe, Qdrant, Milvus) for security misconfigurations and writes DORA evidence reports in text, JSON, HTML, PDF and SARIF, with signed evidence bundles and Cilium, Tetragon and Kyverno remediation policies. It declares the Apache-2.0 license on GitHub. It is written mainly in Go, has 2 stars and last changed on 2026-11-21. Nobody has reviewed it on Take My Repo yet, which says nothing about its quality. Read from GitHub on 2026-11-21.
In the maintainer's words. Shown from GitHub; Take My Repo does not keep a copy.
kshield is an open source Go CLI that scans Kubernetes manifests and live clusters that run AI and LLM workloads (vLLM, Ollama, Triton, Text Generation Inference, Text Embeddings Inference, LocalAI, SGLang, llama.cpp, lmdeploy, TensorRT-LLM, KubeRay, KServe, Qdrant, Milvus). It finds security misconfigurations such as root containers, unauthenticated inference APIs, --trust-remote-code, pickle model loading, hostPath and hostPort use, open Ray ports and missing ingress, egress or runtime guards. Each finding cites the verbatim text of the requirement of the profile that it supports evidence for: DORA (Regulation (EU) 2022/2554 and RTS (EU) 2024/1774) or NIS2 (Directive (EU) 2022/2555 and CIR (EU) 2024/2690). Reports come as text, JSON, HTML, PDF and SARIF, and can be packed into a signed evidence bundle. kshield remediate writes a kustomize bundle with workload patches and Cilium, Tetragon and Kyverno policies, and changes the cluster only when you add --apply.
kshield reports support evidence for the requirements they cite. They are not an audit and do not state compliance with any regulation.
With Go 1.26 or newer:
go install github.com/sv222/kshield/cmd/kshield@latest
Binaries for Linux, macOS and Windows (amd64 and arm64) with checksums.txt are attached to each release. To build from source:
git clone https://github.com/sv222/kshield.git
cd kshield && go build -o kshield ./cmd/kshield
Scan the insecure sample stack from the test corpus:
kshield scan manifest -f test/corpus/baseline/toxic/input.yaml
kshield dev | profile dora v1 | manifest scan | 5 objects, 5 AI workloads
[FAIL] DORA-CH2-001 KS-WL-001 Container may run as root (no runAsNonRoot: true, or UID 0)
FAIL Deployment/ai-inference/qdrant container=qdrant: container may run as root: runAsNonRoot is not true and runAsUser is not set
FAIL Deployment/ai-inference/vllm container=vllm: container may run as root: runAsNonRoot is not true and runAsUser is not set
...
fix: workload patch (kshield remediate) | supports evidence for: DORA Art. 9(4)(c)
[PASS] DORA-CH2-004 KS-WL-004 hostIPC, hostPID or hostNetwork true
[FAIL] DORA-CH2-005 KS-WL-005 /dev/shm from hostPath (or hostPath /dev)
FAIL Deployment/ai-inference/vllm: volume "shm" mounts hostPath /dev/shm
fix: workload patch (kshield remediate) | supports evidence for: DORA Art. 9(3)(c)
...
Summary: 17 FAIL, 5 WARN, 13 PASS, 0 INFO, 5 N/A
The exit code is 1 because there are findings. The hardened version of the same stack is clean:
kshield scan manifest -f test/corpus/baseline/hardened/input.yaml
Summary: 0 FAIL, 0 WARN, 35 PASS, 0 INFO, 5 N/A
Scan your own cluster. Scans are read-only:
kshield scan cluster -n ai-inference --format html --out report.html
An organisation that falls under NIS2 scans with the nis2 profile and gets NIS2 display IDs and NIS2 references:
kshield scan manifest -f app.yaml --profile nis2
| id | regulation | who it applies to | checks |
|---|---|---|---|
dora |
Regulation (EU) 2022/2554 Chapter II and RTS (EU) 2024/1774 | financial entities under DORA | 40 |
nis2 |
Article 21 of Directive (EU) 2022/2555 and CIR (EU) 2024/2690 | essential and important entities under NIS2 | 38 |
NIS2 applies to essential and important entities; for financial entities DORA is lex specialis (Art. 4 of the Directive). The default profile is dora; runs without --profile do not change. KS-WL-006 and KS-WL-013 stay out of the nis2 profile because no point of NIS2 Art. 21 or of the Annex of CIR (EU) 2024/2690 fits them. The check by check mappings are in docs/MAPPING-REVIEW.md and docs/MAPPING-REVIEW-nis2.md.
List the checks of a profile with kshield checks list --profile dora (or --profile nis2) and read one with kshield checks explain KS-AI-002.
| Group | Checks | Examples |
|---|---|---|
| Workload hardening | KS-WL-001..016 | root containers, privilege escalation, capabilities, host namespaces, /dev/shm hostPath, any other hostPath, hostPort, seccomp, token automount, secrets in env, images not pinned by digest, GPU access through hostPath |
| AI serving | KS-AI-001..013 | vLLM without API key, --trust-remote-code, pickle model load, inference API exposed without auth, Ray GCS, client or dashboard exposed, Ray TLS off, Ollama exposed, Qdrant without API key or TLS, Milvus authorization off, other engines without API key, debug and insecure flags, unsafe model sources and formats, Gateway API HTTPRoute exposure without auth |
| Network | KS-NET-001..004 | no default-deny egress, egress to the whole internet, pod-to-pod encryption off, no ingress isolation |
| Runtime guards | KS-RT-001..003 | no Tetragon shell-exec guard, no Tetragon egress-connect guard, no Kyverno admission guard |
| Cluster prerequisites | KS-PRE-001..004 | Tetragon, Cilium and Kyverno present and healthy, BPF LSM on the nodes |
Supported workloads: Pod, Deployment, StatefulSet, DaemonSet, ReplicaSet, ReplicationController and Job, CronJob, Argo Rollout, KubeRay RayCluster, RayService and RayJob, KServe InferenceService, ServingRuntime and ClusterServingRuntime. A cluster scan does not read ReplicationControllers or Rollouts yet; their pods are scanned as owned pods. Helm users can pipe helm template output into kshield scan manifest -f -.
How kshield decides that a container is an AI engine:
tritonserver), Text Generation Inference (text-generation-inference, tgi, text-generation-launcher), Text Embeddings Inference (text-embeddings-router), LocalAI (local-ai), SGLang, llama.cpp (llama-server), lmdeploy, TensorRT-LLM (trtllm-serve), Qdrant, Milvus, Ray images and Ray Serve commands. The workload name is not used.OLLAMA_ env var or a mount path that contains .ollama.kshield.io/ai: "true" on the workload or its pod template, or with --workload-selector <label selector> on scan manifest and scan cluster. The engine of an opted-in workload is a guess, so the engine checks report WARN, not FAIL.kshield.io/gateway-auth: "true" on the workload. KS-AI-001, KS-AI-004, KS-AI-007, KS-AI-010 and KS-AI-013 then report INFO and name the annotation. kshield does not verify the gateway.Auth evidence in front of a workload:
--api-key or the engine env var), an Ingress annotation (auth-url, auth-type, auth-signin, auth-secret, oauth2) and kshield.io/gateway-auth count, as before.AuthorizationPolicy that allows only requests with a principal (principals or requestPrincipals), denies requests without one, or delegates to an external provider. It must select the workload, its Service or the ingress Gateway. A policy that relies on JWT principals counts only with a RequestAuthentication that selects the same target.KongPlugin or KongClusterPlugin with an auth plugin (key-auth, jwt, oidc and the other Kong auth plugins, not disabled and without an anonymous consumer), named in the konghq.com/plugins annotation of the Ingress, Service or HTTPRoute, or in an ExtensionRef filter of an HTTPRoute.SecurityPolicy with jwt, oidc, basicAuth, apiKeyAuth or extAuth that targets the HTTPRoute or its Gateway.The hardened Ollama and vLLM examples and what the engines need to run as non-root are in docs/hardened-engines.md.
kshield scan manifest -f app.yaml --format text|json|html|pdf|sarif [--out <path>] [--fail-on fail|warn|never] [--deterministic]
text (default) for the terminal.json is the stable report contract (kshield.report/v1).html is one self-contained page with no scripts and no network requests.pdf for people who want a document (needs --out).sarif is SARIF 2.1.0 for GitHub code scanning and other SARIF tools.--deterministic gives byte-identical output for the same input.kshield scan cluster [--kubeconfig <file>] [--context <name>] [-n <ns> ...] [--node-probe]
get, list and discovery requests. Secret values are never printed or written.deploy/rbac/kshield-scan.yaml (read-only ClusterRole) and, for --node-probe, deploy/rbac/kshield-node-probe.yaml.deploy/rbac/kshield-scan.yaml when you upgrade.--node-probe starts one short-lived pod per Linux node (default namespace kube-system) to read the LSM list and kernel config. The pods are deleted at the end, also after Ctrl-C.kshield evidence keygen --out sign
kshield scan manifest -f app.yaml --evidence pack --sign-key sign.key
kshield evidence verify pack --pub-key sign.pub
signature: valid
evidence: OK
The pack holds all five reports, manifest.json (sha256 and size of each file) and manifest.sig (Ed25519). verify exits 1 when a file is missing, changed or extra, or the signature fails.
kshield scan manifest -f app.yaml --format json --deterministic --out scan.json
kshield remediate --from scan.json -f app.yaml --mode audit --out fix
The fix directory is a kustomize bundle: base/, workload-patch.yaml, workload-patch-6902/, infrastructure-policies.yaml (Cilium, Tetragon and Kyverno), MANUAL.md and remediation.json. --mode audit blocks nothing. --mode enforce switches the policies to deny and kill. The policies and their limits are described in policies/README.md.
/root at a path containing .ollama, the workload patch moves that mount to /ollama and points HOME and OLLAMA_MODELS there before applying the non-root uid. A mount under /root at any other path stays a manual item.MANUAL.md lists which non-AI workloads of a policy namespace break the Pod Security Standards restricted profile and which conform, and remediation.json carries the same list as pssNonAI.ray.io/node-type: head and ray.io/cluster.remediate writes a bundle and changes nothing in the cluster. Add --apply to also send the policies to the cluster with server-side apply (field manager kshield):
kshield remediate --from scan.json -f app.yaml --out fix --apply --dry-run
kshield remediate --from scan.json -f app.yaml --out fix --apply
--kubeconfig and --context (for a cluster scan.json, the context of the scan).Apply N objects to context X? [y/N]. --yes skips the question. Without a terminal and without --yes it refuses (exit 2).--dry-run runs a server-side dry run, prints the result and changes nothing./dev/shm hostPath fix of KS-WL-005) is rejected on an object that was created by another tool. Apply that patch with the kustomize bundle by hand.--apply-patches, and only for the workloads that the bundle patches.Policy, Cilium CiliumNetworkPolicy, Tetragon TracingPolicyNamespaced). --skip-missing-crds skips those objects.--force-conflicts takes the field over. Review who owns it first.deploy/rbac/kshield-apply.yaml holds two ClusterRoles, kshield-apply (create and patch on the three policy kinds) and kshield-apply-patches (patch on the workload kinds, only for --apply-patches).| Code | Meaning |
|---|---|
| 0 | nothing at or above --fail-on |
| 1 | findings at or above --fail-on |
| 2 | usage or input error |
| 3 | scan incomplete (a read was denied or failed) |
| 4 | remediate --apply failed while applying (a conflict, a denied write or an API error) |
remediate --apply returns 2 when it refuses: a missing CRD without --skip-missing-crds, no terminal without --yes, or an answer other than yes.
Each check of the dora profile maps to articles of DORA Chapter II (ICT risk management, Regulation (EU) 2022/2554) and of RTS (EU) 2024/1774. The nis2 profile maps to Article 21 of Directive (EU) 2022/2555 and to the Annex of Commission Implementing Regulation (EU) 2024/2690, with the same article choices as k8s-remediate-nis2 for the same controls. The report quotes the regulation text verbatim from excerpts committed in internal/regtext. The full mapping, check by check, is in docs/MAPPING-REVIEW.md and docs/MAPPING-REVIEW-nis2.md.
What this means and what it does not:
Upload SARIF to GitHub code scanning:
name: kshield
on: [push, pull_request]
permissions:
contents: read
security-events: write
jobs:
scan:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version: "1.27.4"
- run: go install github.com/sv222/kshield/cmd/kshield@v0.1.0
- run: kshield scan manifest -f k8s/ --format sarif --out kshield.sarif --fail-on never
- uses: github/codeql-action/upload-sarif@1fc58d04a4d4374f921bdac573c3811c240f9c26 # v4.39.2
with:
sarif_file: kshield.sarif
To fail the build on findings, drop --fail-on never (or use --fail-on warn).
ownerReferences.The scanner has no network access other than the Kubernetes API, no telemetry and no cloud service.
/sys/kernel/security/lsm.ray start pod without the KubeRay ray.io/cluster label. The pods of a KubeRay RayCluster (head, worker, driver) are exempt.ollama/ollama image.dora and nis2 profiles exist today.kshield replaces ai-guard-k8s. The checks of ai-guard-k8s are ported, with these IDs:
| ai-guard-k8s | kshield |
|---|---|
| AIG-001 no auth on the engine | KS-AI-001 (vLLM), KS-AI-010 (other engines) |
| AIG-002 debug and insecure flags | KS-AI-011 |
| AIG-003 host namespaces | KS-WL-004 |
| AIG-004 hostPath | KS-WL-005 (/dev, /dev/shm), KS-WL-014 (GPU devices), KS-WL-015 (any other path) |
| AIG-005 root, privileged, privilege escalation | KS-WL-001, KS-WL-002 |
| AIG-006 seccomp | KS-WL-009 |
| AIG-007 requests and limits | KS-WL-013 (memory limit only) |
| AIG-008 unsafe model loading | KS-AI-002, KS-AI-003, KS-AI-012 |
| AIG-009 no ingress isolation | KS-NET-004 |
| AIG-010 exposed without auth | KS-AI-004 (Ollama: KS-AI-007), with Istio and Kong evidence |
| AIG-011 hostPort | KS-WL-016 |
| AIG-012 dangerous capabilities | KS-WL-003 |
| AIG-013 HTTPRoute exposed without auth | KS-AI-013 |
The flags and names change like this:
| ai-guard-k8s | kshield |
|---|---|
scan --path <dir> |
scan manifest -f <dir> |
scan (live cluster) |
scan cluster |
--fail-on low|medium|high |
--fail-on fail|warn|never. High is FAIL, Medium and Low are WARN |
--json, --sarif |
--format json (kshield.report/v1), --format sarif |
--workload-selector |
--workload-selector |
label ai.infra.guard/enabled |
label or annotation kshield.io/ai |
annotation ai.infra.guard/gateway-auth |
label or annotation kshield.io/gateway-auth |
enforce |
remediate (a kustomize bundle) |
enforce --apply |
remediate --apply. It is server-side apply without force, asks first, and applies policies only unless you add --apply-patches |
--helm |
pipe helm template into kshield scan manifest -f - |
--kustomize |
pipe kustomize build into kshield scan manifest -f - |
For example, ai-guard scan --path dir --fail-on high becomes kshield scan manifest -f dir --fail-on fail.
What is different:
ruleId values change from AIG- to KS-, so code scanning alerts of ai-guard-k8s close and new ones open.kshield.io/ai label for custom images.envFrom key. A Secret that is not in the input gives a WARN, not a guess from its name.unstructured data. A protected exposure is INFO that names the policy, not a skipped finding.remediate --apply does not force by default. Ai-guard-k8s forced the apply.remediate writes a namespaced Kyverno policy with the Pod Security Standards restricted profile, not the label-selected cluster policies of ai-guard-k8s.Ideas and votes are welcome in issues.
See CONTRIBUTING.md. Report security issues as described in SECURITY.md.
Copyright 2026 Stanislav
sv222/kshield is a public repo on GitHub by sv222. Open source Go CLI that scans Kubernetes AI workloads (vLLM, Ollama, KubeRay, KServe, Qdrant, Milvus) for security misconfigurations and writes DORA evidence reports in text, JSON, HTML, PDF and SARIF, with signed evidence bundles and Cilium, Tetragon and Kyverno remediation policies.
It declares the Apache-2.0 license on GitHub.
Its maker has not tagged a system, so it is unknown here. Its README says what it needs.
Open "Take it" on its page: Take My Repo writes an install plan for your machine and hands it to your AI agent (Claude Code, Codex or Cursor), which asks you before each step. Take My Repo has not tested it on any machine.
Its last change on GitHub was on 2026-11-21. Take My Repo does not judge from that whether it is maintained.
Nobody has reviewed it on Take My Repo yet, which says nothing about its quality.
使用Ansible脚本安装K8S集群,介绍组件交互原理,方便直接,不受国内网络环境影响
Reverse engineer anything with agents, from app behavior down to native binaries.

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

Shannon is an AI pentester for web applications and APIs. It analyzes your source code, identifies attack vectors, and executes real exploits to prove vulnerabilities before they reach production.

Hubble - Network, Service & Security Observability for Kubernetes using eBPF

Practical AWS cloud architecture handbook for engineers: core services, design patterns, limits, security, cost optimization and AWS Well-Architected Framework guidance, updated for 2026.
Competency handbook for cloud and platform engineers: concise, regularly refreshed answers on AWS, Azure and Google Cloud, covering architecture, networking, security, serverless, containers, IaC, cost and migration. Use it to check your skills and find gaps to grow.
AWS to Azure service equivalents: a side-by-side comparison matrix for multi-cloud design, migration and hybrid architecture, covering compute, storage, databases, networking, identity, security, analytics, AI and containers. Reviewed 2026.
Kubernetes operations runbook: 150 Q&A on cluster administration, networking, storage, security, upgrades and troubleshooting, with kubectl commands and YAML examples validated in CI.
DevOps engineering playbook: practical answers on CI/CD, infrastructure as code, containers, Kubernetes, GitOps, observability and software supply-chain security. A concise handbook for engineers building delivery pipelines and platforms.
Nushell config for 100% Bash Compatibility for Windows. 100% Bash commands for Windows without WSL/Git Bash.
This page is also available as structured data, with the same sources and dates.
/api/v1/resources/gh/sv222/kshieldTake My Repo has not tested this on your machine. Requirements come from the project's own documentation.