Skip to content

Refactor file detection and scanning logic to fix commit file handling #101

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
merged 2 commits into from
Jul 23, 2025

Conversation

dacoburn
Copy link
Collaborator

Root Cause

The files logic for detecting if there were changed manifest files had been broken over time. At this point it was completely decoupled and in most instances things didn't work correctly without --ignore-commit-files

Fix

  • 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

Public Changelog

• Fixed file detection logic that was preventing proper scanning of changed manifest files
• Improved handling of different file input formats (list, string, JSON) for better reliability
• Enhanced automatic detection of git repository changes and manifest file filtering
• Fixed cases where scans would incorrectly skip when manifest files were present in commits

- 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
@dacoburn dacoburn added the Product Changelog New features for the public changelog label Jul 23, 2025
@dacoburn dacoburn requested a review from a team as a code owner July 23, 2025 00:10
@dacoburn dacoburn requested review from tmpvar and barslev and removed request for a team July 23, 2025 00:10
Copy link

github-actions bot commented Jul 23, 2025

🚀 Preview package published!

Install with:

pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple socketsecurity==2.1.23.dev1

Docker image: socketdev/cli:pr-101

…r 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
@dacoburn dacoburn merged commit 69ec6b9 into main Jul 23, 2025
6 checks passed
@dacoburn dacoburn deleted the doug/fix-commit-detected-files branch July 23, 2025 04:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Product Changelog New features for the public changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants