socketsecurity 2.2.2__tar.gz → 2.2.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {socketsecurity-2.2.2 → socketsecurity-2.2.5}/Dockerfile +1 -1
- socketsecurity-2.2.5/Makefile +62 -0
- {socketsecurity-2.2.2 → socketsecurity-2.2.5}/PKG-INFO +11 -13
- {socketsecurity-2.2.2 → socketsecurity-2.2.5}/README.md +8 -10
- {socketsecurity-2.2.2 → socketsecurity-2.2.5}/pyproject.toml +3 -3
- {socketsecurity-2.2.2 → socketsecurity-2.2.5}/scripts/deploy-test-docker.sh +1 -1
- {socketsecurity-2.2.2 → socketsecurity-2.2.5}/socketsecurity/__init__.py +1 -1
- {socketsecurity-2.2.2 → socketsecurity-2.2.5}/socketsecurity/core/messages.py +1 -1
- socketsecurity-2.2.5/uv.lock +1388 -0
- socketsecurity-2.2.2/Makefile +0 -69
- socketsecurity-2.2.2/requirements-dev.lock +0 -73
- socketsecurity-2.2.2/requirements-dev.txt +0 -73
- socketsecurity-2.2.2/requirements.lock +0 -71
- socketsecurity-2.2.2/requirements.txt +0 -71
- {socketsecurity-2.2.2 → socketsecurity-2.2.5}/.github/CODEOWNERS +0 -0
- {socketsecurity-2.2.2 → socketsecurity-2.2.5}/.github/PULL_REQUEST_TEMPLATE/bug-fix.md +0 -0
- {socketsecurity-2.2.2 → socketsecurity-2.2.5}/.github/PULL_REQUEST_TEMPLATE/feature.md +0 -0
- {socketsecurity-2.2.2 → socketsecurity-2.2.5}/.github/PULL_REQUEST_TEMPLATE/improvement.md +0 -0
- {socketsecurity-2.2.2 → socketsecurity-2.2.5}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {socketsecurity-2.2.2 → socketsecurity-2.2.5}/.github/workflows/docker-stable.yml +0 -0
- {socketsecurity-2.2.2 → socketsecurity-2.2.5}/.github/workflows/pr-preview.yml +0 -0
- {socketsecurity-2.2.2 → socketsecurity-2.2.5}/.github/workflows/release.yml +0 -0
- {socketsecurity-2.2.2 → socketsecurity-2.2.5}/.github/workflows/version-check.yml +0 -0
- {socketsecurity-2.2.2 → socketsecurity-2.2.5}/.gitignore +0 -0
- {socketsecurity-2.2.2 → socketsecurity-2.2.5}/.hooks/sync_version.py +0 -0
- {socketsecurity-2.2.2 → socketsecurity-2.2.5}/.pre-commit-config.yaml +0 -0
- {socketsecurity-2.2.2 → socketsecurity-2.2.5}/.python-version +0 -0
- {socketsecurity-2.2.2 → socketsecurity-2.2.5}/LICENSE +0 -0
- {socketsecurity-2.2.2 → socketsecurity-2.2.5}/Pipfile.lock +0 -0
- {socketsecurity-2.2.2 → socketsecurity-2.2.5}/docs/README.md +0 -0
- {socketsecurity-2.2.2 → socketsecurity-2.2.5}/pytest.ini +0 -0
- {socketsecurity-2.2.2 → socketsecurity-2.2.5}/scripts/build_container.sh +0 -0
- {socketsecurity-2.2.2 → socketsecurity-2.2.5}/scripts/deploy-test-pypi.sh +0 -0
- {socketsecurity-2.2.2 → socketsecurity-2.2.5}/scripts/run.sh +0 -0
- {socketsecurity-2.2.2 → socketsecurity-2.2.5}/socketsecurity/config.py +0 -0
- {socketsecurity-2.2.2 → socketsecurity-2.2.5}/socketsecurity/core/__init__.py +0 -0
- {socketsecurity-2.2.2 → socketsecurity-2.2.5}/socketsecurity/core/classes.py +0 -0
- {socketsecurity-2.2.2 → socketsecurity-2.2.5}/socketsecurity/core/cli_client.py +0 -0
- {socketsecurity-2.2.2 → socketsecurity-2.2.5}/socketsecurity/core/exceptions.py +0 -0
- {socketsecurity-2.2.2 → socketsecurity-2.2.5}/socketsecurity/core/git_interface.py +0 -0
- {socketsecurity-2.2.2 → socketsecurity-2.2.5}/socketsecurity/core/helper/__init__.py +0 -0
- {socketsecurity-2.2.2 → socketsecurity-2.2.5}/socketsecurity/core/lazy_file_loader.py +0 -0
- {socketsecurity-2.2.2 → socketsecurity-2.2.5}/socketsecurity/core/logging.py +0 -0
- {socketsecurity-2.2.2 → socketsecurity-2.2.5}/socketsecurity/core/resource_utils.py +0 -0
- {socketsecurity-2.2.2 → socketsecurity-2.2.5}/socketsecurity/core/scm/__init__.py +0 -0
- {socketsecurity-2.2.2 → socketsecurity-2.2.5}/socketsecurity/core/scm/base.py +0 -0
- {socketsecurity-2.2.2 → socketsecurity-2.2.5}/socketsecurity/core/scm/client.py +0 -0
- {socketsecurity-2.2.2 → socketsecurity-2.2.5}/socketsecurity/core/scm/github.py +0 -0
- {socketsecurity-2.2.2 → socketsecurity-2.2.5}/socketsecurity/core/scm/gitlab.py +0 -0
- {socketsecurity-2.2.2 → socketsecurity-2.2.5}/socketsecurity/core/scm_comments.py +0 -0
- {socketsecurity-2.2.2 → socketsecurity-2.2.5}/socketsecurity/core/socket_config.py +0 -0
- {socketsecurity-2.2.2 → socketsecurity-2.2.5}/socketsecurity/core/utils.py +0 -0
- {socketsecurity-2.2.2 → socketsecurity-2.2.5}/socketsecurity/output.py +0 -0
- {socketsecurity-2.2.2 → socketsecurity-2.2.5}/socketsecurity/plugins/__init__.py +0 -0
- {socketsecurity-2.2.2 → socketsecurity-2.2.5}/socketsecurity/plugins/base.py +0 -0
- {socketsecurity-2.2.2 → socketsecurity-2.2.5}/socketsecurity/plugins/jira.py +0 -0
- {socketsecurity-2.2.2 → socketsecurity-2.2.5}/socketsecurity/plugins/manager.py +0 -0
- {socketsecurity-2.2.2 → socketsecurity-2.2.5}/socketsecurity/plugins/slack.py +0 -0
- {socketsecurity-2.2.2 → socketsecurity-2.2.5}/socketsecurity/plugins/teams.py +0 -0
- {socketsecurity-2.2.2 → socketsecurity-2.2.5}/socketsecurity/plugins/webhook.py +0 -0
- {socketsecurity-2.2.2 → socketsecurity-2.2.5}/socketsecurity/socketcli.py +0 -0
- {socketsecurity-2.2.2 → socketsecurity-2.2.5}/tests/__init__.py +0 -0
- {socketsecurity-2.2.2 → socketsecurity-2.2.5}/tests/core/conftest.py +0 -0
- {socketsecurity-2.2.2 → socketsecurity-2.2.5}/tests/core/create_diff_input.json +0 -0
- {socketsecurity-2.2.2 → socketsecurity-2.2.5}/tests/core/test_diff_generation.py +0 -0
- {socketsecurity-2.2.2 → socketsecurity-2.2.5}/tests/core/test_package_and_alerts.py +0 -0
- {socketsecurity-2.2.2 → socketsecurity-2.2.5}/tests/core/test_sdk_methods.py +0 -0
- {socketsecurity-2.2.2 → socketsecurity-2.2.5}/tests/core/test_supporting_methods.py +0 -0
- {socketsecurity-2.2.2 → socketsecurity-2.2.5}/tests/data/fullscans/create_response.json +0 -0
- {socketsecurity-2.2.2 → socketsecurity-2.2.5}/tests/data/fullscans/diff/stream_diff.json +0 -0
- {socketsecurity-2.2.2 → socketsecurity-2.2.5}/tests/data/fullscans/diff/stream_diff_full.json +0 -0
- {socketsecurity-2.2.2 → socketsecurity-2.2.5}/tests/data/fullscans/head_scan/metadata.json +0 -0
- {socketsecurity-2.2.2 → socketsecurity-2.2.5}/tests/data/fullscans/head_scan/stream_scan.json +0 -0
- {socketsecurity-2.2.2 → socketsecurity-2.2.5}/tests/data/fullscans/head_scan/stream_scan_full.json +0 -0
- {socketsecurity-2.2.2 → socketsecurity-2.2.5}/tests/data/fullscans/new_scan/metadata.json +0 -0
- {socketsecurity-2.2.2 → socketsecurity-2.2.5}/tests/data/fullscans/new_scan/stream_scan.json +0 -0
- {socketsecurity-2.2.2 → socketsecurity-2.2.5}/tests/data/repos/repo_info_error.json +0 -0
- {socketsecurity-2.2.2 → socketsecurity-2.2.5}/tests/data/repos/repo_info_no_head.json +0 -0
- {socketsecurity-2.2.2 → socketsecurity-2.2.5}/tests/data/repos/repo_info_success.json +0 -0
- {socketsecurity-2.2.2 → socketsecurity-2.2.5}/tests/data/settings/security-policy.json +0 -0
- {socketsecurity-2.2.2 → socketsecurity-2.2.5}/tests/unit/__init__.py +0 -0
- {socketsecurity-2.2.2 → socketsecurity-2.2.5}/tests/unit/test_cli_config.py +0 -0
- {socketsecurity-2.2.2 → socketsecurity-2.2.5}/tests/unit/test_client.py +0 -0
- {socketsecurity-2.2.2 → socketsecurity-2.2.5}/tests/unit/test_config.py +0 -0
- {socketsecurity-2.2.2 → socketsecurity-2.2.5}/tests/unit/test_gitlab_auth.py +0 -0
- {socketsecurity-2.2.2 → socketsecurity-2.2.5}/tests/unit/test_gitlab_auth_fallback.py +0 -0
- {socketsecurity-2.2.2 → socketsecurity-2.2.5}/tests/unit/test_output.py +0 -0
- {socketsecurity-2.2.2 → socketsecurity-2.2.5}/workflows/bitbucket-pipelines.yml +0 -0
- {socketsecurity-2.2.2 → socketsecurity-2.2.5}/workflows/github-actions.yml +0 -0
- {socketsecurity-2.2.2 → socketsecurity-2.2.5}/workflows/gitlab-ci.yml +0 -0
|
@@ -18,5 +18,5 @@ RUN for i in $(seq 1 10); do \
|
|
|
18
18
|
sleep 30; \
|
|
19
19
|
done && \
|
|
20
20
|
if [ ! -z "$SDK_VERSION" ]; then \
|
|
21
|
-
pip install --index-url ${PIP_INDEX_URL} --extra-index-url ${PIP_EXTRA_INDEX_URL}
|
|
21
|
+
pip install --index-url ${PIP_INDEX_URL} --extra-index-url ${PIP_EXTRA_INDEX_URL} socketdev==${SDK_VERSION}; \
|
|
22
22
|
fi
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
.PHONY: setup sync clean test lint update-lock local-dev first-time-setup dev-setup sync-all first-time-local-setup
|
|
2
|
+
|
|
3
|
+
# Environment variable for local SDK path (optional)
|
|
4
|
+
SOCKET_SDK_PATH ?= ../socketdev
|
|
5
|
+
|
|
6
|
+
# Environment variable to control local development mode
|
|
7
|
+
USE_LOCAL_SDK ?= false
|
|
8
|
+
|
|
9
|
+
# === High-level workflow targets ===
|
|
10
|
+
|
|
11
|
+
# First-time repo setup after cloning (using PyPI packages)
|
|
12
|
+
first-time-setup: clean setup
|
|
13
|
+
|
|
14
|
+
# First-time setup for local development (using local SDK)
|
|
15
|
+
first-time-local-setup:
|
|
16
|
+
$(MAKE) clean
|
|
17
|
+
$(MAKE) USE_LOCAL_SDK=true dev-setup
|
|
18
|
+
|
|
19
|
+
# Update lock file after changing pyproject.toml
|
|
20
|
+
update-lock:
|
|
21
|
+
uv lock
|
|
22
|
+
|
|
23
|
+
# Setup for local development
|
|
24
|
+
dev-setup: clean local-dev setup
|
|
25
|
+
|
|
26
|
+
# Sync all dependencies after pulling changes
|
|
27
|
+
sync-all: sync
|
|
28
|
+
|
|
29
|
+
# === Implementation targets ===
|
|
30
|
+
|
|
31
|
+
# Installs dependencies needed for local development
|
|
32
|
+
# Currently: socketdev from test PyPI or local path
|
|
33
|
+
local-dev:
|
|
34
|
+
ifeq ($(USE_LOCAL_SDK),true)
|
|
35
|
+
uv add --editable $(SOCKET_SDK_PATH)
|
|
36
|
+
endif
|
|
37
|
+
|
|
38
|
+
# Creates virtual environment and installs dependencies from uv.lock
|
|
39
|
+
setup: update-lock
|
|
40
|
+
uv sync --all-extras
|
|
41
|
+
ifeq ($(USE_LOCAL_SDK),true)
|
|
42
|
+
uv add --editable $(SOCKET_SDK_PATH)
|
|
43
|
+
endif
|
|
44
|
+
|
|
45
|
+
# Installs exact versions from uv.lock into your virtual environment
|
|
46
|
+
sync:
|
|
47
|
+
uv sync --all-extras
|
|
48
|
+
ifeq ($(USE_LOCAL_SDK),true)
|
|
49
|
+
uv add --editable $(SOCKET_SDK_PATH)
|
|
50
|
+
endif
|
|
51
|
+
|
|
52
|
+
# Removes virtual environment and cache files
|
|
53
|
+
clean:
|
|
54
|
+
rm -rf .venv
|
|
55
|
+
find . -type d -name "__pycache__" -exec rm -rf {} +
|
|
56
|
+
|
|
57
|
+
test:
|
|
58
|
+
uv run pytest
|
|
59
|
+
|
|
60
|
+
lint:
|
|
61
|
+
uv run ruff check .
|
|
62
|
+
uv run ruff format --check .
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: socketsecurity
|
|
3
|
-
Version: 2.2.
|
|
3
|
+
Version: 2.2.5
|
|
4
4
|
Summary: Socket Security CLI for CI/CD
|
|
5
5
|
Project-URL: Homepage, https://socket.dev
|
|
6
6
|
Author-email: Douglas Coburn <douglas@socket.dev>
|
|
@@ -39,13 +39,13 @@ Requires-Dist: packaging
|
|
|
39
39
|
Requires-Dist: prettytable
|
|
40
40
|
Requires-Dist: python-dotenv
|
|
41
41
|
Requires-Dist: requests
|
|
42
|
-
Requires-Dist:
|
|
42
|
+
Requires-Dist: socketdev<4.0.0,>=3.0.0
|
|
43
43
|
Provides-Extra: dev
|
|
44
44
|
Requires-Dist: hatch; extra == 'dev'
|
|
45
|
-
Requires-Dist: pip-tools>=7.4.0; extra == 'dev'
|
|
46
45
|
Requires-Dist: pre-commit; extra == 'dev'
|
|
47
46
|
Requires-Dist: ruff>=0.3.0; extra == 'dev'
|
|
48
47
|
Requires-Dist: twine; extra == 'dev'
|
|
48
|
+
Requires-Dist: uv>=0.1.0; extra == 'dev'
|
|
49
49
|
Provides-Extra: test
|
|
50
50
|
Requires-Dist: pytest-asyncio>=0.23.0; extra == 'test'
|
|
51
51
|
Requires-Dist: pytest-cov>=4.1.0; extra == 'test'
|
|
@@ -427,9 +427,9 @@ make first-time-setup
|
|
|
427
427
|
2. Local Development Setup (for SDK development):
|
|
428
428
|
```bash
|
|
429
429
|
pyenv local 3.11 # Ensure correct Python version
|
|
430
|
-
SOCKET_SDK_PATH=~/path/to/
|
|
430
|
+
SOCKET_SDK_PATH=~/path/to/socketdev make first-time-local-setup
|
|
431
431
|
```
|
|
432
|
-
The default SDK path is `../
|
|
432
|
+
The default SDK path is `../socketdev` if not specified.
|
|
433
433
|
|
|
434
434
|
#### Ongoing Development Tasks
|
|
435
435
|
|
|
@@ -448,25 +448,23 @@ make sync-all
|
|
|
448
448
|
High-level workflows:
|
|
449
449
|
- `make first-time-setup`: Complete setup using PyPI packages
|
|
450
450
|
- `make first-time-local-setup`: Complete setup for local SDK development
|
|
451
|
-
- `make update-
|
|
451
|
+
- `make update-lock`: Update uv.lock file after changing pyproject.toml
|
|
452
452
|
- `make sync-all`: Sync dependencies after pulling changes
|
|
453
453
|
- `make dev-setup`: Setup for local development (included in first-time-local-setup)
|
|
454
454
|
|
|
455
455
|
Implementation targets:
|
|
456
|
-
- `make init-tools`: Creates virtual environment and installs pip-tools
|
|
457
456
|
- `make local-dev`: Installs dependencies needed for local development
|
|
458
|
-
- `make
|
|
459
|
-
- `make
|
|
460
|
-
- `make sync-deps`: Installs exact versions from requirements.txt
|
|
457
|
+
- `make setup`: Creates virtual environment and installs dependencies from uv.lock
|
|
458
|
+
- `make sync`: Installs exact versions from uv.lock
|
|
461
459
|
- `make clean`: Removes virtual environment and cache files
|
|
462
|
-
- `make test`: Runs pytest suite
|
|
463
|
-
- `make lint`: Runs ruff for code formatting and linting
|
|
460
|
+
- `make test`: Runs pytest suite using uv run
|
|
461
|
+
- `make lint`: Runs ruff for code formatting and linting using uv run
|
|
464
462
|
|
|
465
463
|
### Environment Variables
|
|
466
464
|
|
|
467
465
|
#### Core Configuration
|
|
468
466
|
- `SOCKET_SECURITY_API_KEY`: Socket Security API token (alternative to --api-token parameter)
|
|
469
|
-
- `SOCKET_SDK_PATH`: Path to local
|
|
467
|
+
- `SOCKET_SDK_PATH`: Path to local socketdev repository (default: ../socketdev)
|
|
470
468
|
|
|
471
469
|
#### GitLab Integration
|
|
472
470
|
- `GITLAB_TOKEN`: GitLab API token for GitLab integration (supports both Bearer and PRIVATE-TOKEN authentication)
|
|
@@ -371,9 +371,9 @@ make first-time-setup
|
|
|
371
371
|
2. Local Development Setup (for SDK development):
|
|
372
372
|
```bash
|
|
373
373
|
pyenv local 3.11 # Ensure correct Python version
|
|
374
|
-
SOCKET_SDK_PATH=~/path/to/
|
|
374
|
+
SOCKET_SDK_PATH=~/path/to/socketdev make first-time-local-setup
|
|
375
375
|
```
|
|
376
|
-
The default SDK path is `../
|
|
376
|
+
The default SDK path is `../socketdev` if not specified.
|
|
377
377
|
|
|
378
378
|
#### Ongoing Development Tasks
|
|
379
379
|
|
|
@@ -392,25 +392,23 @@ make sync-all
|
|
|
392
392
|
High-level workflows:
|
|
393
393
|
- `make first-time-setup`: Complete setup using PyPI packages
|
|
394
394
|
- `make first-time-local-setup`: Complete setup for local SDK development
|
|
395
|
-
- `make update-
|
|
395
|
+
- `make update-lock`: Update uv.lock file after changing pyproject.toml
|
|
396
396
|
- `make sync-all`: Sync dependencies after pulling changes
|
|
397
397
|
- `make dev-setup`: Setup for local development (included in first-time-local-setup)
|
|
398
398
|
|
|
399
399
|
Implementation targets:
|
|
400
|
-
- `make init-tools`: Creates virtual environment and installs pip-tools
|
|
401
400
|
- `make local-dev`: Installs dependencies needed for local development
|
|
402
|
-
- `make
|
|
403
|
-
- `make
|
|
404
|
-
- `make sync-deps`: Installs exact versions from requirements.txt
|
|
401
|
+
- `make setup`: Creates virtual environment and installs dependencies from uv.lock
|
|
402
|
+
- `make sync`: Installs exact versions from uv.lock
|
|
405
403
|
- `make clean`: Removes virtual environment and cache files
|
|
406
|
-
- `make test`: Runs pytest suite
|
|
407
|
-
- `make lint`: Runs ruff for code formatting and linting
|
|
404
|
+
- `make test`: Runs pytest suite using uv run
|
|
405
|
+
- `make lint`: Runs ruff for code formatting and linting using uv run
|
|
408
406
|
|
|
409
407
|
### Environment Variables
|
|
410
408
|
|
|
411
409
|
#### Core Configuration
|
|
412
410
|
- `SOCKET_SECURITY_API_KEY`: Socket Security API token (alternative to --api-token parameter)
|
|
413
|
-
- `SOCKET_SDK_PATH`: Path to local
|
|
411
|
+
- `SOCKET_SDK_PATH`: Path to local socketdev repository (default: ../socketdev)
|
|
414
412
|
|
|
415
413
|
#### GitLab Integration
|
|
416
414
|
- `GITLAB_TOKEN`: GitLab API token for GitLab integration (supports both Bearer and PRIVATE-TOKEN authentication)
|
|
@@ -6,7 +6,7 @@ build-backend = "hatchling.build"
|
|
|
6
6
|
|
|
7
7
|
[project]
|
|
8
8
|
name = "socketsecurity"
|
|
9
|
-
version = "2.2.
|
|
9
|
+
version = "2.2.5"
|
|
10
10
|
requires-python = ">= 3.10"
|
|
11
11
|
license = {"file" = "LICENSE"}
|
|
12
12
|
dependencies = [
|
|
@@ -16,7 +16,7 @@ dependencies = [
|
|
|
16
16
|
'GitPython',
|
|
17
17
|
'packaging',
|
|
18
18
|
'python-dotenv',
|
|
19
|
-
'
|
|
19
|
+
'socketdev>=3.0.0,<4.0.0'
|
|
20
20
|
]
|
|
21
21
|
readme = "README.md"
|
|
22
22
|
description = "Socket Security CLI for CI/CD"
|
|
@@ -45,7 +45,7 @@ test = [
|
|
|
45
45
|
dev = [
|
|
46
46
|
"ruff>=0.3.0",
|
|
47
47
|
"twine", # for building
|
|
48
|
-
"
|
|
48
|
+
"uv>=0.1.0", # for dependency management
|
|
49
49
|
"pre-commit",
|
|
50
50
|
"hatch"
|
|
51
51
|
]
|
|
@@ -29,7 +29,7 @@ fi
|
|
|
29
29
|
|
|
30
30
|
if [ -z "$SDK_VERSION" ]; then
|
|
31
31
|
echo "No SDK version specified, checking TestPyPI for latest version..."
|
|
32
|
-
SDK_VERSION=$(get_latest_version "
|
|
32
|
+
SDK_VERSION=$(get_latest_version "socketdev")
|
|
33
33
|
echo "Latest SDK version on TestPyPI is: $SDK_VERSION"
|
|
34
34
|
fi
|
|
35
35
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
__author__ = 'socket.dev'
|
|
2
|
-
__version__ = '2.2.
|
|
2
|
+
__version__ = '2.2.5'
|
|
@@ -283,7 +283,7 @@ class Messages:
|
|
|
283
283
|
@staticmethod
|
|
284
284
|
def create_security_comment_json(diff: Diff) -> dict:
|
|
285
285
|
scan_failed = False
|
|
286
|
-
if len(diff.new_alerts)
|
|
286
|
+
if len(diff.new_alerts) > 0:
|
|
287
287
|
for alert in diff.new_alerts:
|
|
288
288
|
alert: Issue
|
|
289
289
|
if alert.error:
|