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
Refactor file detection and scanning logic to fix commit file handling (#101)
* Refactor file detection and scanning logic to fix commit file handling
- Fix file argument parsing to handle list, string, and JSON formats more robustly
- Clarify git repository detection and file selection logic with better separation of concerns
- Add force_api_mode to handle cases where no supported manifest files are found
- Replace ambiguous should_skip_scan logic with clearer file detection flow
- Add create_full_scan_with_report_url method to Core for API-mode scanning
- Improve logging messages and remove unused code (get_all_scores method)
- Ensure consistent diff object initialization and ID handling
- Automatically enable disable_blocking when no supported files are detected
* Add debugging options and lazy file loading to prevent file descriptor exhaustion
- Add --save-submitted-files-list option to output JSON with list of scanned files, sizes, and metadata for debugging
- Add --save-manifest-tar option to create tar.gz archive of all manifest files with original directory structure
- Implement lazy file loading to prevent 'Too many open files' errors when scanning large numbers of manifest files
- Add system resource utilities to check file descriptor limits and warn when approaching ulimit -n
- Update .gitignore to exclude AI testing files and verification scripts
- Update README with comprehensive documentation for new debugging features and examples
| --excluded-ecosystems | False | [] | List of ecosystems to exclude from analysis (JSON array string). You can get supported files from the [Supported Files API](https://docs.socket.dev/reference/getsupportedfiles) |
49
-
| --license-file-name | False | `license_output.json` | Name of the file to save the license details to if enabled |
| --excluded-ecosystems | False | [] | List of ecosystems to exclude from analysis (JSON array string). You can get supported files from the [Supported Files API](https://docs.socket.dev/reference/getsupportedfiles) |
49
+
| --license-file-name | False | `license_output.json` | Name of the file to save the license details to if enabled |
50
+
| --save-submitted-files-list | False | | Save list of submitted file names to JSON file for debugging purposes |
51
+
| --save-manifest-tar | False | | Save all manifest files to a compressed tar.gz archive with original directory structure |
50
52
51
53
#### Branch and Scan Configuration
52
54
| Parameter | Required | Default | Description |
@@ -133,6 +135,73 @@ The CLI determines which files to scan based on the following logic:
133
135
- **Using `--files`**: If you specify `--files '["package.json"]'`, the CLI will check if this file exists and is a manifest file before triggering a scan.
134
136
- **Using `--ignore-commit-files`**: This forces a scan of all manifest files in the target path, regardless of what's in your commit.
135
137
138
+
## Debugging and Troubleshooting
139
+
140
+
### Saving Submitted Files List
141
+
142
+
The CLI provides a debugging option to save the list of files that were submitted for scanning:
This will create a compressed archive containing all the manifest files that were found and submitted for scanning, preserving their original directory structure relative to the scanned directory.
0 commit comments