socketsecurity 2.2.32__tar.gz → 2.2.35__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.32 → socketsecurity-2.2.35}/Dockerfile +5 -1
- {socketsecurity-2.2.32 → socketsecurity-2.2.35}/PKG-INFO +9 -2
- {socketsecurity-2.2.32 → socketsecurity-2.2.35}/README.md +8 -1
- {socketsecurity-2.2.32 → socketsecurity-2.2.35}/pyproject.toml +1 -1
- socketsecurity-2.2.35/scripts/docker-entrypoint.sh +18 -0
- {socketsecurity-2.2.32 → socketsecurity-2.2.35}/socketsecurity/__init__.py +1 -1
- {socketsecurity-2.2.32 → socketsecurity-2.2.35}/socketsecurity/config.py +8 -0
- {socketsecurity-2.2.32 → socketsecurity-2.2.35}/socketsecurity/core/__init__.py +70 -18
- {socketsecurity-2.2.32 → socketsecurity-2.2.35}/socketsecurity/core/tools/reachability.py +10 -0
- {socketsecurity-2.2.32 → socketsecurity-2.2.35}/socketsecurity/socketcli.py +3 -1
- {socketsecurity-2.2.32 → socketsecurity-2.2.35}/.github/CODEOWNERS +0 -0
- {socketsecurity-2.2.32 → socketsecurity-2.2.35}/.github/PULL_REQUEST_TEMPLATE/bug-fix.md +0 -0
- {socketsecurity-2.2.32 → socketsecurity-2.2.35}/.github/PULL_REQUEST_TEMPLATE/feature.md +0 -0
- {socketsecurity-2.2.32 → socketsecurity-2.2.35}/.github/PULL_REQUEST_TEMPLATE/improvement.md +0 -0
- {socketsecurity-2.2.32 → socketsecurity-2.2.35}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {socketsecurity-2.2.32 → socketsecurity-2.2.35}/.github/workflows/docker-stable.yml +0 -0
- {socketsecurity-2.2.32 → socketsecurity-2.2.35}/.github/workflows/pr-preview.yml +0 -0
- {socketsecurity-2.2.32 → socketsecurity-2.2.35}/.github/workflows/release.yml +0 -0
- {socketsecurity-2.2.32 → socketsecurity-2.2.35}/.github/workflows/version-check.yml +0 -0
- {socketsecurity-2.2.32 → socketsecurity-2.2.35}/.gitignore +0 -0
- {socketsecurity-2.2.32 → socketsecurity-2.2.35}/.hooks/sync_version.py +0 -0
- {socketsecurity-2.2.32 → socketsecurity-2.2.35}/.pre-commit-config.yaml +0 -0
- {socketsecurity-2.2.32 → socketsecurity-2.2.35}/.python-version +0 -0
- {socketsecurity-2.2.32 → socketsecurity-2.2.35}/LICENSE +0 -0
- {socketsecurity-2.2.32 → socketsecurity-2.2.35}/Makefile +0 -0
- {socketsecurity-2.2.32 → socketsecurity-2.2.35}/docs/README.md +0 -0
- {socketsecurity-2.2.32 → socketsecurity-2.2.35}/pytest.ini +0 -0
- {socketsecurity-2.2.32 → socketsecurity-2.2.35}/scripts/build_container.sh +0 -0
- {socketsecurity-2.2.32 → socketsecurity-2.2.35}/scripts/build_container_flexible.sh +0 -0
- {socketsecurity-2.2.32 → socketsecurity-2.2.35}/scripts/deploy-test-docker.sh +0 -0
- {socketsecurity-2.2.32 → socketsecurity-2.2.35}/scripts/deploy-test-pypi.sh +0 -0
- {socketsecurity-2.2.32 → socketsecurity-2.2.35}/scripts/run.sh +0 -0
- {socketsecurity-2.2.32 → socketsecurity-2.2.35}/socketsecurity/core/classes.py +0 -0
- {socketsecurity-2.2.32 → socketsecurity-2.2.35}/socketsecurity/core/cli_client.py +0 -0
- {socketsecurity-2.2.32 → socketsecurity-2.2.35}/socketsecurity/core/exceptions.py +0 -0
- {socketsecurity-2.2.32 → socketsecurity-2.2.35}/socketsecurity/core/git_interface.py +0 -0
- {socketsecurity-2.2.32 → socketsecurity-2.2.35}/socketsecurity/core/helper/__init__.py +0 -0
- {socketsecurity-2.2.32 → socketsecurity-2.2.35}/socketsecurity/core/lazy_file_loader.py +0 -0
- {socketsecurity-2.2.32 → socketsecurity-2.2.35}/socketsecurity/core/logging.py +0 -0
- {socketsecurity-2.2.32 → socketsecurity-2.2.35}/socketsecurity/core/messages.py +0 -0
- {socketsecurity-2.2.32 → socketsecurity-2.2.35}/socketsecurity/core/resource_utils.py +0 -0
- {socketsecurity-2.2.32 → socketsecurity-2.2.35}/socketsecurity/core/scm/__init__.py +0 -0
- {socketsecurity-2.2.32 → socketsecurity-2.2.35}/socketsecurity/core/scm/base.py +0 -0
- {socketsecurity-2.2.32 → socketsecurity-2.2.35}/socketsecurity/core/scm/client.py +0 -0
- {socketsecurity-2.2.32 → socketsecurity-2.2.35}/socketsecurity/core/scm/github.py +0 -0
- {socketsecurity-2.2.32 → socketsecurity-2.2.35}/socketsecurity/core/scm/gitlab.py +0 -0
- {socketsecurity-2.2.32 → socketsecurity-2.2.35}/socketsecurity/core/scm_comments.py +0 -0
- {socketsecurity-2.2.32 → socketsecurity-2.2.35}/socketsecurity/core/socket_config.py +0 -0
- {socketsecurity-2.2.32 → socketsecurity-2.2.35}/socketsecurity/core/utils.py +0 -0
- {socketsecurity-2.2.32 → socketsecurity-2.2.35}/socketsecurity/output.py +0 -0
- {socketsecurity-2.2.32 → socketsecurity-2.2.35}/socketsecurity/plugins/__init__.py +0 -0
- {socketsecurity-2.2.32 → socketsecurity-2.2.35}/socketsecurity/plugins/base.py +0 -0
- {socketsecurity-2.2.32 → socketsecurity-2.2.35}/socketsecurity/plugins/jira.py +0 -0
- {socketsecurity-2.2.32 → socketsecurity-2.2.35}/socketsecurity/plugins/manager.py +0 -0
- {socketsecurity-2.2.32 → socketsecurity-2.2.35}/socketsecurity/plugins/slack.py +0 -0
- {socketsecurity-2.2.32 → socketsecurity-2.2.35}/socketsecurity/plugins/teams.py +0 -0
- {socketsecurity-2.2.32 → socketsecurity-2.2.35}/socketsecurity/plugins/webhook.py +0 -0
- {socketsecurity-2.2.32 → socketsecurity-2.2.35}/tests/__init__.py +0 -0
- {socketsecurity-2.2.32 → socketsecurity-2.2.35}/tests/core/conftest.py +0 -0
- {socketsecurity-2.2.32 → socketsecurity-2.2.35}/tests/core/create_diff_input.json +0 -0
- {socketsecurity-2.2.32 → socketsecurity-2.2.35}/tests/core/test_diff_generation.py +0 -0
- {socketsecurity-2.2.32 → socketsecurity-2.2.35}/tests/core/test_package_and_alerts.py +0 -0
- {socketsecurity-2.2.32 → socketsecurity-2.2.35}/tests/core/test_sdk_methods.py +0 -0
- {socketsecurity-2.2.32 → socketsecurity-2.2.35}/tests/core/test_supporting_methods.py +0 -0
- {socketsecurity-2.2.32 → socketsecurity-2.2.35}/tests/data/fullscans/create_response.json +0 -0
- {socketsecurity-2.2.32 → socketsecurity-2.2.35}/tests/data/fullscans/diff/stream_diff.json +0 -0
- {socketsecurity-2.2.32 → socketsecurity-2.2.35}/tests/data/fullscans/diff/stream_diff_full.json +0 -0
- {socketsecurity-2.2.32 → socketsecurity-2.2.35}/tests/data/fullscans/head_scan/metadata.json +0 -0
- {socketsecurity-2.2.32 → socketsecurity-2.2.35}/tests/data/fullscans/head_scan/stream_scan.json +0 -0
- {socketsecurity-2.2.32 → socketsecurity-2.2.35}/tests/data/fullscans/head_scan/stream_scan_full.json +0 -0
- {socketsecurity-2.2.32 → socketsecurity-2.2.35}/tests/data/fullscans/new_scan/metadata.json +0 -0
- {socketsecurity-2.2.32 → socketsecurity-2.2.35}/tests/data/fullscans/new_scan/stream_scan.json +0 -0
- {socketsecurity-2.2.32 → socketsecurity-2.2.35}/tests/data/repos/repo_info_error.json +0 -0
- {socketsecurity-2.2.32 → socketsecurity-2.2.35}/tests/data/repos/repo_info_no_head.json +0 -0
- {socketsecurity-2.2.32 → socketsecurity-2.2.35}/tests/data/repos/repo_info_success.json +0 -0
- {socketsecurity-2.2.32 → socketsecurity-2.2.35}/tests/data/settings/security-policy.json +0 -0
- {socketsecurity-2.2.32 → socketsecurity-2.2.35}/tests/unit/__init__.py +0 -0
- {socketsecurity-2.2.32 → socketsecurity-2.2.35}/tests/unit/test_cli_config.py +0 -0
- {socketsecurity-2.2.32 → socketsecurity-2.2.35}/tests/unit/test_client.py +0 -0
- {socketsecurity-2.2.32 → socketsecurity-2.2.35}/tests/unit/test_config.py +0 -0
- {socketsecurity-2.2.32 → socketsecurity-2.2.35}/tests/unit/test_gitlab_auth.py +0 -0
- {socketsecurity-2.2.32 → socketsecurity-2.2.35}/tests/unit/test_gitlab_auth_fallback.py +0 -0
- {socketsecurity-2.2.32 → socketsecurity-2.2.35}/tests/unit/test_output.py +0 -0
- {socketsecurity-2.2.32 → socketsecurity-2.2.35}/uv.lock +0 -0
- {socketsecurity-2.2.32 → socketsecurity-2.2.35}/workflows/bitbucket-pipelines.yml +0 -0
- {socketsecurity-2.2.32 → socketsecurity-2.2.35}/workflows/github-actions.yml +0 -0
- {socketsecurity-2.2.32 → socketsecurity-2.2.35}/workflows/gitlab-ci.yml +0 -0
|
@@ -99,4 +99,8 @@ RUN if [ "$USE_LOCAL_INSTALL" = "true" ]; then \
|
|
|
99
99
|
# Create workspace directory with proper permissions
|
|
100
100
|
RUN mkdir -p /go/src && chmod -R 777 /go
|
|
101
101
|
|
|
102
|
-
|
|
102
|
+
# Copy and setup entrypoint script
|
|
103
|
+
COPY scripts/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
|
|
104
|
+
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
|
|
105
|
+
|
|
106
|
+
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: socketsecurity
|
|
3
|
-
Version: 2.2.
|
|
3
|
+
Version: 2.2.35
|
|
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>
|
|
@@ -300,7 +300,9 @@ The CLI now automatically detects repository information from your git environme
|
|
|
300
300
|
- **Committer information**: Git commit author details
|
|
301
301
|
- **Default branch status**: Determined from git repository and CI environment
|
|
302
302
|
- **Changed files**: Files modified in the current commit (for differential scanning)
|
|
303
|
-
|
|
303
|
+
> **Note on merge commits**:
|
|
304
|
+
> Standard merges (two parents) are supported.
|
|
305
|
+
> For *octopus merges* (three or more parents), Git only reports changes relative to the first parent. This can lead to incomplete or empty file lists if changes only exist relative to other parents. In these cases, differential scanning may be skipped. To ensure coverage, use `--ignore-commit-files` to force a full scan or specify files explicitly with `--files`.
|
|
304
306
|
### Default Branch Detection
|
|
305
307
|
|
|
306
308
|
The CLI uses intelligent default branch detection with the following priority:
|
|
@@ -485,6 +487,11 @@ The manifest archive feature is useful for:
|
|
|
485
487
|
|
|
486
488
|
> **Note**: The tar.gz archive preserves the original directory structure, making it easy to extract and examine the files in their proper context.
|
|
487
489
|
|
|
490
|
+
### Differential scan skipped on octopus merge
|
|
491
|
+
|
|
492
|
+
When your repo uses an **octopus merge** (3+ parents), the CLI may not detect all changed files.
|
|
493
|
+
This is expected Git behavior: the default diff only compares the merge result to the first parent.
|
|
494
|
+
|
|
488
495
|
## Development
|
|
489
496
|
|
|
490
497
|
This project uses `pyproject.toml` as the primary dependency specification.
|
|
@@ -243,7 +243,9 @@ The CLI now automatically detects repository information from your git environme
|
|
|
243
243
|
- **Committer information**: Git commit author details
|
|
244
244
|
- **Default branch status**: Determined from git repository and CI environment
|
|
245
245
|
- **Changed files**: Files modified in the current commit (for differential scanning)
|
|
246
|
-
|
|
246
|
+
> **Note on merge commits**:
|
|
247
|
+
> Standard merges (two parents) are supported.
|
|
248
|
+
> For *octopus merges* (three or more parents), Git only reports changes relative to the first parent. This can lead to incomplete or empty file lists if changes only exist relative to other parents. In these cases, differential scanning may be skipped. To ensure coverage, use `--ignore-commit-files` to force a full scan or specify files explicitly with `--files`.
|
|
247
249
|
### Default Branch Detection
|
|
248
250
|
|
|
249
251
|
The CLI uses intelligent default branch detection with the following priority:
|
|
@@ -428,6 +430,11 @@ The manifest archive feature is useful for:
|
|
|
428
430
|
|
|
429
431
|
> **Note**: The tar.gz archive preserves the original directory structure, making it easy to extract and examine the files in their proper context.
|
|
430
432
|
|
|
433
|
+
### Differential scan skipped on octopus merge
|
|
434
|
+
|
|
435
|
+
When your repo uses an **octopus merge** (3+ parents), the CLI may not detect all changed files.
|
|
436
|
+
This is expected Git behavior: the default diff only compares the merge result to the first parent.
|
|
437
|
+
|
|
431
438
|
## Development
|
|
432
439
|
|
|
433
440
|
This project uses `pyproject.toml` as the primary dependency specification.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
|
|
3
|
+
# Docker entrypoint script to support both patterns:
|
|
4
|
+
# docker run socketdev/cli socketcli --params
|
|
5
|
+
# docker run socketdev/cli --cli-params
|
|
6
|
+
|
|
7
|
+
# Check if we have any arguments
|
|
8
|
+
if [ $# -eq 0 ]; then
|
|
9
|
+
# No arguments provided, run socketcli with no args (will show help)
|
|
10
|
+
exec socketcli --help
|
|
11
|
+
elif [ "$1" = "socketcli" ]; then
|
|
12
|
+
# If first argument is "socketcli", shift it out and pass the rest to socketcli
|
|
13
|
+
shift
|
|
14
|
+
exec socketcli "$@"
|
|
15
|
+
else
|
|
16
|
+
# If first argument is not "socketcli", assume all arguments are for socketcli
|
|
17
|
+
exec socketcli "$@"
|
|
18
|
+
fi
|
|
@@ -68,6 +68,7 @@ class CliConfig:
|
|
|
68
68
|
reach_analysis_memory_limit: Optional[int] = None
|
|
69
69
|
reach_analysis_timeout: Optional[int] = None
|
|
70
70
|
reach_disable_analytics: bool = False
|
|
71
|
+
reach_disable_analysis_splitting: bool = False
|
|
71
72
|
reach_ecosystems: Optional[List[str]] = None
|
|
72
73
|
reach_exclude_paths: Optional[List[str]] = None
|
|
73
74
|
reach_skip_cache: bool = False
|
|
@@ -129,6 +130,7 @@ class CliConfig:
|
|
|
129
130
|
'reach_analysis_timeout': args.reach_analysis_timeout,
|
|
130
131
|
'reach_analysis_memory_limit': args.reach_analysis_memory_limit,
|
|
131
132
|
'reach_disable_analytics': args.reach_disable_analytics,
|
|
133
|
+
'reach_disable_analysis_splitting': args.reach_disable_analysis_splitting,
|
|
132
134
|
'reach_ecosystems': args.reach_ecosystems.split(',') if args.reach_ecosystems else None,
|
|
133
135
|
'reach_exclude_paths': args.reach_exclude_paths.split(',') if args.reach_exclude_paths else None,
|
|
134
136
|
'reach_skip_cache': args.reach_skip_cache,
|
|
@@ -567,6 +569,12 @@ def create_argument_parser() -> argparse.ArgumentParser:
|
|
|
567
569
|
action="store_true",
|
|
568
570
|
help="Disable analytics sharing for reachability analysis"
|
|
569
571
|
)
|
|
572
|
+
reachability_group.add_argument(
|
|
573
|
+
"--reach-disable-analysis-splitting",
|
|
574
|
+
dest="reach_disable_analysis_splitting",
|
|
575
|
+
action="store_true",
|
|
576
|
+
help="Disable analysis splitting/bucketing for reachability analysis"
|
|
577
|
+
)
|
|
570
578
|
reachability_group.add_argument(
|
|
571
579
|
"--reach-output-file",
|
|
572
580
|
dest="reach_output_file",
|
|
@@ -442,12 +442,13 @@ class Core:
|
|
|
442
442
|
Returns:
|
|
443
443
|
List containing path to a temporary empty file
|
|
444
444
|
"""
|
|
445
|
-
# Create a temporary
|
|
446
|
-
|
|
445
|
+
# Create a temporary directory and then create our specific filename
|
|
446
|
+
temp_dir = tempfile.gettempdir()
|
|
447
|
+
temp_path = os.path.join(temp_dir, '.socket.facts.json')
|
|
447
448
|
|
|
448
|
-
#
|
|
449
|
-
|
|
450
|
-
|
|
449
|
+
# Create the empty file
|
|
450
|
+
with open(temp_path, 'w') as f:
|
|
451
|
+
pass # Creates an empty file
|
|
451
452
|
|
|
452
453
|
log.debug(f"Created temporary empty file for baseline scan: {temp_path}")
|
|
453
454
|
return [temp_path]
|
|
@@ -524,18 +525,42 @@ class Core:
|
|
|
524
525
|
if save_manifest_tar_path and all_files and paths:
|
|
525
526
|
self.save_manifest_tar(all_files, save_manifest_tar_path, paths[0])
|
|
526
527
|
|
|
528
|
+
# If no supported files found, create empty scan
|
|
527
529
|
if not all_files:
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
530
|
+
log.info("No supported manifest files found - creating empty scan")
|
|
531
|
+
empty_files = Core.empty_head_scan_file()
|
|
532
|
+
try:
|
|
533
|
+
# Create new scan
|
|
534
|
+
new_scan_start = time.time()
|
|
535
|
+
new_full_scan = self.create_full_scan(empty_files, params, base_paths=base_paths)
|
|
536
|
+
new_scan_end = time.time()
|
|
537
|
+
log.info(f"Total time to create empty full scan: {new_scan_end - new_scan_start:.2f}")
|
|
538
|
+
|
|
539
|
+
# Clean up the temporary empty file
|
|
540
|
+
for temp_file in empty_files:
|
|
541
|
+
try:
|
|
542
|
+
os.unlink(temp_file)
|
|
543
|
+
log.debug(f"Cleaned up temporary file: {temp_file}")
|
|
544
|
+
except OSError as e:
|
|
545
|
+
log.warning(f"Failed to clean up temporary file {temp_file}: {e}")
|
|
546
|
+
except Exception as e:
|
|
547
|
+
# Clean up temp files even if scan creation fails
|
|
548
|
+
for temp_file in empty_files:
|
|
549
|
+
try:
|
|
550
|
+
os.unlink(temp_file)
|
|
551
|
+
except OSError:
|
|
552
|
+
pass
|
|
553
|
+
raise e
|
|
554
|
+
else:
|
|
555
|
+
try:
|
|
556
|
+
# Create new scan
|
|
557
|
+
new_scan_start = time.time()
|
|
558
|
+
new_full_scan = self.create_full_scan(all_files, params, base_paths=base_paths)
|
|
559
|
+
new_scan_end = time.time()
|
|
560
|
+
log.info(f"Total time to create new full scan: {new_scan_end - new_scan_start:.2f}")
|
|
561
|
+
except APIFailure as e:
|
|
562
|
+
log.error(f"Failed to create full scan: {e}")
|
|
563
|
+
raise
|
|
539
564
|
|
|
540
565
|
# Construct report URL
|
|
541
566
|
base_socket = "https://socket.dev/dashboard/org"
|
|
@@ -888,8 +913,11 @@ class Core:
|
|
|
888
913
|
if save_manifest_tar_path and all_files and paths:
|
|
889
914
|
self.save_manifest_tar(all_files, save_manifest_tar_path, paths[0])
|
|
890
915
|
|
|
916
|
+
# If no supported files found, create empty scan for comparison
|
|
917
|
+
scan_files = all_files
|
|
891
918
|
if not all_files:
|
|
892
|
-
|
|
919
|
+
log.info("No supported manifest files found - creating empty scan for diff comparison")
|
|
920
|
+
scan_files = Core.empty_head_scan_file()
|
|
893
921
|
|
|
894
922
|
try:
|
|
895
923
|
# Get head scan ID
|
|
@@ -932,19 +960,43 @@ class Core:
|
|
|
932
960
|
raise e
|
|
933
961
|
|
|
934
962
|
# Create new scan
|
|
963
|
+
temp_files_to_cleanup = []
|
|
964
|
+
if not all_files: # We're using empty scan files
|
|
965
|
+
temp_files_to_cleanup = scan_files
|
|
966
|
+
|
|
935
967
|
try:
|
|
936
968
|
new_scan_start = time.time()
|
|
937
|
-
new_full_scan = self.create_full_scan(
|
|
969
|
+
new_full_scan = self.create_full_scan(scan_files, params, base_paths=base_paths)
|
|
938
970
|
new_scan_end = time.time()
|
|
939
971
|
log.info(f"Total time to create new full scan: {new_scan_end - new_scan_start:.2f}")
|
|
940
972
|
except APIFailure as e:
|
|
941
973
|
log.error(f"API Error: {e}")
|
|
974
|
+
# Clean up temp files if any
|
|
975
|
+
for temp_file in temp_files_to_cleanup:
|
|
976
|
+
try:
|
|
977
|
+
os.unlink(temp_file)
|
|
978
|
+
except OSError:
|
|
979
|
+
pass
|
|
942
980
|
sys.exit(1)
|
|
943
981
|
except Exception as e:
|
|
944
982
|
import traceback
|
|
945
983
|
log.error(f"Error creating new full scan: {str(e)}")
|
|
946
984
|
log.error(f"Stack trace:\n{traceback.format_exc()}")
|
|
985
|
+
# Clean up temp files if any
|
|
986
|
+
for temp_file in temp_files_to_cleanup:
|
|
987
|
+
try:
|
|
988
|
+
os.unlink(temp_file)
|
|
989
|
+
except OSError:
|
|
990
|
+
pass
|
|
947
991
|
raise
|
|
992
|
+
finally:
|
|
993
|
+
# Clean up temporary empty files if they were created
|
|
994
|
+
for temp_file in temp_files_to_cleanup:
|
|
995
|
+
try:
|
|
996
|
+
os.unlink(temp_file)
|
|
997
|
+
log.debug(f"Cleaned up temporary file: {temp_file}")
|
|
998
|
+
except OSError as e:
|
|
999
|
+
log.warning(f"Failed to clean up temporary file {temp_file}: {e}")
|
|
948
1000
|
|
|
949
1001
|
# Handle diff generation - now we always have both scans
|
|
950
1002
|
scans_ready = self.check_full_scans_status(head_full_scan_id, new_full_scan.id)
|
|
@@ -93,12 +93,14 @@ class ReachabilityAnalyzer:
|
|
|
93
93
|
min_severity: Optional[str] = None,
|
|
94
94
|
skip_cache: bool = False,
|
|
95
95
|
disable_analytics: bool = False,
|
|
96
|
+
disable_analysis_splitting: bool = False,
|
|
96
97
|
repo_name: Optional[str] = None,
|
|
97
98
|
branch_name: Optional[str] = None,
|
|
98
99
|
version: Optional[str] = None,
|
|
99
100
|
concurrency: Optional[int] = None,
|
|
100
101
|
additional_params: Optional[List[str]] = None,
|
|
101
102
|
allow_unverified: bool = False,
|
|
103
|
+
enable_debug: bool = False,
|
|
102
104
|
) -> Dict[str, Any]:
|
|
103
105
|
"""
|
|
104
106
|
Run reachability analysis.
|
|
@@ -115,12 +117,14 @@ class ReachabilityAnalyzer:
|
|
|
115
117
|
min_severity: Minimum severity level (info, low, moderate, high, critical)
|
|
116
118
|
skip_cache: Skip cache usage
|
|
117
119
|
disable_analytics: Disable analytics sharing
|
|
120
|
+
disable_analysis_splitting: Disable analysis splitting
|
|
118
121
|
repo_name: Repository name
|
|
119
122
|
branch_name: Branch name
|
|
120
123
|
version: Specific version of @coana-tech/cli to use
|
|
121
124
|
concurrency: Concurrency level for analysis (must be >= 1)
|
|
122
125
|
additional_params: Additional parameters to pass to coana CLI
|
|
123
126
|
allow_unverified: Disable SSL certificate verification (sets NODE_TLS_REJECT_UNAUTHORIZED=0)
|
|
127
|
+
enable_debug: Enable debug mode (passes -d flag to coana CLI)
|
|
124
128
|
|
|
125
129
|
Returns:
|
|
126
130
|
Dict containing scan_id and report_path
|
|
@@ -149,6 +153,9 @@ class ReachabilityAnalyzer:
|
|
|
149
153
|
if disable_analytics:
|
|
150
154
|
cmd.append("--disable-analytics-sharing")
|
|
151
155
|
|
|
156
|
+
if disable_analysis_splitting:
|
|
157
|
+
cmd.append("--disable-analysis-splitting")
|
|
158
|
+
|
|
152
159
|
# KEY POINT: Only add manifest tar hash if we have one
|
|
153
160
|
if tar_hash:
|
|
154
161
|
cmd.extend(["--run-without-docker", "--manifests-tar-hash", tar_hash])
|
|
@@ -168,6 +175,9 @@ class ReachabilityAnalyzer:
|
|
|
168
175
|
if concurrency:
|
|
169
176
|
cmd.extend(["--concurrency", str(concurrency)])
|
|
170
177
|
|
|
178
|
+
if enable_debug:
|
|
179
|
+
cmd.append("-d")
|
|
180
|
+
|
|
171
181
|
# Add any additional parameters provided by the user
|
|
172
182
|
if additional_params:
|
|
173
183
|
cmd.extend(additional_params)
|
|
@@ -282,12 +282,14 @@ def main_code():
|
|
|
282
282
|
min_severity=config.reach_min_severity,
|
|
283
283
|
skip_cache=config.reach_skip_cache or False,
|
|
284
284
|
disable_analytics=config.reach_disable_analytics or False,
|
|
285
|
+
disable_analysis_splitting=config.reach_disable_analysis_splitting or False,
|
|
285
286
|
repo_name=config.repo,
|
|
286
287
|
branch_name=config.branch,
|
|
287
288
|
version=config.reach_version,
|
|
288
289
|
concurrency=config.reach_concurrency,
|
|
289
290
|
additional_params=config.reach_additional_params,
|
|
290
|
-
allow_unverified=config.allow_unverified
|
|
291
|
+
allow_unverified=config.allow_unverified,
|
|
292
|
+
enable_debug=config.enable_debug
|
|
291
293
|
)
|
|
292
294
|
|
|
293
295
|
log.info(f"Reachability analysis completed successfully")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{socketsecurity-2.2.32 → socketsecurity-2.2.35}/.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
|
{socketsecurity-2.2.32 → socketsecurity-2.2.35}/tests/data/fullscans/diff/stream_diff_full.json
RENAMED
|
File without changes
|
{socketsecurity-2.2.32 → socketsecurity-2.2.35}/tests/data/fullscans/head_scan/metadata.json
RENAMED
|
File without changes
|
{socketsecurity-2.2.32 → socketsecurity-2.2.35}/tests/data/fullscans/head_scan/stream_scan.json
RENAMED
|
File without changes
|
{socketsecurity-2.2.32 → socketsecurity-2.2.35}/tests/data/fullscans/head_scan/stream_scan_full.json
RENAMED
|
File without changes
|
|
File without changes
|
{socketsecurity-2.2.32 → socketsecurity-2.2.35}/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
|
|
File without changes
|
|
File without changes
|