feat: Add support for base_paths parameter in fullscans and diffscans #48
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.
This PR adds support for a
base_paths
parameter to fullscans and diffscans functionality, allowing users to specify multiple base directory paths to strip from uploaded file keys for cleaner file organization in Socket scans.Why?
Currently, users can only specify a single
base_path
to strip from file paths when uploading files for scanning. In complex projects with multiple source directories or monorepo structures, users may need to strip different base paths from different files to create clean, organized file keys in their Socket scans.This feature enables users to specify multiple base paths in a list, allowing for more flexible file organization. For example, files from
/home/user/project/src/
and/opt/app/config/
can both be properly organized by stripping their respective base paths.Benefits:
base_path
parameterPublic Changelog
Added
base_paths
parameter toFullScans.post()
andDiffScans.create_from_repo()
methods to support stripping multiple base directory paths from uploaded file keys. This enables cleaner file organization in Socket scans for complex project structures. The existingbase_path
parameter remains fully supported for backward compatibility.