fix: include license violations in diff results + SDK 2.1.8 upgrade #111
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🔧 Socket Python CLI - Critical Bug Fixes & Performance Improvements
🎯 Description
This PR addresses several critical issues in the Socket Python CLI that were affecting license compliance monitoring, committer identification, and performance with large repositories. The changes ensure that all security alerts, including license violations, are properly reported in diff scans while improving the overall reliability and performance of the tool.
🐛 Key Bug Fixes
1. License Violations Missing from Diff Scans
Critical Fix: The CLI was filtering out license violation alerts (
licenseSpdxDisj
) from diff processing results, causing license violations to not be properly reported when scanning changes between commits or branches.Root Cause: The
process_alerts_for_diff_scan()
method in the core module contained a filter condition that explicitly excluded alerts of typelicenseSpdxDisj
from being added to the alerts collection.Solution: Removed the license alert filter condition, ensuring all alert types including license violations are now properly included in diff scan results for comprehensive compliance monitoring.
2. Enhanced Committer Identification
Improvement: Significantly improved how the CLI identifies committers with a robust priority-based system that works across different CI/CD environments.
New Priority Order:
--committers
parameter (highest priority)GITHUB_ACTOR
(GitHub Actions)GITLAB_USER_LOGIN
(GitLab CI)BITBUCKET_STEP_TRIGGERER_UUID
(Bitbucket Pipelines)[email protected]
)This ensures accurate committer attribution across all major CI/CD platforms and development workflows.
🚀 Performance Enhancements
3. Lazy File Loading with SDK 2.1.8
Major Performance Improvement: Upgraded to Socket SDK 2.1.8 with lazy file loading support, significantly improving performance for large repositories.
Benefits:
max_open_files=50
limit4. Reduced Log Noise
Quality of Life: Changed ulimit warning messages from
warning
todebug
level to reduce unnecessary log noise while maintaining diagnostic capability.Implementation:
🎯 Release Notes
licenseSpdxDisj
) are now properly included in diff scan results, ensuring complete compliance monitoring*This PR ensures the Socket Python CLI provides complete, accurate, and performant security scanning across all development