Repository navigation
fix(cleaner): update Kubernetes client calls to @kubernetes/client-node v1.x object parameter convention - #1406
Merged
commjoen merged 1 commit intoOct 27, 2026
Conversation
…de v1.x object parameter convention Update cleaner API methods to pass named parameter objects required by @kubernetes/client-node v1.x, safely parse response items, and add comprehensive unit tests. Fixes OWASP#1405
🚀 Preview Build Complete!Your pull request has been built successfully. However, since this is from a fork, preview images cannot be pushed to the organization's container registry. Testing Your ChangesTo test your changes, you can build and deploy locally: # Clone this PR
git fetch origin pull/1406/head:pr-1406
git checkout pr-1406
# Build and deploy locally
./build-and-deploy.sh
# Or for minikube
./build-and-deploy-minikube.sh
# Port forward to access locally
kubectl port-forward service/wrongsecrets-balancer 3000:3000Alternative: Manual Build# Build images locally
cd wrongsecrets-balancer
docker build -t my-wrongsecrets-balancer:test .
cd ../cleaner
docker build -t my-cleaner:test .
# Deploy with custom images using Helm
helm repo add wrongsecrets https://owasp.org/wrongsecrets-ctf-party
helm repo update
helm install my-preview wrongsecrets/wrongsecrets-ctf-party \
--set balancer.repository=my-wrongsecrets-balancer \
--set balancer.tag=test \
--set wrongsecretsCleanup.repository=my-cleaner \
--set wrongsecretsCleanup.tag=test \
--set balancer.imagePullPolicy=Never \
--set wrongsecretsCleanup.imagePullPolicy=NeverWhy Can't Images Be Pushed?External contributors don't have write permissions to the organization's GitHub Container Registry. This is a security measure to protect the organization's packages. This preview was automatically generated for PR #1406 |
commjoen
approved these changes
Oct 27, 2026
commjoen
left a comment
Collaborator
There was a problem hiding this comment.
Thank you @youknowme19 !
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Thank you for submitting a pull request to the WrongSecrets Party!
What kind of changes does this PR include?
Checklist:
Summary of changes
cleaner/src/kubernetes.jsmethods (getTeamInstances,getTeamJuiceShopInstances,getNamespaces,deleteNamespaceForTeam) to pass named parameter objects required by@kubernetes/client-nodev1.x (^1.2.0).cleaner/src/main.jsto safely resolve deployment and namespace collections (res?.items || res?.body?.items || []) supporting both v1.x response format and mock structures.cleaner/src/kubernetes.test.jswith comprehensive unit tests validating parameter object structures and error handling for all Kubernetes client calls.Fixes #1405