Conversation
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
pkg/runner/runner.go(6 hunks)pkg/scan/scan.go(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: build-linux
🔇 Additional comments (5)
pkg/scan/scan.go (1)
193-198: Improved error handling in Close methodThe method signature has been updated to return an error type, enhancing error handling capability while maintaining backward compatibility by returning nil. This change is part of a broader effort to improve error handling across the codebase, which is also reflected in the
runner.gofile.pkg/runner/runner.go (4)
34-34: Added dependency on networkpolicy packageThis import adds the networkpolicy package for improved IP filtering/validation capabilities.
55-55: Added NetworkPolicy field for IP exclusion handlingThe new field
excludedIpsNPwill store a pointer to a NetworkPolicy instance, which provides more robust and standardized IP filtering capabilities compared to the previous map-based approach.
115-123: Enhanced IP exclusion mechanismThe code now creates a NetworkPolicy instance when excluded IPs are provided, offering a more structured approach to IP filtering compared to the previous implementation. This change aligns with issue #1398 mentioned in the PR objectives.
702-724: Improved error handling in Close methodThe Close method has been updated to return errors from various operations, providing better error handling and reporting capabilities. This change is part of a consistent approach also implemented in the Scanner's Close method.
Closes #1398
Summary by CodeRabbit