socketsecurity 2.2.40__tar.gz → 2.2.43__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.40 → socketsecurity-2.2.43}/PKG-INFO +2 -2
- {socketsecurity-2.2.40 → socketsecurity-2.2.43}/README.md +1 -1
- {socketsecurity-2.2.40 → socketsecurity-2.2.43}/pyproject.toml +6 -1
- {socketsecurity-2.2.40 → socketsecurity-2.2.43}/socketsecurity/__init__.py +1 -1
- {socketsecurity-2.2.40 → socketsecurity-2.2.43}/socketsecurity/core/__init__.py +3 -14
- {socketsecurity-2.2.40 → socketsecurity-2.2.43}/socketsecurity/core/messages.py +3 -3
- {socketsecurity-2.2.40 → socketsecurity-2.2.43}/socketsecurity/core/socket_config.py +0 -8
- {socketsecurity-2.2.40 → socketsecurity-2.2.43}/tests/core/conftest.py +1 -11
- {socketsecurity-2.2.40 → socketsecurity-2.2.43}/tests/core/test_package_and_alerts.py +2 -31
- {socketsecurity-2.2.40 → socketsecurity-2.2.43}/tests/unit/test_config.py +1 -12
- {socketsecurity-2.2.40 → socketsecurity-2.2.43}/uv.lock +13 -9
- {socketsecurity-2.2.40 → socketsecurity-2.2.43}/.github/CODEOWNERS +0 -0
- {socketsecurity-2.2.40 → socketsecurity-2.2.43}/.github/PULL_REQUEST_TEMPLATE/bug-fix.md +0 -0
- {socketsecurity-2.2.40 → socketsecurity-2.2.43}/.github/PULL_REQUEST_TEMPLATE/feature.md +0 -0
- {socketsecurity-2.2.40 → socketsecurity-2.2.43}/.github/PULL_REQUEST_TEMPLATE/improvement.md +0 -0
- {socketsecurity-2.2.40 → socketsecurity-2.2.43}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {socketsecurity-2.2.40 → socketsecurity-2.2.43}/.github/workflows/docker-stable.yml +0 -0
- {socketsecurity-2.2.40 → socketsecurity-2.2.43}/.github/workflows/pr-preview.yml +0 -0
- {socketsecurity-2.2.40 → socketsecurity-2.2.43}/.github/workflows/release.yml +0 -0
- {socketsecurity-2.2.40 → socketsecurity-2.2.43}/.github/workflows/version-check.yml +0 -0
- {socketsecurity-2.2.40 → socketsecurity-2.2.43}/.gitignore +0 -0
- {socketsecurity-2.2.40 → socketsecurity-2.2.43}/.hooks/sync_version.py +0 -0
- {socketsecurity-2.2.40 → socketsecurity-2.2.43}/.pre-commit-config.yaml +0 -0
- {socketsecurity-2.2.40 → socketsecurity-2.2.43}/.python-version +0 -0
- {socketsecurity-2.2.40 → socketsecurity-2.2.43}/Dockerfile +0 -0
- {socketsecurity-2.2.40 → socketsecurity-2.2.43}/LICENSE +0 -0
- {socketsecurity-2.2.40 → socketsecurity-2.2.43}/Makefile +0 -0
- {socketsecurity-2.2.40 → socketsecurity-2.2.43}/docs/README.md +0 -0
- {socketsecurity-2.2.40 → socketsecurity-2.2.43}/pytest.ini +0 -0
- {socketsecurity-2.2.40 → socketsecurity-2.2.43}/scripts/build_container.sh +0 -0
- {socketsecurity-2.2.40 → socketsecurity-2.2.43}/scripts/build_container_flexible.sh +0 -0
- {socketsecurity-2.2.40 → socketsecurity-2.2.43}/scripts/deploy-test-docker.sh +0 -0
- {socketsecurity-2.2.40 → socketsecurity-2.2.43}/scripts/deploy-test-pypi.sh +0 -0
- {socketsecurity-2.2.40 → socketsecurity-2.2.43}/scripts/docker-entrypoint.sh +0 -0
- {socketsecurity-2.2.40 → socketsecurity-2.2.43}/scripts/run.sh +0 -0
- {socketsecurity-2.2.40 → socketsecurity-2.2.43}/socketsecurity/config.py +0 -0
- {socketsecurity-2.2.40 → socketsecurity-2.2.43}/socketsecurity/core/classes.py +0 -0
- {socketsecurity-2.2.40 → socketsecurity-2.2.43}/socketsecurity/core/cli_client.py +0 -0
- {socketsecurity-2.2.40 → socketsecurity-2.2.43}/socketsecurity/core/exceptions.py +0 -0
- {socketsecurity-2.2.40 → socketsecurity-2.2.43}/socketsecurity/core/git_interface.py +0 -0
- {socketsecurity-2.2.40 → socketsecurity-2.2.43}/socketsecurity/core/helper/__init__.py +0 -0
- {socketsecurity-2.2.40 → socketsecurity-2.2.43}/socketsecurity/core/lazy_file_loader.py +0 -0
- {socketsecurity-2.2.40 → socketsecurity-2.2.43}/socketsecurity/core/logging.py +0 -0
- {socketsecurity-2.2.40 → socketsecurity-2.2.43}/socketsecurity/core/resource_utils.py +0 -0
- {socketsecurity-2.2.40 → socketsecurity-2.2.43}/socketsecurity/core/scm/__init__.py +0 -0
- {socketsecurity-2.2.40 → socketsecurity-2.2.43}/socketsecurity/core/scm/base.py +0 -0
- {socketsecurity-2.2.40 → socketsecurity-2.2.43}/socketsecurity/core/scm/client.py +0 -0
- {socketsecurity-2.2.40 → socketsecurity-2.2.43}/socketsecurity/core/scm/github.py +0 -0
- {socketsecurity-2.2.40 → socketsecurity-2.2.43}/socketsecurity/core/scm/gitlab.py +0 -0
- {socketsecurity-2.2.40 → socketsecurity-2.2.43}/socketsecurity/core/scm_comments.py +0 -0
- {socketsecurity-2.2.40 → socketsecurity-2.2.43}/socketsecurity/core/tools/reachability.py +0 -0
- {socketsecurity-2.2.40 → socketsecurity-2.2.43}/socketsecurity/core/utils.py +0 -0
- {socketsecurity-2.2.40 → socketsecurity-2.2.43}/socketsecurity/output.py +0 -0
- {socketsecurity-2.2.40 → socketsecurity-2.2.43}/socketsecurity/plugins/__init__.py +0 -0
- {socketsecurity-2.2.40 → socketsecurity-2.2.43}/socketsecurity/plugins/base.py +0 -0
- {socketsecurity-2.2.40 → socketsecurity-2.2.43}/socketsecurity/plugins/jira.py +0 -0
- {socketsecurity-2.2.40 → socketsecurity-2.2.43}/socketsecurity/plugins/manager.py +0 -0
- {socketsecurity-2.2.40 → socketsecurity-2.2.43}/socketsecurity/plugins/slack.py +0 -0
- {socketsecurity-2.2.40 → socketsecurity-2.2.43}/socketsecurity/plugins/teams.py +0 -0
- {socketsecurity-2.2.40 → socketsecurity-2.2.43}/socketsecurity/plugins/webhook.py +0 -0
- {socketsecurity-2.2.40 → socketsecurity-2.2.43}/socketsecurity/socketcli.py +0 -0
- {socketsecurity-2.2.40 → socketsecurity-2.2.43}/tests/__init__.py +0 -0
- {socketsecurity-2.2.40 → socketsecurity-2.2.43}/tests/core/create_diff_input.json +0 -0
- {socketsecurity-2.2.40 → socketsecurity-2.2.43}/tests/core/test_diff_generation.py +0 -0
- {socketsecurity-2.2.40 → socketsecurity-2.2.43}/tests/core/test_sdk_methods.py +0 -0
- {socketsecurity-2.2.40 → socketsecurity-2.2.43}/tests/core/test_supporting_methods.py +0 -0
- {socketsecurity-2.2.40 → socketsecurity-2.2.43}/tests/data/fullscans/create_response.json +0 -0
- {socketsecurity-2.2.40 → socketsecurity-2.2.43}/tests/data/fullscans/diff/stream_diff.json +0 -0
- {socketsecurity-2.2.40 → socketsecurity-2.2.43}/tests/data/fullscans/diff/stream_diff_full.json +0 -0
- {socketsecurity-2.2.40 → socketsecurity-2.2.43}/tests/data/fullscans/head_scan/metadata.json +0 -0
- {socketsecurity-2.2.40 → socketsecurity-2.2.43}/tests/data/fullscans/head_scan/stream_scan.json +0 -0
- {socketsecurity-2.2.40 → socketsecurity-2.2.43}/tests/data/fullscans/head_scan/stream_scan_full.json +0 -0
- {socketsecurity-2.2.40 → socketsecurity-2.2.43}/tests/data/fullscans/new_scan/metadata.json +0 -0
- {socketsecurity-2.2.40 → socketsecurity-2.2.43}/tests/data/fullscans/new_scan/stream_scan.json +0 -0
- {socketsecurity-2.2.40 → socketsecurity-2.2.43}/tests/data/repos/repo_info_error.json +0 -0
- {socketsecurity-2.2.40 → socketsecurity-2.2.43}/tests/data/repos/repo_info_no_head.json +0 -0
- {socketsecurity-2.2.40 → socketsecurity-2.2.43}/tests/data/repos/repo_info_success.json +0 -0
- {socketsecurity-2.2.40 → socketsecurity-2.2.43}/tests/data/settings/security-policy.json +0 -0
- {socketsecurity-2.2.40 → socketsecurity-2.2.43}/tests/unit/__init__.py +0 -0
- {socketsecurity-2.2.40 → socketsecurity-2.2.43}/tests/unit/test_cli_config.py +0 -0
- {socketsecurity-2.2.40 → socketsecurity-2.2.43}/tests/unit/test_client.py +0 -0
- {socketsecurity-2.2.40 → socketsecurity-2.2.43}/tests/unit/test_gitlab_auth.py +0 -0
- {socketsecurity-2.2.40 → socketsecurity-2.2.43}/tests/unit/test_gitlab_auth_fallback.py +0 -0
- {socketsecurity-2.2.40 → socketsecurity-2.2.43}/tests/unit/test_output.py +0 -0
- {socketsecurity-2.2.40 → socketsecurity-2.2.43}/workflows/bitbucket-pipelines.yml +0 -0
- {socketsecurity-2.2.40 → socketsecurity-2.2.43}/workflows/github-actions.yml +0 -0
- {socketsecurity-2.2.40 → socketsecurity-2.2.43}/workflows/gitlab-ci.yml +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: socketsecurity
|
|
3
|
-
Version: 2.2.
|
|
3
|
+
Version: 2.2.43
|
|
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>
|
|
@@ -57,7 +57,7 @@ Description-Content-Type: text/markdown
|
|
|
57
57
|
|
|
58
58
|
# Socket Security CLI
|
|
59
59
|
|
|
60
|
-
The Socket Security CLI was created to enable integrations with other tools like GitHub Actions, GitLab, BitBucket, local use cases and more. The tool will get the head scan for the provided repo from Socket, create a new one, and then report any new alerts detected. If there are new alerts
|
|
60
|
+
The Socket Security CLI was created to enable integrations with other tools like GitHub Actions, GitLab, BitBucket, local use cases and more. The tool will get the head scan for the provided repo from Socket, create a new one, and then report any new alerts detected. If there are new alerts with blocking actions it'll exit with a non-Zero exit code.
|
|
61
61
|
|
|
62
62
|
## Quick Start
|
|
63
63
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Socket Security CLI
|
|
2
2
|
|
|
3
|
-
The Socket Security CLI was created to enable integrations with other tools like GitHub Actions, GitLab, BitBucket, local use cases and more. The tool will get the head scan for the provided repo from Socket, create a new one, and then report any new alerts detected. If there are new alerts
|
|
3
|
+
The Socket Security CLI was created to enable integrations with other tools like GitHub Actions, GitLab, BitBucket, local use cases and more. The tool will get the head scan for the provided repo from Socket, create a new one, and then report any new alerts detected. If there are new alerts with blocking actions it'll exit with a non-Zero exit code.
|
|
4
4
|
|
|
5
5
|
## Quick Start
|
|
6
6
|
|
|
@@ -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.43"
|
|
10
10
|
requires-python = ">= 3.10"
|
|
11
11
|
license = {"file" = "LICENSE"}
|
|
12
12
|
dependencies = [
|
|
@@ -160,3 +160,8 @@ docstring-code-line-length = "dynamic"
|
|
|
160
160
|
|
|
161
161
|
[tool.hatch.build.targets.wheel]
|
|
162
162
|
include = ["socketsecurity", "LICENSE"]
|
|
163
|
+
|
|
164
|
+
[dependency-groups]
|
|
165
|
+
dev = [
|
|
166
|
+
"pre-commit>=4.3.0",
|
|
167
|
+
]
|
|
@@ -19,7 +19,6 @@ from socketdev.exceptions import APIFailure
|
|
|
19
19
|
from socketdev.fullscans import FullScanParams, SocketArtifact
|
|
20
20
|
from socketdev.org import Organization
|
|
21
21
|
from socketdev.repos import RepositoryInfo
|
|
22
|
-
from socketdev.settings import SecurityPolicyRule
|
|
23
22
|
import copy
|
|
24
23
|
from socketsecurity import __version__, USER_AGENT
|
|
25
24
|
from socketsecurity.core.classes import (
|
|
@@ -82,8 +81,6 @@ class Core:
|
|
|
82
81
|
self.config.full_scan_path = f"{base_path}/full-scans"
|
|
83
82
|
self.config.repository_path = f"{base_path}/repos"
|
|
84
83
|
|
|
85
|
-
self.config.security_policy = self.get_security_policy()
|
|
86
|
-
|
|
87
84
|
def get_org_id_slug(self) -> Tuple[str, str]:
|
|
88
85
|
"""Gets the Org ID and Org Slug for the API Token."""
|
|
89
86
|
response = self.sdk.org.get(use_types=True)
|
|
@@ -112,16 +109,7 @@ class Core:
|
|
|
112
109
|
"""Converts artifacts dictionary to a list."""
|
|
113
110
|
return list(artifacts_dict.values())
|
|
114
111
|
|
|
115
|
-
def get_security_policy(self) -> Dict[str, SecurityPolicyRule]:
|
|
116
|
-
"""Gets the organization's security policy."""
|
|
117
|
-
response = self.sdk.settings.get(self.config.org_slug, use_types=True)
|
|
118
|
-
|
|
119
|
-
if not response.success:
|
|
120
|
-
log.error(f"Failed to get security policy: {response.status}")
|
|
121
|
-
log.error(response.message)
|
|
122
|
-
raise Exception(f"Failed to get security policy: {response.status}, message: {response.message}")
|
|
123
112
|
|
|
124
|
-
return response.securityPolicyRules
|
|
125
113
|
|
|
126
114
|
def create_sbom_output(self, diff: Diff) -> dict:
|
|
127
115
|
"""Creates CycloneDX output for a given diff."""
|
|
@@ -1317,8 +1305,9 @@ class Core:
|
|
|
1317
1305
|
url=package.url
|
|
1318
1306
|
)
|
|
1319
1307
|
|
|
1320
|
-
|
|
1321
|
-
|
|
1308
|
+
# Use action from API (from security policy, label policy, triage, etc.)
|
|
1309
|
+
if 'action' in alert_item and alert_item['action']:
|
|
1310
|
+
action = alert_item['action']
|
|
1322
1311
|
setattr(issue_alert, action, True)
|
|
1323
1312
|
|
|
1324
1313
|
if issue_alert.key not in alerts_collection:
|
|
@@ -416,7 +416,7 @@ class Messages:
|
|
|
416
416
|
> **❗️ Caution**
|
|
417
417
|
> **Review the following alerts detected in dependencies.**
|
|
418
418
|
>
|
|
419
|
-
> According to your organization's
|
|
419
|
+
> According to your organization's policies, you **must** resolve all **"Block"** alerts before proceeding. It's recommended to resolve **"Warn"** alerts too.
|
|
420
420
|
> Learn more about [Socket for GitHub](https://socket.dev?utm_medium=gh).
|
|
421
421
|
|
|
422
422
|
<!-- start-socket-updated-alerts-table -->
|
|
@@ -622,7 +622,7 @@ class Messages:
|
|
|
622
622
|
@staticmethod
|
|
623
623
|
def create_security_alert_table(diff: Diff, md: MdUtils) -> tuple[MdUtils, list, dict]:
|
|
624
624
|
"""
|
|
625
|
-
Creates the detected issues table based on the
|
|
625
|
+
Creates the detected issues table based on alert actions from the API
|
|
626
626
|
:param diff: Diff - Diff report with the detected issues
|
|
627
627
|
:param md: MdUtils - Main markdown variable
|
|
628
628
|
:return:
|
|
@@ -794,7 +794,7 @@ class Messages:
|
|
|
794
794
|
@staticmethod
|
|
795
795
|
def create_console_security_alert_table(diff: Diff) -> PrettyTable:
|
|
796
796
|
"""
|
|
797
|
-
Creates the detected issues table based on the
|
|
797
|
+
Creates the detected issues table based on alert actions from the API
|
|
798
798
|
:param diff: Diff - Diff report with the detected issues
|
|
799
799
|
:return:
|
|
800
800
|
"""
|
|
@@ -25,7 +25,6 @@ class SocketConfig:
|
|
|
25
25
|
org_slug: Optional[str] = None
|
|
26
26
|
full_scan_path: Optional[str] = None
|
|
27
27
|
repository_path: Optional[str] = None
|
|
28
|
-
security_policy: Dict = None
|
|
29
28
|
repo_visibility: Optional[str] = 'private'
|
|
30
29
|
all_issues: Optional['AllIssues'] = None
|
|
31
30
|
excluded_dirs: Set[str] = field(default_factory=lambda: default_exclude_dirs)
|
|
@@ -42,10 +41,6 @@ class SocketConfig:
|
|
|
42
41
|
|
|
43
42
|
self._validate_api_url(self.api_url)
|
|
44
43
|
|
|
45
|
-
# Initialize empty dict for security policy if None
|
|
46
|
-
if self.security_policy is None:
|
|
47
|
-
self.security_policy = {}
|
|
48
|
-
|
|
49
44
|
# Initialize AllIssues if None
|
|
50
45
|
if self.all_issues is None:
|
|
51
46
|
self.all_issues = AllIssues()
|
|
@@ -70,6 +65,3 @@ class SocketConfig:
|
|
|
70
65
|
self.full_scan_path = f"{base_path}/full-scans"
|
|
71
66
|
self.repository_path = f"{base_path}/repos"
|
|
72
67
|
|
|
73
|
-
def update_security_policy(self, policy: Dict) -> None:
|
|
74
|
-
"""Update security policy"""
|
|
75
|
-
self.security_policy = policy
|
|
@@ -10,7 +10,6 @@ from socketdev.fullscans import (
|
|
|
10
10
|
StreamDiffResponse,
|
|
11
11
|
)
|
|
12
12
|
from socketdev.repos import GetRepoResponse
|
|
13
|
-
from socketdev.settings import OrgSecurityPolicyResponse
|
|
14
13
|
|
|
15
14
|
|
|
16
15
|
@pytest.fixture
|
|
@@ -88,14 +87,7 @@ def stream_diff_response(data_dir, load_json):
|
|
|
88
87
|
})
|
|
89
88
|
|
|
90
89
|
|
|
91
|
-
|
|
92
|
-
def security_policy(data_dir, load_json):
|
|
93
|
-
json_data = load_json(data_dir / "settings" / "security-policy.json")
|
|
94
|
-
return OrgSecurityPolicyResponse.from_dict({
|
|
95
|
-
"success": json_data["success"],
|
|
96
|
-
"status": json_data["status"],
|
|
97
|
-
"securityPolicyRules": json_data["securityPolicyRules"]
|
|
98
|
-
})
|
|
90
|
+
|
|
99
91
|
|
|
100
92
|
|
|
101
93
|
@pytest.fixture
|
|
@@ -146,13 +138,11 @@ def mock_sdk_with_responses(
|
|
|
146
138
|
new_scan_metadata,
|
|
147
139
|
new_scan_stream,
|
|
148
140
|
stream_diff_response,
|
|
149
|
-
security_policy,
|
|
150
141
|
create_full_scan_response,
|
|
151
142
|
):
|
|
152
143
|
sdk = mock_socket_sdk.return_value
|
|
153
144
|
|
|
154
145
|
# Simple returns
|
|
155
|
-
sdk.settings.get.return_value = security_policy
|
|
156
146
|
sdk.fullscans.post.return_value = create_full_scan_response
|
|
157
147
|
|
|
158
148
|
# Argument-based returns
|
|
@@ -33,11 +33,10 @@ class TestPackageAndAlerts:
|
|
|
33
33
|
}
|
|
34
34
|
})
|
|
35
35
|
|
|
36
|
-
# Set up settings.get() to return empty
|
|
36
|
+
# Set up settings.get() to return empty response
|
|
37
37
|
mock.settings = Mock()
|
|
38
38
|
settings_response = Mock()
|
|
39
39
|
settings_response.success = True
|
|
40
|
-
settings_response.security_policy = {}
|
|
41
40
|
mock.settings.get = Mock(return_value=settings_response)
|
|
42
41
|
|
|
43
42
|
return mock
|
|
@@ -48,7 +47,6 @@ class TestPackageAndAlerts:
|
|
|
48
47
|
api_key="test-key",
|
|
49
48
|
allow_unverified_ssl=False
|
|
50
49
|
)
|
|
51
|
-
config.security_policy = {} # Initialize with empty dict
|
|
52
50
|
return config
|
|
53
51
|
|
|
54
52
|
@pytest.fixture
|
|
@@ -135,34 +133,7 @@ class TestPackageAndAlerts:
|
|
|
135
133
|
assert alert.type == "networkAccess"
|
|
136
134
|
assert alert.severity == "high"
|
|
137
135
|
|
|
138
|
-
|
|
139
|
-
"""Test alerts are properly tagged based on security policy"""
|
|
140
|
-
# Mock security policy in config
|
|
141
|
-
core.config.security_policy = {
|
|
142
|
-
"networkAccess": {"action": "error"}
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
package = Package(
|
|
146
|
-
id="pkg:npm/test@1.0.0",
|
|
147
|
-
name="test",
|
|
148
|
-
version="1.0.0",
|
|
149
|
-
type="npm",
|
|
150
|
-
alerts=[{
|
|
151
|
-
"type": "networkAccess",
|
|
152
|
-
"key": "test-alert",
|
|
153
|
-
"severity": "high"
|
|
154
|
-
}],
|
|
155
|
-
topLevelAncestors=[]
|
|
156
|
-
)
|
|
157
|
-
|
|
158
|
-
alerts_collection = {}
|
|
159
|
-
packages = {package.id: package}
|
|
160
|
-
|
|
161
|
-
result = core.add_package_alerts_to_collection(package, alerts_collection, packages)
|
|
162
|
-
|
|
163
|
-
assert len(result) == 1
|
|
164
|
-
alert = result["test-alert"][0]
|
|
165
|
-
assert alert.error is True
|
|
136
|
+
|
|
166
137
|
|
|
167
138
|
def test_get_capabilities_for_added_packages(self, core):
|
|
168
139
|
"""Test capability extraction from package alerts"""
|
|
@@ -7,13 +7,12 @@ def test_config_default_values():
|
|
|
7
7
|
|
|
8
8
|
assert config.api_key == "test_key"
|
|
9
9
|
assert config.api_url == "https://api.socket.dev/v0"
|
|
10
|
-
assert config.timeout ==
|
|
10
|
+
assert config.timeout == 1200
|
|
11
11
|
assert config.allow_unverified_ssl is False
|
|
12
12
|
assert config.org_id is None
|
|
13
13
|
assert config.org_slug is None
|
|
14
14
|
assert config.full_scan_path is None
|
|
15
15
|
assert config.repository_path is None
|
|
16
|
-
assert config.security_policy == {}
|
|
17
16
|
|
|
18
17
|
def test_config_custom_values():
|
|
19
18
|
"""Test that config accepts custom values"""
|
|
@@ -67,14 +66,4 @@ def test_config_update_org_details():
|
|
|
67
66
|
assert config.full_scan_path == "orgs/test-org/full-scans"
|
|
68
67
|
assert config.repository_path == "orgs/test-org/repos"
|
|
69
68
|
|
|
70
|
-
def test_config_update_security_policy():
|
|
71
|
-
"""Test updating security policy"""
|
|
72
|
-
config = SocketConfig(api_key="test_key")
|
|
73
|
-
|
|
74
|
-
test_policy = {
|
|
75
|
-
"rule1": {"action": "block"},
|
|
76
|
-
"rule2": {"action": "warn"}
|
|
77
|
-
}
|
|
78
69
|
|
|
79
|
-
config.security_policy = test_policy
|
|
80
|
-
assert config.security_policy == test_policy
|
|
@@ -1052,28 +1052,26 @@ wheels = [
|
|
|
1052
1052
|
|
|
1053
1053
|
[[package]]
|
|
1054
1054
|
name = "socketdev"
|
|
1055
|
-
version = "3.0.
|
|
1055
|
+
version = "3.0.21"
|
|
1056
1056
|
source = { registry = "https://pypi.org/simple" }
|
|
1057
1057
|
dependencies = [
|
|
1058
1058
|
{ name = "requests" },
|
|
1059
1059
|
{ name = "typing-extensions" },
|
|
1060
1060
|
]
|
|
1061
|
-
sdist = { url = "https://files.pythonhosted.org/packages/
|
|
1061
|
+
sdist = { url = "https://files.pythonhosted.org/packages/33/fb/4669dcd763144f7ebba824562b58648be08f93474ce12fbe3e21836e622f/socketdev-3.0.21.tar.gz", hash = "sha256:c5fe8bdba8c2c114e3bfff9f5f3a4224eca5c85f86a68f68dda8a2d3fea26815", size = 134528, upload-time = "2025-11-27T17:27:09.608Z" }
|
|
1062
1062
|
wheels = [
|
|
1063
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
1063
|
+
{ url = "https://files.pythonhosted.org/packages/e3/40/2974cca90077b861206e8f402571047ac074f6233c524eb88e8ee9323ecc/socketdev-3.0.21-py3-none-any.whl", hash = "sha256:39a85991445a4a37b0a3bc05138d5799cefc3185b77177fdb1e0d9a2ed81fd08", size = 59698, upload-time = "2025-11-27T17:27:07.696Z" },
|
|
1064
1064
|
]
|
|
1065
1065
|
|
|
1066
1066
|
[[package]]
|
|
1067
1067
|
name = "socketsecurity"
|
|
1068
|
-
version = "2.2.
|
|
1068
|
+
version = "2.2.41"
|
|
1069
1069
|
source = { editable = "." }
|
|
1070
1070
|
dependencies = [
|
|
1071
1071
|
{ name = "bs4" },
|
|
1072
1072
|
{ name = "gitpython" },
|
|
1073
|
-
{ name = "hatch" },
|
|
1074
1073
|
{ name = "mdutils" },
|
|
1075
1074
|
{ name = "packaging" },
|
|
1076
|
-
{ name = "pluggy" },
|
|
1077
1075
|
{ name = "prettytable" },
|
|
1078
1076
|
{ name = "python-dotenv" },
|
|
1079
1077
|
{ name = "requests" },
|
|
@@ -1096,15 +1094,18 @@ test = [
|
|
|
1096
1094
|
{ name = "pytest-watch" },
|
|
1097
1095
|
]
|
|
1098
1096
|
|
|
1097
|
+
[package.dev-dependencies]
|
|
1098
|
+
dev = [
|
|
1099
|
+
{ name = "pre-commit" },
|
|
1100
|
+
]
|
|
1101
|
+
|
|
1099
1102
|
[package.metadata]
|
|
1100
1103
|
requires-dist = [
|
|
1101
1104
|
{ name = "bs4", specifier = ">=0.0.2" },
|
|
1102
1105
|
{ name = "gitpython" },
|
|
1103
|
-
{ name = "hatch", specifier = ">=1.14.1" },
|
|
1104
1106
|
{ name = "hatch", marker = "extra == 'dev'" },
|
|
1105
1107
|
{ name = "mdutils" },
|
|
1106
1108
|
{ name = "packaging" },
|
|
1107
|
-
{ name = "pluggy", specifier = ">=1.6.0" },
|
|
1108
1109
|
{ name = "pre-commit", marker = "extra == 'dev'" },
|
|
1109
1110
|
{ name = "prettytable" },
|
|
1110
1111
|
{ name = "pytest", marker = "extra == 'test'", specifier = ">=7.4.0" },
|
|
@@ -1115,12 +1116,15 @@ requires-dist = [
|
|
|
1115
1116
|
{ name = "python-dotenv" },
|
|
1116
1117
|
{ name = "requests" },
|
|
1117
1118
|
{ name = "ruff", marker = "extra == 'dev'", specifier = ">=0.3.0" },
|
|
1118
|
-
{ name = "socketdev", specifier = ">=3.0.
|
|
1119
|
+
{ name = "socketdev", specifier = ">=3.0.21,<4.0.0" },
|
|
1119
1120
|
{ name = "twine", marker = "extra == 'dev'" },
|
|
1120
1121
|
{ name = "uv", marker = "extra == 'dev'", specifier = ">=0.1.0" },
|
|
1121
1122
|
]
|
|
1122
1123
|
provides-extras = ["test", "dev"]
|
|
1123
1124
|
|
|
1125
|
+
[package.metadata.requires-dev]
|
|
1126
|
+
dev = [{ name = "pre-commit", specifier = ">=4.3.0" }]
|
|
1127
|
+
|
|
1124
1128
|
[[package]]
|
|
1125
1129
|
name = "soupsieve"
|
|
1126
1130
|
version = "2.8"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{socketsecurity-2.2.40 → socketsecurity-2.2.43}/.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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{socketsecurity-2.2.40 → socketsecurity-2.2.43}/tests/data/fullscans/diff/stream_diff_full.json
RENAMED
|
File without changes
|
{socketsecurity-2.2.40 → socketsecurity-2.2.43}/tests/data/fullscans/head_scan/metadata.json
RENAMED
|
File without changes
|
{socketsecurity-2.2.40 → socketsecurity-2.2.43}/tests/data/fullscans/head_scan/stream_scan.json
RENAMED
|
File without changes
|
{socketsecurity-2.2.40 → socketsecurity-2.2.43}/tests/data/fullscans/head_scan/stream_scan_full.json
RENAMED
|
File without changes
|
|
File without changes
|
{socketsecurity-2.2.40 → socketsecurity-2.2.43}/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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|