Skip to content

Commit bb177b4

Browse files
authored
Merge pull request #64 from SocketDev/scan-type
Add scan_type query param to full scan API
2 parents e7d1c4a + 89eaf41 commit bb177b4

File tree

4 files changed

+13
-2
lines changed

4 files changed

+13
-2
lines changed

README.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,8 @@ Create a full scan from a set of package manifest files. Returns a full scan inc
227227
+------------------------+------------+-------------------------------------------------------------------------------+
228228
| integration_org_slug | False | Organization slug for integration |
229229
+------------------------+------------+-------------------------------------------------------------------------------+
230+
| scan_type | False | ScanType enum value: "socket", "socket_tier1", or "socket_basics" |
231+
+------------------------+------------+-------------------------------------------------------------------------------+
230232

231233
fullscans.delete(org_slug, full_scan_id)
232234
""""""""""""""""""""""""""""""""""""""""

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "socketdev"
7-
version = "3.0.28"
7+
version = "3.0.29"
88
requires-python = ">= 3.9"
99
dependencies = [
1010
'requests',

socketdev/fullscans/__init__.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@ class DiffType(str, Enum):
4141
UPDATED = "updated"
4242

4343

44+
class ScanType(str, Enum):
45+
SOCKET = "socket"
46+
SOCKET_TIER1 = "socket_tier1"
47+
SOCKET_BASICS = "socket_basics"
48+
49+
4450
@dataclass(kw_only=True)
4551
class SocketPURL:
4652
type: SocketPURL_Type
@@ -99,6 +105,7 @@ class FullScanParams:
99105
make_default_branch: Optional[bool] = None
100106
set_as_pending_head: Optional[bool] = None
101107
tmp: Optional[bool] = None
108+
scan_type: Optional[ScanType] = None
102109

103110
def __getitem__(self, key):
104111
return getattr(self, key)
@@ -109,6 +116,7 @@ def to_dict(self):
109116
@classmethod
110117
def from_dict(cls, data: dict) -> "FullScanParams":
111118
integration_type = data.get("integration_type")
119+
scan_type = data.get("scan_type")
112120
return cls(
113121
repo=data["repo"],
114122
org_slug=data.get("org_slug"),
@@ -122,6 +130,7 @@ def from_dict(cls, data: dict) -> "FullScanParams":
122130
make_default_branch=data.get("make_default_branch"),
123131
set_as_pending_head=data.get("set_as_pending_head"),
124132
tmp=data.get("tmp"),
133+
scan_type=ScanType(scan_type) if scan_type is not None else None,
125134
)
126135

127136

socketdev/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "3.0.28"
1+
__version__ = "3.0.29"

0 commit comments

Comments
 (0)