socketdev 3.6.2__py3-none-any.whl → 3.6.4__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 +45 -14
- socketdev/settings/__init__.py +6 -3
- socketdev/version.py +1 -1
- {socketdev-3.6.2.dist-info → socketdev-3.6.4.dist-info}/METADATA +376 -2
- {socketdev-3.6.2.dist-info → socketdev-3.6.4.dist-info}/RECORD +7 -7
- {socketdev-3.6.2.dist-info → socketdev-3.6.4.dist-info}/WHEEL +1 -1
- {socketdev-3.6.2.dist-info → socketdev-3.6.4.dist-info}/licenses/LICENSE +0 -0
socketdev/core/dedupe.py
CHANGED
|
@@ -2,12 +2,45 @@ from collections import defaultdict
|
|
|
2
2
|
from typing import Dict, List, Any
|
|
3
3
|
from socketdev.log import log
|
|
4
4
|
|
|
5
|
+
# Props that name the advisory behind a vulnerability alert. Every advisory of
|
|
6
|
+
# one severity on a package shares an alert type (``criticalCVE``, ``cve`` and
|
|
7
|
+
# so on), so these are what tell two of them apart.
|
|
8
|
+
#
|
|
9
|
+
# Socket's CVE alerts carry ``ghsaId`` and ``cveId``. The other names are in no
|
|
10
|
+
# current alert schema; they mirror ``Issue.advisory_id()`` in socket-python-cli
|
|
11
|
+
# (socketsecurity/core/classes.py), which reads alerts from this SDK. Keep the
|
|
12
|
+
# two lists in step.
|
|
13
|
+
ADVISORY_ID_PROPS = ("ghsaId", "ghsa_id", "cveId", "cve_id", "cve")
|
|
14
|
+
|
|
15
|
+
# Policy actions from least to most severe. An unknown or missing action ranks
|
|
16
|
+
# below "ignore", so it never replaces a known action and the merged result
|
|
17
|
+
# doesn't depend on which release is listed first.
|
|
18
|
+
ACTION_RANK = {"ignore": 0, "monitor": 1, "warn": 2, "error": 3}
|
|
19
|
+
|
|
5
20
|
|
|
6
21
|
class Dedupe:
|
|
7
22
|
@staticmethod
|
|
8
23
|
def normalize_file_path(path: str) -> str:
|
|
9
24
|
return path.split("/", 1)[-1] if path and "/" in path else path or ""
|
|
10
25
|
|
|
26
|
+
@staticmethod
|
|
27
|
+
def advisory_id(alert: dict) -> str:
|
|
28
|
+
"""The alert's GHSA or CVE identifier, upper-cased, or "" if it has none."""
|
|
29
|
+
props = alert.get("props")
|
|
30
|
+
if not isinstance(props, dict):
|
|
31
|
+
return ""
|
|
32
|
+
for prop_name in ADVISORY_ID_PROPS:
|
|
33
|
+
value = props.get(prop_name)
|
|
34
|
+
if isinstance(value, (list, tuple)):
|
|
35
|
+
value = next((v for v in value if isinstance(v, str) and v.strip()), "")
|
|
36
|
+
if isinstance(value, str) and value.strip():
|
|
37
|
+
return value.strip().upper()
|
|
38
|
+
return ""
|
|
39
|
+
|
|
40
|
+
@staticmethod
|
|
41
|
+
def action_rank(action: Any) -> int:
|
|
42
|
+
return ACTION_RANK.get(action, -1) if isinstance(action, str) else -1
|
|
43
|
+
|
|
11
44
|
@staticmethod
|
|
12
45
|
def alert_key(alert: dict) -> tuple:
|
|
13
46
|
return (
|
|
@@ -16,21 +49,12 @@ class Dedupe:
|
|
|
16
49
|
alert.get("category"),
|
|
17
50
|
Dedupe.normalize_file_path(alert.get("file")),
|
|
18
51
|
alert.get("start"),
|
|
19
|
-
alert.get("end")
|
|
52
|
+
alert.get("end"),
|
|
53
|
+
Dedupe.advisory_id(alert),
|
|
20
54
|
)
|
|
21
55
|
|
|
22
56
|
@staticmethod
|
|
23
57
|
def consolidate_and_merge_alerts(package_group: List[Dict[str, Any]]) -> Dict[str, Any]:
|
|
24
|
-
def alert_identity(alert: dict) -> tuple:
|
|
25
|
-
return (
|
|
26
|
-
alert.get("type"),
|
|
27
|
-
alert.get("severity"),
|
|
28
|
-
alert.get("category"),
|
|
29
|
-
Dedupe.normalize_file_path(alert.get("file")),
|
|
30
|
-
alert.get("start"),
|
|
31
|
-
alert.get("end")
|
|
32
|
-
)
|
|
33
|
-
|
|
34
58
|
alert_map: Dict[tuple, dict] = {}
|
|
35
59
|
releases = set()
|
|
36
60
|
for pkg in package_group:
|
|
@@ -38,7 +62,7 @@ class Dedupe:
|
|
|
38
62
|
releases.add(release)
|
|
39
63
|
|
|
40
64
|
for alert in pkg.get("alerts", []):
|
|
41
|
-
identity =
|
|
65
|
+
identity = Dedupe.alert_key(alert)
|
|
42
66
|
|
|
43
67
|
if identity not in alert_map:
|
|
44
68
|
# Build alert dict with only fields that exist in the original alert.
|
|
@@ -66,8 +90,15 @@ class Dedupe:
|
|
|
66
90
|
|
|
67
91
|
alert_map[identity] = consolidated_alert
|
|
68
92
|
else:
|
|
69
|
-
|
|
70
|
-
|
|
93
|
+
merged = alert_map[identity]
|
|
94
|
+
if release not in merged["releases"]:
|
|
95
|
+
merged["releases"].append(release)
|
|
96
|
+
# Keep the most severe action seen, so a release that blocks
|
|
97
|
+
# is never hidden behind one that doesn't. Only the action
|
|
98
|
+
# moves: key and props stay with the first sighting, so the
|
|
99
|
+
# key can belong to a release with a less severe action.
|
|
100
|
+
if Dedupe.action_rank(alert.get("action")) > Dedupe.action_rank(merged.get("action")):
|
|
101
|
+
merged["action"] = alert.get("action")
|
|
71
102
|
|
|
72
103
|
base = package_group[0]
|
|
73
104
|
base["releases"] = sorted(releases)
|
socketdev/settings/__init__.py
CHANGED
|
@@ -108,14 +108,17 @@ class Settings:
|
|
|
108
108
|
)
|
|
109
109
|
return {}
|
|
110
110
|
|
|
111
|
-
def integration_events(self, org_slug: str, integration_id: str) ->
|
|
111
|
+
def integration_events(self, org_slug: str, integration_id: str) -> list:
|
|
112
112
|
"""Get integration events for a specific integration.
|
|
113
113
|
|
|
114
114
|
Args:
|
|
115
115
|
org_slug: Organization slug
|
|
116
116
|
integration_id: Integration ID
|
|
117
|
+
|
|
118
|
+
Returns:
|
|
119
|
+
The integration's events, as the list the API returns.
|
|
117
120
|
"""
|
|
118
|
-
path = f"orgs/{org_slug}/settings/integrations/{integration_id}"
|
|
121
|
+
path = f"orgs/{org_slug}/settings/integrations/{integration_id}/events"
|
|
119
122
|
response = self.api.do_request(path=path)
|
|
120
123
|
|
|
121
124
|
if response.status_code == 200:
|
|
@@ -123,7 +126,7 @@ class Settings:
|
|
|
123
126
|
|
|
124
127
|
error_message = response.json().get("error", {}).get("message", "Unknown error")
|
|
125
128
|
log.error(f"Error getting integration events: {response.status_code}, message: {error_message}")
|
|
126
|
-
return
|
|
129
|
+
return []
|
|
127
130
|
|
|
128
131
|
def get_license_policy(self, org_slug: str) -> dict:
|
|
129
132
|
"""Get license policy settings for an organization.
|
socketdev/version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "3.6.
|
|
1
|
+
__version__ = "3.6.4"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: socketdev
|
|
3
|
-
Version: 3.6.
|
|
3
|
+
Version: 3.6.4
|
|
4
4
|
Summary: Socket Security Python SDK
|
|
5
5
|
Project-URL: Homepage, https://github.com/SocketDev/socket-sdk-python
|
|
6
6
|
Author-email: Douglas Coburn <douglas@socket.dev>
|
|
@@ -75,7 +75,7 @@ Initializing the module
|
|
|
75
75
|
|
|
76
76
|
**PARAMETERS:**
|
|
77
77
|
|
|
78
|
-
- **token (str)** - The Socket API Key for your Organization
|
|
78
|
+
- **token (str)** - The Socket API Key for your Organization. Each method needs the token to carry particular scopes; see `API token scopes`_
|
|
79
79
|
- **timeout (int)** - The number of seconds to wait before failing the connection
|
|
80
80
|
- **allow_unverified (bool)** - Whether to skip SSL certificate verification (default: False). Set to True for testing with self-signed certificates.
|
|
81
81
|
- **user_agent (str, optional)** - Custom User-Agent string to use in API requests. If not provided, defaults to "SocketSDKPython/{version}"
|
|
@@ -1549,3 +1549,377 @@ List historical snapshots for an organization.
|
|
|
1549
1549
|
|
|
1550
1550
|
- **org_slug (str)** - The organization slug
|
|
1551
1551
|
- **query_params (dict, optional)** - Optional query parameters for filtering
|
|
1552
|
+
|
|
1553
|
+
|
|
1554
|
+
API token scopes
|
|
1555
|
+
----------------
|
|
1556
|
+
|
|
1557
|
+
The SDK authenticates every call with one organization API token, and each Socket API
|
|
1558
|
+
endpoint checks that the token carries particular scopes. The table below lists, for each
|
|
1559
|
+
SDK method, the endpoint it calls and the scopes that endpoint checks. Where an endpoint
|
|
1560
|
+
lists more than one scope, the token needs all of them. "none" means the endpoint checks
|
|
1561
|
+
no scope, so any valid token for the organization works. Paths are relative to
|
|
1562
|
+
``https://api.socket.dev/v0/``; query strings are omitted.
|
|
1563
|
+
|
|
1564
|
+
The scopes each endpoint checks are also listed in the
|
|
1565
|
+
`API reference <https://docs.socket.dev/reference>`_. For a least-privilege token, grant
|
|
1566
|
+
only the scopes of the methods your integration calls.
|
|
1567
|
+
|
|
1568
|
+
Scopes are grouped by their prefix, and a token that holds a group holds every scope in
|
|
1569
|
+
it: ``full-scans`` covers ``full-scans:list``, ``full-scans:create`` and
|
|
1570
|
+
``full-scans:delete``. When a token is given every scope of a group, the API stores and
|
|
1571
|
+
reports the group name instead, so a token created with ``packages:list``, the only
|
|
1572
|
+
scope in its group, is listed with ``packages``.
|
|
1573
|
+
|
|
1574
|
+
Scopes are not the only check. A token restricted to specific repositories is rejected
|
|
1575
|
+
by some endpoints whatever scopes it holds, and organizations that restrict repository
|
|
1576
|
+
access apply per-repository checks on top of the scopes listed here.
|
|
1577
|
+
|
|
1578
|
+
Missing scopes and other 403 responses
|
|
1579
|
+
""""""""""""""""""""""""""""""""""""""
|
|
1580
|
+
|
|
1581
|
+
Methods do not return an empty result on a 401 or 403. ``API.do_request()`` raises
|
|
1582
|
+
before the method sees the response, so the exception reaches the caller, including when
|
|
1583
|
+
``use_types=True``.
|
|
1584
|
+
|
|
1585
|
+
A missing scope raises ``APIAccessDenied`` with ``status_code`` 403. Its message starts
|
|
1586
|
+
with the server's ``Insufficient permissions``, followed by the request URL and the
|
|
1587
|
+
response headers. A 401, from a bad or revoked token, also raises ``APIAccessDenied``,
|
|
1588
|
+
with ``Unauthorized`` in the message.
|
|
1589
|
+
|
|
1590
|
+
Recent API responses name the required scopes in the 403 body under
|
|
1591
|
+
``error.details.requiredScopes``, but the SDK does not include them in the exception
|
|
1592
|
+
message; to see them, look up the endpoint in the table below or the API reference.
|
|
1593
|
+
|
|
1594
|
+
A token restricted to specific repositories gets the same exception from an endpoint
|
|
1595
|
+
that does not accept such tokens. Its message starts with ``This endpoint does not
|
|
1596
|
+
support repository-scoped tokens``.
|
|
1597
|
+
|
|
1598
|
+
A 403 whose message contains ``Insufficient max quota`` raises ``APIInsufficientQuota``
|
|
1599
|
+
instead, as does a 429, and logs the server's message at ``ERROR`` on the ``socketdev``
|
|
1600
|
+
logger.
|
|
1601
|
+
|
|
1602
|
+
``socketdev.exceptions`` also defines ``APIInsufficientPermissions`` and
|
|
1603
|
+
``APIOrganizationNotAllowed``. The SDK raises them for 403 messages containing
|
|
1604
|
+
``Insufficient permissions for API method`` and ``Organization not allowed``, which the
|
|
1605
|
+
API does not currently send. Do not rely on either to detect a missing scope: catch
|
|
1606
|
+
``APIAccessDenied``.
|
|
1607
|
+
|
|
1608
|
+
All of these classes carry the HTTP status in ``status_code`` and subclass
|
|
1609
|
+
``APIFailure``, so catching ``APIFailure`` covers every case.
|
|
1610
|
+
|
|
1611
|
+
.. code-block:: python
|
|
1612
|
+
|
|
1613
|
+
from socketdev import socketdev
|
|
1614
|
+
from socketdev.exceptions import APIAccessDenied
|
|
1615
|
+
|
|
1616
|
+
socket = socketdev(token="REPLACE_ME")
|
|
1617
|
+
try:
|
|
1618
|
+
socket.diffscans.list("org_slug")
|
|
1619
|
+
except APIAccessDenied as error:
|
|
1620
|
+
if error.status_code == 403:
|
|
1621
|
+
print("Access denied; check the token's scopes for this method:", error)
|
|
1622
|
+
raise
|
|
1623
|
+
|
|
1624
|
+
Scopes by method
|
|
1625
|
+
""""""""""""""""
|
|
1626
|
+
|
|
1627
|
+
A few rows need a note:
|
|
1628
|
+
|
|
1629
|
+
- "Deprecated" marks an endpoint the API reference lists as deprecated. Prefer the
|
|
1630
|
+
method the reference names as its successor. ``report.view()`` calls
|
|
1631
|
+
``GET report/view/{id}``, which the reference says will be removed on 2026-11-20;
|
|
1632
|
+
use ``fullscans`` instead.
|
|
1633
|
+
- ``fullscans.finalize_tier1()``, ``uploadmanifests.upload_manifest_files()`` and
|
|
1634
|
+
``sbom.view()`` call endpoints the API reference does not list. Their scopes are
|
|
1635
|
+
given in the table.
|
|
1636
|
+
- Three calls request a path the API has no route for, so they fail with a 404
|
|
1637
|
+
(``APIResourceNotFound``) whatever the token: ``apitokens.update()`` when
|
|
1638
|
+
``token_id`` is passed, ``dependencies.get()`` when ``org_slug``, ``ecosystem``,
|
|
1639
|
+
``package`` and ``version`` are all passed, and ``repositories.list()``. Call
|
|
1640
|
+
``apitokens.update()`` without ``token_id``, and use ``repos.get()`` to list
|
|
1641
|
+
repositories.
|
|
1642
|
+
- ``dependencies.get()`` otherwise calls ``POST dependencies/search``. That endpoint
|
|
1643
|
+
accepts any valid token, but it returns only results from repositories the token can
|
|
1644
|
+
read under ``dependencies:list``. Depending on how the organization restricts
|
|
1645
|
+
repository access, a token without that scope gets an empty result instead of a 403,
|
|
1646
|
+
so grant ``dependencies:list``.
|
|
1647
|
+
- Some scopes differ from what the method name suggests: ``analytics.get_org()`` and
|
|
1648
|
+
``analytics.get_repo()`` check ``report:write``; ``apitokens.update()`` checks
|
|
1649
|
+
``api-tokens:create``; ``labels.setting.delete()`` checks ``repo-label:update``; and
|
|
1650
|
+
the ``export`` methods check ``report:read`` rather than a full-scans scope.
|
|
1651
|
+
|
|
1652
|
+
.. list-table::
|
|
1653
|
+
:header-rows: 1
|
|
1654
|
+
:widths: 30 45 25
|
|
1655
|
+
|
|
1656
|
+
* - Method
|
|
1657
|
+
- Endpoint
|
|
1658
|
+
- Scopes
|
|
1659
|
+
* - ``alertfullscansearch.search()``
|
|
1660
|
+
- ``GET orgs/{org_slug}/alert-full-scan-search``
|
|
1661
|
+
- ``alerts:list``
|
|
1662
|
+
* - ``alerts.get()``
|
|
1663
|
+
- ``GET orgs/{org_slug}/alerts``
|
|
1664
|
+
- ``alerts:list``
|
|
1665
|
+
* - ``alerttypes.get()``
|
|
1666
|
+
- ``POST alert-types``
|
|
1667
|
+
- none
|
|
1668
|
+
* - ``analytics.get_org()``
|
|
1669
|
+
- ``GET analytics/org/{filter}``. Deprecated
|
|
1670
|
+
- ``report:write``
|
|
1671
|
+
* - ``analytics.get_repo()``
|
|
1672
|
+
- ``GET analytics/repo/{name}/{filter}``. Deprecated
|
|
1673
|
+
- ``report:write``
|
|
1674
|
+
* - ``apitokens.create()``
|
|
1675
|
+
- ``POST orgs/{org_slug}/api-tokens``
|
|
1676
|
+
- ``api-tokens:create``
|
|
1677
|
+
* - ``apitokens.list()``
|
|
1678
|
+
- ``GET orgs/{org_slug}/api-tokens``
|
|
1679
|
+
- ``api-tokens:list``
|
|
1680
|
+
* - ``apitokens.update()``
|
|
1681
|
+
- ``POST orgs/{org_slug}/api-tokens/update``
|
|
1682
|
+
- ``api-tokens:create``
|
|
1683
|
+
* - ``apitokens.update(token_id=...)``
|
|
1684
|
+
- ``PUT orgs/{org_slug}/api-tokens/{token_id}``
|
|
1685
|
+
- no such route; the call fails
|
|
1686
|
+
* - ``apitokens.rotate()``
|
|
1687
|
+
- ``POST orgs/{org_slug}/api-tokens/rotate``
|
|
1688
|
+
- ``api-tokens:rotate``
|
|
1689
|
+
* - ``apitokens.revoke()``
|
|
1690
|
+
- ``POST orgs/{org_slug}/api-tokens/revoke``
|
|
1691
|
+
- ``api-tokens:revoke``
|
|
1692
|
+
* - ``auditlog.get()``
|
|
1693
|
+
- ``GET orgs/{org_slug}/audit-log``
|
|
1694
|
+
- ``audit-log:list``
|
|
1695
|
+
* - ``basics.get_config()``
|
|
1696
|
+
- ``GET orgs/{org_slug}/settings/socket-basics``
|
|
1697
|
+
- ``socket-basics:read``
|
|
1698
|
+
* - ``dependencies.post()``
|
|
1699
|
+
- ``POST dependencies/upload``. Deprecated
|
|
1700
|
+
- ``report:write``
|
|
1701
|
+
* - ``dependencies.get()``
|
|
1702
|
+
- ``POST dependencies/search``
|
|
1703
|
+
- none; ``dependencies:list`` to get results (see the note above)
|
|
1704
|
+
* - ``dependencies.get(org_slug, ecosystem, package, version)``
|
|
1705
|
+
- ``GET orgs/{org_slug}/dependencies/{ecosystem}/{package}/{version}``
|
|
1706
|
+
- no such route; the call fails
|
|
1707
|
+
* - ``diffscans.list()``
|
|
1708
|
+
- ``GET orgs/{org_slug}/diff-scans``
|
|
1709
|
+
- ``diff-scans:list``
|
|
1710
|
+
* - ``diffscans.get()``
|
|
1711
|
+
- ``GET orgs/{org_slug}/diff-scans/{diff_scan_id}``
|
|
1712
|
+
- ``diff-scans:list``
|
|
1713
|
+
* - ``diffscans.create_from_repo()``
|
|
1714
|
+
- ``POST orgs/{org_slug}/diff-scans/from-repo/{repo_slug}``
|
|
1715
|
+
- ``diff-scans:create``, ``full-scans:create`` and ``repo:list``
|
|
1716
|
+
* - ``diffscans.create_from_ids()``
|
|
1717
|
+
- ``POST orgs/{org_slug}/diff-scans/from-ids``
|
|
1718
|
+
- ``diff-scans:create`` and ``full-scans:list``
|
|
1719
|
+
* - ``diffscans.gfm()``
|
|
1720
|
+
- ``GET orgs/{org_slug}/diff-scans/{diff_scan_id}/gfm``. Deprecated
|
|
1721
|
+
- ``diff-scans:list``
|
|
1722
|
+
* - ``diffscans.delete()``
|
|
1723
|
+
- ``DELETE orgs/{org_slug}/diff-scans/{diff_scan_id}``
|
|
1724
|
+
- ``diff-scans:delete``
|
|
1725
|
+
* - ``export.cdx_bom()``
|
|
1726
|
+
- ``GET orgs/{org_slug}/export/cdx/{id}``
|
|
1727
|
+
- ``report:read``
|
|
1728
|
+
* - ``export.spdx_bom()``
|
|
1729
|
+
- ``GET orgs/{org_slug}/export/spdx/{id}``
|
|
1730
|
+
- ``report:read``
|
|
1731
|
+
* - ``export.openvex_bom()``
|
|
1732
|
+
- ``GET orgs/{org_slug}/export/openvex/{id}``
|
|
1733
|
+
- ``report:read``
|
|
1734
|
+
* - ``fixes.get()``
|
|
1735
|
+
- ``GET orgs/{org_slug}/fixes``. Deprecated
|
|
1736
|
+
- ``fixes:list``
|
|
1737
|
+
* - ``fullscans.get()``
|
|
1738
|
+
- ``GET orgs/{org_slug}/full-scans``, or ``GET orgs/{org_slug}/full-scans/{full_scan_id}`` when ``params`` holds only ``id``
|
|
1739
|
+
- ``full-scans:list``
|
|
1740
|
+
* - ``fullscans.post()``
|
|
1741
|
+
- ``POST orgs/{org_slug}/full-scans``
|
|
1742
|
+
- ``full-scans:create``
|
|
1743
|
+
* - ``fullscans.delete()``
|
|
1744
|
+
- ``DELETE orgs/{org_slug}/full-scans/{full_scan_id}``
|
|
1745
|
+
- ``full-scans:delete``
|
|
1746
|
+
* - ``fullscans.stream_diff()``
|
|
1747
|
+
- ``GET orgs/{org_slug}/full-scans/diff``. Deprecated
|
|
1748
|
+
- ``full-scans:list``
|
|
1749
|
+
* - ``fullscans.stream()``
|
|
1750
|
+
- ``GET orgs/{org_slug}/full-scans/{full_scan_id}``
|
|
1751
|
+
- ``full-scans:list``
|
|
1752
|
+
* - ``fullscans.metadata()``
|
|
1753
|
+
- ``GET orgs/{org_slug}/full-scans/{full_scan_id}/metadata``
|
|
1754
|
+
- ``full-scans:list``
|
|
1755
|
+
* - ``fullscans.gfm()``
|
|
1756
|
+
- ``GET orgs/{org_slug}/full-scans/diff/gfm``. Deprecated
|
|
1757
|
+
- ``full-scans:list``
|
|
1758
|
+
* - ``fullscans.finalize_tier1()``
|
|
1759
|
+
- ``POST tier1-reachability-scan/finalize``
|
|
1760
|
+
- ``full-scans:create`` (not in the API reference)
|
|
1761
|
+
* - ``fullscans.archive()``
|
|
1762
|
+
- ``POST orgs/{org_slug}/full-scans/archive``
|
|
1763
|
+
- ``full-scans:create``
|
|
1764
|
+
* - ``fullscans.rescan()``
|
|
1765
|
+
- ``POST orgs/{org_slug}/full-scans/{full_scan_id}/rescan``
|
|
1766
|
+
- ``full-scans:create``
|
|
1767
|
+
* - ``fullscans.get_tar_files()``
|
|
1768
|
+
- ``GET orgs/{org_slug}/full-scans/{full_scan_id}/files/tar``
|
|
1769
|
+
- ``full-scans:list``
|
|
1770
|
+
* - ``historical.list()``
|
|
1771
|
+
- ``GET orgs/{org_slug}/historical/alerts``
|
|
1772
|
+
- ``historical:alerts-list``
|
|
1773
|
+
* - ``historical.trend()``
|
|
1774
|
+
- ``GET orgs/{org_slug}/historical/alerts/trend``
|
|
1775
|
+
- ``historical:alerts-trend``
|
|
1776
|
+
* - ``historical.dependencies_trend()``
|
|
1777
|
+
- ``GET orgs/{org_slug}/historical/dependencies/trend``
|
|
1778
|
+
- ``historical:dependencies-trend``
|
|
1779
|
+
* - ``historical.snapshots.create()``
|
|
1780
|
+
- ``POST orgs/{org_slug}/historical/snapshots``
|
|
1781
|
+
- ``historical:snapshots-start``
|
|
1782
|
+
* - ``historical.snapshots.list()``
|
|
1783
|
+
- ``GET orgs/{org_slug}/historical/snapshots``
|
|
1784
|
+
- ``historical:snapshots-list``
|
|
1785
|
+
* - ``labels.list()``
|
|
1786
|
+
- ``GET orgs/{org_slug}/repos/labels``
|
|
1787
|
+
- ``repo-label:list``
|
|
1788
|
+
* - ``labels.post()``
|
|
1789
|
+
- ``POST orgs/{org_slug}/repos/labels``
|
|
1790
|
+
- ``repo-label:create``
|
|
1791
|
+
* - ``labels.get()``
|
|
1792
|
+
- ``GET orgs/{org_slug}/repos/labels/{label_id}``
|
|
1793
|
+
- ``repo-label:list``
|
|
1794
|
+
* - ``labels.delete()``
|
|
1795
|
+
- ``DELETE orgs/{org_slug}/repos/labels/{label_id}``
|
|
1796
|
+
- ``repo-label:delete``
|
|
1797
|
+
* - ``labels.associate()``
|
|
1798
|
+
- ``POST orgs/{org_slug}/repos/labels/{label_id}/associate``
|
|
1799
|
+
- ``repo-label:update``
|
|
1800
|
+
* - ``labels.disassociate()``
|
|
1801
|
+
- ``POST orgs/{org_slug}/repos/labels/{label_id}/disassociate``
|
|
1802
|
+
- ``repo-label:update``
|
|
1803
|
+
* - ``labels.setting.get()``
|
|
1804
|
+
- ``GET orgs/{org_slug}/repos/labels/{label_id}/label-setting``
|
|
1805
|
+
- ``repo-label:list``
|
|
1806
|
+
* - ``labels.setting.put()``
|
|
1807
|
+
- ``PUT orgs/{org_slug}/repos/labels/{label_id}/label-setting``
|
|
1808
|
+
- ``repo-label:update``
|
|
1809
|
+
* - ``labels.setting.delete()``
|
|
1810
|
+
- ``DELETE orgs/{org_slug}/repos/labels/{label_id}/label-setting``
|
|
1811
|
+
- ``repo-label:update``
|
|
1812
|
+
* - ``licensemetadata.post()``
|
|
1813
|
+
- ``POST license-metadata``
|
|
1814
|
+
- none
|
|
1815
|
+
* - ``npm.issues()``
|
|
1816
|
+
- ``GET npm/{package}/{version}/issues``. Deprecated
|
|
1817
|
+
- none
|
|
1818
|
+
* - ``npm.score()``
|
|
1819
|
+
- ``GET npm/{package}/{version}/score``. Deprecated
|
|
1820
|
+
- none
|
|
1821
|
+
* - ``openapi.get()``
|
|
1822
|
+
- ``GET openapi``
|
|
1823
|
+
- none
|
|
1824
|
+
* - ``org.get()``
|
|
1825
|
+
- ``GET organizations``
|
|
1826
|
+
- none
|
|
1827
|
+
* - ``purl.post(org_slug=...)``
|
|
1828
|
+
- ``POST orgs/{org_slug}/purl``
|
|
1829
|
+
- ``packages:list``
|
|
1830
|
+
* - ``purl.post()``
|
|
1831
|
+
- ``POST purl``. Deprecated
|
|
1832
|
+
- ``packages:list``
|
|
1833
|
+
* - ``quota.get()``
|
|
1834
|
+
- ``GET quota``
|
|
1835
|
+
- none
|
|
1836
|
+
* - ``report.list()``
|
|
1837
|
+
- ``GET report/list``. Deprecated
|
|
1838
|
+
- ``report:list``
|
|
1839
|
+
* - ``report.delete()``
|
|
1840
|
+
- ``DELETE report/delete/{id}``. Deprecated
|
|
1841
|
+
- ``report:write``
|
|
1842
|
+
* - ``report.view()``
|
|
1843
|
+
- ``GET report/view/{id}``. Deprecated
|
|
1844
|
+
- ``report:read``
|
|
1845
|
+
* - ``report.supported()``
|
|
1846
|
+
- ``GET report/supported``. Deprecated
|
|
1847
|
+
- none
|
|
1848
|
+
* - ``report.create()``
|
|
1849
|
+
- ``PUT report/upload``. Deprecated
|
|
1850
|
+
- ``report:write``
|
|
1851
|
+
* - ``repos.get()``
|
|
1852
|
+
- ``GET orgs/{org_slug}/repos``
|
|
1853
|
+
- ``repo:list``
|
|
1854
|
+
* - ``repos.repo()``
|
|
1855
|
+
- ``GET orgs/{org_slug}/repos/{repo_slug}``
|
|
1856
|
+
- ``repo:list``
|
|
1857
|
+
* - ``repos.post()``
|
|
1858
|
+
- ``POST orgs/{org_slug}/repos``
|
|
1859
|
+
- ``repo:create``
|
|
1860
|
+
* - ``repos.update()``
|
|
1861
|
+
- ``POST orgs/{org_slug}/repos/{repo_slug}``
|
|
1862
|
+
- ``repo:update``
|
|
1863
|
+
* - ``repos.delete()``
|
|
1864
|
+
- ``DELETE orgs/{org_slug}/repos/{repo_slug}``
|
|
1865
|
+
- ``repo:delete``
|
|
1866
|
+
* - ``repositories.list()``
|
|
1867
|
+
- ``GET repos``
|
|
1868
|
+
- no such route; the call fails
|
|
1869
|
+
* - ``sbom.view()``
|
|
1870
|
+
- ``GET sbom/view/{id}``
|
|
1871
|
+
- ``report:read`` (not in the API reference)
|
|
1872
|
+
* - ``settings.get()``
|
|
1873
|
+
- ``GET orgs/{org_slug}/settings/security-policy``
|
|
1874
|
+
- ``security-policy:read``
|
|
1875
|
+
* - ``settings.update_security_policy()``
|
|
1876
|
+
- ``POST orgs/{org_slug}/settings/security-policy``
|
|
1877
|
+
- ``security-policy:update``
|
|
1878
|
+
* - ``settings.get_license_policy()``
|
|
1879
|
+
- ``GET orgs/{org_slug}/settings/license-policy``. Deprecated
|
|
1880
|
+
- ``license-policy:read``
|
|
1881
|
+
* - ``settings.update_license_policy()``
|
|
1882
|
+
- ``POST orgs/{org_slug}/settings/license-policy``
|
|
1883
|
+
- ``license-policy:update``
|
|
1884
|
+
* - ``settings.integration_events()``
|
|
1885
|
+
- ``GET orgs/{org_slug}/settings/integrations/{integration_id}/events``
|
|
1886
|
+
- ``integration:list``
|
|
1887
|
+
* - ``supportedfiles.get()``
|
|
1888
|
+
- ``GET orgs/{org_slug}/supported-files``
|
|
1889
|
+
- none
|
|
1890
|
+
* - ``telemetry.get_config()``
|
|
1891
|
+
- ``GET orgs/{org_slug}/telemetry/config``
|
|
1892
|
+
- none
|
|
1893
|
+
* - ``telemetry.update_config()``
|
|
1894
|
+
- ``PUT orgs/{org_slug}/telemetry/config``
|
|
1895
|
+
- ``telemetry-policy:update``
|
|
1896
|
+
* - ``threatfeed.get(org_slug)``
|
|
1897
|
+
- ``GET orgs/{org_slug}/threat-feed``
|
|
1898
|
+
- ``threat-feed:list``
|
|
1899
|
+
* - ``threatfeed.get()``
|
|
1900
|
+
- ``GET threat-feed``. Deprecated
|
|
1901
|
+
- ``threat-feed:list``
|
|
1902
|
+
* - ``triage.list_alert_triage()``
|
|
1903
|
+
- ``GET orgs/{org_slug}/triage/alerts``
|
|
1904
|
+
- ``triage:alerts-list``
|
|
1905
|
+
* - ``triage.update_alert_triage()``
|
|
1906
|
+
- ``POST orgs/{org_slug}/triage/alerts``
|
|
1907
|
+
- ``triage:alerts-update``
|
|
1908
|
+
* - ``uploadmanifests.upload_manifest_files()``
|
|
1909
|
+
- ``POST orgs/{org_slug}/upload-manifest-files``
|
|
1910
|
+
- ``full-scans:create`` (not in the API reference)
|
|
1911
|
+
* - ``webhooks.list()``
|
|
1912
|
+
- ``GET orgs/{org_slug}/webhooks``
|
|
1913
|
+
- ``webhooks:list``
|
|
1914
|
+
* - ``webhooks.create()``
|
|
1915
|
+
- ``POST orgs/{org_slug}/webhooks``
|
|
1916
|
+
- ``webhooks:create``
|
|
1917
|
+
* - ``webhooks.get()``
|
|
1918
|
+
- ``GET orgs/{org_slug}/webhooks/{webhook_id}``
|
|
1919
|
+
- ``webhooks:list``
|
|
1920
|
+
* - ``webhooks.update()``
|
|
1921
|
+
- ``PUT orgs/{org_slug}/webhooks/{webhook_id}``
|
|
1922
|
+
- ``webhooks:update``
|
|
1923
|
+
* - ``webhooks.delete()``
|
|
1924
|
+
- ``DELETE orgs/{org_slug}/webhooks/{webhook_id}``
|
|
1925
|
+
- ``webhooks:delete``
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
socketdev/__init__.py,sha256=4S3ApgU21s_1Wd4bEfife4ifAzmrdzLMS2gvft1a6Vo,4224
|
|
2
2
|
socketdev/exceptions.py,sha256=yr1O1wkJUi-pvXQuqdAj4phNggHmT2N57I6DOdGdsgI,4225
|
|
3
3
|
socketdev/log.py,sha256=AgEcsPN3y9U-fze8pTFvLigVvNob2vmNC-TkOOQkkeQ,90
|
|
4
|
-
socketdev/version.py,sha256=
|
|
4
|
+
socketdev/version.py,sha256=q3gcnRqnpustX32RHZbHBlkyA1XrYBRYxZEAyTtm4y4,22
|
|
5
5
|
socketdev/alertfullscansearch/__init__.py,sha256=YwXrgnrI9z9rAexXFFmoXQcaQdGW47HRhQ58CQBCG3U,884
|
|
6
6
|
socketdev/alerts/__init__.py,sha256=kGLCNXtXTRz3vl2s_bPQ7xuds_QGwNQnah1TfHzp2MU,846
|
|
7
7
|
socketdev/alerttypes/__init__.py,sha256=W-m2D9VxbepSAUELJPmWmX40zksGZbQcSzwQ1kjlB1k,1169
|
|
@@ -11,7 +11,7 @@ socketdev/auditlog/__init__.py,sha256=vjcVtOK6oujqC6-RW5Hrvmth5BqFkLdinbeyqtycOp
|
|
|
11
11
|
socketdev/basics/__init__.py,sha256=9jTEwC4dMUV-9pKpU4twK-hM1cY0xeXAxjDrb37sxoQ,4067
|
|
12
12
|
socketdev/core/api.py,sha256=JROfXLRZ4IZApCpKw5MJFX21NIAdeBwIzU5oWxAC-3g,6622
|
|
13
13
|
socketdev/core/classes.py,sha256=jY1oyokpSVDA2XckG1pdVOP5PtxDS8CWta8PX6eZFJc,3608
|
|
14
|
-
socketdev/core/dedupe.py,sha256=
|
|
14
|
+
socketdev/core/dedupe.py,sha256=16O_njjnO5D3KXtuubrO5CyleZVOt-W__Z-EQsj23wY,7532
|
|
15
15
|
socketdev/core/enums.py,sha256=daY3vdm4veuYKCWenFOIsGsga85xzkiLfcygb5F1LSk,1416
|
|
16
16
|
socketdev/core/issues.py,sha256=SKhJz7SrglozeuEk72CbbuCM7X0hgzNMk55uM4wX-TI,68081
|
|
17
17
|
socketdev/core/retired_token.py,sha256=uwPS_1p1e3JzC8yPD3bBVPhhLsqWsTbChorHEdapLMo,1126
|
|
@@ -33,7 +33,7 @@ socketdev/report/__init__.py,sha256=5uQQAgeZP_ApOSfUdYizIbYKFaptnIL1_rxRGTkrtus,
|
|
|
33
33
|
socketdev/repos/__init__.py,sha256=2_BVRYYpA-wF1W9KvhbaBrfe3g2VHLkWLMizWOiyX3A,5641
|
|
34
34
|
socketdev/repositories/__init__.py,sha256=nZPaI28geaZWCoMjBZ6ipCFHZpdJNLnznOvdY5OnKlM,759
|
|
35
35
|
socketdev/sbom/__init__.py,sha256=LpesXKZhgF5OeNWls10YgxsCNamFW-F8UOy4yI11hrY,2341
|
|
36
|
-
socketdev/settings/__init__.py,sha256=
|
|
36
|
+
socketdev/settings/__init__.py,sha256=UPom0BXlJ91wyWqYLLAYiJ19bIwQdPXnJqEQWsnKpzw,6648
|
|
37
37
|
socketdev/supportedfiles/__init__.py,sha256=XLli-HOPYJrKs0TIHKSD2tk8VSLJsI3owMKeVlGQNms,706
|
|
38
38
|
socketdev/telemetry/__init__.py,sha256=9cRqeT6ToZVnWv65acMX9TXGgDDNe2VY4ZEf-4ooGHI,1444
|
|
39
39
|
socketdev/threatfeed/__init__.py,sha256=2SsJYKByXBkb2C1fGopwxejkr7mky0kggFKIunyV7Nk,1119
|
|
@@ -42,7 +42,7 @@ socketdev/triage/__init__.py,sha256=-h599vThVetfRSOAs1e4IUoMjcXS8xOsUfub41XPiX4,
|
|
|
42
42
|
socketdev/uploadmanifests/__init__.py,sha256=-sFHbOW-aw7U0wRfEJT_Edrzx8aCbzD9cTGmVTNJKpw,6043
|
|
43
43
|
socketdev/utils/__init__.py,sha256=E11UJTsWsN-ZurOwtKvPGOTc9UMP3ND79nPbmNRRQ6E,17666
|
|
44
44
|
socketdev/webhooks/__init__.py,sha256=fme6K7ma_Gvk_TFOLz9jVcR5QJbDpMHXqRaU3x_RShY,3507
|
|
45
|
-
socketdev-3.6.
|
|
46
|
-
socketdev-3.6.
|
|
47
|
-
socketdev-3.6.
|
|
48
|
-
socketdev-3.6.
|
|
45
|
+
socketdev-3.6.4.dist-info/METADATA,sha256=kAoRiPBM2yp9JfvjpdAJ2plxHX-twf1QTEUwPfVQ6ww,61607
|
|
46
|
+
socketdev-3.6.4.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
|
|
47
|
+
socketdev-3.6.4.dist-info/licenses/LICENSE,sha256=mC0II_UuE-_gCG9XqOLNyrV3crnROzMpdAetGnMrhpw,1068
|
|
48
|
+
socketdev-3.6.4.dist-info/RECORD,,
|
|
File without changes
|