Name | socketdev JSON |
Version |
3.0.14
JSON |
| download |
home_page | None |
Summary | Socket Security Python SDK |
upload_time | 2025-10-17 01:53:04 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.9 |
license | MIT License
Copyright (c) 2025 Socket Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. |
keywords |
oss
sca
sdk
security
socket.dev
socketsecurity
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
socketdev
#########
Purpose
-------
The Socket.dev Python SDK provides a wrapper around the Socket.dev REST API to simplify making calls to the API from Python.
Socket API v0 - https://docs.socket.dev/reference/introduction-to-socket-api
Initializing the module
-----------------------
.. code-block:: python
from socketdev import socketdev
socket = socketdev(token="REPLACE_ME", timeout=30)
**PARAMETERS:**
- **token (str)** - The Socket API Key for your Organization
- **Timeout (int)** - The number of seconds to wait before failing the connection
Supported Functions
-------------------
purl.post(license, components)
""""""""""""""""""""""""""""""
Retrieve the package information for a purl post
**Usage:**
.. code-block:: python
from socketdev import socketdev
socket = socketdev(token="REPLACE_ME")
license = "true"
components = [
{
"purl": "pkg:pypi/pyonepassword@5.0.0"
},
{
"purl": "pkg:pypi/socketsecurity"
}
]
print(socket.purl.post(license, components))
**PARAMETERS:**
- **license (str)** - The license parameter if enabled will show alerts and license information. If disabled will only show the basic package metadata and scores. Default is true
- **components (array{dict})** - The components list of packages urls
export.cdx_bom(org_slug, id, query_params)
""""""""""""""""""""""""""""""""""""""""""
Export a Socket SBOM as a CycloneDX SBOM
**Usage:**
.. code-block:: python
from socketdev import socketdev
from socketdev.export import ExportQueryParams
socket = socketdev(token="REPLACE_ME")
query_params = ExportQueryParams(
author="john_doe",
project_name="my-project"
)
print(socket.export.cdx_bom("org_slug", "sbom_id", query_params))
**PARAMETERS:**
- **org_slug (str)** - The organization name
- **id (str)** - The ID of either a full scan or an SBOM report
- **query_params (ExportQueryParams)** - Optional query parameters for filtering:
- **author (str)** - Filter by author
- **project_group (str)** - Filter by project group
- **project_name (str)** - Filter by project name
- **project_version (str)** - Filter by project version
- **project_id (str)** - Filter by project ID
export.spdx_bom(org_slug, id, query_params)
"""""""""""""""""""""""""""""""""""""""""""
Export a Socket SBOM as an SPDX SBOM
**Usage:**
.. code-block:: python
from socketdev import socketdev
from socketdev.export import ExportQueryParams
socket = socketdev(token="REPLACE_ME")
query_params = ExportQueryParams(
project_name="my-project",
project_version="1.0.0"
)
print(socket.export.spdx_bom("org_slug", "sbom_id", query_params))
**PARAMETERS:**
- **org_slug (str)** - The organization name
- **id (str)** - The ID of either a full scan or an SBOM report
- **query_params (ExportQueryParams)** - Optional query parameters for filtering:
- **author (str)** - Filter by author
- **project_group (str)** - Filter by project group
- **project_name (str)** - Filter by project name
- **project_version (str)** - Filter by project version
- **project_id (str)** - Filter by project ID
fullscans.get(org_slug, params)
"""""""""""""""""""""""""""""""
Retrieve the Fullscans information for an Organization with query parameters
**Usage:**
.. code-block:: python
from socketdev import socketdev
socket = socketdev(token="REPLACE_ME")
# Query parameters for filtering full scans
params = {
"repo": "my-repo",
"branch": "main",
"limit": 10,
"offset": 0
}
print(socket.fullscans.get("org_slug", params))
**PARAMETERS:**
- **org_slug (str)** - The organization name
- **params (dict)** - Query parameters for filtering results (required)
fullscans.post(files, params)
"""""""""""""""""""""""""""""
Create a full scan from a set of package manifest files. Returns a full scan including all SBOM artifacts.
**Usage:**
.. code-block:: python
from socketdev import socketdev
from socketdev.fullscans import FullScanParams
socket = socketdev(token="REPLACE_ME")
files = [
"/path/to/manifest/package.json"
]
params = FullScanParams(
org_slug="org_name",
repo="TestRepo",
branch="main",
commit_message="Test Commit Message",
commit_hash="abc123def456",
pull_request=123,
committers=["committer1", "committer2"],
make_default_branch=False,
set_as_pending_head=False
)
print(socket.fullscans.post(files, params))
**PARAMETERS:**
- **files (list)** - List of file paths of manifest files
- **params (FullScanParams)** - FullScanParams object containing scan configuration
+------------------------+------------+-------------------------------------------------------------------------------+
| Parameter | Required | Description |
+========================+============+===============================================================================+
| org_slug | True | The string name in a git approved name for organization. |
+------------------------+------------+-------------------------------------------------------------------------------+
| repo | True | The string name in a git approved name for repositories. |
+------------------------+------------+-------------------------------------------------------------------------------+
| branch | False | The string name in a git approved name for branches. |
+------------------------+------------+-------------------------------------------------------------------------------+
| committers | False | List of committer names (List[str]). |
+------------------------+------------+-------------------------------------------------------------------------------+
| pull_request | False | The integer for the PR or MR number. |
+------------------------+------------+-------------------------------------------------------------------------------+
| commit_message | False | The string for a commit message if there is one. |
+------------------------+------------+-------------------------------------------------------------------------------+
| make_default_branch | False | Boolean to signal that this is the default branch. |
+------------------------+------------+-------------------------------------------------------------------------------+
| commit_hash | False | Optional git commit hash |
+------------------------+------------+-------------------------------------------------------------------------------+
| set_as_pending_head | False | Boolean to set as pending head |
+------------------------+------------+-------------------------------------------------------------------------------+
| tmp | False | Boolean temporary flag |
+------------------------+------------+-------------------------------------------------------------------------------+
| integration_type | False | IntegrationType enum value (e.g., "api", "github") |
+------------------------+------------+-------------------------------------------------------------------------------+
| integration_org_slug | False | Organization slug for integration |
+------------------------+------------+-------------------------------------------------------------------------------+
fullscans.delete(org_slug, full_scan_id)
""""""""""""""""""""""""""""""""""""""""
Delete an existing full scan.
**Usage:**
.. code-block:: python
from socketdev import socketdev
socket = socketdev(token="REPLACE_ME")
print(socket.fullscans.delete("org_slug", "full_scan_id"))
**PARAMETERS:**
- **org_slug (str)** - The organization name
- **full_scan_id (str)** - The ID of the full scan
fullscans.stream_diff(org_slug, before, after, use_types=True, include_license_details="true", \*\*kwargs)
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
Stream a diff between two full scans. Returns a scan diff.
**Usage:**
.. code-block:: python
from socketdev import socketdev
socket = socketdev(token="REPLACE_ME")
print(socket.fullscans.stream_diff("org_slug", "before_scan_id", "after_scan_id"))
# With additional parameters
print(socket.fullscans.stream_diff(
"org_slug",
"before_scan_id",
"after_scan_id",
use_types=False,
include_license_details="false"
))
**PARAMETERS:**
- **org_slug (str)** - The organization name
- **before (str)** - The base full scan ID
- **after (str)** - The comparison full scan ID
- **use_types (bool)** - Whether to return typed response objects (default: True)
- **include_license_details (str)** - Include license details ("true"/"false"). Can greatly increase response size. Defaults to "true".
- **kwargs** - Additional query parameters
fullscans.stream(org_slug, full_scan_id, use_types=False)
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""
Stream all SBOM artifacts for a full scan.
**Usage:**
.. code-block:: python
from socketdev import socketdev
socket = socketdev(token="REPLACE_ME")
print(socket.fullscans.stream("org_slug", "full_scan_id"))
# With typed response
print(socket.fullscans.stream("org_slug", "full_scan_id", use_types=True))
**PARAMETERS:**
- **org_slug (str)** - The organization name
- **full_scan_id (str)** - The ID of the full scan
- **use_types (bool)** - Whether to return typed response objects (default: False)
fullscans.metadata(org_slug, full_scan_id, use_types=False)
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
Get metadata for a single full scan
**Usage:**
.. code-block:: python
from socketdev import socketdev
socket = socketdev(token="REPLACE_ME")
print(socket.fullscans.metadata("org_slug", "full_scan_id"))
# With typed response
print(socket.fullscans.metadata("org_slug", "full_scan_id", use_types=True))
**PARAMETERS:**
- **org_slug (str)** - The organization name
- **full_scan_id (str)** - The ID of the full scan
- **use_types (bool)** - Whether to return typed response objects (default: False)
fullscans.gfm(org_slug, before, after)
""""""""""""""""""""""""""""""""""""""
Get GitHub Flavored Markdown diff between two full scans.
**Usage:**
.. code-block:: python
from socketdev import socketdev
socket = socketdev(token="REPLACE_ME")
print(socket.fullscans.gfm("org_slug", "before_scan_id", "after_scan_id"))
**PARAMETERS:**
- **org_slug (str)** - The organization name
- **before (str)** - The base full scan ID
- **after (str)** - The comparison full scan ID
basics.get_config(org_slug, use_types)
""""""""""""""""""""""""""""""""""""""
Get Socket Basics configuration for an organization. Socket Basics is a CI/CD security scanning suite that includes SAST scanning, secret detection, container security, and dependency analysis.
**Usage:**
.. code-block:: python
from socketdev import socketdev
socket = socketdev(token="REPLACE_ME")
# Basic usage - returns dictionary
config = socket.basics.get_config("org_slug")
print(f"Python SAST enabled: {config['pythonSastEnabled']}")
print(f"Secret scanning enabled: {config['secretScanningEnabled']}")
# Using typed response objects
from socketdev.basics import SocketBasicsConfig, SocketBasicsResponse
response = socket.basics.get_config("org_slug", use_types=True)
if response.success and response.config:
print(f"JavaScript SAST: {response.config.javascriptSastEnabled}")
print(f"Trivy scanning: {response.config.trivyImageEnabled}")
**PARAMETERS:**
- **org_slug (str)** - The organization name
- **use_types (bool)** - Whether to return typed response objects (default: False)
**Socket Basics Features:**
- **Python SAST** - Static analysis for Python code
- **Go SAST** - Static analysis for Go code
- **JavaScript SAST** - Static analysis for JavaScript/TypeScript code
- **Secret Scanning** - Detection of hardcoded secrets and credentials
- **Trivy Image Scanning** - Vulnerability scanning for Docker images
- **Trivy Dockerfile Scanning** - Vulnerability scanning for Dockerfiles
- **Socket SCA** - Supply chain analysis for dependencies
- **Socket Scanning** - General dependency security scanning
- **Additional Parameters** - Custom configuration options
dependencies.get(limit, offset)
"""""""""""""""""""""""""""""""
Retrieve the dependencies for the organization associated with the API Key
**Usage:**
.. code-block:: python
from socketdev import socketdev
socket = socketdev(token="REPLACE_ME")
print(socket.dependencies.get(10, 0))
**PARAMETERS:**
- **limit (int)** - The maximum number of dependencies to return
- **offset (int)** - The index to start from for pulling the dependencies
dependencies.post(files, params)
""""""""""""""""""""""""""""""""
Retrieve the dependencies for the organization associated with the API Key
**Usage:**
.. code-block:: python
from socketdev import socketdev
socket = socketdev(token="REPLACE_ME")
file_names = [
"path/to/package.json"
]
params = {
"repository": "username/repo-name",
"branch": "dependency-branch"
}
print(socket.dependencies.post(file_names, params))
**PARAMETERS:**
- **files (list)** - The file paths of the manifest files to import into the Dependency API.
- **params (dict)** - A dictionary of the `repository` and `branch` options for the API
repos.get()
"""""""""""
Get a list of information about the tracked repositories
**Usage:**
.. code-block:: python
from socketdev import socketdev
socket = socketdev(token="REPLACE_ME")
print(socket.repos.get(sort="name", direction="asc", per_page=100, page=1))
**PARAMETERS:**
- **sort** - The key to sort on from the repo properties. Defaults to `created_at`
- **direction** - Can be `desc` or `asc`. Defaults to `desc`
- **per_page** - Integer between 1 to 100. Defaults to `10`
- **page** - Integer page number defaults to `1`. If there are no more results it will be `0`
repos.post()
""""""""""""
Create a new Socket Repository
**Usage:**
.. code-block:: python
from socketdev import socketdev
socket = socketdev(token="REPLACE_ME")
print(
socket.repos.post(
name="example",
description="Info about Repo",
homepage="http://homepage",
visibility='public',
archived=False,
default_branch='not-main'
)
)
**PARAMETERS:**
- **name(required)** - The name of the Socket Repository
- **description(optional)** - String description of the repository
- **homepage(optional)** - URL of the homepage of the
- **visibility(optional)** - Can be `public` or `private` and defaults to `private`
- **archived(optional)** - Boolean on if the repository is archived. Defaults to `False`
- **default_branch(optional)** - String name of the default branch for the repository. Defaults to `main`
repos.repo()
""""""""""""
Get a list of information about the tracked repositories
**Usage:**
.. code-block:: python
from socketdev import socketdev
socket = socketdev(token="REPLACE_ME")
print(socket.repos.repo(org_slug="example", repo_name="example-repo"))
repos.update()
""""""""""""""
Update an existing Socket Repository
**Usage:**
.. code-block:: python
from socketdev import socketdev
socket = socketdev(token="REPLACE_ME")
print(
socket.repos.update(
org_slug="example-org",
repo_name="example",
name="new-name-example",
description="Info about Repo",
homepage="http://homepage",
visibility='public',
archived=False,
default_branch='not-main'
)
)
- **name(optional)** - The name of the Socket Repository
- **description(optional)** - String description of the repository
- **homepage(optional)** - URL of the homepage of the
- **visibility(optional)** - Can be `public` or `private` and defaults to `private`
- **archived(optional)** - Boolean on if the repository is archived. Defaults to `False`
- **default_branch(optional)** - String name of the default branch for the repository. Defaults to `main`
repos.delete()
""""""""""""""
Delete a Socket Repository
**Usage:**
.. code-block:: python
from socketdev import socketdev
socket = socketdev(token="REPLACE_ME")
print(socket.repos.delete(org_slug="example", repo_name="example-repo"))
**PARAMETERS:**
- **org_slug** - Name of the Socket Org
- **repo_name** - The name of the Socket Repository to delete
org.get()
"""""""""
Retrieve the Socket.dev org information
**Usage:**
.. code-block:: python
from socketdev import socketdev
socket = socketdev(token="REPLACE_ME")
print(socket.org.get())
quota.get()
"""""""""""
Retrieve the the current quota available for your API Key
**Usage:**
.. code-block:: python
from socketdev import socketdev
socket = socketdev(token="REPLACE_ME")
print(socket.quota.get())
settings.get()
""""""""""""""
Retrieve the Socket Organization Settings
**Usage:**
.. code-block:: python
from socketdev import socketdev
socket = socketdev(token="REPLACE_ME")
print(socket.settings.get())
report.supported()
""""""""""""""""""
Retrieve the supported types of manifest files for creating a report
**Usage:**
.. code-block:: python
from socketdev import socketdev
socket = socketdev(token="REPLACE_ME")
print(socket.report.supported())
Deprecated: report.list()
"""""""""""""""""""""""""
Retrieve the list of all reports for the organization
**Usage:**
.. code-block:: python
from socketdev import socketdev
socket = socketdev(token="REPLACE_ME")
print(socket.report.list(from_time=1726183485))
**PARAMETERS:**
- **from_time (int)** - The Unix Timestamp in Seconds to limit the reports pulled
Deprecated: report.delete(report_id)
""""""""""""""""""""""""""""""""""""
Delete the specified report
**Usage:**
.. code-block:: python
from socketdev import socketdev
socket = socketdev(token="REPLACE_ME")
print(socket.report.delete("report-id"))
**PARAMETERS:**
- **report_id (str)** - The report ID of the report to delete
Deprecated: report.view(report_id)
""""""""""""""""""""""""""""""""""
Retrieve the information for a Project Health Report
**Usage:**
.. code-block:: python
from socketdev import socketdev
socket = socketdev(token="REPLACE_ME")
print(socket.report.view("report_id"))
**PARAMETERS:**
- **report_id (str)** - The report ID of the report to view
Deprecated: report.create(files)
""""""""""""""""""""""""""""""""
Create a new project health report with the provided files
**Usage:**
.. code-block:: python
from socketdev import socketdev
socket = socketdev(token="REPLACE_ME")
files = [
"/path/to/manifest/package.json"
]
print(socket.report.create(files))
**PARAMETERS:**
- **files (list)** - List of file paths of manifest files
Deprecated: repositories.get()
""""""""""""""""""""""""""""""
Get a list of information about the tracked repositories
**Usage:**
.. code-block:: python
from socketdev import socketdev
socket = socketdev(token="REPLACE_ME")
print(socket.repositories.get())
Deprecated: sbom.view(report_id)
""""""""""""""""""""""""""""""""
Retrieve the information for a SBOM Report
**Usage:**
.. code-block:: python
from socketdev import socketdev
socket = socketdev(token="REPLACE_ME")
print(socket.sbom.view("report_id"))
Deprecated: npm.issues(package, version)
""""""""""""""""""""""""""""""""""""""""
Retrieve the Issues associated with a package and version.
**Usage:**
.. code-block:: python
from socketdev import socketdev
socket = socketdev(token="REPLACE_ME")
print(socket.npm.issues("hardhat-gas-report", "1.1.25"))
**PARAMETERS:**
- **package (str)** - The name of the NPM package.
- **version (str)** - The version of the NPM Package.
Deprecated: npm.score(package, version)
"""""""""""""""""""""""""""""""""""""""
Retrieve the Issues associated with a package and version.
**Usage:**
.. code-block:: python
from socketdev import socketdev
socket = socketdev(token="REPLACE_ME")
print(socket.npm.score("hardhat-gas-report", "1.1.25"))
**PARAMETERS:**
- **package (str)** - The name of the NPM package.
- **version (str)** - The version of the NPM Package.
labels.list(org_slug)
"""""""""""""""""""""""
List all repository labels for the given organization.
**Usage:**
.. code-block:: python
from socketdev import socketdev
socket = socketdev(token="REPLACE_ME")
print(socket.labels.list("org_slug"))
**PARAMETERS:**
- **org_slug (str)** – The organization name
labels.post(org_slug, label_name)
"""""""""""""""""""""""""""""""""""
Create a new label in the organization.
**Usage:**
.. code-block:: python
print(socket.labels.post("org_slug", "my-label"))
**PARAMETERS:**
- **org_slug (str)** – The organization name
- **label_name (str)** – Name of the label to create
labels.get(org_slug, label_id)
"""""""""""""""""""""""""""""""""
Retrieve a single label by its ID.
**Usage:**
.. code-block:: python
print(socket.labels.get("org_slug", "label_id"))
**PARAMETERS:**
- **org_slug (str)** – The organization name
- **label_id (str)** – The label ID
labels.delete(org_slug, label_id)
"""""""""""""""""""""""""""""""""""
Delete a label by ID.
**Usage:**
.. code-block:: python
print(socket.labels.delete("org_slug", "label_id"))
**PARAMETERS:**
- **org_slug (str)** – The organization name
- **label_id (str)** – The label ID
labels.associate(org_slug, label_id, repo_id)
"""""""""""""""""""""""""""""""""""""""""""""""
Associate a label with a repository.
**Usage:**
.. code-block:: python
print(socket.labels.associate("org_slug", 1234, "repo_id"))
**PARAMETERS:**
- **org_slug (str)** – The organization name
- **label_id (int)** – The label ID
- **repo_id (str)** – The repository ID
labels.disassociate(org_slug, label_id, repo_id)
"""""""""""""""""""""""""""""""""""""""""""""""""
Disassociate a label from a repository.
**Usage:**
.. code-block:: python
print(socket.labels.disassociate("org_slug", 1234, "repo_id"))
**PARAMETERS:**
- **org_slug (str)** – The organization name
- **label_id (int)** – The label ID
- **repo_id (str)** – The repository ID
labels.setting.get(org_slug, label_id, setting_key)
"""""""""""""""""""""""""""""""""""""""""""""""""""""
Get a setting for a specific label.
**Usage:**
.. code-block:: python
print(socket.labels.setting.get("org_slug", 1234, "severity"))
**PARAMETERS:**
- **org_slug (str)** – The organization name
- **label_id (int)** – The label ID
- **setting_key (str)** – The key of the setting
labels.setting.put(org_slug, label_id, settings)
"""""""""""""""""""""""""""""""""""""""""""""""""""
Update settings for a specific label.
**Usage:**
.. code-block:: python
settings = {"severity": {"value": {"level": "high"}}}
print(socket.labels.setting.put("org_slug", 1234, settings))
**PARAMETERS:**
- **org_slug (str)** – The organization name
- **label_id (int)** – The label ID
- **settings (dict)** – A dictionary of label settings
labels.setting.delete(org_slug, label_id, setting_key)
"""""""""""""""""""""""""""""""""""""""""""""""""""""""
Delete a setting from a label.
**Usage:**
.. code-block:: python
print(socket.labels.setting.delete("org_slug", 1234, "severity"))
**PARAMETERS:**
- **org_slug (str)** – The organization name
- **label_id (int)** – The label ID
- **setting_key (str)** – The setting key to delete
historical.list(org_slug, query_params=None)
"""""""""""""""""""""""""""""""""""""""""""""""
List historical alerts for an organization.
**Usage:**
.. code-block:: python
print(socket.historical.list("org_slug", {"repo": "example-repo"}))
**PARAMETERS:**
- **org_slug (str)** – The organization name
- **query_params (dict, optional)** – Optional query parameters
historical.trend(org_slug, query_params=None)
"""""""""""""""""""""""""""""""""""""""""""""""
Retrieve alert trend data across time.
**Usage:**
.. code-block:: python
print(socket.historical.trend("org_slug", {"range": "30d"}))
**PARAMETERS:**
- **org_slug (str)** – The organization name
- **query_params (dict, optional)** – Optional query parameters
historical.snapshots.create(org_slug)
""""""""""""""""""""""""""""""""""""""""
Create a new snapshot of historical data.
**Usage:**
.. code-block:: python
print(socket.historical.snapshots.create("org_slug"))
**PARAMETERS:**
- **org_slug (str)** – The organization name
historical.snapshots.list(org_slug, query_params=None)
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""
List all historical snapshots for an organization.
**Usage:**
.. code-block:: python
print(socket.historical.snapshots.list("org_slug", {"repo": "example-repo"}))
**PARAMETERS:**
- **org_slug (str)** – The organization name
- **query_params (dict, optional)** – Optional query parameters
diffscans.list(org_slug, params=None)
"""""""""""""""""""""""""""""""""""""
List all diff scans for an organization.
**Usage:**
.. code-block:: python
from socketdev import socketdev
socket = socketdev(token="REPLACE_ME")
print(socket.diffscans.list("org_slug", {"limit": 10, "offset": 0}))
**PARAMETERS:**
- **org_slug (str)** – The organization name
- **params (dict, optional)** – Optional query parameters for filtering
diffscans.get(org_slug, diff_scan_id)
"""""""""""""""""""""""""""""""""""""
Fetch a specific diff scan by ID.
**Usage:**
.. code-block:: python
from socketdev import socketdev
socket = socketdev(token="REPLACE_ME")
print(socket.diffscans.get("org_slug", "diff_scan_id"))
**PARAMETERS:**
- **org_slug (str)** – The organization name
- **diff_scan_id (str)** – The ID of the diff scan to retrieve
diffscans.create_from_ids(org_slug, params)
"""""""""""""""""""""""""""""""""""""""""""
Create a diff scan from two full scan IDs.
**Usage:**
.. code-block:: python
from socketdev import socketdev
socket = socketdev(token="REPLACE_ME")
params = {
"before": "full_scan_id_1",
"after": "full_scan_id_2",
"description": "Compare two scans"
}
print(socket.diffscans.create_from_ids("org_slug", params))
**PARAMETERS:**
- **org_slug (str)** – The organization name
- **params (dict)** – Parameters including before and after scan IDs
diffscans.create_from_repo(org_slug, repo_slug, files, params=None)
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
Create a diff scan from repository files.
**Usage:**
.. code-block:: python
from socketdev import socketdev
socket = socketdev(token="REPLACE_ME")
files = ["/path/to/package.json"]
params = {"branch": "main", "commit": "abc123"}
print(socket.diffscans.create_from_repo("org_slug", "repo_slug", files, params))
**PARAMETERS:**
- **org_slug (str)** – The organization name
- **repo_slug (str)** – The repository name
- **files (list)** – List of file paths to scan
- **params (dict, optional)** – Optional parameters for the scan
diffscans.gfm(org_slug, diff_scan_id)
"""""""""""""""""""""""""""""""""""""
Get GitHub Flavored Markdown comments for a diff scan.
**Usage:**
.. code-block:: python
from socketdev import socketdev
socket = socketdev(token="REPLACE_ME")
print(socket.diffscans.gfm("org_slug", "diff_scan_id"))
**PARAMETERS:**
- **org_slug (str)** – The organization name
- **diff_scan_id (str)** – The ID of the diff scan
diffscans.delete(org_slug, diff_scan_id)
""""""""""""""""""""""""""""""""""""""""
Delete a specific diff scan.
**Usage:**
.. code-block:: python
from socketdev import socketdev
socket = socketdev(token="REPLACE_ME")
print(socket.diffscans.delete("org_slug", "diff_scan_id"))
**PARAMETERS:**
- **org_slug (str)** – The organization name
- **diff_scan_id (str)** – The ID of the diff scan to delete
threatfeed.get(org_slug=None, \*\*kwargs)
"""""""""""""""""""""""""""""""""""""""""""
Get threat feed items for an organization or globally.
**Usage:**
.. code-block:: python
from socketdev import socketdev
socket = socketdev(token="REPLACE_ME")
# Get org-specific threat feed
print(socket.threatfeed.get("org_slug", per_page=50, sort="created_at"))
# Get global threat feed (deprecated)
print(socket.threatfeed.get())
**PARAMETERS:**
- **org_slug (str, optional)** – The organization name (recommended for new implementations)
- **kwargs** – Query parameters like per_page, page_cursor, sort, etc.
apitokens.create(org_slug, \*\*kwargs)
""""""""""""""""""""""""""""""""""""""
Create a new API token for an organization.
**Usage:**
.. code-block:: python
from socketdev import socketdev
socket = socketdev(token="REPLACE_ME")
token_config = {
"name": "My API Token",
"permissions": ["read", "write"],
"expires_at": "2024-12-31T23:59:59Z"
}
print(socket.apitokens.create("org_slug", **token_config))
**PARAMETERS:**
- **org_slug (str)** – The organization name
- **kwargs** – Token configuration parameters
apitokens.update(org_slug, \*\*kwargs)
""""""""""""""""""""""""""""""""""""""
Update an existing API token.
**Usage:**
.. code-block:: python
from socketdev import socketdev
socket = socketdev(token="REPLACE_ME")
update_params = {
"token_id": "token_123",
"name": "Updated Token Name",
"permissions": ["read"]
}
print(socket.apitokens.update("org_slug", **update_params))
**PARAMETERS:**
- **org_slug (str)** – The organization name
- **kwargs** – Token update parameters
auditlog.get(org_slug, \*\*kwargs)
""""""""""""""""""""""""""""""""""""
Get audit log entries for an organization.
**Usage:**
.. code-block:: python
from socketdev import socketdev
socket = socketdev(token="REPLACE_ME")
print(socket.auditlog.get("org_slug", limit=100, cursor="abc123"))
**PARAMETERS:**
- **org_slug (str)** – The organization name
- **kwargs** – Query parameters like limit, cursor, etc.
analytics.get_org(filter, \*\*kwargs)
"""""""""""""""""""""""""""""""""""""""
Get organization analytics (deprecated - use Historical module instead).
**Usage:**
.. code-block:: python
from socketdev import socketdev
socket = socketdev(token="REPLACE_ME")
# DEPRECATED: Use socket.historical.list() or socket.historical.trend() instead
print(socket.analytics.get_org("alerts", start_date="2024-01-01"))
**PARAMETERS:**
- **filter (str)** – Analytics filter type
- **kwargs** – Additional query parameters
analytics.get_repo(name, filter, \*\*kwargs)
""""""""""""""""""""""""""""""""""""""""""""""
Get repository analytics (deprecated - use Historical module instead).
**Usage:**
.. code-block:: python
from socketdev import socketdev
socket = socketdev(token="REPLACE_ME")
# DEPRECATED: Use socket.historical.list() or socket.historical.trend() instead
print(socket.analytics.get_repo("repo_name", "alerts", start_date="2024-01-01"))
**PARAMETERS:**
- **name (str)** – Repository name
- **filter (str)** – Analytics filter type
- **kwargs** – Additional query parameters
alerttypes.get(alert_types=None, language="en-US", \*\*kwargs)
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
Get alert types metadata.
**Usage:**
.. code-block:: python
from socketdev import socketdev
socket = socketdev(token="REPLACE_ME")
# Get metadata for specific alert types
alert_list = ["supply_chain_risk", "license_risk"]
print(socket.alerttypes.get(alert_list, language="en-US"))
# Get all alert types metadata
print(socket.alerttypes.get())
**PARAMETERS:**
- **alert_types (list, optional)** – List of alert type strings to get metadata for
- **language (str)** – Language for alert metadata (default: en-US)
- **kwargs** – Additional query parameters
triage.list_alert_triage(org_slug, query_params=None)
"""""""""""""""""""""""""""""""""""""""""""""""""""""
Get list of triaged alerts for an organization.
**Usage:**
.. code-block:: python
from socketdev import socketdev
socket = socketdev(token="REPLACE_ME")
query_params = {"status": "triaged", "limit": 50}
print(socket.triage.list_alert_triage("org_slug", query_params))
**PARAMETERS:**
- **org_slug (str)** – The organization name
- **query_params (dict, optional)** – Optional query parameters for filtering
openapi.get()
"""""""""""""
Retrieve the OpenAPI specification for the Socket API.
**Usage:**
.. code-block:: python
from socketdev import socketdev
socket = socketdev(token="REPLACE_ME")
print(socket.openapi.get())
**PARAMETERS:**
None required.
Raw data
{
"_id": null,
"home_page": null,
"name": "socketdev",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": "Douglas Coburn <douglas@socket.dev>",
"keywords": "oss, sca, sdk, security, socket.dev, socketsecurity",
"author": null,
"author_email": "Douglas Coburn <douglas@socket.dev>",
"download_url": "https://files.pythonhosted.org/packages/71/e8/362072e5a8b94aa550d91ec0d7ef9ee63120284ceaedc9c8e1889a32abcf/socketdev-3.0.14.tar.gz",
"platform": null,
"description": "\nsocketdev\n#########\n\nPurpose\n-------\n\nThe Socket.dev Python SDK provides a wrapper around the Socket.dev REST API to simplify making calls to the API from Python.\n\nSocket API v0 - https://docs.socket.dev/reference/introduction-to-socket-api\n\nInitializing the module\n-----------------------\n\n.. code-block:: python\n\n from socketdev import socketdev\n socket = socketdev(token=\"REPLACE_ME\", timeout=30)\n\n**PARAMETERS:**\n\n- **token (str)** - The Socket API Key for your Organization\n- **Timeout (int)** - The number of seconds to wait before failing the connection\n\nSupported Functions\n-------------------\n\n\npurl.post(license, components)\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\nRetrieve the package information for a purl post\n\n**Usage:**\n\n.. code-block:: python\n\n from socketdev import socketdev\n socket = socketdev(token=\"REPLACE_ME\")\n license = \"true\"\n components = [\n {\n \"purl\": \"pkg:pypi/pyonepassword@5.0.0\"\n },\n {\n \"purl\": \"pkg:pypi/socketsecurity\"\n }\n ]\n print(socket.purl.post(license, components))\n\n**PARAMETERS:**\n\n- **license (str)** - The license parameter if enabled will show alerts and license information. If disabled will only show the basic package metadata and scores. Default is true\n- **components (array{dict})** - The components list of packages urls\n\nexport.cdx_bom(org_slug, id, query_params)\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\nExport a Socket SBOM as a CycloneDX SBOM\n\n**Usage:**\n\n.. code-block:: python\n\n from socketdev import socketdev\n from socketdev.export import ExportQueryParams\n\n socket = socketdev(token=\"REPLACE_ME\")\n query_params = ExportQueryParams(\n author=\"john_doe\",\n project_name=\"my-project\"\n )\n print(socket.export.cdx_bom(\"org_slug\", \"sbom_id\", query_params))\n\n**PARAMETERS:**\n\n- **org_slug (str)** - The organization name\n- **id (str)** - The ID of either a full scan or an SBOM report\n- **query_params (ExportQueryParams)** - Optional query parameters for filtering:\n - **author (str)** - Filter by author\n - **project_group (str)** - Filter by project group\n - **project_name (str)** - Filter by project name\n - **project_version (str)** - Filter by project version\n - **project_id (str)** - Filter by project ID\n\nexport.spdx_bom(org_slug, id, query_params)\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\nExport a Socket SBOM as an SPDX SBOM\n\n**Usage:**\n\n.. code-block:: python\n\n from socketdev import socketdev\n from socketdev.export import ExportQueryParams\n\n socket = socketdev(token=\"REPLACE_ME\")\n query_params = ExportQueryParams(\n project_name=\"my-project\",\n project_version=\"1.0.0\"\n )\n print(socket.export.spdx_bom(\"org_slug\", \"sbom_id\", query_params))\n\n**PARAMETERS:**\n\n- **org_slug (str)** - The organization name\n- **id (str)** - The ID of either a full scan or an SBOM report\n- **query_params (ExportQueryParams)** - Optional query parameters for filtering:\n - **author (str)** - Filter by author\n - **project_group (str)** - Filter by project group\n - **project_name (str)** - Filter by project name\n - **project_version (str)** - Filter by project version\n - **project_id (str)** - Filter by project ID\n\nfullscans.get(org_slug, params)\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\nRetrieve the Fullscans information for an Organization with query parameters\n\n**Usage:**\n\n.. code-block:: python\n\n from socketdev import socketdev\n socket = socketdev(token=\"REPLACE_ME\")\n \n # Query parameters for filtering full scans\n params = {\n \"repo\": \"my-repo\",\n \"branch\": \"main\",\n \"limit\": 10,\n \"offset\": 0\n }\n print(socket.fullscans.get(\"org_slug\", params))\n\n**PARAMETERS:**\n\n- **org_slug (str)** - The organization name\n- **params (dict)** - Query parameters for filtering results (required)\n\nfullscans.post(files, params)\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\nCreate a full scan from a set of package manifest files. Returns a full scan including all SBOM artifacts.\n\n**Usage:**\n\n.. code-block:: python\n\n from socketdev import socketdev\n from socketdev.fullscans import FullScanParams\n \n socket = socketdev(token=\"REPLACE_ME\")\n files = [\n \"/path/to/manifest/package.json\"\n ]\n params = FullScanParams(\n org_slug=\"org_name\",\n repo=\"TestRepo\",\n branch=\"main\",\n commit_message=\"Test Commit Message\",\n commit_hash=\"abc123def456\",\n pull_request=123,\n committers=[\"committer1\", \"committer2\"],\n make_default_branch=False,\n set_as_pending_head=False\n )\n\n print(socket.fullscans.post(files, params))\n\n**PARAMETERS:**\n\n- **files (list)** - List of file paths of manifest files\n- **params (FullScanParams)** - FullScanParams object containing scan configuration\n\n+------------------------+------------+-------------------------------------------------------------------------------+\n| Parameter | Required | Description |\n+========================+============+===============================================================================+\n| org_slug | True | The string name in a git approved name for organization. |\n+------------------------+------------+-------------------------------------------------------------------------------+\n| repo | True | The string name in a git approved name for repositories. |\n+------------------------+------------+-------------------------------------------------------------------------------+\n| branch | False | The string name in a git approved name for branches. |\n+------------------------+------------+-------------------------------------------------------------------------------+\n| committers | False | List of committer names (List[str]). |\n+------------------------+------------+-------------------------------------------------------------------------------+\n| pull_request | False | The integer for the PR or MR number. |\n+------------------------+------------+-------------------------------------------------------------------------------+\n| commit_message | False | The string for a commit message if there is one. |\n+------------------------+------------+-------------------------------------------------------------------------------+\n| make_default_branch | False | Boolean to signal that this is the default branch. |\n+------------------------+------------+-------------------------------------------------------------------------------+\n| commit_hash | False | Optional git commit hash |\n+------------------------+------------+-------------------------------------------------------------------------------+\n| set_as_pending_head | False | Boolean to set as pending head |\n+------------------------+------------+-------------------------------------------------------------------------------+\n| tmp | False | Boolean temporary flag |\n+------------------------+------------+-------------------------------------------------------------------------------+\n| integration_type | False | IntegrationType enum value (e.g., \"api\", \"github\") |\n+------------------------+------------+-------------------------------------------------------------------------------+\n| integration_org_slug | False | Organization slug for integration |\n+------------------------+------------+-------------------------------------------------------------------------------+\n\nfullscans.delete(org_slug, full_scan_id)\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\nDelete an existing full scan.\n\n**Usage:**\n\n.. code-block:: python\n\n from socketdev import socketdev\n socket = socketdev(token=\"REPLACE_ME\")\n print(socket.fullscans.delete(\"org_slug\", \"full_scan_id\"))\n\n**PARAMETERS:**\n\n- **org_slug (str)** - The organization name\n- **full_scan_id (str)** - The ID of the full scan\n\nfullscans.stream_diff(org_slug, before, after, use_types=True, include_license_details=\"true\", \\*\\*kwargs)\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\nStream a diff between two full scans. Returns a scan diff.\n\n**Usage:**\n\n.. code-block:: python\n\n from socketdev import socketdev\n socket = socketdev(token=\"REPLACE_ME\")\n print(socket.fullscans.stream_diff(\"org_slug\", \"before_scan_id\", \"after_scan_id\"))\n \n # With additional parameters\n print(socket.fullscans.stream_diff(\n \"org_slug\", \n \"before_scan_id\", \n \"after_scan_id\",\n use_types=False,\n include_license_details=\"false\"\n ))\n\n**PARAMETERS:**\n\n- **org_slug (str)** - The organization name\n- **before (str)** - The base full scan ID\n- **after (str)** - The comparison full scan ID\n- **use_types (bool)** - Whether to return typed response objects (default: True)\n- **include_license_details (str)** - Include license details (\"true\"/\"false\"). Can greatly increase response size. Defaults to \"true\".\n- **kwargs** - Additional query parameters\n\nfullscans.stream(org_slug, full_scan_id, use_types=False)\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\nStream all SBOM artifacts for a full scan.\n\n**Usage:**\n\n.. code-block:: python\n\n from socketdev import socketdev\n socket = socketdev(token=\"REPLACE_ME\")\n print(socket.fullscans.stream(\"org_slug\", \"full_scan_id\"))\n \n # With typed response\n print(socket.fullscans.stream(\"org_slug\", \"full_scan_id\", use_types=True))\n\n**PARAMETERS:**\n\n- **org_slug (str)** - The organization name\n- **full_scan_id (str)** - The ID of the full scan\n- **use_types (bool)** - Whether to return typed response objects (default: False)\n\nfullscans.metadata(org_slug, full_scan_id, use_types=False)\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\nGet metadata for a single full scan\n\n**Usage:**\n\n.. code-block:: python\n\n from socketdev import socketdev\n socket = socketdev(token=\"REPLACE_ME\")\n print(socket.fullscans.metadata(\"org_slug\", \"full_scan_id\"))\n \n # With typed response\n print(socket.fullscans.metadata(\"org_slug\", \"full_scan_id\", use_types=True))\n\n**PARAMETERS:**\n\n- **org_slug (str)** - The organization name\n- **full_scan_id (str)** - The ID of the full scan\n- **use_types (bool)** - Whether to return typed response objects (default: False)\n\nfullscans.gfm(org_slug, before, after)\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\nGet GitHub Flavored Markdown diff between two full scans.\n\n**Usage:**\n\n.. code-block:: python\n\n from socketdev import socketdev\n socket = socketdev(token=\"REPLACE_ME\")\n print(socket.fullscans.gfm(\"org_slug\", \"before_scan_id\", \"after_scan_id\"))\n\n**PARAMETERS:**\n\n- **org_slug (str)** - The organization name\n- **before (str)** - The base full scan ID\n- **after (str)** - The comparison full scan ID\n\nbasics.get_config(org_slug, use_types)\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\nGet Socket Basics configuration for an organization. Socket Basics is a CI/CD security scanning suite that includes SAST scanning, secret detection, container security, and dependency analysis.\n\n**Usage:**\n\n.. code-block:: python\n\n from socketdev import socketdev\n socket = socketdev(token=\"REPLACE_ME\")\n \n # Basic usage - returns dictionary\n config = socket.basics.get_config(\"org_slug\")\n print(f\"Python SAST enabled: {config['pythonSastEnabled']}\")\n print(f\"Secret scanning enabled: {config['secretScanningEnabled']}\")\n \n # Using typed response objects\n from socketdev.basics import SocketBasicsConfig, SocketBasicsResponse\n response = socket.basics.get_config(\"org_slug\", use_types=True)\n if response.success and response.config:\n print(f\"JavaScript SAST: {response.config.javascriptSastEnabled}\")\n print(f\"Trivy scanning: {response.config.trivyImageEnabled}\")\n\n**PARAMETERS:**\n\n- **org_slug (str)** - The organization name\n- **use_types (bool)** - Whether to return typed response objects (default: False)\n\n**Socket Basics Features:**\n\n- **Python SAST** - Static analysis for Python code\n- **Go SAST** - Static analysis for Go code \n- **JavaScript SAST** - Static analysis for JavaScript/TypeScript code\n- **Secret Scanning** - Detection of hardcoded secrets and credentials\n- **Trivy Image Scanning** - Vulnerability scanning for Docker images\n- **Trivy Dockerfile Scanning** - Vulnerability scanning for Dockerfiles\n- **Socket SCA** - Supply chain analysis for dependencies\n- **Socket Scanning** - General dependency security scanning\n- **Additional Parameters** - Custom configuration options\n\ndependencies.get(limit, offset)\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\nRetrieve the dependencies for the organization associated with the API Key\n\n**Usage:**\n\n.. code-block:: python\n\n from socketdev import socketdev\n socket = socketdev(token=\"REPLACE_ME\")\n print(socket.dependencies.get(10, 0))\n\n**PARAMETERS:**\n\n- **limit (int)** - The maximum number of dependencies to return\n- **offset (int)** - The index to start from for pulling the dependencies\n\ndependencies.post(files, params)\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\nRetrieve the dependencies for the organization associated with the API Key\n\n**Usage:**\n\n.. code-block:: python\n\n from socketdev import socketdev\n socket = socketdev(token=\"REPLACE_ME\")\n file_names = [\n \"path/to/package.json\"\n ]\n params = {\n \"repository\": \"username/repo-name\",\n \"branch\": \"dependency-branch\"\n }\n print(socket.dependencies.post(file_names, params))\n\n**PARAMETERS:**\n\n- **files (list)** - The file paths of the manifest files to import into the Dependency API.\n- **params (dict)** - A dictionary of the `repository` and `branch` options for the API\n\nrepos.get()\n\"\"\"\"\"\"\"\"\"\"\"\nGet a list of information about the tracked repositories\n\n**Usage:**\n\n.. code-block:: python\n\n from socketdev import socketdev\n socket = socketdev(token=\"REPLACE_ME\")\n print(socket.repos.get(sort=\"name\", direction=\"asc\", per_page=100, page=1))\n\n**PARAMETERS:**\n\n- **sort** - The key to sort on from the repo properties. Defaults to `created_at`\n- **direction** - Can be `desc` or `asc`. Defaults to `desc`\n- **per_page** - Integer between 1 to 100. Defaults to `10`\n- **page** - Integer page number defaults to `1`. If there are no more results it will be `0`\n\nrepos.post()\n\"\"\"\"\"\"\"\"\"\"\"\"\nCreate a new Socket Repository\n\n**Usage:**\n\n.. code-block:: python\n\n from socketdev import socketdev\n socket = socketdev(token=\"REPLACE_ME\")\n print(\n socket.repos.post(\n name=\"example\",\n description=\"Info about Repo\",\n homepage=\"http://homepage\",\n visibility='public',\n archived=False,\n default_branch='not-main'\n )\n )\n\n**PARAMETERS:**\n\n- **name(required)** - The name of the Socket Repository\n- **description(optional)** - String description of the repository\n- **homepage(optional)** - URL of the homepage of the\n- **visibility(optional)** - Can be `public` or `private` and defaults to `private`\n- **archived(optional)** - Boolean on if the repository is archived. Defaults to `False`\n- **default_branch(optional)** - String name of the default branch for the repository. Defaults to `main`\n\nrepos.repo()\n\"\"\"\"\"\"\"\"\"\"\"\"\nGet a list of information about the tracked repositories\n\n**Usage:**\n\n.. code-block:: python\n\n from socketdev import socketdev\n socket = socketdev(token=\"REPLACE_ME\")\n print(socket.repos.repo(org_slug=\"example\", repo_name=\"example-repo\"))\n\nrepos.update()\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\nUpdate an existing Socket Repository\n\n**Usage:**\n\n.. code-block:: python\n\n from socketdev import socketdev\n socket = socketdev(token=\"REPLACE_ME\")\n print(\n socket.repos.update(\n org_slug=\"example-org\",\n repo_name=\"example\",\n name=\"new-name-example\",\n description=\"Info about Repo\",\n homepage=\"http://homepage\",\n visibility='public',\n archived=False,\n default_branch='not-main'\n )\n )\n\n- **name(optional)** - The name of the Socket Repository\n- **description(optional)** - String description of the repository\n- **homepage(optional)** - URL of the homepage of the\n- **visibility(optional)** - Can be `public` or `private` and defaults to `private`\n- **archived(optional)** - Boolean on if the repository is archived. Defaults to `False`\n- **default_branch(optional)** - String name of the default branch for the repository. Defaults to `main`\n\nrepos.delete()\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\nDelete a Socket Repository\n\n**Usage:**\n\n.. code-block:: python\n\n from socketdev import socketdev\n socket = socketdev(token=\"REPLACE_ME\")\n print(socket.repos.delete(org_slug=\"example\", repo_name=\"example-repo\"))\n\n**PARAMETERS:**\n\n- **org_slug** - Name of the Socket Org\n- **repo_name** - The name of the Socket Repository to delete\n\norg.get()\n\"\"\"\"\"\"\"\"\"\nRetrieve the Socket.dev org information\n\n**Usage:**\n\n.. code-block:: python\n\n from socketdev import socketdev\n socket = socketdev(token=\"REPLACE_ME\")\n print(socket.org.get())\n\nquota.get()\n\"\"\"\"\"\"\"\"\"\"\"\nRetrieve the the current quota available for your API Key\n\n**Usage:**\n\n.. code-block:: python\n\n from socketdev import socketdev\n socket = socketdev(token=\"REPLACE_ME\")\n print(socket.quota.get())\n\nsettings.get()\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\nRetrieve the Socket Organization Settings\n\n**Usage:**\n\n.. code-block:: python\n\n from socketdev import socketdev\n socket = socketdev(token=\"REPLACE_ME\")\n print(socket.settings.get())\n\nreport.supported()\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\nRetrieve the supported types of manifest files for creating a report\n\n**Usage:**\n\n.. code-block:: python\n\n from socketdev import socketdev\n socket = socketdev(token=\"REPLACE_ME\")\n print(socket.report.supported())\n\nDeprecated: report.list()\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\nRetrieve the list of all reports for the organization\n\n**Usage:**\n\n.. code-block:: python\n\n from socketdev import socketdev\n socket = socketdev(token=\"REPLACE_ME\")\n print(socket.report.list(from_time=1726183485))\n\n**PARAMETERS:**\n\n- **from_time (int)** - The Unix Timestamp in Seconds to limit the reports pulled\n\nDeprecated: report.delete(report_id)\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\nDelete the specified report\n\n**Usage:**\n\n.. code-block:: python\n\n from socketdev import socketdev\n socket = socketdev(token=\"REPLACE_ME\")\n print(socket.report.delete(\"report-id\"))\n\n**PARAMETERS:**\n\n- **report_id (str)** - The report ID of the report to delete\n\nDeprecated: report.view(report_id)\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\nRetrieve the information for a Project Health Report\n\n**Usage:**\n\n.. code-block:: python\n\n from socketdev import socketdev\n socket = socketdev(token=\"REPLACE_ME\")\n print(socket.report.view(\"report_id\"))\n\n**PARAMETERS:**\n\n- **report_id (str)** - The report ID of the report to view\n\nDeprecated: report.create(files)\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\nCreate a new project health report with the provided files\n\n**Usage:**\n\n.. code-block:: python\n\n from socketdev import socketdev\n socket = socketdev(token=\"REPLACE_ME\")\n files = [\n \"/path/to/manifest/package.json\"\n ]\n print(socket.report.create(files))\n\n**PARAMETERS:**\n\n- **files (list)** - List of file paths of manifest files\n\nDeprecated: repositories.get()\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\nGet a list of information about the tracked repositories\n\n**Usage:**\n\n.. code-block:: python\n\n from socketdev import socketdev\n socket = socketdev(token=\"REPLACE_ME\")\n print(socket.repositories.get())\n\nDeprecated: sbom.view(report_id)\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\nRetrieve the information for a SBOM Report\n\n**Usage:**\n\n.. code-block:: python\n\n from socketdev import socketdev\n socket = socketdev(token=\"REPLACE_ME\")\n print(socket.sbom.view(\"report_id\"))\n\nDeprecated: npm.issues(package, version)\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\nRetrieve the Issues associated with a package and version.\n\n**Usage:**\n\n.. code-block:: python\n\n from socketdev import socketdev\n socket = socketdev(token=\"REPLACE_ME\")\n print(socket.npm.issues(\"hardhat-gas-report\", \"1.1.25\"))\n\n**PARAMETERS:**\n\n- **package (str)** - The name of the NPM package.\n- **version (str)** - The version of the NPM Package.\n\nDeprecated: npm.score(package, version)\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\nRetrieve the Issues associated with a package and version.\n\n**Usage:**\n\n.. code-block:: python\n\n from socketdev import socketdev\n socket = socketdev(token=\"REPLACE_ME\")\n print(socket.npm.score(\"hardhat-gas-report\", \"1.1.25\"))\n\n**PARAMETERS:**\n\n- **package (str)** - The name of the NPM package.\n- **version (str)** - The version of the NPM Package.\n\nlabels.list(org_slug)\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\nList all repository labels for the given organization.\n\n**Usage:**\n\n.. code-block:: python\n\n from socketdev import socketdev\n\n socket = socketdev(token=\"REPLACE_ME\")\n print(socket.labels.list(\"org_slug\"))\n\n**PARAMETERS:**\n\n- **org_slug (str)** \u2013 The organization name\n\nlabels.post(org_slug, label_name)\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\nCreate a new label in the organization.\n\n**Usage:**\n\n.. code-block:: python\n\n print(socket.labels.post(\"org_slug\", \"my-label\"))\n\n**PARAMETERS:**\n\n- **org_slug (str)** \u2013 The organization name\n- **label_name (str)** \u2013 Name of the label to create\n\nlabels.get(org_slug, label_id)\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\nRetrieve a single label by its ID.\n\n**Usage:**\n\n.. code-block:: python\n\n print(socket.labels.get(\"org_slug\", \"label_id\"))\n\n**PARAMETERS:**\n\n- **org_slug (str)** \u2013 The organization name\n- **label_id (str)** \u2013 The label ID\n\nlabels.delete(org_slug, label_id)\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\nDelete a label by ID.\n\n**Usage:**\n\n.. code-block:: python\n\n print(socket.labels.delete(\"org_slug\", \"label_id\"))\n\n**PARAMETERS:**\n\n- **org_slug (str)** \u2013 The organization name\n- **label_id (str)** \u2013 The label ID\n\nlabels.associate(org_slug, label_id, repo_id)\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\nAssociate a label with a repository.\n\n**Usage:**\n\n.. code-block:: python\n\n print(socket.labels.associate(\"org_slug\", 1234, \"repo_id\"))\n\n**PARAMETERS:**\n\n- **org_slug (str)** \u2013 The organization name\n- **label_id (int)** \u2013 The label ID\n- **repo_id (str)** \u2013 The repository ID\n\nlabels.disassociate(org_slug, label_id, repo_id)\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\nDisassociate a label from a repository.\n\n**Usage:**\n\n.. code-block:: python\n\n print(socket.labels.disassociate(\"org_slug\", 1234, \"repo_id\"))\n\n**PARAMETERS:**\n\n- **org_slug (str)** \u2013 The organization name\n- **label_id (int)** \u2013 The label ID\n- **repo_id (str)** \u2013 The repository ID\n\nlabels.setting.get(org_slug, label_id, setting_key)\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\nGet a setting for a specific label.\n\n**Usage:**\n\n.. code-block:: python\n\n print(socket.labels.setting.get(\"org_slug\", 1234, \"severity\"))\n\n**PARAMETERS:**\n\n- **org_slug (str)** \u2013 The organization name\n- **label_id (int)** \u2013 The label ID\n- **setting_key (str)** \u2013 The key of the setting\n\nlabels.setting.put(org_slug, label_id, settings)\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\nUpdate settings for a specific label.\n\n**Usage:**\n\n.. code-block:: python\n\n settings = {\"severity\": {\"value\": {\"level\": \"high\"}}}\n print(socket.labels.setting.put(\"org_slug\", 1234, settings))\n\n**PARAMETERS:**\n\n- **org_slug (str)** \u2013 The organization name\n- **label_id (int)** \u2013 The label ID\n- **settings (dict)** \u2013 A dictionary of label settings\n\nlabels.setting.delete(org_slug, label_id, setting_key)\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\nDelete a setting from a label.\n\n**Usage:**\n\n.. code-block:: python\n\n print(socket.labels.setting.delete(\"org_slug\", 1234, \"severity\"))\n\n**PARAMETERS:**\n\n- **org_slug (str)** \u2013 The organization name\n- **label_id (int)** \u2013 The label ID\n- **setting_key (str)** \u2013 The setting key to delete\n\nhistorical.list(org_slug, query_params=None)\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\nList historical alerts for an organization.\n\n**Usage:**\n\n.. code-block:: python\n\n print(socket.historical.list(\"org_slug\", {\"repo\": \"example-repo\"}))\n\n**PARAMETERS:**\n\n- **org_slug (str)** \u2013 The organization name\n- **query_params (dict, optional)** \u2013 Optional query parameters\n\nhistorical.trend(org_slug, query_params=None)\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\nRetrieve alert trend data across time.\n\n**Usage:**\n\n.. code-block:: python\n\n print(socket.historical.trend(\"org_slug\", {\"range\": \"30d\"}))\n\n**PARAMETERS:**\n\n- **org_slug (str)** \u2013 The organization name\n- **query_params (dict, optional)** \u2013 Optional query parameters\n\nhistorical.snapshots.create(org_slug)\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\nCreate a new snapshot of historical data.\n\n**Usage:**\n\n.. code-block:: python\n\n print(socket.historical.snapshots.create(\"org_slug\"))\n\n**PARAMETERS:**\n\n- **org_slug (str)** \u2013 The organization name\n\nhistorical.snapshots.list(org_slug, query_params=None)\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\nList all historical snapshots for an organization.\n\n**Usage:**\n\n.. code-block:: python\n\n print(socket.historical.snapshots.list(\"org_slug\", {\"repo\": \"example-repo\"}))\n\n**PARAMETERS:**\n\n- **org_slug (str)** \u2013 The organization name\n- **query_params (dict, optional)** \u2013 Optional query parameters\n\ndiffscans.list(org_slug, params=None)\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\nList all diff scans for an organization.\n\n**Usage:**\n\n.. code-block:: python\n\n from socketdev import socketdev\n socket = socketdev(token=\"REPLACE_ME\")\n print(socket.diffscans.list(\"org_slug\", {\"limit\": 10, \"offset\": 0}))\n\n**PARAMETERS:**\n\n- **org_slug (str)** \u2013 The organization name\n- **params (dict, optional)** \u2013 Optional query parameters for filtering\n\ndiffscans.get(org_slug, diff_scan_id)\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\nFetch a specific diff scan by ID.\n\n**Usage:**\n\n.. code-block:: python\n\n from socketdev import socketdev\n socket = socketdev(token=\"REPLACE_ME\")\n print(socket.diffscans.get(\"org_slug\", \"diff_scan_id\"))\n\n**PARAMETERS:**\n\n- **org_slug (str)** \u2013 The organization name\n- **diff_scan_id (str)** \u2013 The ID of the diff scan to retrieve\n\ndiffscans.create_from_ids(org_slug, params)\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\nCreate a diff scan from two full scan IDs.\n\n**Usage:**\n\n.. code-block:: python\n\n from socketdev import socketdev\n socket = socketdev(token=\"REPLACE_ME\")\n params = {\n \"before\": \"full_scan_id_1\",\n \"after\": \"full_scan_id_2\",\n \"description\": \"Compare two scans\"\n }\n print(socket.diffscans.create_from_ids(\"org_slug\", params))\n\n**PARAMETERS:**\n\n- **org_slug (str)** \u2013 The organization name\n- **params (dict)** \u2013 Parameters including before and after scan IDs\n\ndiffscans.create_from_repo(org_slug, repo_slug, files, params=None)\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\nCreate a diff scan from repository files.\n\n**Usage:**\n\n.. code-block:: python\n\n from socketdev import socketdev\n socket = socketdev(token=\"REPLACE_ME\")\n files = [\"/path/to/package.json\"]\n params = {\"branch\": \"main\", \"commit\": \"abc123\"}\n print(socket.diffscans.create_from_repo(\"org_slug\", \"repo_slug\", files, params))\n\n**PARAMETERS:**\n\n- **org_slug (str)** \u2013 The organization name\n- **repo_slug (str)** \u2013 The repository name\n- **files (list)** \u2013 List of file paths to scan\n- **params (dict, optional)** \u2013 Optional parameters for the scan\n\ndiffscans.gfm(org_slug, diff_scan_id)\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\nGet GitHub Flavored Markdown comments for a diff scan.\n\n**Usage:**\n\n.. code-block:: python\n\n from socketdev import socketdev\n socket = socketdev(token=\"REPLACE_ME\")\n print(socket.diffscans.gfm(\"org_slug\", \"diff_scan_id\"))\n\n**PARAMETERS:**\n\n- **org_slug (str)** \u2013 The organization name\n- **diff_scan_id (str)** \u2013 The ID of the diff scan\n\ndiffscans.delete(org_slug, diff_scan_id)\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\nDelete a specific diff scan.\n\n**Usage:**\n\n.. code-block:: python\n\n from socketdev import socketdev\n socket = socketdev(token=\"REPLACE_ME\")\n print(socket.diffscans.delete(\"org_slug\", \"diff_scan_id\"))\n\n**PARAMETERS:**\n\n- **org_slug (str)** \u2013 The organization name\n- **diff_scan_id (str)** \u2013 The ID of the diff scan to delete\n\nthreatfeed.get(org_slug=None, \\*\\*kwargs)\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\nGet threat feed items for an organization or globally.\n\n**Usage:**\n\n.. code-block:: python\n\n from socketdev import socketdev\n socket = socketdev(token=\"REPLACE_ME\")\n \n # Get org-specific threat feed\n print(socket.threatfeed.get(\"org_slug\", per_page=50, sort=\"created_at\"))\n \n # Get global threat feed (deprecated)\n print(socket.threatfeed.get())\n\n**PARAMETERS:**\n\n- **org_slug (str, optional)** \u2013 The organization name (recommended for new implementations)\n- **kwargs** \u2013 Query parameters like per_page, page_cursor, sort, etc.\n\napitokens.create(org_slug, \\*\\*kwargs)\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\nCreate a new API token for an organization.\n\n**Usage:**\n\n.. code-block:: python\n\n from socketdev import socketdev\n socket = socketdev(token=\"REPLACE_ME\")\n token_config = {\n \"name\": \"My API Token\",\n \"permissions\": [\"read\", \"write\"],\n \"expires_at\": \"2024-12-31T23:59:59Z\"\n }\n print(socket.apitokens.create(\"org_slug\", **token_config))\n\n**PARAMETERS:**\n\n- **org_slug (str)** \u2013 The organization name\n- **kwargs** \u2013 Token configuration parameters\n\napitokens.update(org_slug, \\*\\*kwargs)\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\nUpdate an existing API token.\n\n**Usage:**\n\n.. code-block:: python\n\n from socketdev import socketdev\n socket = socketdev(token=\"REPLACE_ME\")\n update_params = {\n \"token_id\": \"token_123\",\n \"name\": \"Updated Token Name\",\n \"permissions\": [\"read\"]\n }\n print(socket.apitokens.update(\"org_slug\", **update_params))\n\n**PARAMETERS:**\n\n- **org_slug (str)** \u2013 The organization name\n- **kwargs** \u2013 Token update parameters\n\nauditlog.get(org_slug, \\*\\*kwargs)\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\nGet audit log entries for an organization.\n\n**Usage:**\n\n.. code-block:: python\n\n from socketdev import socketdev\n socket = socketdev(token=\"REPLACE_ME\")\n print(socket.auditlog.get(\"org_slug\", limit=100, cursor=\"abc123\"))\n\n**PARAMETERS:**\n\n- **org_slug (str)** \u2013 The organization name\n- **kwargs** \u2013 Query parameters like limit, cursor, etc.\n\nanalytics.get_org(filter, \\*\\*kwargs)\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\nGet organization analytics (deprecated - use Historical module instead).\n\n**Usage:**\n\n.. code-block:: python\n\n from socketdev import socketdev\n socket = socketdev(token=\"REPLACE_ME\")\n # DEPRECATED: Use socket.historical.list() or socket.historical.trend() instead\n print(socket.analytics.get_org(\"alerts\", start_date=\"2024-01-01\"))\n\n**PARAMETERS:**\n\n- **filter (str)** \u2013 Analytics filter type\n- **kwargs** \u2013 Additional query parameters\n\nanalytics.get_repo(name, filter, \\*\\*kwargs)\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\nGet repository analytics (deprecated - use Historical module instead).\n\n**Usage:**\n\n.. code-block:: python\n\n from socketdev import socketdev\n socket = socketdev(token=\"REPLACE_ME\")\n # DEPRECATED: Use socket.historical.list() or socket.historical.trend() instead\n print(socket.analytics.get_repo(\"repo_name\", \"alerts\", start_date=\"2024-01-01\"))\n\n**PARAMETERS:**\n\n- **name (str)** \u2013 Repository name\n- **filter (str)** \u2013 Analytics filter type\n- **kwargs** \u2013 Additional query parameters\n\nalerttypes.get(alert_types=None, language=\"en-US\", \\*\\*kwargs)\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\nGet alert types metadata.\n\n**Usage:**\n\n.. code-block:: python\n\n from socketdev import socketdev\n socket = socketdev(token=\"REPLACE_ME\")\n \n # Get metadata for specific alert types\n alert_list = [\"supply_chain_risk\", \"license_risk\"]\n print(socket.alerttypes.get(alert_list, language=\"en-US\"))\n \n # Get all alert types metadata\n print(socket.alerttypes.get())\n\n**PARAMETERS:**\n\n- **alert_types (list, optional)** \u2013 List of alert type strings to get metadata for\n- **language (str)** \u2013 Language for alert metadata (default: en-US)\n- **kwargs** \u2013 Additional query parameters\n\ntriage.list_alert_triage(org_slug, query_params=None)\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\nGet list of triaged alerts for an organization.\n\n**Usage:**\n\n.. code-block:: python\n\n from socketdev import socketdev\n socket = socketdev(token=\"REPLACE_ME\")\n query_params = {\"status\": \"triaged\", \"limit\": 50}\n print(socket.triage.list_alert_triage(\"org_slug\", query_params))\n\n**PARAMETERS:**\n\n- **org_slug (str)** \u2013 The organization name\n- **query_params (dict, optional)** \u2013 Optional query parameters for filtering\n\nopenapi.get()\n\"\"\"\"\"\"\"\"\"\"\"\"\"\nRetrieve the OpenAPI specification for the Socket API.\n\n**Usage:**\n\n.. code-block:: python\n\n from socketdev import socketdev\n socket = socketdev(token=\"REPLACE_ME\")\n print(socket.openapi.get())\n\n**PARAMETERS:**\n\nNone required.\n",
"bugtrack_url": null,
"license": "MIT License\n \n Copyright (c) 2025 Socket Inc.\n \n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n \n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.",
"summary": "Socket Security Python SDK",
"version": "3.0.14",
"project_urls": {
"Homepage": "https://github.com/socketdev/socketdev"
},
"split_keywords": [
"oss",
" sca",
" sdk",
" security",
" socket.dev",
" socketsecurity"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "80acaa54c296ecfff89d32974396517eb67bec17737cb863ef1f41bfe1ef83f1",
"md5": "64b017730d180b61dc508f939c2f268b",
"sha256": "189d3e717f774b402eee55d933ddc13e41b52fc9e6410ab4362d5198ff57c723"
},
"downloads": -1,
"filename": "socketdev-3.0.14-py3-none-any.whl",
"has_sig": false,
"md5_digest": "64b017730d180b61dc508f939c2f268b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 57338,
"upload_time": "2025-10-17T01:53:02",
"upload_time_iso_8601": "2025-10-17T01:53:02.356072Z",
"url": "https://files.pythonhosted.org/packages/80/ac/aa54c296ecfff89d32974396517eb67bec17737cb863ef1f41bfe1ef83f1/socketdev-3.0.14-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "71e8362072e5a8b94aa550d91ec0d7ef9ee63120284ceaedc9c8e1889a32abcf",
"md5": "3a4e0d54691cc31054014827019cf31b",
"sha256": "bcd1c548ac93f91ecc504f8a42be0ad59e457baa9ab17d02fcd2ccd9f10ace5e"
},
"downloads": -1,
"filename": "socketdev-3.0.14.tar.gz",
"has_sig": false,
"md5_digest": "3a4e0d54691cc31054014827019cf31b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 131919,
"upload_time": "2025-10-17T01:53:04",
"upload_time_iso_8601": "2025-10-17T01:53:04.019482Z",
"url": "https://files.pythonhosted.org/packages/71/e8/362072e5a8b94aa550d91ec0d7ef9ee63120284ceaedc9c8e1889a32abcf/socketdev-3.0.14.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-10-17 01:53:04",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "socketdev",
"github_project": "socketdev",
"github_not_found": true,
"lcname": "socketdev"
}