Skip to content

Commit 9135c20

Browse files
committed
Fixes for basics endpoint
1 parent ab3c972 commit 9135c20

File tree

3 files changed

+42
-2
lines changed

3 files changed

+42
-2
lines changed

README.rst

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,46 @@ Get GitHub Flavored Markdown diff between two full scans.
304304
- **before (str)** - The base full scan ID
305305
- **after (str)** - The comparison full scan ID
306306

307+
basics.get_config(org_slug, use_types)
308+
""""""""""""""""""""""""""""""""""""""
309+
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.
310+
311+
**Usage:**
312+
313+
.. code-block:: python
314+
315+
from socketdev import socketdev
316+
socket = socketdev(token="REPLACE_ME")
317+
318+
# Basic usage - returns dictionary
319+
config = socket.basics.get_config("org_slug")
320+
print(f"Python SAST enabled: {config['pythonSastEnabled']}")
321+
print(f"Secret scanning enabled: {config['secretScanningEnabled']}")
322+
323+
# Using typed response objects
324+
from socketdev.basics import SocketBasicsConfig, SocketBasicsResponse
325+
response = socket.basics.get_config("org_slug", use_types=True)
326+
if response.success and response.config:
327+
print(f"JavaScript SAST: {response.config.javascriptSastEnabled}")
328+
print(f"Trivy scanning: {response.config.trivyImageEnabled}")
329+
330+
**PARAMETERS:**
331+
332+
- **org_slug (str)** - The organization name
333+
- **use_types (bool)** - Whether to return typed response objects (default: False)
334+
335+
**Socket Basics Features:**
336+
337+
- **Python SAST** - Static analysis for Python code
338+
- **Go SAST** - Static analysis for Go code
339+
- **JavaScript SAST** - Static analysis for JavaScript/TypeScript code
340+
- **Secret Scanning** - Detection of hardcoded secrets and credentials
341+
- **Trivy Image Scanning** - Vulnerability scanning for Docker images
342+
- **Trivy Dockerfile Scanning** - Vulnerability scanning for Dockerfiles
343+
- **Socket SCA** - Supply chain analysis for dependencies
344+
- **Socket Scanning** - General dependency security scanning
345+
- **Additional Parameters** - Custom configuration options
346+
307347
dependencies.get(limit, offset)
308348
"""""""""""""""""""""""""""""""
309349
Retrieve the dependencies for the organization associated with the API Key

pyproject.toml

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

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

socketdev/version.py

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

0 commit comments

Comments
 (0)