Skip to content

fix(scan): match manifest filenames case-insensitively#1290

Merged
Benjamin Barslev Nielsen (barslev) merged 1 commit intov1.xfrom
barslev/fix-support-for-pipfile-with-capital-p
Apr 30, 2026
Merged

fix(scan): match manifest filenames case-insensitively#1290
Benjamin Barslev Nielsen (barslev) merged 1 commit intov1.xfrom
barslev/fix-support-for-pipfile-with-capital-p

Conversation

@barslev
Copy link
Copy Markdown
Contributor

@barslev Benjamin Barslev Nielsen (barslev) commented Apr 30, 2026

The supported-file patterns returned by getReportSupportedFiles are lowercase (e.g. pipfile, setup.py), but real Python projects commonly ship capitalized names like Pipfile and Pipfile.lock. Without nocase: true, those files were silently dropped from socket scan create output, so only one manifest type per project ended up in the SBOM.

Adds nocase: true to the four micromatch.some() calls used during scan-file selection (filterBySupportedScanFiles,
createSupportedFilesFilter, isReportSupportedFile, and filterToCdxSpdxAndFactsFiles).


Note

Low Risk
Small, localized change to file-glob filtering behavior with added tests; low chance of unintended impact beyond including additional files in scans.

Overview
Fixes socket scan create manifest discovery to be case-insensitive by enabling micromatch nocase matching in the scan-file selection paths (supported-manifest filtering and CDX/SPDX-only filtering), preventing files like Pipfile/Pipfile.lock from being silently excluded.

Adds unit coverage ensuring capitalized Python manifest filenames are picked up, and bumps the CLI version to 1.1.89 with a corresponding changelog entry.

Reviewed by Cursor Bugbot for commit 82030f1. Configure here.

The supported-file patterns returned by getReportSupportedFiles are
lowercase (e.g. `pipfile`, `setup.py`), but real Python projects
commonly ship capitalized names like `Pipfile` and `Pipfile.lock`.
Without `nocase: true`, those files were silently dropped from
`socket scan create` output, so only one manifest type per project
ended up in the SBOM.

Adds `nocase: true` to the four micromatch.some() calls used during
scan-file selection (filterBySupportedScanFiles,
createSupportedFilesFilter, isReportSupportedFile, and
filterToCdxSpdxAndFactsFiles).
@barslev Benjamin Barslev Nielsen (barslev) merged commit 387326b into v1.x Apr 30, 2026
13 checks passed
@barslev Benjamin Barslev Nielsen (barslev) deleted the barslev/fix-support-for-pipfile-with-capital-p branch April 30, 2026 10:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants