Skip to content
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

Binary size with latest Trivy types #2

Open
madflow opened this issue Nov 4, 2024 · 0 comments
Open

Binary size with latest Trivy types #2

madflow opened this issue Nov 4, 2024 · 0 comments

Comments

@madflow
Copy link

madflow commented Nov 4, 2024

I used this template to evaluate how to write a plugin.

The binary size is 2.9 MB.

When I use the latest trivy report types by updating:

go get github.com/aquasecurity/trivy

the binary size is 114 MB.

This would be a too large binary size, for the value a plugin would provide for my taste.

Maybe I am doing something wrong?

The tool gsa yields:

gsa count

┌────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ count                                                                                                      │
├─────────┬─────────────────────────────────────────────────────────────────────────────┬────────┬───────────┤
│ PERCENT │ NAME                                                                        │ SIZE   │ TYPE      │
├─────────┼─────────────────────────────────────────────────────────────────────────────┼────────┼───────────┤
│ 12.34%  │ k8s.io/api                                                                  │ 15 MB  │ vendor    │
│ 9.13%   │ __rodata __TEXT                                                             │ 11 MB  │ section   │
│ 8.03%   │ __rodata __DATA_CONST                                                       │ 9.6 MB │ section   │
│ 5.48%   │ __zdebug_info __DWARF                                                       │ 6.6 MB │ section   │
│ 4.81%   │ __zdebug_loc __DWARF                                                        │ 5.8 MB │ section   │
│ 3.67%   │ github.com/aws/aws-sdk-go                                                   │ 4.4 MB │ vendor    │
│ 3.57%   │ github.com/open-policy-agent/opa                                            │ 4.3 MB │ vendor    │
│ 3.53%   │ github.com/alecthomas/chroma                                                │ 4.2 MB │ vendor    │
│ 2.84%   │ __zdebug_names __DWARF                                                      │ 3.4 MB │ section   │
│ 2.60%   │ __zdebug_line __DWARF                                                       │ 3.1 MB │ section   │
│ 1.41%   │ google.golang.org/protobuf                                                  │ 1.7 MB │ vendor    │
│ 1.36%   │ k8s.io/apimachinery                                                         │ 1.6 MB │ vendor    │
│ 1.20%   │ __noptrdata __DATA                                                          │ 1.4 MB │ section   │
│ 1.18%   │ __zdebug_ranges __DWARF                                                     │ 1.4 MB │ section   │
│ 1.17%   │ net                                                                         │ 1.4 MB │ std       │
│ 1.14%   │ github.com/google/gnostic-models                                            │ 1.4 MB │ vendor    │
│ 1.08%   │                                                                             │ 1.3 MB │ generated │
│ 1.02%   │ crypto                                                                      │ 1.2 MB │ std       │
│ 0.97%   │ golang.org/x/text                                                           │ 1.2 MB │ vendor    │
│ 0.90%   │ google.golang.org/grpc                                                      │ 1.1 MB │ vendor    │
│ 0.85%   │ __zdebug_str __DWARF                                                        │ 1.0 MB │ section   │
│ 0.85%   │ runtime                                                                     │ 1.0 MB │ std       │

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant