socketdev 3.0.0__py3-none-any.whl → 3.0.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- socketdev/core/dedupe.py +23 -1
- socketdev/version.py +1 -1
- {socketdev-3.0.0.dist-info → socketdev-3.0.2.dist-info}/METADATA +9 -9
- {socketdev-3.0.0.dist-info → socketdev-3.0.2.dist-info}/RECORD +6 -6
- {socketdev-3.0.0.dist-info → socketdev-3.0.2.dist-info}/WHEEL +0 -0
- {socketdev-3.0.0.dist-info → socketdev-3.0.2.dist-info}/licenses/LICENSE +0 -0
socketdev/core/dedupe.py
CHANGED
|
@@ -61,7 +61,29 @@ class Dedupe:
|
|
|
61
61
|
base = package_group[0]
|
|
62
62
|
base["releases"] = sorted(releases)
|
|
63
63
|
base["alerts"] = list(alert_map.values())
|
|
64
|
-
|
|
64
|
+
|
|
65
|
+
# Use inputPurl if available and complete, otherwise construct proper purl with namespace
|
|
66
|
+
if "inputPurl" in base and "@" in base["inputPurl"]:
|
|
67
|
+
# inputPurl has version, use it as-is
|
|
68
|
+
base["purl"] = base["inputPurl"]
|
|
69
|
+
else:
|
|
70
|
+
# Construct purl properly with namespace and version
|
|
71
|
+
purl_type = base.get('type', 'unknown')
|
|
72
|
+
namespace = base.get('namespace')
|
|
73
|
+
name = base.get('name', 'unknown')
|
|
74
|
+
version = base.get('version', '0.0.0')
|
|
75
|
+
|
|
76
|
+
# Start with inputPurl if available (without version) or construct from scratch
|
|
77
|
+
if "inputPurl" in base and not "@" in base["inputPurl"]:
|
|
78
|
+
# inputPurl exists but lacks version, append it
|
|
79
|
+
base["purl"] = f"{base['inputPurl']}@{version}"
|
|
80
|
+
else:
|
|
81
|
+
# Construct complete purl from components
|
|
82
|
+
if namespace:
|
|
83
|
+
base["purl"] = f"pkg:{purl_type}/{namespace}/{name}@{version}"
|
|
84
|
+
else:
|
|
85
|
+
base["purl"] = f"pkg:{purl_type}/{name}@{version}"
|
|
86
|
+
|
|
65
87
|
return base
|
|
66
88
|
|
|
67
89
|
@staticmethod
|
socketdev/version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "3.0.
|
|
1
|
+
__version__ = "3.0.2"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: socketdev
|
|
3
|
-
Version: 3.0.
|
|
3
|
+
Version: 3.0.2
|
|
4
4
|
Summary: Socket Security Python SDK
|
|
5
5
|
Project-URL: Homepage, https://github.com/socketdev/socketdev
|
|
6
6
|
Author-email: Douglas Coburn <douglas@socket.dev>
|
|
@@ -163,7 +163,7 @@ Export a Socket SBOM as an SPDX SBOM
|
|
|
163
163
|
|
|
164
164
|
fullscans.get(org_slug)
|
|
165
165
|
"""""""""""""""""""""""
|
|
166
|
-
Retrieve the Fullscans information for
|
|
166
|
+
Retrieve the Fullscans information for an Organization
|
|
167
167
|
|
|
168
168
|
**Usage:**
|
|
169
169
|
|
|
@@ -337,7 +337,7 @@ Retrieve the dependencies for the organization associated with the API Key
|
|
|
337
337
|
]
|
|
338
338
|
params = {
|
|
339
339
|
"repository": "username/repo-name",
|
|
340
|
-
"branch": "dependency-branch
|
|
340
|
+
"branch": "dependency-branch"
|
|
341
341
|
}
|
|
342
342
|
print(socket.dependencies.post(file_names, params))
|
|
343
343
|
|
|
@@ -348,7 +348,7 @@ Retrieve the dependencies for the organization associated with the API Key
|
|
|
348
348
|
|
|
349
349
|
repos.get()
|
|
350
350
|
"""""""""""
|
|
351
|
-
Get a list of information about the tracked
|
|
351
|
+
Get a list of information about the tracked repositories
|
|
352
352
|
|
|
353
353
|
**Usage:**
|
|
354
354
|
|
|
@@ -360,7 +360,7 @@ Get a list of information about the tracked repositores
|
|
|
360
360
|
|
|
361
361
|
**PARAMETERS:**
|
|
362
362
|
|
|
363
|
-
- **sort** - The key to sort on
|
|
363
|
+
- **sort** - The key to sort on from the repo properties. Defaults to `created_at`
|
|
364
364
|
- **direction** - Can be `desc` or `asc`. Defaults to `desc`
|
|
365
365
|
- **per_page** - Integer between 1 to 100. Defaults to `10`
|
|
366
366
|
- **page** - Integer page number defaults to `1`. If there are no more results it will be `0`
|
|
@@ -397,7 +397,7 @@ Create a new Socket Repository
|
|
|
397
397
|
|
|
398
398
|
repos.repo()
|
|
399
399
|
""""""""""""
|
|
400
|
-
Get a list of information about the tracked
|
|
400
|
+
Get a list of information about the tracked repositories
|
|
401
401
|
|
|
402
402
|
**Usage:**
|
|
403
403
|
|
|
@@ -405,7 +405,7 @@ Get a list of information about the tracked repositores
|
|
|
405
405
|
|
|
406
406
|
from socketdev import socketdev
|
|
407
407
|
socket = socketdev(token="REPLACE_ME")
|
|
408
|
-
print(socket.repos.repo(org_slug="example", repo_name="example-repo")
|
|
408
|
+
print(socket.repos.repo(org_slug="example", repo_name="example-repo"))
|
|
409
409
|
|
|
410
410
|
repos.update()
|
|
411
411
|
""""""""""""""
|
|
@@ -447,7 +447,7 @@ Delete a Socket Repository
|
|
|
447
447
|
|
|
448
448
|
from socketdev import socketdev
|
|
449
449
|
socket = socketdev(token="REPLACE_ME")
|
|
450
|
-
print(socket.repos.delete(org_slug="example", repo_name="example-repo")
|
|
450
|
+
print(socket.repos.delete(org_slug="example", repo_name="example-repo"))
|
|
451
451
|
|
|
452
452
|
**PARAMETERS:**
|
|
453
453
|
|
|
@@ -571,7 +571,7 @@ Create a new project health report with the provided files
|
|
|
571
571
|
|
|
572
572
|
Deprecated: repositories.get()
|
|
573
573
|
""""""""""""""""""""""""""""""
|
|
574
|
-
Get a list of information about the tracked
|
|
574
|
+
Get a list of information about the tracked repositories
|
|
575
575
|
|
|
576
576
|
**Usage:**
|
|
577
577
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
socketdev/__init__.py,sha256=PEXQ6i0D__cuVweAcORx1zkPRPp9hS_forsTKmTRHWY,2362
|
|
2
2
|
socketdev/exceptions.py,sha256=SNU1EgswGwnxI_Zmm325ruP6CFg5C4MsS1qxXWwBJqs,1120
|
|
3
3
|
socketdev/log.py,sha256=AgEcsPN3y9U-fze8pTFvLigVvNob2vmNC-TkOOQkkeQ,90
|
|
4
|
-
socketdev/version.py,sha256=
|
|
4
|
+
socketdev/version.py,sha256=YKXrr5J7dV2n7ZhaRv0tigylRDtfOuvJC9Y4ouFZpzo,22
|
|
5
5
|
socketdev/apitokens/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
6
|
socketdev/auditlog/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
7
|
socketdev/core/api.py,sha256=xymEv2szAwZXDsTI4nRC_zcqoSVAenQ-TceNuHfkwbE,5773
|
|
8
8
|
socketdev/core/classes.py,sha256=fyDlolgnkpHFb1dMHa2SA0czCS1I6Tr3SuYb1a67-dY,3756
|
|
9
|
-
socketdev/core/dedupe.py,sha256=
|
|
9
|
+
socketdev/core/dedupe.py,sha256=_8wTWNghgkiRmpxADDcUbluPpQy0eSRMn9YvTbXkq_A,5102
|
|
10
10
|
socketdev/core/issues.py,sha256=jIfi6h1Y-d38OgxSFhlgC74TLvY6IfUcWhQfLq8FFPo,68147
|
|
11
11
|
socketdev/dependencies/__init__.py,sha256=RahCr5DyOndUcz2okg8Ak-WLbqxCeKp7MaUqiT_Z1Wo,1612
|
|
12
12
|
socketdev/diffscans/__init__.py,sha256=ilv1mBDBMGjRwsfRhaUpaSy8OekiSfNK4s8PKf-0l2Y,5011
|
|
@@ -29,7 +29,7 @@ socketdev/threatfeed/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hS
|
|
|
29
29
|
socketdev/tools/__init__.py,sha256=ROvpEULLXTKby9DMsVFPlAlysjwfop1NhRqSrFUWprY,1969
|
|
30
30
|
socketdev/triage/__init__.py,sha256=-h599vThVetfRSOAs1e4IUoMjcXS8xOsUfub41XPiX4,1559
|
|
31
31
|
socketdev/utils/__init__.py,sha256=JD0TTGxhomG55-H7k_qTmDEQPrlabm2HEWMcoXagQ_A,10587
|
|
32
|
-
socketdev-3.0.
|
|
33
|
-
socketdev-3.0.
|
|
34
|
-
socketdev-3.0.
|
|
35
|
-
socketdev-3.0.
|
|
32
|
+
socketdev-3.0.2.dist-info/METADATA,sha256=g-LPB7RC5GG7swmZ1SltCT1ESc2PcKcbSYCh1SEYlrc,24417
|
|
33
|
+
socketdev-3.0.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
34
|
+
socketdev-3.0.2.dist-info/licenses/LICENSE,sha256=mC0II_UuE-_gCG9XqOLNyrV3crnROzMpdAetGnMrhpw,1068
|
|
35
|
+
socketdev-3.0.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|