socketsecurity 2.1.0__tar.gz → 2.1.3__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.1.0 → socketsecurity-2.1.3}/PKG-INFO +8 -8
- {socketsecurity-2.1.0 → socketsecurity-2.1.3}/README.md +6 -6
- {socketsecurity-2.1.0 → socketsecurity-2.1.3}/pyproject.toml +2 -2
- {socketsecurity-2.1.0 → socketsecurity-2.1.3}/socketsecurity/__init__.py +1 -1
- {socketsecurity-2.1.0 → socketsecurity-2.1.3}/socketsecurity/core/__init__.py +12 -6
- {socketsecurity-2.1.0 → socketsecurity-2.1.3}/.github/CODEOWNERS +0 -0
- {socketsecurity-2.1.0 → socketsecurity-2.1.3}/.github/PULL_REQUEST_TEMPLATE/bug-fix.md +0 -0
- {socketsecurity-2.1.0 → socketsecurity-2.1.3}/.github/PULL_REQUEST_TEMPLATE/feature.md +0 -0
- {socketsecurity-2.1.0 → socketsecurity-2.1.3}/.github/PULL_REQUEST_TEMPLATE/improvement.md +0 -0
- {socketsecurity-2.1.0 → socketsecurity-2.1.3}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {socketsecurity-2.1.0 → socketsecurity-2.1.3}/.github/workflows/docker-stable.yml +0 -0
- {socketsecurity-2.1.0 → socketsecurity-2.1.3}/.github/workflows/pr-preview.yml +0 -0
- {socketsecurity-2.1.0 → socketsecurity-2.1.3}/.github/workflows/release.yml +0 -0
- {socketsecurity-2.1.0 → socketsecurity-2.1.3}/.github/workflows/version-check.yml +0 -0
- {socketsecurity-2.1.0 → socketsecurity-2.1.3}/.gitignore +0 -0
- {socketsecurity-2.1.0 → socketsecurity-2.1.3}/.hooks/sync_version.py +0 -0
- {socketsecurity-2.1.0 → socketsecurity-2.1.3}/.pre-commit-config.yaml +0 -0
- {socketsecurity-2.1.0 → socketsecurity-2.1.3}/.python-version +0 -0
- {socketsecurity-2.1.0 → socketsecurity-2.1.3}/Dockerfile +0 -0
- {socketsecurity-2.1.0 → socketsecurity-2.1.3}/LICENSE +0 -0
- {socketsecurity-2.1.0 → socketsecurity-2.1.3}/Makefile +0 -0
- {socketsecurity-2.1.0 → socketsecurity-2.1.3}/Pipfile.lock +0 -0
- {socketsecurity-2.1.0 → socketsecurity-2.1.3}/docs/README.md +0 -0
- {socketsecurity-2.1.0 → socketsecurity-2.1.3}/pytest.ini +0 -0
- {socketsecurity-2.1.0 → socketsecurity-2.1.3}/requirements-dev.lock +0 -0
- {socketsecurity-2.1.0 → socketsecurity-2.1.3}/requirements.lock +0 -0
- {socketsecurity-2.1.0 → socketsecurity-2.1.3}/scripts/build_container.sh +0 -0
- {socketsecurity-2.1.0 → socketsecurity-2.1.3}/scripts/deploy-test-docker.sh +0 -0
- {socketsecurity-2.1.0 → socketsecurity-2.1.3}/scripts/deploy-test-pypi.sh +0 -0
- {socketsecurity-2.1.0 → socketsecurity-2.1.3}/scripts/run.sh +0 -0
- {socketsecurity-2.1.0 → socketsecurity-2.1.3}/socketsecurity/config.py +0 -0
- {socketsecurity-2.1.0 → socketsecurity-2.1.3}/socketsecurity/core/classes.py +0 -0
- {socketsecurity-2.1.0 → socketsecurity-2.1.3}/socketsecurity/core/cli_client.py +0 -0
- {socketsecurity-2.1.0 → socketsecurity-2.1.3}/socketsecurity/core/exceptions.py +0 -0
- {socketsecurity-2.1.0 → socketsecurity-2.1.3}/socketsecurity/core/git_interface.py +0 -0
- {socketsecurity-2.1.0 → socketsecurity-2.1.3}/socketsecurity/core/logging.py +0 -0
- {socketsecurity-2.1.0 → socketsecurity-2.1.3}/socketsecurity/core/messages.py +0 -0
- {socketsecurity-2.1.0 → socketsecurity-2.1.3}/socketsecurity/core/scm/__init__.py +0 -0
- {socketsecurity-2.1.0 → socketsecurity-2.1.3}/socketsecurity/core/scm/base.py +0 -0
- {socketsecurity-2.1.0 → socketsecurity-2.1.3}/socketsecurity/core/scm/client.py +0 -0
- {socketsecurity-2.1.0 → socketsecurity-2.1.3}/socketsecurity/core/scm/github.py +0 -0
- {socketsecurity-2.1.0 → socketsecurity-2.1.3}/socketsecurity/core/scm/gitlab.py +0 -0
- {socketsecurity-2.1.0 → socketsecurity-2.1.3}/socketsecurity/core/scm_comments.py +0 -0
- {socketsecurity-2.1.0 → socketsecurity-2.1.3}/socketsecurity/core/socket_config.py +0 -0
- {socketsecurity-2.1.0 → socketsecurity-2.1.3}/socketsecurity/core/utils.py +0 -0
- {socketsecurity-2.1.0 → socketsecurity-2.1.3}/socketsecurity/output.py +0 -0
- {socketsecurity-2.1.0 → socketsecurity-2.1.3}/socketsecurity/plugins/__init__.py +0 -0
- {socketsecurity-2.1.0 → socketsecurity-2.1.3}/socketsecurity/plugins/base.py +0 -0
- {socketsecurity-2.1.0 → socketsecurity-2.1.3}/socketsecurity/plugins/jira.py +0 -0
- {socketsecurity-2.1.0 → socketsecurity-2.1.3}/socketsecurity/plugins/manager.py +0 -0
- {socketsecurity-2.1.0 → socketsecurity-2.1.3}/socketsecurity/plugins/slack.py +0 -0
- {socketsecurity-2.1.0 → socketsecurity-2.1.3}/socketsecurity/plugins/teams.py +0 -0
- {socketsecurity-2.1.0 → socketsecurity-2.1.3}/socketsecurity/plugins/webhook.py +0 -0
- {socketsecurity-2.1.0 → socketsecurity-2.1.3}/socketsecurity/socketcli.py +0 -0
- {socketsecurity-2.1.0 → socketsecurity-2.1.3}/tests/__init__.py +0 -0
- {socketsecurity-2.1.0 → socketsecurity-2.1.3}/tests/core/conftest.py +0 -0
- {socketsecurity-2.1.0 → socketsecurity-2.1.3}/tests/core/create_diff_input.json +0 -0
- {socketsecurity-2.1.0 → socketsecurity-2.1.3}/tests/core/test_diff_generation.py +0 -0
- {socketsecurity-2.1.0 → socketsecurity-2.1.3}/tests/core/test_package_and_alerts.py +0 -0
- {socketsecurity-2.1.0 → socketsecurity-2.1.3}/tests/core/test_sdk_methods.py +0 -0
- {socketsecurity-2.1.0 → socketsecurity-2.1.3}/tests/core/test_supporting_methods.py +0 -0
- {socketsecurity-2.1.0 → socketsecurity-2.1.3}/tests/data/fullscans/create_response.json +0 -0
- {socketsecurity-2.1.0 → socketsecurity-2.1.3}/tests/data/fullscans/diff/stream_diff.json +0 -0
- {socketsecurity-2.1.0 → socketsecurity-2.1.3}/tests/data/fullscans/diff/stream_diff_full.json +0 -0
- {socketsecurity-2.1.0 → socketsecurity-2.1.3}/tests/data/fullscans/head_scan/metadata.json +0 -0
- {socketsecurity-2.1.0 → socketsecurity-2.1.3}/tests/data/fullscans/head_scan/stream_scan.json +0 -0
- {socketsecurity-2.1.0 → socketsecurity-2.1.3}/tests/data/fullscans/head_scan/stream_scan_full.json +0 -0
- {socketsecurity-2.1.0 → socketsecurity-2.1.3}/tests/data/fullscans/new_scan/metadata.json +0 -0
- {socketsecurity-2.1.0 → socketsecurity-2.1.3}/tests/data/fullscans/new_scan/stream_scan.json +0 -0
- {socketsecurity-2.1.0 → socketsecurity-2.1.3}/tests/data/repos/repo_info_error.json +0 -0
- {socketsecurity-2.1.0 → socketsecurity-2.1.3}/tests/data/repos/repo_info_no_head.json +0 -0
- {socketsecurity-2.1.0 → socketsecurity-2.1.3}/tests/data/repos/repo_info_success.json +0 -0
- {socketsecurity-2.1.0 → socketsecurity-2.1.3}/tests/data/settings/security-policy.json +0 -0
- {socketsecurity-2.1.0 → socketsecurity-2.1.3}/tests/unit/__init__.py +0 -0
- {socketsecurity-2.1.0 → socketsecurity-2.1.3}/tests/unit/test_cli_config.py +0 -0
- {socketsecurity-2.1.0 → socketsecurity-2.1.3}/tests/unit/test_client.py +0 -0
- {socketsecurity-2.1.0 → socketsecurity-2.1.3}/tests/unit/test_config.py +0 -0
- {socketsecurity-2.1.0 → socketsecurity-2.1.3}/tests/unit/test_output.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: socketsecurity
|
|
3
|
-
Version: 2.1.
|
|
3
|
+
Version: 2.1.3
|
|
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<3,>=2.1.
|
|
42
|
+
Requires-Dist: socket-sdk-python<3,>=2.1.5
|
|
43
43
|
Provides-Extra: dev
|
|
44
44
|
Requires-Dist: hatch; extra == 'dev'
|
|
45
45
|
Requires-Dist: pip-tools>=7.4.0; extra == 'dev'
|
|
@@ -96,12 +96,12 @@ If you don't want to provide the Socket API Token every time then you can use th
|
|
|
96
96
|
| --commit-sha | False | "" | Commit SHA |
|
|
97
97
|
|
|
98
98
|
#### Path and File
|
|
99
|
-
| Parameter
|
|
100
|
-
|
|
101
|
-
| --target-path
|
|
102
|
-
| --sbom-file
|
|
103
|
-
| --files
|
|
104
|
-
| --
|
|
99
|
+
| Parameter | Required | Default | Description |
|
|
100
|
+
|:----------------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|
101
|
+
| --target-path | False | ./ | Target path for analysis |
|
|
102
|
+
| --sbom-file | False | | SBOM file path |
|
|
103
|
+
| --files | False | [] | Files to analyze (JSON array string) |
|
|
104
|
+
| --excluded-ecosystems | False | [] | List of ecosystems to exclude from analysis (JSON array string). You can get supported files from the [Supported Files API](https://docs.socket.dev/reference/getsupportedfiles) |
|
|
105
105
|
|
|
106
106
|
#### Branch and Scan Configuration
|
|
107
107
|
| Parameter | Required | Default | Description |
|
|
@@ -40,12 +40,12 @@ If you don't want to provide the Socket API Token every time then you can use th
|
|
|
40
40
|
| --commit-sha | False | "" | Commit SHA |
|
|
41
41
|
|
|
42
42
|
#### Path and File
|
|
43
|
-
| Parameter
|
|
44
|
-
|
|
45
|
-
| --target-path
|
|
46
|
-
| --sbom-file
|
|
47
|
-
| --files
|
|
48
|
-
| --
|
|
43
|
+
| Parameter | Required | Default | Description |
|
|
44
|
+
|:----------------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|
45
|
+
| --target-path | False | ./ | Target path for analysis |
|
|
46
|
+
| --sbom-file | False | | SBOM file path |
|
|
47
|
+
| --files | False | [] | Files to analyze (JSON array string) |
|
|
48
|
+
| --excluded-ecosystems | False | [] | List of ecosystems to exclude from analysis (JSON array string). You can get supported files from the [Supported Files API](https://docs.socket.dev/reference/getsupportedfiles) |
|
|
49
49
|
|
|
50
50
|
#### Branch and Scan Configuration
|
|
51
51
|
| Parameter | Required | Default | Description |
|
|
@@ -6,7 +6,7 @@ build-backend = "hatchling.build"
|
|
|
6
6
|
|
|
7
7
|
[project]
|
|
8
8
|
name = "socketsecurity"
|
|
9
|
-
version = "2.1.
|
|
9
|
+
version = "2.1.3"
|
|
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.1.
|
|
19
|
+
'socket-sdk-python>=2.1.5,<3'
|
|
20
20
|
]
|
|
21
21
|
readme = "README.md"
|
|
22
22
|
description = "Socket Security CLI for CI/CD"
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
__author__ = 'socket.dev'
|
|
2
|
-
__version__ = '2.1.
|
|
2
|
+
__version__ = '2.1.3'
|
|
@@ -15,7 +15,7 @@ from socketdev.fullscans import FullScanParams, SocketArtifact
|
|
|
15
15
|
from socketdev.org import Organization
|
|
16
16
|
from socketdev.repos import RepositoryInfo
|
|
17
17
|
from socketdev.settings import SecurityPolicyRule
|
|
18
|
-
|
|
18
|
+
import copy
|
|
19
19
|
from socketsecurity import __version__
|
|
20
20
|
from socketsecurity.core.classes import (
|
|
21
21
|
Alert,
|
|
@@ -187,6 +187,7 @@ class Core:
|
|
|
187
187
|
for ecosystem in patterns:
|
|
188
188
|
if ecosystem in self.config.excluded_ecosystems:
|
|
189
189
|
continue
|
|
190
|
+
log.info(f'Scanning ecosystem: {ecosystem}')
|
|
190
191
|
ecosystem_patterns = patterns[ecosystem]
|
|
191
192
|
for file_name in ecosystem_patterns:
|
|
192
193
|
original_pattern = ecosystem_patterns[file_name]["pattern"]
|
|
@@ -209,7 +210,7 @@ class Core:
|
|
|
209
210
|
glob_end = time.time()
|
|
210
211
|
log.debug(f"Globbing took {glob_end - glob_start:.4f} seconds")
|
|
211
212
|
|
|
212
|
-
log.
|
|
213
|
+
log.info(f"Total files found: {len(files)}")
|
|
213
214
|
return sorted(files)
|
|
214
215
|
|
|
215
216
|
def get_supported_patterns(self) -> Dict:
|
|
@@ -331,7 +332,7 @@ class Core:
|
|
|
331
332
|
Returns:
|
|
332
333
|
FullScan object with scan results
|
|
333
334
|
"""
|
|
334
|
-
log.
|
|
335
|
+
log.info("Creating new full scan")
|
|
335
336
|
create_full_start = time.time()
|
|
336
337
|
|
|
337
338
|
res = self.sdk.fullscans.post(files, params, use_types=True)
|
|
@@ -627,11 +628,14 @@ class Core:
|
|
|
627
628
|
head_full_scan_id = None
|
|
628
629
|
|
|
629
630
|
if head_full_scan_id is None:
|
|
630
|
-
|
|
631
|
+
new_params = copy.deepcopy(params.__dict__)
|
|
632
|
+
new_params.pop('include_license_details')
|
|
633
|
+
tmp_params = FullScanParams(**new_params)
|
|
634
|
+
tmp_params.include_license_details = params.include_license_details
|
|
631
635
|
tmp_params.tmp = True
|
|
632
636
|
tmp_params.set_as_pending_head = False
|
|
633
637
|
tmp_params.make_default_branch = False
|
|
634
|
-
head_full_scan = self.create_full_scan(Core.empty_head_scan_file(),
|
|
638
|
+
head_full_scan = self.create_full_scan(Core.empty_head_scan_file(), tmp_params)
|
|
635
639
|
head_full_scan_id = head_full_scan.id
|
|
636
640
|
|
|
637
641
|
# Create new scan
|
|
@@ -666,7 +670,7 @@ class Core:
|
|
|
666
670
|
diff.report_url = report_url
|
|
667
671
|
|
|
668
672
|
if head_full_scan_id is not None:
|
|
669
|
-
diff.diff_url = f"{base_socket}/{self.config.org_slug}/diff/{diff.id}
|
|
673
|
+
diff.diff_url = f"{base_socket}/{self.config.org_slug}/diff/{head_full_scan_id}/{diff.id}"
|
|
670
674
|
else:
|
|
671
675
|
diff.diff_url = diff.report_url
|
|
672
676
|
|
|
@@ -795,6 +799,8 @@ class Core:
|
|
|
795
799
|
introduced_by = []
|
|
796
800
|
if package.direct:
|
|
797
801
|
manifests = ""
|
|
802
|
+
if not hasattr(package, "manifestFiles"):
|
|
803
|
+
return introduced_by
|
|
798
804
|
for manifest_data in package.manifestFiles:
|
|
799
805
|
manifest_file = manifest_data.get("file")
|
|
800
806
|
manifests += f"{manifest_file};"
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{socketsecurity-2.1.0 → socketsecurity-2.1.3}/tests/data/fullscans/diff/stream_diff_full.json
RENAMED
|
File without changes
|
|
File without changes
|
{socketsecurity-2.1.0 → socketsecurity-2.1.3}/tests/data/fullscans/head_scan/stream_scan.json
RENAMED
|
File without changes
|
{socketsecurity-2.1.0 → socketsecurity-2.1.3}/tests/data/fullscans/head_scan/stream_scan_full.json
RENAMED
|
File without changes
|
|
File without changes
|
{socketsecurity-2.1.0 → socketsecurity-2.1.3}/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
|