You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Unknown field "initContainers" in io.securecodebox.execution.v1.Scan.spec #784
secureCodeBox/semgrep gives 'failed to download" error when I install, in this case I installed through scanners/semgrep via repository (helm -f value.yaml ...) . Next, I used scanners/semgrep/example/vulnerable-flask-app/scan.yaml to generate a scan but got the error message 'error: error validating "scan.yaml": error validating data: ValidationError (Scan.spec): unknown field "initContainers" in io.securecodebox.execution.v1.Scan.spec; if you choose to ignore these errors, turn validation off with --validate=false'
Install Semgrep scanner with source git clone https://github.com/secureCodeBox/secureCodeBox.git cd secureCodeBox/scanners/semgrep helm upgrade --install -f values.yaml semgrep . -n securecodebox-system
Create scan (Error: unknown field "initContainers" in io.securecodebox.execution.v1.Scan.spec) cd scanners/semgrep/examples/vulnerable-flask-app kubectl apply -f scan.yaml
Expected behavior
How can I install semgrep scanner and make a scan with semgrep type working properly?
System (please complete the following information):
Hi there. This is interesting, thank you for the bug report. It looks like you are still running secureCodeBox 3.1.1 for the operator - the initContainer support was only added with 3.2, but there was an issue with the release process which means that the operator wasn't built and released properly, so the first working release with the new features is 3.3. So, this explains why it doesn't work for you.
When did you run the upgrade of the operator? We released version 3.3 on the 26th - before that day, it may be that semgrep already showed up in the docs because of the way we build or docs, but the helm chart was not yet available, so the installation would have failed, as you saw.
In general, your process looks good to me, so if your attempt at installing it has been more than 1.5 days ago, can you try again and report back?
Hi there. This is interesting, thank you for the bug report. It looks like you are still running secureCodeBox 3.1.1 for the operator - the initContainer support was only added with 3.2, but there was an issue with the release process which means that the operator wasn't built and released properly, so the first working release with the new features is 3.3. So, this explains why it doesn't work for you.
When did you run the upgrade of the operator? We released version 3.3 on the 26th - before that day, it may be that semgrep already showed up in the docs because of the way we build or docs, but the helm chart was not yet available, so the installation would have failed, as you saw.
In general, your process looks good to me, so if your attempt at installing it has been more than 1.5 days ago, can you try again and report back?
Thanks for your reply.
I rerun helm --namespace securecodebox-system upgrade --install securecodebox-operator secureCodeBox/operator again but the version was still operator-3.1.1, so i installed it from source and now it's operator-v3.3.0.
And I reinstalled semgrep with helm upgrade --install semgrep secureCodeBox/semgrep command but still getting Error: failed to download "secureCodeBox/semgrep error, so i installed it from source.
And also unknown field "initContainers" error when creating a scan.
Hmm, this is strange, the repo should be up to date. Did you run helm repo update to get the new indexes before trying this? What is the output of helm search repo secureCodeBox?
If you install the operator from source, it may not necessarily also install the updated custom resource definitions (CRDs) that you need (depending on how exactly you installed it), so I would prefer to figure out why the helm install did not work properly for you :)
Hmm, this is strange, the repo should be up to date. Did you run helm repo update to get the new indexes before trying this? What is the output of helm search repo secureCodeBox?
If you install the operator from source, it may not necessarily also install the updated custom resource definitions (CRDs) that you need (depending on how exactly you installed it), so I would prefer to figure out why the helm install did not work properly for you :)
I didn't do helm repo update before. Currently, I have run helm repo update and can install from secureCodeBox/operator, as well as can install semgrep from secureCodeBox/semgrep, but still get unknown field "initContainers" error when creating a scan.
I did helm uninstall securecodebox-operator before reinstalling it.
Sorry forgot to mention this in the release notes: Helm has a limitation on handling CRDs. Helm only installs them, but never upgrades them even when they have been changed. 😕 https://helm.sh/docs/topics/charts/#limitations-on-crds
That's why you still have the 3.1.x versions of the crds installed.
Ooof, okay, I see - I didn't know that, either. Yes, we should add that to the release note, and I'll also post to the release discussion here on GitHub.
Hmm, seems like our release process did not push the docker image to dockerhub, and none of our previous CI runs did so, either - @J12934 do you know what is going on here? Would be good to have this resolved before we merge secureCodeBox/documentation#150.
We have just created a new release 3.3.1, which should fix the issue. Remember to run helm repo update before trying to install :) and let us know if it works now. Thanks again for pointing this issue out to us.
Activity
malexmave commentedon Oct 28, 2021
Hi there. This is interesting, thank you for the bug report. It looks like you are still running secureCodeBox 3.1.1 for the operator - the initContainer support was only added with 3.2, but there was an issue with the release process which means that the operator wasn't built and released properly, so the first working release with the new features is 3.3. So, this explains why it doesn't work for you.
When did you run the upgrade of the operator? We released version 3.3 on the 26th - before that day, it may be that semgrep already showed up in the docs because of the way we build or docs, but the helm chart was not yet available, so the installation would have failed, as you saw.
In general, your process looks good to me, so if your attempt at installing it has been more than 1.5 days ago, can you try again and report back?
l4mb0san commentedon Oct 28, 2021
Thanks for your reply.
helm --namespace securecodebox-system upgrade --install securecodebox-operator secureCodeBox/operatoragain but the version was still operator-3.1.1, so i installed it from source and now it's operator-v3.3.0.helm upgrade --install semgrep secureCodeBox/semgrepcommand but still getting Error: failed to download "secureCodeBox/semgrep error, so i installed it from source.malexmave commentedon Oct 28, 2021
Hmm, this is strange, the repo should be up to date. Did you run
helm repo updateto get the new indexes before trying this? What is the output ofhelm search repo secureCodeBox?If you install the operator from source, it may not necessarily also install the updated custom resource definitions (CRDs) that you need (depending on how exactly you installed it), so I would prefer to figure out why the helm install did not work properly for you :)
l4mb0san commentedon Oct 28, 2021
I didn't do
helm repo updatebefore. Currently, I have runhelm repo updateand can install fromsecureCodeBox/operator, as well as can install semgrep fromsecureCodeBox/semgrep, but still get unknown field "initContainers" error when creating a scan.I did
helm uninstall securecodebox-operatorbefore reinstalling it.J12934 commentedon Oct 28, 2021
Hi 👋
Sorry forgot to mention this in the release notes: Helm has a limitation on handling CRDs. Helm only installs them, but never upgrades them even when they have been changed. 😕 https://helm.sh/docs/topics/charts/#limitations-on-crds
That's why you still have the 3.1.x versions of the crds installed.
You can manually update them by running:
We should definitively add some upgrading notes to the release notes on releases when we add new fields to the crds.
malexmave commentedon Oct 28, 2021
Ooof, okay, I see - I didn't know that, either. Yes, we should add that to the release note, and I'll also post to the release discussion here on GitHub.
malexmave commentedon Oct 28, 2021
Let us know if this resolves the issue, @l4mb0san, and thank you for reporting this!
l4mb0san commentedon Oct 28, 2021
Thank you very much @malexmave @J12934 ,
unknown field "initContainers" error has been fixed. I have created the scan to run normally.
But there is one more small problem: parser-semgrep can't pull image, can you help me with this problem?
malexmave commentedon Oct 28, 2021
Hmm, seems like our release process did not push the docker image to dockerhub, and none of our previous CI runs did so, either - @J12934 do you know what is going on here? Would be good to have this resolved before we merge secureCodeBox/documentation#150.
Add missing semgrep release build
malexmave commentedon Oct 28, 2021
We have just created a new release 3.3.1, which should fix the issue. Remember to run
helm repo updatebefore trying to install :) and let us know if it works now. Thanks again for pointing this issue out to us.l4mb0san commentedon Oct 28, 2021
Thanks for your support ^^ @malexmave