aquasecurity / aquasecurity/trivy-plugin-count
Binary size with latest Trivy types
- Dominant language
- Go
- Stars
- 5
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Description
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 │
```
Contributor guide
Research direction
Reproduce the plugin build from the template, first comparing the 2.9 MB binary with the version after running `go get github.com/aquasecurity/trivy`. Use `gsa count` to inspect which dependencies and sections account for the increase; done means identifying the cause of the size change or confirming whether the latest Trivy report types inherently require it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100