fix(utils): restore path normalization for open events#773
fix(utils): restore path normalization for open events#773yugal07 wants to merge 2 commits intokubescape:mainfrom
Conversation
Signed-off-by: yugal07-tamasha <yugal.sadhwani@tamasha.live>
Signed-off-by: yugal07-tamasha <yugal.sadhwani@tamasha.live>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughThis pull request introduces a Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
✨ Finishing Touches🧪 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 |
Overview
Commit 9597da4 refactored
datasource_event.goto suppress verbose fieldlength warnings, but silently dropped the
NormalizePath()calls that wereintroduced in eafe066. This caused raw eBPF paths to be surfaced without
normalization, resulting in:
/procpaths:/46/task/46/fdinstead of/proc/46/task/46/fd.instead of//This PR restores
pkg/utils/path.gowith theNormalizePath()function andre-wires it into the
GetPath,GetFullPath,GetExePath,GetNewPath, andGetOldPathgetter methods in bothDatasourceEventandStructEvent.Testing -
Deploy the node-agent and inspect open events or an
ApplicationProfile.Paths should be fully absolute (e.g.
/proc/46/task/46/fd) with no bare.entries.
Unit tests can be run locally with:
go test ./pkg/utils/...
This fixes #721
Summary by CodeRabbit
Bug Fixes
Tests