-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(misconf): Merge trivy-iac
into Trivy
#5636
Conversation
@nikpivkin as you mentioned, I removed the packages that exist in defsec today so we can properly make another PR to bring them into Trivy later. |
9a6ab27
to
45f469e
Compare
@DmitriyLewen the errors in the CI seem unrelated to this PR. Is it because we have to update |
Hello @simar7 I tried to reproduce your error locally, but tests for your PR work correctly: ➜ trivy git:(merge-trivy-iac-2) ✗ tinygo version
tinygo version 0.29.0 darwin/amd64 (using go version go1.21.4 and LLVM version 15.0.0)
➜ trivy git:(merge-trivy-iac-2) ✗ mage test:module
...
=== RUN TestModule
=== RUN TestModule/spring4shell_jre_8,_severity_update
=== RUN TestModule/spring4shell_jre_11,_no_severity_update
--- PASS: TestModule (6.04s)
--- PASS: TestModule/spring4shell_jre_8,_severity_update (2.68s)
--- PASS: TestModule/spring4shell_jre_11,_no_severity_update (3.20s)
PASS
ok github.com/aquasecurity/trivy/integration 7.578s
I also pulled changes (bump to 1.21) to my PR - #5630. I see you update/add some dependencies. |
45f469e
to
547bb16
Compare
547bb16
to
b970f8c
Compare
I see - it's strange indeed. I will try to rebase and see what happens. Thanks for looking into it. |
fa2f1f7
to
23d715f
Compare
23d715f
to
e0ddc71
Compare
I found the following in the tinygo documentation on the supported packages page:
But I used Also I get the following error if I disable CGO (which does not happen in main): CGO_ENABLED=0 go generate pkg/module/testdata/analyzer/analyzer.go
# golang.org/x/sys/unix
../../../../../../go/pkg/mod/golang.org/x/[email protected]/unix/syscall_linux.go:1893:64: undefined: syscall.Rlimit
../../../../../../go/pkg/mod/golang.org/x/[email protected]/unix/syscall_linux.go:1898:50: undefined: syscall.Rlimit
../../../../../../go/pkg/mod/golang.org/x/[email protected]/unix/syscall_linux.go:1898:79: undefined: syscall.Rlimit
../../../../../../go/pkg/mod/golang.org/x/[email protected]/unix/syscall_unix.go:605:17: undefined: syscall.Setrlimit
../../../../../../go/pkg/mod/golang.org/x/[email protected]/unix/syscall_unix.go:605:47: undefined: syscall.Rlimit
pkg/module/testdata/analyzer/analyzer.go:1: running "tinygo": exit status 1 |
Interesting find, but we don't use cgo in Trivy or is it a dependency of Trivy that does so (maybe tinygo?) we might have to look through the diff of the changed dependencies here
Hmm.. I'm also not sure. So far I've tried the following with no success:
I'm not able to reproduce this issue locally either. I am clearing go test cache between tests via |
@simar7 I tried re-migrating trivy-iac and locally all my tests passed. CI failed due to linter issues. |
Interesting does that mean it's just the GitHub Actions not working well on this PR? Or are there any differences between your PR and this? |
@simar7 I compared go.mod and didn't seem to notice any difference. |
Closing in favor of #5692 as this one has something up with the CI actions. |
Description
Merges
trivy-iac
into Trivy.Related issues
trivy-iac
into Trivy #5626Related PRs
trivy-iac/pkg
withdefsec/pkg
trivy-checks#39trivy-iac/pkg
withdefsec/pkg
trivy-aws#55Checklist