From baff150c13f7cf1f0601f8d2269d42c93f2e0605 Mon Sep 17 00:00:00 2001 From: Douglas Coburn Date: Thu, 31 Jul 2025 16:45:32 -0700 Subject: [PATCH 1/3] Fixed old diff scan endpoint to correctly use the include_license_details flag and default to true --- socketdev/fullscans/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/socketdev/fullscans/__init__.py b/socketdev/fullscans/__init__.py index 1f00f64..f852722 100644 --- a/socketdev/fullscans/__init__.py +++ b/socketdev/fullscans/__init__.py @@ -766,10 +766,10 @@ def stream_diff( before: str, after: str, use_types: bool = True, - include_license_details: bool = False, + include_license_details: bool = True, **kwargs, ) -> Union[dict, StreamDiffResponse]: - path = f"orgs/{org_slug}/full-scans/diff?before={before}&after={after}&{include_license_details}" + path = f"orgs/{org_slug}/full-scans/diff?before={before}&after={after}&include_license_details={include_license_details}" if kwargs: for key, value in kwargs.items(): path += f"&{key}={value}" From 06a0c42310ba21e35a009829a14760c902be6ca2 Mon Sep 17 00:00:00 2001 From: Douglas Coburn Date: Thu, 31 Jul 2025 16:46:47 -0700 Subject: [PATCH 2/3] Bumped version --- socketdev/fullscans/__init__.py | 2 +- socketdev/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/socketdev/fullscans/__init__.py b/socketdev/fullscans/__init__.py index f852722..f411009 100644 --- a/socketdev/fullscans/__init__.py +++ b/socketdev/fullscans/__init__.py @@ -766,7 +766,7 @@ def stream_diff( before: str, after: str, use_types: bool = True, - include_license_details: bool = True, + include_license_details: str = "true", **kwargs, ) -> Union[dict, StreamDiffResponse]: path = f"orgs/{org_slug}/full-scans/diff?before={before}&after={after}&include_license_details={include_license_details}" diff --git a/socketdev/version.py b/socketdev/version.py index 0b167e6..edc60b3 100644 --- a/socketdev/version.py +++ b/socketdev/version.py @@ -1 +1 @@ -__version__ = "2.1.5" +__version__ = "2.1.6" From 9a7669521d91eaefb71f5491e9bb4e6327726008 Mon Sep 17 00:00:00 2001 From: Douglas Coburn Date: Thu, 31 Jul 2025 17:23:04 -0700 Subject: [PATCH 3/3] Fixed license attributes that had changed for artifacts --- socketdev/fullscans/__init__.py | 13 +++++-------- socketdev/version.py | 2 +- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/socketdev/fullscans/__init__.py b/socketdev/fullscans/__init__.py index f411009..fbedbb9 100644 --- a/socketdev/fullscans/__init__.py +++ b/socketdev/fullscans/__init__.py @@ -343,11 +343,9 @@ def from_dict(cls, data: dict) -> "LicenseMatch": @dataclass class LicenseDetail: authors: List[str] - charEnd: int - charStart: int + errorData: str filepath: str match_strength: int - filehash: str provenance: str spdxDisj: List[List[LicenseMatch]] @@ -360,14 +358,13 @@ def to_dict(self): @classmethod def from_dict(cls, data: dict) -> "LicenseDetail": return cls( + spdxDisj=data["spdxDisj"], authors=data["authors"], - charEnd=data["charEnd"], - charStart=data["charStart"], + errorData=data["errorData"], + provenance=data["provenance"], filepath=data["filepath"], match_strength=data["match_strength"], - filehash=data["filehash"], - provenance=data["provenance"], - spdxDisj=[[LicenseMatch.from_dict(match) for match in group] for group in data["spdxDisj"]], + ) diff --git a/socketdev/version.py b/socketdev/version.py index edc60b3..b6d2a0c 100644 --- a/socketdev/version.py +++ b/socketdev/version.py @@ -1 +1 @@ -__version__ = "2.1.6" +__version__ = "2.1.7"