socketdev 3.0.0__tar.gz → 3.0.2__tar.gz

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.
Files changed (51) hide show
  1. socketdev-3.0.2/.github/PULL_REQUEST_TEMPLATE/bug-fix.md +19 -0
  2. socketdev-3.0.2/.github/PULL_REQUEST_TEMPLATE/feature.md +16 -0
  3. socketdev-3.0.2/.github/PULL_REQUEST_TEMPLATE/improvement.md +10 -0
  4. socketdev-3.0.2/.github/PULL_REQUEST_TEMPLATE.md +5 -0
  5. {socketdev-3.0.0 → socketdev-3.0.2}/PKG-INFO +9 -9
  6. {socketdev-3.0.0 → socketdev-3.0.2}/README.rst +8 -8
  7. {socketdev-3.0.0 → socketdev-3.0.2}/pyproject.toml +1 -1
  8. {socketdev-3.0.0 → socketdev-3.0.2}/socketdev/core/dedupe.py +23 -1
  9. socketdev-3.0.2/socketdev/version.py +1 -0
  10. socketdev-3.0.0/socketdev/version.py +0 -1
  11. {socketdev-3.0.0 → socketdev-3.0.2}/.github/CODEOWNERS +0 -0
  12. {socketdev-3.0.0 → socketdev-3.0.2}/.github/workflows/pr-preview.yml +0 -0
  13. {socketdev-3.0.0 → socketdev-3.0.2}/.github/workflows/release.yml +0 -0
  14. {socketdev-3.0.0 → socketdev-3.0.2}/.github/workflows/version-check.yml +0 -0
  15. {socketdev-3.0.0 → socketdev-3.0.2}/.gitignore +0 -0
  16. {socketdev-3.0.0 → socketdev-3.0.2}/.hooks/sync_version.py +0 -0
  17. {socketdev-3.0.0 → socketdev-3.0.2}/.python-version +0 -0
  18. {socketdev-3.0.0 → socketdev-3.0.2}/LICENSE +0 -0
  19. {socketdev-3.0.0 → socketdev-3.0.2}/scripts/build.sh +0 -0
  20. {socketdev-3.0.0 → socketdev-3.0.2}/scripts/deploy-test-pypi.sh +0 -0
  21. {socketdev-3.0.0 → socketdev-3.0.2}/socketdev/__init__.py +0 -0
  22. {socketdev-3.0.0 → socketdev-3.0.2}/socketdev/apitokens/__init__.py +0 -0
  23. {socketdev-3.0.0 → socketdev-3.0.2}/socketdev/auditlog/__init__.py +0 -0
  24. {socketdev-3.0.0 → socketdev-3.0.2}/socketdev/core/api.py +0 -0
  25. {socketdev-3.0.0 → socketdev-3.0.2}/socketdev/core/classes.py +0 -0
  26. {socketdev-3.0.0 → socketdev-3.0.2}/socketdev/core/issues.py +0 -0
  27. {socketdev-3.0.0 → socketdev-3.0.2}/socketdev/dependencies/__init__.py +0 -0
  28. {socketdev-3.0.0 → socketdev-3.0.2}/socketdev/diffscans/__init__.py +0 -0
  29. {socketdev-3.0.0 → socketdev-3.0.2}/socketdev/exceptions.py +0 -0
  30. {socketdev-3.0.0 → socketdev-3.0.2}/socketdev/export/__init__.py +0 -0
  31. {socketdev-3.0.0 → socketdev-3.0.2}/socketdev/fullscans/__init__.py +0 -0
  32. {socketdev-3.0.0 → socketdev-3.0.2}/socketdev/historical/__init__.py +0 -0
  33. {socketdev-3.0.0 → socketdev-3.0.2}/socketdev/labels/__init__.py +0 -0
  34. {socketdev-3.0.0 → socketdev-3.0.2}/socketdev/licensemetadata/__init__.py +0 -0
  35. {socketdev-3.0.0 → socketdev-3.0.2}/socketdev/log.py +0 -0
  36. {socketdev-3.0.0 → socketdev-3.0.2}/socketdev/npm/__init__.py +0 -0
  37. {socketdev-3.0.0 → socketdev-3.0.2}/socketdev/openapi/__init__.py +0 -0
  38. {socketdev-3.0.0 → socketdev-3.0.2}/socketdev/org/__init__.py +0 -0
  39. {socketdev-3.0.0 → socketdev-3.0.2}/socketdev/purl/__init__.py +0 -0
  40. {socketdev-3.0.0 → socketdev-3.0.2}/socketdev/quota/__init__.py +0 -0
  41. {socketdev-3.0.0 → socketdev-3.0.2}/socketdev/report/__init__.py +0 -0
  42. {socketdev-3.0.0 → socketdev-3.0.2}/socketdev/repos/__init__.py +0 -0
  43. {socketdev-3.0.0 → socketdev-3.0.2}/socketdev/repositories/__init__.py +0 -0
  44. {socketdev-3.0.0 → socketdev-3.0.2}/socketdev/sbom/__init__.py +0 -0
  45. {socketdev-3.0.0 → socketdev-3.0.2}/socketdev/settings/__init__.py +0 -0
  46. {socketdev-3.0.0 → socketdev-3.0.2}/socketdev/threatfeed/__init__.py +0 -0
  47. {socketdev-3.0.0 → socketdev-3.0.2}/socketdev/tools/__init__.py +0 -0
  48. {socketdev-3.0.0 → socketdev-3.0.2}/socketdev/triage/__init__.py +0 -0
  49. {socketdev-3.0.0 → socketdev-3.0.2}/socketdev/utils/__init__.py +0 -0
  50. {socketdev-3.0.0 → socketdev-3.0.2}/tests/integration/test_diffscans_integration.py +0 -0
  51. {socketdev-3.0.0 → socketdev-3.0.2}/uv.lock +0 -0
@@ -0,0 +1,19 @@
1
+ <!--Description: Briefly describe the bug and its impact. ⬇️ -->
2
+
3
+ ## Root Cause
4
+ <!-- Concise explanation of what caused the bug ⬇️ -->
5
+
6
+
7
+
8
+ ## Fix
9
+ <!-- Explain how your changes address the bug ⬇️ -->
10
+
11
+ ## Public Changelog
12
+ <!-- Write a changelog message between comment tags if this should be included in the public product changelog, Leave blank otherwise. -->
13
+
14
+ <!-- changelog ⬇️-->
15
+ N/A
16
+ <!-- /changelog ⬆️ -->
17
+
18
+
19
+ <!-- TEMPLATE TYPE DON'T REMOVE: python-sdk-template-bug-fix -->
@@ -0,0 +1,16 @@
1
+ <!-- Description: Briefly describe the new feature you're introducing ⬇️ -->
2
+
3
+
4
+ ## Why?
5
+ <!-- Explain the motivation behind this feature and its expected benefits ⬇️ -->
6
+
7
+
8
+
9
+ ## Public Changelog
10
+ <!-- Write a changelog message between comment tags if this should be included in the public product changelog. -->
11
+
12
+ <!-- changelog ⬇️-->
13
+ N/A
14
+ <!-- /changelog ⬆️ -->
15
+
16
+ <!-- TEMPLATE TYPE DON'T REMOVE: python-sdk-template-feature -->
@@ -0,0 +1,10 @@
1
+ <!-- Description: Briefly describe the code improvement you're making. This could include things like lint fixes, adding monitoring dashboards, optimizing scripts, refactoring, etc. ⬇️ -->
2
+
3
+ ## Public Changelog
4
+ <!-- Write a changelog message between comment tags if this should be included in the public product changelog. -->
5
+
6
+ <!-- changelog ⬇️-->
7
+ N/A
8
+ <!-- /changelog ⬆️ -->
9
+
10
+ <!-- TEMPLATE TYPE DON'T REMOVE: python-sdk-template-improvement -->
@@ -0,0 +1,5 @@
1
+ Click on the "Preview" tab and select appropriate PR template:
2
+
3
+ [New Feature](?expand=1&template=feature.md)
4
+ [Bug Fix](?expand=1&template=bug-fix.md)
5
+ [Improvement](?expand=1&template=improvement.md)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: socketdev
3
- Version: 3.0.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 around Organization
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 repositores
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 froom the repo properties. Defaults to `created_at`
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 repositores
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 repositores
574
+ Get a list of information about the tracked repositories
575
575
 
576
576
  **Usage:**
577
577
 
@@ -112,7 +112,7 @@ Export a Socket SBOM as an SPDX SBOM
112
112
 
113
113
  fullscans.get(org_slug)
114
114
  """""""""""""""""""""""
115
- Retrieve the Fullscans information for around Organization
115
+ Retrieve the Fullscans information for an Organization
116
116
 
117
117
  **Usage:**
118
118
 
@@ -286,7 +286,7 @@ Retrieve the dependencies for the organization associated with the API Key
286
286
  ]
287
287
  params = {
288
288
  "repository": "username/repo-name",
289
- "branch": "dependency-branch
289
+ "branch": "dependency-branch"
290
290
  }
291
291
  print(socket.dependencies.post(file_names, params))
292
292
 
@@ -297,7 +297,7 @@ Retrieve the dependencies for the organization associated with the API Key
297
297
 
298
298
  repos.get()
299
299
  """""""""""
300
- Get a list of information about the tracked repositores
300
+ Get a list of information about the tracked repositories
301
301
 
302
302
  **Usage:**
303
303
 
@@ -309,7 +309,7 @@ Get a list of information about the tracked repositores
309
309
 
310
310
  **PARAMETERS:**
311
311
 
312
- - **sort** - The key to sort on froom the repo properties. Defaults to `created_at`
312
+ - **sort** - The key to sort on from the repo properties. Defaults to `created_at`
313
313
  - **direction** - Can be `desc` or `asc`. Defaults to `desc`
314
314
  - **per_page** - Integer between 1 to 100. Defaults to `10`
315
315
  - **page** - Integer page number defaults to `1`. If there are no more results it will be `0`
@@ -346,7 +346,7 @@ Create a new Socket Repository
346
346
 
347
347
  repos.repo()
348
348
  """"""""""""
349
- Get a list of information about the tracked repositores
349
+ Get a list of information about the tracked repositories
350
350
 
351
351
  **Usage:**
352
352
 
@@ -354,7 +354,7 @@ Get a list of information about the tracked repositores
354
354
 
355
355
  from socketdev import socketdev
356
356
  socket = socketdev(token="REPLACE_ME")
357
- print(socket.repos.repo(org_slug="example", repo_name="example-repo")
357
+ print(socket.repos.repo(org_slug="example", repo_name="example-repo"))
358
358
 
359
359
  repos.update()
360
360
  """"""""""""""
@@ -396,7 +396,7 @@ Delete a Socket Repository
396
396
 
397
397
  from socketdev import socketdev
398
398
  socket = socketdev(token="REPLACE_ME")
399
- print(socket.repos.delete(org_slug="example", repo_name="example-repo")
399
+ print(socket.repos.delete(org_slug="example", repo_name="example-repo"))
400
400
 
401
401
  **PARAMETERS:**
402
402
 
@@ -520,7 +520,7 @@ Create a new project health report with the provided files
520
520
 
521
521
  Deprecated: repositories.get()
522
522
  """"""""""""""""""""""""""""""
523
- Get a list of information about the tracked repositores
523
+ Get a list of information about the tracked repositories
524
524
 
525
525
  **Usage:**
526
526
 
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "socketdev"
7
- version = "3.0.0"
7
+ version = "3.0.2"
8
8
  requires-python = ">= 3.9"
9
9
  dependencies = [
10
10
  'requests',
@@ -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
- base["purl"] = f"pkg:{base.get('type', 'unknown')}/{base.get('name', 'unknown')}@{base.get('version', '0.0.0')}"
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
@@ -0,0 +1 @@
1
+ __version__ = "3.0.2"
@@ -1 +0,0 @@
1
- __version__ = "3.0.0"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes