socketsecurity 2.4.9__tar.gz → 2.4.11__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.4.9 → socketsecurity-2.4.11}/CHANGELOG.md +28 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/PKG-INFO +1 -1
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/docs/cli-reference.md +6 -5
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/pyproject.toml +1 -1
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/socketsecurity/__init__.py +1 -1
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/socketsecurity/config.py +19 -10
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/socketsecurity/core/socket_config.py +4 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/socketsecurity/core/tools/reachability.py +17 -11
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/socketsecurity/socketcli.py +14 -2
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/tests/unit/test_config.py +15 -5
- socketsecurity-2.4.11/tests/unit/test_include_dirs.py +99 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/tests/unit/test_reachability.py +16 -1
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/uv.lock +1 -1
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/.github/CODEOWNERS +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/.github/PULL_REQUEST_TEMPLATE/bug-fix.md +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/.github/PULL_REQUEST_TEMPLATE/feature.md +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/.github/PULL_REQUEST_TEMPLATE/improvement.md +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/.github/actions/setup-docker/action.yml +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/.github/actions/setup-hatch/action.yml +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/.github/actions/setup-sfw/action.yml +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/.github/dependabot.yml +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/.github/workflows/dependency-review.yml +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/.github/workflows/docker-stable.yml +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/.github/workflows/e2e-test.yml +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/.github/workflows/pr-preview.yml +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/.github/workflows/python-tests.yml +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/.github/workflows/release.yml +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/.github/workflows/version-check.yml +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/.github/zizmor.yml +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/.gitignore +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/.hooks/sync_version.py +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/.pre-commit-config.yaml +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/.python-version +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/Dockerfile +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/LICENSE +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/Makefile +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/README.md +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/docs/ci-cd.md +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/docs/development.md +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/docs/troubleshooting.md +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/examples/config/sarif-dashboard-parity.json +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/examples/config/sarif-dashboard-parity.toml +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/examples/config/sarif-diff-ci-cd.json +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/examples/config/sarif-diff-ci-cd.toml +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/examples/config/sarif-instance-detail.json +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/examples/config/sarif-instance-detail.toml +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/instructions/gitlab-commit-status/uat.md +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/pytest.ini +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/scripts/build_container.sh +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/scripts/build_container_flexible.sh +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/scripts/deploy-test-docker.sh +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/scripts/deploy-test-pypi.sh +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/scripts/docker-entrypoint.sh +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/scripts/run.sh +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/session.md +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/socket.yml +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/socketsecurity/core/__init__.py +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/socketsecurity/core/alert_selection.py +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/socketsecurity/core/classes.py +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/socketsecurity/core/cli_client.py +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/socketsecurity/core/cli_run.py +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/socketsecurity/core/exceptions.py +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/socketsecurity/core/git_interface.py +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/socketsecurity/core/helper/__init__.py +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/socketsecurity/core/helper/socket_facts_loader.py +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/socketsecurity/core/lazy_file_loader.py +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/socketsecurity/core/log_uploader.py +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/socketsecurity/core/logging.py +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/socketsecurity/core/messages.py +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/socketsecurity/core/resource_utils.py +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/socketsecurity/core/scm/__init__.py +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/socketsecurity/core/scm/base.py +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/socketsecurity/core/scm/client.py +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/socketsecurity/core/scm/github.py +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/socketsecurity/core/scm/gitlab.py +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/socketsecurity/core/scm_comments.py +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/socketsecurity/core/streaming.py +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/socketsecurity/core/utils.py +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/socketsecurity/fossa_compat.py +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/socketsecurity/output.py +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/socketsecurity/plugins/__init__.py +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/socketsecurity/plugins/base.py +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/socketsecurity/plugins/formatters/__init__.py +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/socketsecurity/plugins/formatters/slack.py +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/socketsecurity/plugins/jira.py +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/socketsecurity/plugins/manager.py +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/socketsecurity/plugins/slack.py +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/socketsecurity/plugins/teams.py +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/socketsecurity/plugins/webhook.py +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/tests/__init__.py +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/tests/core/conftest.py +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/tests/core/create_diff_input.json +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/tests/core/test_diff_alerts.py +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/tests/core/test_diff_generation.py +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/tests/core/test_facts_compression.py +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/tests/core/test_has_manifest_files.py +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/tests/core/test_package_and_alerts.py +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/tests/core/test_sdk_methods.py +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/tests/core/test_supporting_methods.py +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/tests/data/fullscans/create_response.json +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/tests/data/fullscans/diff/stream_diff.json +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/tests/data/fullscans/diff/stream_diff_full.json +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/tests/data/fullscans/head_scan/metadata.json +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/tests/data/fullscans/head_scan/stream_scan.json +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/tests/data/fullscans/head_scan/stream_scan_full.json +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/tests/data/fullscans/new_scan/metadata.json +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/tests/data/fullscans/new_scan/stream_scan.json +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/tests/data/repos/repo_info_error.json +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/tests/data/repos/repo_info_no_head.json +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/tests/data/repos/repo_info_success.json +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/tests/data/settings/security-policy.json +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/tests/e2e/fixtures/simple-npm/index.js +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/tests/e2e/fixtures/simple-npm/package.json +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/tests/e2e/fixtures/simple-pypi/requirements.txt +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/tests/e2e/validate-gitlab.sh +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/tests/e2e/validate-json.sh +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/tests/e2e/validate-reachability.sh +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/tests/e2e/validate-sarif.sh +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/tests/e2e/validate-scan.sh +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/tests/fixtures/fossa/README.md +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/tests/fixtures/fossa/fossa-analyze-empty.json +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/tests/fixtures/fossa/fossa-analyze-populated.json +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/tests/fixtures/fossa/fossa-sbom-empty-deep.json +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/tests/fixtures/fossa/fossa-sbom-populated.json +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/tests/unit/__init__.py +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/tests/unit/test_alert_selection.py +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/tests/unit/test_cli_config.py +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/tests/unit/test_cli_run.py +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/tests/unit/test_client.py +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/tests/unit/test_dependency_overview.py +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/tests/unit/test_disable_ignore.py +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/tests/unit/test_exclude_paths.py +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/tests/unit/test_fossa_compat.py +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/tests/unit/test_fossa_parity.py +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/tests/unit/test_full_scan_retry.py +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/tests/unit/test_gitlab_auth.py +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/tests/unit/test_gitlab_auth_fallback.py +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/tests/unit/test_gitlab_commit_status.py +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/tests/unit/test_gitlab_format.py +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/tests/unit/test_ignore_telemetry_filtering.py +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/tests/unit/test_log_uploader.py +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/tests/unit/test_output.py +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/tests/unit/test_slack_plugin.py +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/tests/unit/test_socketcli.py +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/tests/unit/test_streaming.py +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/tests/unit/test_tier1_finalize.py +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/workflows/bitbucket-pipelines.yml +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/workflows/buildkite.yml +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/workflows/github-actions.yml +0 -0
- {socketsecurity-2.4.9 → socketsecurity-2.4.11}/workflows/gitlab-ci.yml +0 -0
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2.4.11
|
|
4
|
+
|
|
5
|
+
### Changed: units for `--reach-analysis-timeout` and `--reach-analysis-memory-limit`
|
|
6
|
+
|
|
7
|
+
- `--reach-analysis-timeout` now accepts a duration with an optional unit suffix — `s`, `m`
|
|
8
|
+
or `h` (e.g. `90s`, `10m`, `1h`). `--reach-analysis-memory-limit` now accepts a size with an
|
|
9
|
+
optional unit suffix — `MB` or `GB`, case-insensitive (e.g. `512MB`, `8GB`). The value is
|
|
10
|
+
passed through verbatim to the reachability engine (`@coana-tech/cli`), which owns parsing
|
|
11
|
+
and validation, so error messages come from a single source of truth.
|
|
12
|
+
- Backward compatible: a bare number is still accepted (seconds for the timeout, MB for the
|
|
13
|
+
memory limit), exactly as before. This legacy form is no longer documented but keeps working.
|
|
14
|
+
- Bumped the pinned `@coana-tech/cli` version to `15.5.0`, which ships the unit parser.
|
|
15
|
+
|
|
16
|
+
## 2.4.10
|
|
17
|
+
|
|
18
|
+
### Added: opt directories back into manifest discovery via `--include-dirs`
|
|
19
|
+
|
|
20
|
+
- New `--include-dirs` flag (comma-separated directory names) that re-includes directories
|
|
21
|
+
the CLI excludes from manifest discovery by default. The default exclude list
|
|
22
|
+
(`node_modules`, `bower_components`, `jspm_packages`, `__pycache__`, `.venv`, `venv`,
|
|
23
|
+
`build`, `dist`, `.tox`, `.mypy_cache`, `.pytest_cache`, `*.egg-info`, `vendor`) is a sane
|
|
24
|
+
default, but some projects keep manifest files under those names — e.g. `build/requirements.txt`.
|
|
25
|
+
Pass `--include-dirs build,dist` to scan them. Names are matched against any path segment,
|
|
26
|
+
mirroring how the default exclude list is applied.
|
|
27
|
+
- `--include-module-folders` now functions as documented: it re-includes the JS/TS module
|
|
28
|
+
folders (`node_modules`, `bower_components`, `jspm_packages`) as a group. Previously the
|
|
29
|
+
flag was accepted but had no effect.
|
|
30
|
+
|
|
3
31
|
## 2.4.9
|
|
4
32
|
|
|
5
33
|
### Added: opt-in streaming log channel via `--upload-logs`
|
|
@@ -148,7 +148,7 @@ socketcli [-h] [--api-token API_TOKEN] [--repo REPO] [--workspace WORKSPACE] [--
|
|
|
148
148
|
[--owner OWNER] [--pr-number PR_NUMBER] [--commit-message COMMIT_MESSAGE] [--commit-sha COMMIT_SHA] [--committers [COMMITTERS ...]]
|
|
149
149
|
[--target-path TARGET_PATH] [--sbom-file SBOM_FILE] [--license-file-name LICENSE_FILE_NAME] [--save-submitted-files-list SAVE_SUBMITTED_FILES_LIST]
|
|
150
150
|
[--save-manifest-tar SAVE_MANIFEST_TAR] [--files FILES] [--sub-path SUB_PATH] [--workspace-name WORKSPACE_NAME]
|
|
151
|
-
[--excluded-ecosystems EXCLUDED_ECOSYSTEMS] [--exclude-paths EXCLUDE_PATHS] [--default-branch] [--pending-head] [--generate-license] [--enable-debug]
|
|
151
|
+
[--excluded-ecosystems EXCLUDED_ECOSYSTEMS] [--exclude-paths EXCLUDE_PATHS] [--include-dirs INCLUDE_DIRS] [--default-branch] [--pending-head] [--generate-license] [--enable-debug]
|
|
152
152
|
[--enable-json] [--enable-sarif] [--sarif-file <path>] [--sarif-scope {diff,full}] [--sarif-grouping {instance,alert}] [--sarif-reachability {all,reachable,potentially,reachable-or-potentially}] [--enable-gitlab-security] [--gitlab-security-file <path>]
|
|
153
153
|
[--disable-overview] [--exclude-license-details] [--allow-unverified] [--disable-security-issue]
|
|
154
154
|
[--ignore-commit-files] [--disable-blocking] [--disable-ignore] [--enable-diff] [--scm SCM] [--timeout TIMEOUT] [--include-module-folders]
|
|
@@ -205,13 +205,14 @@ If you don't want to provide the Socket API Token every time then you can use th
|
|
|
205
205
|
| `--workspace-name` | False | | Workspace name suffix to append to repository name (repo-name-workspace_name). Must be used with `--sub-path` |
|
|
206
206
|
| `--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) |
|
|
207
207
|
| `--exclude-paths` | False | | Comma-separated paths/globs to exclude from **both** manifest discovery (every scan) **and** reachability analysis (e.g. `tests/**,packages/legacy,*.spec.ts`). Patterns are scan-root-relative, case-sensitive globs where `*` does not cross `/` and `**` does. Supersedes `--reach-exclude-paths`. |
|
|
208
|
+
| `--include-dirs` | False | | Comma-separated directory **names** that are excluded from manifest discovery by default but should be scanned (e.g. `build,dist`). Names are matched against any path segment, mirroring the default exclude list (`node_modules`, `bower_components`, `jspm_packages`, `__pycache__`, `.venv`, `venv`, `build`, `dist`, `.tox`, `.mypy_cache`, `.pytest_cache`, `*.egg-info`, `vendor`). Use this when manifest files live under a normally-ignored folder, e.g. `build/requirements.txt`. |
|
|
208
209
|
|
|
209
210
|
#### Branch and Scan Configuration
|
|
210
211
|
| Parameter | Required | Default | Description |
|
|
211
212
|
|:-------------------------|:---------|:--------|:------------------------------------------------------------------------------------------------------|
|
|
212
213
|
| `--default-branch` | False | *auto* | Make this branch the default branch (auto-detected from git and CI environment when not specified) |
|
|
213
214
|
| `--pending-head` | False | *auto* | If true, the new scan will be set as the branch's head scan (automatically synced with default-branch) |
|
|
214
|
-
| `--include-module-folders` | False | False | If enabled
|
|
215
|
+
| `--include-module-folders` | False | False | If enabled, re-includes the JS/TS module folders (`node_modules`, `bower_components`, `jspm_packages`) in manifest discovery. For other excluded directories, use `--include-dirs`. |
|
|
215
216
|
|
|
216
217
|
#### Output Configuration
|
|
217
218
|
| Parameter | Required | Default | Description |
|
|
@@ -240,9 +241,9 @@ If you don't want to provide the Socket API Token every time then you can use th
|
|
|
240
241
|
| Parameter | Required | Default | Description |
|
|
241
242
|
|:---------------------------------|:---------|:--------|:---------------------------------------------------------------------------------------------------------------------------|
|
|
242
243
|
| `--reach` | False | False | Enable reachability analysis to identify which vulnerable functions are actually called by your code. Creates a tier-1 full-application reachability scan (`scan_type=socket_tier1`). |
|
|
243
|
-
| `--reach-version` | False | 15.
|
|
244
|
-
| `--reach-analysis-timeout` | False |
|
|
245
|
-
| `--reach-analysis-memory-limit` | False |
|
|
244
|
+
| `--reach-version` | False | 15.5.0 | Version of @coana-tech/cli to use. Defaults to the pinned version that ships with this CLI release, so the engine only changes when you upgrade the Socket CLI. Pass `latest` to always use the newest published version (opt-in auto-update), or an explicit version (e.g. `1.2.3`) to pin it. |
|
|
245
|
+
| `--reach-analysis-timeout` | False | 10m | Timeout for each reachability analysis run, e.g. `90s`, `10m` or `1h`. Omitted by default, so coana applies its own default (`10m`). Alias: `--reach-timeout` |
|
|
246
|
+
| `--reach-analysis-memory-limit` | False | 8GB | Memory limit for each reachability analysis run, e.g. `512MB` or `8GB`. Omitted by default, so coana applies its own default (`8GB`). Alias: `--reach-memory-limit` |
|
|
246
247
|
| `--reach-concurrency` | False | 1 | Control parallel analysis execution (must be >= 1). Omitted by default, so coana applies its own default. |
|
|
247
248
|
| `--reach-additional-params` | False | | Pass custom parameters to the coana CLI tool |
|
|
248
249
|
| `--reach-ecosystems` | False | | Comma-separated list of ecosystems to analyze (e.g., "npm,pypi"). If not specified, all supported ecosystems are analyzed |
|
|
@@ -154,6 +154,7 @@ class CliConfig:
|
|
|
154
154
|
repo_is_public: bool = False
|
|
155
155
|
excluded_ecosystems: list[str] = field(default_factory=lambda: [])
|
|
156
156
|
exclude_paths: Optional[List[str]] = None
|
|
157
|
+
included_dirs: List[str] = field(default_factory=lambda: [])
|
|
157
158
|
version: str = __version__
|
|
158
159
|
jira_plugin: PluginConfig = field(default_factory=PluginConfig)
|
|
159
160
|
slack_plugin: PluginConfig = field(default_factory=PluginConfig)
|
|
@@ -167,8 +168,8 @@ class CliConfig:
|
|
|
167
168
|
# Reachability Flags
|
|
168
169
|
reach: bool = False
|
|
169
170
|
reach_version: Optional[str] = None
|
|
170
|
-
reach_analysis_memory_limit: Optional[
|
|
171
|
-
reach_analysis_timeout: Optional[
|
|
171
|
+
reach_analysis_memory_limit: Optional[str] = None
|
|
172
|
+
reach_analysis_timeout: Optional[str] = None
|
|
172
173
|
reach_disable_analytics: bool = False
|
|
173
174
|
reach_disable_analysis_splitting: bool = False # Deprecated, kept for backwards compatibility
|
|
174
175
|
reach_enable_analysis_splitting: bool = False
|
|
@@ -314,6 +315,7 @@ class CliConfig:
|
|
|
314
315
|
'reach_ecosystems': args.reach_ecosystems.split(',') if args.reach_ecosystems else None,
|
|
315
316
|
'reach_exclude_paths': args.reach_exclude_paths.split(',') if args.reach_exclude_paths else None,
|
|
316
317
|
'exclude_paths': normalize_exclude_paths(args.exclude_paths),
|
|
318
|
+
'included_dirs': normalize_exclude_paths(args.include_dirs) or [],
|
|
317
319
|
'reach_skip_cache': args.reach_skip_cache,
|
|
318
320
|
'reach_min_severity': args.reach_min_severity,
|
|
319
321
|
'reach_output_file': args.reach_output_file,
|
|
@@ -639,6 +641,17 @@ def create_argument_parser() -> argparse.ArgumentParser:
|
|
|
639
641
|
"Supersedes --reach-exclude-paths."
|
|
640
642
|
)
|
|
641
643
|
|
|
644
|
+
path_group.add_argument(
|
|
645
|
+
"--include-dirs",
|
|
646
|
+
dest="include_dirs",
|
|
647
|
+
metavar="<list>",
|
|
648
|
+
help="Comma-separated directory names that are excluded from manifest discovery by "
|
|
649
|
+
"default but should be scanned (e.g. 'build,dist'). Names are matched against any "
|
|
650
|
+
"path segment, mirroring the default exclude list. Defaults excluded: "
|
|
651
|
+
"node_modules, bower_components, jspm_packages, __pycache__, .venv, venv, build, "
|
|
652
|
+
"dist, .tox, .mypy_cache, .pytest_cache, *.egg-info, vendor."
|
|
653
|
+
)
|
|
654
|
+
|
|
642
655
|
# Branch and Scan Configuration
|
|
643
656
|
config_group = parser.add_argument_group('Branch and Scan Configuration')
|
|
644
657
|
config_group.add_argument(
|
|
@@ -975,29 +988,25 @@ def create_argument_parser() -> argparse.ArgumentParser:
|
|
|
975
988
|
reachability_group.add_argument(
|
|
976
989
|
"--reach-analysis-timeout",
|
|
977
990
|
dest="reach_analysis_timeout",
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
help="Timeout for reachability analysis in seconds"
|
|
991
|
+
metavar="<duration>",
|
|
992
|
+
help="Set the timeout for each reachability analysis run, e.g. 90s, 10m or 1h. (default: 10m)"
|
|
981
993
|
)
|
|
982
994
|
# Backwards-compatible alias for the pre-alignment name. Kept working, hidden from help.
|
|
983
995
|
reachability_group.add_argument(
|
|
984
996
|
"--reach-timeout",
|
|
985
997
|
dest="reach_analysis_timeout",
|
|
986
|
-
type=int,
|
|
987
998
|
help=argparse.SUPPRESS
|
|
988
999
|
)
|
|
989
1000
|
reachability_group.add_argument(
|
|
990
1001
|
"--reach-analysis-memory-limit",
|
|
991
1002
|
dest="reach_analysis_memory_limit",
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
help="Memory limit for reachability analysis in MB (defaults to the coana CLI's own default, currently 8192)"
|
|
1003
|
+
metavar="<size>",
|
|
1004
|
+
help="Set the memory limit for each reachability analysis run, e.g. 512MB or 8GB. (default: 8GB)"
|
|
995
1005
|
)
|
|
996
1006
|
# Backwards-compatible alias for the pre-alignment name. Kept working, hidden from help.
|
|
997
1007
|
reachability_group.add_argument(
|
|
998
1008
|
"--reach-memory-limit",
|
|
999
1009
|
dest="reach_analysis_memory_limit",
|
|
1000
|
-
type=int,
|
|
1001
1010
|
help=argparse.SUPPRESS
|
|
1002
1011
|
)
|
|
1003
1012
|
reachability_group.add_argument(
|
|
@@ -15,6 +15,10 @@ default_exclude_dirs = {
|
|
|
15
15
|
"vendor"
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
+
# Subset of default_exclude_dirs that hold installed JS/TS modules. Re-included as a group
|
|
19
|
+
# by --include-module-folders (see CliConfig.include_module_folders).
|
|
20
|
+
module_folder_dirs = {"node_modules", "bower_components", "jspm_packages"}
|
|
21
|
+
|
|
18
22
|
@dataclass
|
|
19
23
|
class SocketConfig:
|
|
20
24
|
api_key: str
|
|
@@ -18,7 +18,7 @@ log = logging.getLogger(__name__)
|
|
|
18
18
|
# Pinned @coana-tech/cli version. Bumped deliberately per Python CLI release so the
|
|
19
19
|
# reachability engine version only changes through a standard pip upgrade (advance notice).
|
|
20
20
|
# Pass --reach-version latest to opt into the newest published version instead.
|
|
21
|
-
DEFAULT_COANA_CLI_VERSION: Final = "15.
|
|
21
|
+
DEFAULT_COANA_CLI_VERSION: Final = "15.5.0"
|
|
22
22
|
|
|
23
23
|
# Resolved @coana-tech/cli script paths from the npm-install fallback, keyed by version.
|
|
24
24
|
# Lives for the process lifetime so repeated fallback invocations install only once
|
|
@@ -55,7 +55,7 @@ class ReachabilityAnalyzer:
|
|
|
55
55
|
|
|
56
56
|
def _resolve_coana_package_spec(self, version: Optional[str] = None) -> str:
|
|
57
57
|
"""
|
|
58
|
-
Resolve the @coana-tech/cli package spec to run (e.g. '@coana-tech/cli@15.
|
|
58
|
+
Resolve the @coana-tech/cli package spec to run (e.g. '@coana-tech/cli@15.5.0').
|
|
59
59
|
|
|
60
60
|
Args:
|
|
61
61
|
version: Coana CLI version to use.
|
|
@@ -64,7 +64,7 @@ class ReachabilityAnalyzer:
|
|
|
64
64
|
- '<semver>': that exact version.
|
|
65
65
|
|
|
66
66
|
Returns:
|
|
67
|
-
str: The package specifier to use with npx (e.g. '@coana-tech/cli@15.
|
|
67
|
+
str: The package specifier to use with npx (e.g. '@coana-tech/cli@15.5.0').
|
|
68
68
|
"""
|
|
69
69
|
return f"@coana-tech/cli@{self._resolve_coana_version(version)}"
|
|
70
70
|
|
|
@@ -79,8 +79,8 @@ class ReachabilityAnalyzer:
|
|
|
79
79
|
target_directory: str,
|
|
80
80
|
tar_hash: Optional[str] = None,
|
|
81
81
|
output_path: str = ".socket.facts.json",
|
|
82
|
-
timeout: Optional[
|
|
83
|
-
memory_limit: Optional[
|
|
82
|
+
timeout: Optional[str] = None,
|
|
83
|
+
memory_limit: Optional[str] = None,
|
|
84
84
|
ecosystems: Optional[List[str]] = None,
|
|
85
85
|
exclude_paths: Optional[List[str]] = None,
|
|
86
86
|
min_severity: Optional[str] = None,
|
|
@@ -112,8 +112,10 @@ class ReachabilityAnalyzer:
|
|
|
112
112
|
target_directory: Directory to analyze
|
|
113
113
|
tar_hash: Tar hash from manifest upload or existing scan (optional)
|
|
114
114
|
output_path: Output file path for results
|
|
115
|
-
timeout: Analysis timeout
|
|
116
|
-
|
|
115
|
+
timeout: Analysis timeout, forwarded verbatim to coana --analysis-timeout
|
|
116
|
+
(coana parses the units, e.g. '90s', '10m', '1h'; a bare number is seconds)
|
|
117
|
+
memory_limit: Memory limit, forwarded verbatim to coana --memory-limit
|
|
118
|
+
(coana parses the units, e.g. '512MB', '8GB'; a bare number is MB)
|
|
117
119
|
ecosystems: List of ecosystems to analyze (e.g., ['npm', 'pypi'])
|
|
118
120
|
exclude_paths: Paths to exclude from analysis
|
|
119
121
|
min_severity: Minimum severity level (info, low, moderate, high, critical)
|
|
@@ -149,11 +151,15 @@ class ReachabilityAnalyzer:
|
|
|
149
151
|
"--disable-report-submission"
|
|
150
152
|
])
|
|
151
153
|
|
|
152
|
-
# Add conditional arguments
|
|
153
|
-
|
|
154
|
+
# Add conditional arguments. timeout/memory_limit are forwarded verbatim; coana owns
|
|
155
|
+
# unit parsing/validation (e.g. '90s', '8GB'). We coerce to str only for subprocess
|
|
156
|
+
# safety — config-file values can arrive as ints via argparse set_defaults — and use
|
|
157
|
+
# `is not None` (not truthiness) so an explicit empty string still reaches coana and
|
|
158
|
+
# triggers coana's own error, rather than being silently dropped.
|
|
159
|
+
if timeout is not None:
|
|
154
160
|
coana_args.extend(["--analysis-timeout", str(timeout)])
|
|
155
|
-
|
|
156
|
-
if memory_limit:
|
|
161
|
+
|
|
162
|
+
if memory_limit is not None:
|
|
157
163
|
coana_args.extend(["--memory-limit", str(memory_limit)])
|
|
158
164
|
|
|
159
165
|
if disable_analytics:
|
|
@@ -19,7 +19,7 @@ from socketsecurity.core.git_interface import Git
|
|
|
19
19
|
from socketsecurity.core.logging import initialize_logging, set_debug_mode
|
|
20
20
|
from socketsecurity.core.messages import Messages
|
|
21
21
|
from socketsecurity.core.scm_comments import Comments
|
|
22
|
-
from socketsecurity.core.socket_config import SocketConfig
|
|
22
|
+
from socketsecurity.core.socket_config import SocketConfig, module_folder_dirs
|
|
23
23
|
from socketsecurity.core.streaming import StreamingLogs
|
|
24
24
|
from socketsecurity.fossa_compat import build_fossa_attribution_payload
|
|
25
25
|
from socketsecurity.output import OutputHandler
|
|
@@ -195,7 +195,19 @@ def main_code():
|
|
|
195
195
|
) as streaming:
|
|
196
196
|
core = Core(socket_config, sdk, config)
|
|
197
197
|
log.debug("loaded core")
|
|
198
|
-
|
|
198
|
+
|
|
199
|
+
# Re-include directories that are excluded from manifest discovery by default
|
|
200
|
+
# (e.g. build/dist). --include-dirs names them individually; --include-module-folders
|
|
201
|
+
# re-includes the JS module folders as a group. Build a new set rather than mutating
|
|
202
|
+
# the shared default_exclude_dirs in place. Applied here so it covers every find_files
|
|
203
|
+
# call below, including the sub-path manifest pre-check.
|
|
204
|
+
dirs_to_include = set(config.included_dirs or [])
|
|
205
|
+
if config.include_module_folders:
|
|
206
|
+
dirs_to_include |= module_folder_dirs
|
|
207
|
+
if dirs_to_include:
|
|
208
|
+
core.config.excluded_dirs = set(core.config.excluded_dirs) - dirs_to_include
|
|
209
|
+
log.debug(f"Re-including normally-excluded directories in scan: {sorted(dirs_to_include)}")
|
|
210
|
+
|
|
199
211
|
# Check for required dependencies if reachability analysis is enabled
|
|
200
212
|
if config.reach:
|
|
201
213
|
log.info("Reachability analysis enabled, checking for required dependencies...")
|
|
@@ -180,21 +180,31 @@ class TestReachAlignmentFlags:
|
|
|
180
180
|
assert config.reach_analysis_timeout is None
|
|
181
181
|
|
|
182
182
|
def test_reach_node_style_name_aliases(self):
|
|
183
|
-
"""G8: Node-style primary names map to the same dests.
|
|
183
|
+
"""G8: Node-style primary names map to the same dests. Values are kept as raw
|
|
184
|
+
strings and forwarded verbatim to coana (coana owns unit parsing)."""
|
|
184
185
|
config = CliConfig.from_args(
|
|
185
186
|
self.BASE_ARGS
|
|
186
187
|
+ ["--reach", "--reach-analysis-timeout", "300", "--reach-analysis-memory-limit", "2048"]
|
|
187
188
|
)
|
|
188
|
-
assert config.reach_analysis_timeout == 300
|
|
189
|
-
assert config.reach_analysis_memory_limit == 2048
|
|
189
|
+
assert config.reach_analysis_timeout == "300"
|
|
190
|
+
assert config.reach_analysis_memory_limit == "2048"
|
|
190
191
|
|
|
191
192
|
def test_reach_legacy_name_aliases_still_work(self):
|
|
192
193
|
"""G8: pre-alignment names keep working (hidden aliases)."""
|
|
193
194
|
config = CliConfig.from_args(
|
|
194
195
|
self.BASE_ARGS + ["--reach", "--reach-timeout", "111", "--reach-memory-limit", "512"]
|
|
195
196
|
)
|
|
196
|
-
assert config.reach_analysis_timeout == 111
|
|
197
|
-
assert config.reach_analysis_memory_limit == 512
|
|
197
|
+
assert config.reach_analysis_timeout == "111"
|
|
198
|
+
assert config.reach_analysis_memory_limit == "512"
|
|
199
|
+
|
|
200
|
+
def test_reach_unit_suffixes_are_passed_through_verbatim(self):
|
|
201
|
+
"""Unit-bearing values (parsed/validated by coana) are stored as-is, not coerced."""
|
|
202
|
+
config = CliConfig.from_args(
|
|
203
|
+
self.BASE_ARGS
|
|
204
|
+
+ ["--reach", "--reach-analysis-timeout", "10m", "--reach-analysis-memory-limit", "8GB"]
|
|
205
|
+
)
|
|
206
|
+
assert config.reach_analysis_timeout == "10m"
|
|
207
|
+
assert config.reach_analysis_memory_limit == "8GB"
|
|
198
208
|
|
|
199
209
|
def test_reach_debug_flag(self):
|
|
200
210
|
"""G9: dedicated --reach-debug flag, independent of --enable-debug."""
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
"""Tests for --include-dirs (and the now-functional --include-module-folders).
|
|
2
|
+
|
|
3
|
+
Covers config parsing of the comma-separated directory names and that re-including a
|
|
4
|
+
normally-excluded directory (e.g. build) lets Core.find_files discover manifests under it.
|
|
5
|
+
"""
|
|
6
|
+
import types
|
|
7
|
+
from unittest.mock import MagicMock
|
|
8
|
+
|
|
9
|
+
import pytest
|
|
10
|
+
|
|
11
|
+
from socketsecurity.config import CliConfig
|
|
12
|
+
from socketsecurity.core import Core
|
|
13
|
+
from socketsecurity.core.socket_config import (
|
|
14
|
+
SocketConfig,
|
|
15
|
+
default_exclude_dirs,
|
|
16
|
+
module_folder_dirs,
|
|
17
|
+
)
|
|
18
|
+
|
|
19
|
+
BASE_ARGS = ["--api-token", "test-token", "--repo", "test-repo"]
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
# ---- config parsing ------------------------------------------------------
|
|
23
|
+
|
|
24
|
+
def test_include_dirs_parses_to_list():
|
|
25
|
+
config = CliConfig.from_args(BASE_ARGS + ["--include-dirs", "build, dist , vendor"])
|
|
26
|
+
assert config.included_dirs == ["build", "dist", "vendor"]
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def test_include_dirs_defaults_empty():
|
|
30
|
+
config = CliConfig.from_args(BASE_ARGS)
|
|
31
|
+
assert config.included_dirs == []
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
def test_include_dirs_from_config_file(tmp_path):
|
|
35
|
+
import json
|
|
36
|
+
cfg = tmp_path / "socketcli.json"
|
|
37
|
+
cfg.write_text(json.dumps({"socketcli": {"include_dirs": ["build", "dist"]}}), encoding="utf-8")
|
|
38
|
+
config = CliConfig.from_args(BASE_ARGS + ["--config", str(cfg)])
|
|
39
|
+
assert config.included_dirs == ["build", "dist"]
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def test_module_folder_dirs_is_subset_of_defaults():
|
|
43
|
+
assert module_folder_dirs <= default_exclude_dirs
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
# ---- find_files integration ----------------------------------------------
|
|
47
|
+
|
|
48
|
+
def _make_core(excluded_dirs):
|
|
49
|
+
core = Core.__new__(Core)
|
|
50
|
+
core.config = SocketConfig(api_key="test-key", excluded_dirs=excluded_dirs)
|
|
51
|
+
core.cli_config = types.SimpleNamespace(exclude_paths=None)
|
|
52
|
+
core.sdk = MagicMock()
|
|
53
|
+
return core
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
def _seed_manifests(tmp_path):
|
|
57
|
+
for rel in ("requirements.txt", "build/requirements.txt", "dist/requirements.txt"):
|
|
58
|
+
p = tmp_path / rel
|
|
59
|
+
p.parent.mkdir(parents=True, exist_ok=True)
|
|
60
|
+
p.write_text("flask==1.0\n", encoding="utf-8")
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
def test_find_files_excludes_build_by_default(tmp_path, mocker):
|
|
64
|
+
_seed_manifests(tmp_path)
|
|
65
|
+
core = _make_core(set(default_exclude_dirs))
|
|
66
|
+
mocker.patch.object(
|
|
67
|
+
core, "get_supported_patterns",
|
|
68
|
+
return_value={"pypi": {"requirements.txt": {"pattern": "requirements.txt"}}},
|
|
69
|
+
)
|
|
70
|
+
|
|
71
|
+
found = core.find_files(str(tmp_path))
|
|
72
|
+
assert not any("/build/" in f for f in found)
|
|
73
|
+
assert not any("/dist/" in f for f in found)
|
|
74
|
+
assert any(f.endswith("/requirements.txt") for f in found)
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
def test_find_files_includes_build_when_unexcluded(tmp_path, mocker):
|
|
78
|
+
"""Mirrors socketcli wiring: dropping a name from excluded_dirs re-includes its manifests."""
|
|
79
|
+
_seed_manifests(tmp_path)
|
|
80
|
+
core = _make_core(set(default_exclude_dirs) - {"build"})
|
|
81
|
+
mocker.patch.object(
|
|
82
|
+
core, "get_supported_patterns",
|
|
83
|
+
return_value={"pypi": {"requirements.txt": {"pattern": "requirements.txt"}}},
|
|
84
|
+
)
|
|
85
|
+
|
|
86
|
+
found = core.find_files(str(tmp_path))
|
|
87
|
+
assert any("/build/requirements.txt" in f for f in found)
|
|
88
|
+
# dist is still excluded since only build was re-included
|
|
89
|
+
assert not any("/dist/" in f for f in found)
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
def test_unexcluding_does_not_mutate_shared_defaults():
|
|
93
|
+
"""The socketcli flow builds a new set rather than mutating the module-level default."""
|
|
94
|
+
before = set(default_exclude_dirs)
|
|
95
|
+
config = SocketConfig(api_key="test-key")
|
|
96
|
+
config.excluded_dirs = set(config.excluded_dirs) - {"build"}
|
|
97
|
+
assert "build" not in config.excluded_dirs
|
|
98
|
+
assert default_exclude_dirs == before
|
|
99
|
+
assert "build" in default_exclude_dirs
|
|
@@ -87,11 +87,26 @@ def test_disable_external_tool_checks(analyzer, mocker):
|
|
|
87
87
|
|
|
88
88
|
def test_concurrency_and_memory_args(analyzer, mocker):
|
|
89
89
|
"""G7: explicit concurrency/memory propagate as coana args."""
|
|
90
|
-
cmd, _ = _run(analyzer, mocker, concurrency=1, memory_limit=8192)
|
|
90
|
+
cmd, _ = _run(analyzer, mocker, concurrency=1, memory_limit="8192")
|
|
91
91
|
assert "--concurrency" in cmd and cmd[cmd.index("--concurrency") + 1] == "1"
|
|
92
92
|
assert "--memory-limit" in cmd and cmd[cmd.index("--memory-limit") + 1] == "8192"
|
|
93
93
|
|
|
94
94
|
|
|
95
|
+
def test_timeout_and_memory_units_forwarded_verbatim(analyzer, mocker):
|
|
96
|
+
"""Unit-bearing timeout/memory strings are forwarded to coana untouched (coana parses them)."""
|
|
97
|
+
cmd, _ = _run(analyzer, mocker, timeout="10m", memory_limit="8GB")
|
|
98
|
+
assert cmd[cmd.index("--analysis-timeout") + 1] == "10m"
|
|
99
|
+
assert cmd[cmd.index("--memory-limit") + 1] == "8GB"
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
def test_timeout_and_memory_int_values_coerced_to_str(analyzer, mocker):
|
|
103
|
+
"""Config-file values can arrive as ints (set_defaults bypasses argparse type=); they must
|
|
104
|
+
still reach subprocess as strings, not raw ints."""
|
|
105
|
+
cmd, _ = _run(analyzer, mocker, timeout=300, memory_limit=2048)
|
|
106
|
+
assert cmd[cmd.index("--analysis-timeout") + 1] == "300"
|
|
107
|
+
assert cmd[cmd.index("--memory-limit") + 1] == "2048"
|
|
108
|
+
|
|
109
|
+
|
|
95
110
|
def test_env_identifies_python_cli(analyzer, mocker):
|
|
96
111
|
"""G5: SOCKET_CLI_VERSION + SOCKET_CALLER_USER_AGENT forwarded to coana."""
|
|
97
112
|
_, env = _run(analyzer, mocker)
|
|
@@ -1283,7 +1283,7 @@ wheels = [
|
|
|
1283
1283
|
|
|
1284
1284
|
[[package]]
|
|
1285
1285
|
name = "socketsecurity"
|
|
1286
|
-
version = "2.4.
|
|
1286
|
+
version = "2.4.11"
|
|
1287
1287
|
source = { editable = "." }
|
|
1288
1288
|
dependencies = [
|
|
1289
1289
|
{ name = "brotli", marker = "platform_python_implementation == 'CPython'" },
|
|
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.4.9 → socketsecurity-2.4.11}/socketsecurity/core/helper/socket_facts_loader.py
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
|
{socketsecurity-2.4.9 → socketsecurity-2.4.11}/socketsecurity/plugins/formatters/__init__.py
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
|
{socketsecurity-2.4.9 → socketsecurity-2.4.11}/tests/data/fullscans/diff/stream_diff_full.json
RENAMED
|
File without changes
|
|
File without changes
|
{socketsecurity-2.4.9 → socketsecurity-2.4.11}/tests/data/fullscans/head_scan/stream_scan.json
RENAMED
|
File without changes
|
{socketsecurity-2.4.9 → socketsecurity-2.4.11}/tests/data/fullscans/head_scan/stream_scan_full.json
RENAMED
|
File without changes
|
|
File without changes
|
{socketsecurity-2.4.9 → socketsecurity-2.4.11}/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
|
{socketsecurity-2.4.9 → socketsecurity-2.4.11}/tests/e2e/fixtures/simple-pypi/requirements.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{socketsecurity-2.4.9 → socketsecurity-2.4.11}/tests/fixtures/fossa/fossa-analyze-empty.json
RENAMED
|
File without changes
|
{socketsecurity-2.4.9 → socketsecurity-2.4.11}/tests/fixtures/fossa/fossa-analyze-populated.json
RENAMED
|
File without changes
|
{socketsecurity-2.4.9 → socketsecurity-2.4.11}/tests/fixtures/fossa/fossa-sbom-empty-deep.json
RENAMED
|
File without changes
|
{socketsecurity-2.4.9 → socketsecurity-2.4.11}/tests/fixtures/fossa/fossa-sbom-populated.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
|
{socketsecurity-2.4.9 → socketsecurity-2.4.11}/tests/unit/test_ignore_telemetry_filtering.py
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
|