[WIP] Run gosec against BuildKit#2449
Conversation
|
For the |
Signed-off-by: Sascha Schwarze <schwarzs@de.ibm.com>
Signed-off-by: Sascha Schwarze <schwarzs@de.ibm.com>
1bdb9a6 to
069158a
Compare
That's fine, we're not in a hurry. |
| @@ -0,0 +1,7 @@ | |||
| # syntax=docker/dockerfile:1.3 | |||
|
|
|||
| ARG GOSEC_VERSION=v2.9.1 | |||
There was a problem hiding this comment.
Wondering; instead of a new Dockerfile, wouldn't we be able to enable gosec in golangci-lint ? Looks like it's included in golangci-lint, but not enabled by default; https://golangci-lint.run/usage/linters/
There was a problem hiding this comment.
Yep, will come back to this. Currently working on the same in my runc PR. ;-)
|
@SaschaSchwarze0 I think we'd still be interested in this if you're still working on it? For the TLS minimum versions, if we're waiting on containerd to make sure we're aligned, could we compromise by ignoring those warnings for now and circling back round later? I think the other warnings still have value and be good to get in 👀 |
|
@jedevc I think all that's needed is to add |
|
Solved by #3224 |
We are happily using BuildKit and would like to continue doing so. For this, we need it to pass
gosec -confidence medium -severity high. Let me know if the BuildKit project is willing to fix those findings and validate against gosec rules going forward. If not, just close the PR.I am adding gosec validation to the
validationaction, and start to mitigate the findings.math/randtocrypto/rand. Mitigates G404: Insecure random number source (rand)ParseIntto be able to provide the bit size. Mitigates G109: Potential Integer overflow made by strconv.Atoi result conversion to int16/32With that, gosec is not yet fully happy. What is remaining is:
I could easily specify a MinVersion there (and would set it to 1.2). But, I do not know if that would break a contract. Looking for some guidance on that aspect.