-
Couldn't load subscription status.
- Fork 8
fix: include license violations in diff results + SDK 2.1.8 upgrade #111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
...andling - Upgrade socket-sdk-python dependency to version 2.1.8 to support lazy file loading capabilities - Enable lazy file loading in fullscans.post() with use_lazy_loading=True and max_open_files=50 to prevent "Too many open files" errors when processing large numbers of manifest files - Remove custom lazy_file_loader module as this functionality is now handled by the SDK - Fix committer display format by implementing proper priority order: 1. CLI --committers argument (highest priority) 2. CI/CD SCM username (GITHUB_ACTOR, GITLAB_USER_LOGIN, BITBUCKET_STEP_TRIGGERER_UUID) 3. Git username extracted from email patterns (e.g., GitHub noreply emails) 4. Git email address 5. Git author name (fallback) - Add get_formatted_committer() method to Git class to properly format committer strings instead of displaying raw git.Actor objects - Include license alerts in diff processing by removing licenseSpdxDisj filter condition - Change ulimit warning messages from log.warning to log.debug to reduce noise - Update create_full_scan() method signature to accept file paths directly instead of pre-processed file objects - Remove deprecated load_files_for_sending() method as lazy loading is now handled by the SDK This update improves performance for large repositories, provides better committer identification in CI/CD environments, and ensures license violations are properly reported.
@dacoburn
dacoburn
requested review from
kapravel and
nolanlawson
and removed request for
a team
August 22, 2025 23:54
π Preview package published!
Install with:
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple socketsecurity==2.2.0.dev1
Docker image: socketdev/cli:pr-111
@dacoburn
dacoburn
changed the title
(ει€) feat: upgrade to SDK 2.1.8 with lazy loading and improved committer h... (ει€γγγΎγ§)
(θΏ½θ¨) fix: include license violations in diff results + SDK 2.1.8 upgrade (θΏ½θ¨γγγΎγ§)
Aug 22, 2025
...dling - Add --enable-diff flag to force differential scanning even when using --integration api - Improve license policy violation grouping and display in PR comments - Fix alert consolidation logic to prevent duplicate alerts based on manifest files - Enhance empty baseline scan creation with proper file cleanup - Add comprehensive test coverage for new enable_diff functionality - Update documentation with new scanning mode examples and usage patterns The --enable-diff flag enables differential mode without SCM integration, useful for getting diff reports while using the API integration type. License policy violations are now properly grouped by package and displayed with consistent formatting in GitHub PR comments.
Planeshifter
Planeshifter
approved these changes
Aug 23, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Uh oh!
There was an error while loading. Please reload this page.
π§ 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 typelicenseSpdxDisjfrom 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:
--committersparameter (highest priority)GITHUB_ACTOR(GitHub Actions)GITLAB_USER_LOGIN(GitLab CI)BITBUCKET_STEP_TRIGGERER_UUID(Bitbucket Pipelines)123456+username@users.noreply.github.com)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=50limit4. Reduced Log Noise
Quality of Life: Changed ulimit warning messages from
warningtodebuglevel 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