You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: include license violations in diff results + SDK 2.1.8 upgrade (#111)
* feat: upgrade to SDK 2.1.8 with lazy loading and improved committer handling
- 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.
* feat: add --enable-diff flag and improve license policy violation handling
- 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.
* changes for license processing
* Fixing login issues for pushing Docker image
* Another docker fix
* bumping minor version since the PR ended up having a lot of changes
| --enable-diff | False | False | Enable diff mode even when using --integration api (forces diff mode without SCM integration) |
119
120
| --scm | False | api | Source control management type|
120
121
| --timeout | False || Timeout in seconds for API requests |
121
122
| --include-module-folders | False | False | If enabled will include manifest files from folders like node_modules |
@@ -205,13 +206,15 @@ The CLI determines which files to scan based on the following logic:
205
206
- **Differential Mode**: When manifest files are detected in changes, performs a diff scan with PR/MR comment integration
206
207
- **API Mode**: When no manifest files are in changes, creates a full scan report without PR comments but still scans the entire repository
207
208
- **Force Mode**: With `--ignore-commit-files`, always performs a full scan regardless of changes
209
+
- **Forced Diff Mode**: With `--enable-diff`, forces differential mode even when using `--integration api` (without SCM integration)
208
210
209
211
### Examples
210
212
211
213
- **Commit with manifest file**: If your commit includes changes to `package.json`, a differential scan will be triggered automatically with PR comment integration.
212
214
- **Commit without manifest files**: If your commit only changes non-manifest files (like `.github/workflows/socket.yaml`), the CLI automatically switches to API mode and performs a full repository scan.
213
215
- **Using `--files`**: If you specify `--files '["package.json"]'`, the CLI will check if this file exists and is a manifest file before determining scan type.
214
216
- **Using `--ignore-commit-files`**: This forces a full scan of all manifest files in the target path, regardless of what's in your commit.
217
+
- **Using `--enable-diff`**: Forces diff mode without SCM integration - useful when you want differential scanning but are using `--integration api`. For example: `socketcli --integration api --enable-diff --target-path /path/to/repo`
215
218
- **Auto-detection**: Most CI/CD scenarios now work with just `socketcli --target-path /path/to/repo --scm github --pr-number $PR_NUM`
0 commit comments