socketsecurity 2.0.38__tar.gz → 2.0.42__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.0.38 → socketsecurity-2.0.42}/PKG-INFO +2 -2
- {socketsecurity-2.0.38 → socketsecurity-2.0.42}/pyproject.toml +2 -2
- {socketsecurity-2.0.38 → socketsecurity-2.0.42}/socketsecurity/__init__.py +1 -2
- {socketsecurity-2.0.38 → socketsecurity-2.0.42}/socketsecurity/core/__init__.py +2 -1
- {socketsecurity-2.0.38 → socketsecurity-2.0.42}/socketsecurity/core/messages.py +15 -3
- {socketsecurity-2.0.38 → socketsecurity-2.0.42}/.github/CODEOWNERS +0 -0
- {socketsecurity-2.0.38 → socketsecurity-2.0.42}/.github/PULL_REQUEST_TEMPLATE/bug-fix.md +0 -0
- {socketsecurity-2.0.38 → socketsecurity-2.0.42}/.github/PULL_REQUEST_TEMPLATE/feature.md +0 -0
- {socketsecurity-2.0.38 → socketsecurity-2.0.42}/.github/PULL_REQUEST_TEMPLATE/improvement.md +0 -0
- {socketsecurity-2.0.38 → socketsecurity-2.0.42}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {socketsecurity-2.0.38 → socketsecurity-2.0.42}/.github/workflows/docker-stable.yml +0 -0
- {socketsecurity-2.0.38 → socketsecurity-2.0.42}/.github/workflows/pr-preview.yml +0 -0
- {socketsecurity-2.0.38 → socketsecurity-2.0.42}/.github/workflows/release.yml +0 -0
- {socketsecurity-2.0.38 → socketsecurity-2.0.42}/.github/workflows/version-check.yml +0 -0
- {socketsecurity-2.0.38 → socketsecurity-2.0.42}/.gitignore +0 -0
- {socketsecurity-2.0.38 → socketsecurity-2.0.42}/.hooks/sync_version.py +0 -0
- {socketsecurity-2.0.38 → socketsecurity-2.0.42}/.pre-commit-config.yaml +0 -0
- {socketsecurity-2.0.38 → socketsecurity-2.0.42}/.python-version +0 -0
- {socketsecurity-2.0.38 → socketsecurity-2.0.42}/Dockerfile +0 -0
- {socketsecurity-2.0.38 → socketsecurity-2.0.42}/LICENSE +0 -0
- {socketsecurity-2.0.38 → socketsecurity-2.0.42}/Makefile +0 -0
- {socketsecurity-2.0.38 → socketsecurity-2.0.42}/Pipfile.lock +0 -0
- {socketsecurity-2.0.38 → socketsecurity-2.0.42}/README.md +0 -0
- {socketsecurity-2.0.38 → socketsecurity-2.0.42}/docs/README.md +0 -0
- {socketsecurity-2.0.38 → socketsecurity-2.0.42}/pytest.ini +0 -0
- {socketsecurity-2.0.38 → socketsecurity-2.0.42}/requirements-dev.lock +0 -0
- {socketsecurity-2.0.38 → socketsecurity-2.0.42}/requirements.lock +0 -0
- {socketsecurity-2.0.38 → socketsecurity-2.0.42}/scripts/build_container.sh +0 -0
- {socketsecurity-2.0.38 → socketsecurity-2.0.42}/scripts/deploy-test-docker.sh +0 -0
- {socketsecurity-2.0.38 → socketsecurity-2.0.42}/scripts/deploy-test-pypi.sh +0 -0
- {socketsecurity-2.0.38 → socketsecurity-2.0.42}/scripts/run.sh +0 -0
- {socketsecurity-2.0.38 → socketsecurity-2.0.42}/socketsecurity/config.py +0 -0
- {socketsecurity-2.0.38 → socketsecurity-2.0.42}/socketsecurity/core/classes.py +0 -0
- {socketsecurity-2.0.38 → socketsecurity-2.0.42}/socketsecurity/core/cli_client.py +0 -0
- {socketsecurity-2.0.38 → socketsecurity-2.0.42}/socketsecurity/core/exceptions.py +0 -0
- {socketsecurity-2.0.38 → socketsecurity-2.0.42}/socketsecurity/core/git_interface.py +0 -0
- {socketsecurity-2.0.38 → socketsecurity-2.0.42}/socketsecurity/core/issues.py +0 -0
- {socketsecurity-2.0.38 → socketsecurity-2.0.42}/socketsecurity/core/licenses.py +0 -0
- {socketsecurity-2.0.38 → socketsecurity-2.0.42}/socketsecurity/core/logging.py +0 -0
- {socketsecurity-2.0.38 → socketsecurity-2.0.42}/socketsecurity/core/scm/__init__.py +0 -0
- {socketsecurity-2.0.38 → socketsecurity-2.0.42}/socketsecurity/core/scm/base.py +0 -0
- {socketsecurity-2.0.38 → socketsecurity-2.0.42}/socketsecurity/core/scm/client.py +0 -0
- {socketsecurity-2.0.38 → socketsecurity-2.0.42}/socketsecurity/core/scm/github.py +0 -0
- {socketsecurity-2.0.38 → socketsecurity-2.0.42}/socketsecurity/core/scm/gitlab.py +0 -0
- {socketsecurity-2.0.38 → socketsecurity-2.0.42}/socketsecurity/core/scm_comments.py +0 -0
- {socketsecurity-2.0.38 → socketsecurity-2.0.42}/socketsecurity/core/socket_config.py +0 -0
- {socketsecurity-2.0.38 → socketsecurity-2.0.42}/socketsecurity/core/utils.py +0 -0
- {socketsecurity-2.0.38 → socketsecurity-2.0.42}/socketsecurity/output.py +0 -0
- {socketsecurity-2.0.38 → socketsecurity-2.0.42}/socketsecurity/socketcli.py +0 -0
- {socketsecurity-2.0.38 → socketsecurity-2.0.42}/tests/__init__.py +0 -0
- {socketsecurity-2.0.38 → socketsecurity-2.0.42}/tests/core/conftest.py +0 -0
- {socketsecurity-2.0.38 → socketsecurity-2.0.42}/tests/core/create_diff_input.json +0 -0
- {socketsecurity-2.0.38 → socketsecurity-2.0.42}/tests/core/test_diff_generation.py +0 -0
- {socketsecurity-2.0.38 → socketsecurity-2.0.42}/tests/core/test_package_and_alerts.py +0 -0
- {socketsecurity-2.0.38 → socketsecurity-2.0.42}/tests/core/test_sdk_methods.py +0 -0
- {socketsecurity-2.0.38 → socketsecurity-2.0.42}/tests/core/test_supporting_methods.py +0 -0
- {socketsecurity-2.0.38 → socketsecurity-2.0.42}/tests/data/fullscans/create_response.json +0 -0
- {socketsecurity-2.0.38 → socketsecurity-2.0.42}/tests/data/fullscans/diff/stream_diff.json +0 -0
- {socketsecurity-2.0.38 → socketsecurity-2.0.42}/tests/data/fullscans/diff/stream_diff_full.json +0 -0
- {socketsecurity-2.0.38 → socketsecurity-2.0.42}/tests/data/fullscans/head_scan/metadata.json +0 -0
- {socketsecurity-2.0.38 → socketsecurity-2.0.42}/tests/data/fullscans/head_scan/stream_scan.json +0 -0
- {socketsecurity-2.0.38 → socketsecurity-2.0.42}/tests/data/fullscans/head_scan/stream_scan_full.json +0 -0
- {socketsecurity-2.0.38 → socketsecurity-2.0.42}/tests/data/fullscans/new_scan/metadata.json +0 -0
- {socketsecurity-2.0.38 → socketsecurity-2.0.42}/tests/data/fullscans/new_scan/stream_scan.json +0 -0
- {socketsecurity-2.0.38 → socketsecurity-2.0.42}/tests/data/repos/repo_info_error.json +0 -0
- {socketsecurity-2.0.38 → socketsecurity-2.0.42}/tests/data/repos/repo_info_no_head.json +0 -0
- {socketsecurity-2.0.38 → socketsecurity-2.0.42}/tests/data/repos/repo_info_success.json +0 -0
- {socketsecurity-2.0.38 → socketsecurity-2.0.42}/tests/data/settings/security-policy.json +0 -0
- {socketsecurity-2.0.38 → socketsecurity-2.0.42}/tests/unit/__init__.py +0 -0
- {socketsecurity-2.0.38 → socketsecurity-2.0.42}/tests/unit/test_cli_config.py +0 -0
- {socketsecurity-2.0.38 → socketsecurity-2.0.42}/tests/unit/test_client.py +0 -0
- {socketsecurity-2.0.38 → socketsecurity-2.0.42}/tests/unit/test_config.py +0 -0
- {socketsecurity-2.0.38 → socketsecurity-2.0.42}/tests/unit/test_output.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: socketsecurity
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.42
|
|
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,7 +39,7 @@ Requires-Dist: packaging
|
|
|
39
39
|
Requires-Dist: prettytable
|
|
40
40
|
Requires-Dist: python-dotenv
|
|
41
41
|
Requires-Dist: requests
|
|
42
|
-
Requires-Dist: socket-sdk-python>=2.0.
|
|
42
|
+
Requires-Dist: socket-sdk-python>=2.0.21
|
|
43
43
|
Provides-Extra: dev
|
|
44
44
|
Requires-Dist: hatch; extra == 'dev'
|
|
45
45
|
Requires-Dist: pip-tools>=7.4.0; extra == 'dev'
|
|
@@ -6,7 +6,7 @@ build-backend = "hatchling.build"
|
|
|
6
6
|
|
|
7
7
|
[project]
|
|
8
8
|
name = "socketsecurity"
|
|
9
|
-
version = "2.0.
|
|
9
|
+
version = "2.0.42"
|
|
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
|
-
'socket-sdk-python>=2.0.
|
|
19
|
+
'socket-sdk-python>=2.0.21'
|
|
20
20
|
]
|
|
21
21
|
readme = "README.md"
|
|
22
22
|
description = "Socket Security CLI for CI/CD"
|
|
@@ -427,6 +427,8 @@ class Core:
|
|
|
427
427
|
Exception: If API request fails
|
|
428
428
|
"""
|
|
429
429
|
try:
|
|
430
|
+
# Need to switch to either standard logger or not call our module logging so that there isn't a conflict
|
|
431
|
+
# Also need to update the SDK to not emit log in a way that can't be trapped by try/except
|
|
430
432
|
sdk_logger = logging_std.getLogger("socketdev")
|
|
431
433
|
original_level = sdk_logger.level
|
|
432
434
|
sdk_logger.setLevel(logging_std.CRITICAL)
|
|
@@ -799,7 +801,6 @@ class Core:
|
|
|
799
801
|
alert = Alert(**alert_item)
|
|
800
802
|
props = getattr(self.config.all_issues, alert.type, default_props)
|
|
801
803
|
introduced_by = self.get_source_data(package, packages)
|
|
802
|
-
|
|
803
804
|
issue_alert = Issue(
|
|
804
805
|
pkg_type=package.type,
|
|
805
806
|
pkg_name=package.name,
|
|
@@ -3,6 +3,7 @@ import logging
|
|
|
3
3
|
import re
|
|
4
4
|
from pathlib import Path
|
|
5
5
|
|
|
6
|
+
from docutils.nodes import title
|
|
6
7
|
from mdutils import MdUtils
|
|
7
8
|
from prettytable import PrettyTable
|
|
8
9
|
|
|
@@ -233,10 +234,21 @@ class Messages:
|
|
|
233
234
|
# Create a unique rule id and name by appending the manifest file.
|
|
234
235
|
unique_rule_id = f"{base_rule_id} ({mf})"
|
|
235
236
|
rule_name = f"Alert {base_rule_id} ({mf})"
|
|
236
|
-
|
|
237
|
-
|
|
237
|
+
props = {}
|
|
238
|
+
if hasattr(alert, 'props'):
|
|
239
|
+
props = alert.props
|
|
240
|
+
suggestion = ''
|
|
241
|
+
if hasattr(alert, 'suggestion'):
|
|
242
|
+
suggestion = alert.suggestion
|
|
243
|
+
alert_title = ''
|
|
244
|
+
if hasattr(alert, 'title'):
|
|
245
|
+
alert_title = alert.title
|
|
246
|
+
description = ''
|
|
247
|
+
if hasattr(alert, 'description'):
|
|
248
|
+
description = alert.description
|
|
249
|
+
short_desc = (f"{props.get('note', '')}<br/><br/>Suggested Action:<br/>{suggestion}"
|
|
238
250
|
f"<br/><a href=\"{socket_url}\">{socket_url}</a>")
|
|
239
|
-
full_desc = "{} - {}".format(
|
|
251
|
+
full_desc = "{} - {}".format(alert_title, description.replace('\r\n', '<br/>'))
|
|
240
252
|
|
|
241
253
|
if unique_rule_id not in rules_map:
|
|
242
254
|
rules_map[unique_rule_id] = {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{socketsecurity-2.0.38 → socketsecurity-2.0.42}/.github/PULL_REQUEST_TEMPLATE/improvement.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{socketsecurity-2.0.38 → socketsecurity-2.0.42}/tests/data/fullscans/diff/stream_diff_full.json
RENAMED
|
File without changes
|
{socketsecurity-2.0.38 → socketsecurity-2.0.42}/tests/data/fullscans/head_scan/metadata.json
RENAMED
|
File without changes
|
{socketsecurity-2.0.38 → socketsecurity-2.0.42}/tests/data/fullscans/head_scan/stream_scan.json
RENAMED
|
File without changes
|
{socketsecurity-2.0.38 → socketsecurity-2.0.42}/tests/data/fullscans/head_scan/stream_scan_full.json
RENAMED
|
File without changes
|
|
File without changes
|
{socketsecurity-2.0.38 → socketsecurity-2.0.42}/tests/data/fullscans/new_scan/stream_scan.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|