perf: switch to kubescape/syft v1.32.0-ks.2 + disable file catalogers#355
perf: switch to kubescape/syft v1.32.0-ks.2 + disable file catalogers#355
Conversation
These three catalogers iterate every file in the scan tree and dominate transient allocation, but their outputs are not consumed downstream in the vulnerability scan pipeline. Disabling them saves ~200 MB peak RSS on gitlab-ee and stacks with upstream selective-indexing + binary-prefilter improvements. Signed-off-by: Ben <ben@armosec.io>
Routes anchore/syft imports to the kubescape fork via replace directive. The fork carries selective indexing + binary-cataloger pre-filtering on top of v1.32.0; combined with the file-cataloger disable in the parent commit, this reduces gitlab-ee scan peak RSS from 1,621 MB to 1,123 MB. Refs: NAUT-1283 Signed-off-by: Ben <ben@armosec.io>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (4)
📝 WalkthroughWalkthroughThe pull request modifies SBOM generation configuration to exclude specific file catalogers (digest, metadata, executable) from Syft's pipeline, updates test data JSON files to reflect the new SBOM format with unescaped ampersands and removed file metadata, and adds a Go module replacement pointing Syft to a Kubescape fork. Changes
Estimated Code Review Effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly Related PRs
Suggested Labels
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@matthyx — these three PRs implement the syft memory-reduction work we discussed (NAUT-1283). The combined effect is -498 MB peak RSS on gitlab-ee (1,621 → 1,123 MB), fitting the 1.5 GB cgroup with margin. The syft side is a clean two-commit branch on
Whenever you have a moment. |
|
@slashben fix unit tests pls |
file-digest-cataloger and file-metadata-cataloger are now disabled, so $.files[i] no longer carries digests or metadata keys; update fixtures to match the slimmer output Signed-off-by: Ben <ben@armosec.io>
|
Summary:
|
Memory-reduction rollout (NAUT-1283)
Reduces node-agent + kubevuln scan peak RSS by 30.7% on gitlab-ee
(1,621 MB → 1,123 MB), fitting a 1.5 GB cgroup with 377 MB margin.
Measured deltas (gitlab-ee, 113,836 files; kernel peak RSS via /usr/bin/time -v)
Initiative status
workerpool.New(1); kubevulnscanConcurrencydefaults to 1)Cross-repo PRs
Audit
Pre-merge audit confirmed no production-path consumer reads
sbom.Files[*].Digestsorsbom.Files[*].Metadatain node-agent,kubevuln, or kubescape/storage. The two storage consumers
(
containerprofile_processor.go:172,applicationprofile_processor.go:67)only read
f.Location.RealPath, which the directory walker stillpopulates regardless of file-cataloger disable. Selective indexing also
keeps 99.9% of the file-path coverage on gitlab-ee
(113,265 of 113,382 paths).
Reference:
shared-designs-and-docs/syft-memory-improvement/2026-04-28-rollout-design.mdSummary by CodeRabbit
Release Notes
Bug Fixes
Chores