socketsecurity 2.11.14__tar.gz → 2.12.1__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.12.1/.dockerignore +12 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/.github/actions/setup-docker/action.yml +1 -1
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/.github/dependabot.yml +8 -0
- socketsecurity-2.12.1/.github/workflows/docker-stable.yml +37 -0
- socketsecurity-2.12.1/.github/workflows/e2e-image.yml +119 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/.github/workflows/e2e-test.yml +8 -28
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/.github/workflows/python-tests.yml +1 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/.github/workflows/release.yml +9 -2
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/CHANGELOG.md +54 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/Dockerfile +23 -12
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/PKG-INFO +5 -5
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/docs/ci-cd.md +77 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/docs/cli-reference.md +1 -1
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/pyproject.toml +5 -5
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/socketsecurity/__init__.py +1 -1
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/socketsecurity/core/tools/reachability.py +1 -1
- socketsecurity-2.12.1/tests/e2e/fixtures/simple-cargo/Cargo.lock +16 -0
- socketsecurity-2.12.1/tests/e2e/fixtures/simple-cargo/Cargo.toml +10 -0
- socketsecurity-2.12.1/tests/e2e/fixtures/simple-cargo/src/main.rs +7 -0
- socketsecurity-2.12.1/tests/e2e/reach_facts.py +105 -0
- socketsecurity-2.12.1/tests/e2e/run-with-retries.sh +36 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/tests/e2e/validate-reachability.sh +2 -4
- socketsecurity-2.12.1/tests/unit/test_dockerfile.py +56 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/uv.lock +78 -59
- socketsecurity-2.11.14/.github/workflows/docker-stable.yml +0 -47
- socketsecurity-2.11.14/tests/e2e/reach-facts-probe.sh +0 -19
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/.github/CODEOWNERS +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/.github/PULL_REQUEST_TEMPLATE/bug-fix.md +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/.github/PULL_REQUEST_TEMPLATE/feature.md +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/.github/PULL_REQUEST_TEMPLATE/improvement.md +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/.github/actions/setup-hatch/action.yml +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/.github/actions/setup-sfw/action.yml +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/.github/workflows/dependency-audit.yml +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/.github/workflows/dependency-review.yml +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/.github/workflows/package-check.yml +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/.github/workflows/pr-preview.yml +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/.github/workflows/version-check.yml +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/.github/zizmor.yml +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/.gitignore +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/.hooks/sync_version.py +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/.pre-commit-config.yaml +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/.python-version +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/CONTRIBUTING.md +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/Dockerfile.preview +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/LICENSE +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/Makefile +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/README.md +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/benchmarks/manifest_discovery.py +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/docs/development.md +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/docs/troubleshooting.md +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/examples/config/sarif-dashboard-parity.json +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/examples/config/sarif-dashboard-parity.toml +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/examples/config/sarif-diff-ci-cd.json +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/examples/config/sarif-diff-ci-cd.toml +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/examples/config/sarif-instance-detail.json +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/examples/config/sarif-instance-detail.toml +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/instructions/gitlab-commit-status/uat.md +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/pytest.ini +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/scripts/build_container.sh +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/scripts/build_container_flexible.sh +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/scripts/deploy-test-docker.sh +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/scripts/deploy-test-pypi.sh +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/scripts/docker-entrypoint.sh +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/scripts/run.sh +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/session.md +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/socket.yml +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/socketsecurity/config.py +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/socketsecurity/core/__init__.py +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/socketsecurity/core/alert_selection.py +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/socketsecurity/core/classes.py +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/socketsecurity/core/cli_client.py +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/socketsecurity/core/cli_run.py +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/socketsecurity/core/exceptions.py +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/socketsecurity/core/git_interface.py +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/socketsecurity/core/git_remote.py +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/socketsecurity/core/helper/__init__.py +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/socketsecurity/core/helper/socket_facts_loader.py +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/socketsecurity/core/lazy_file_loader.py +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/socketsecurity/core/log_uploader.py +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/socketsecurity/core/logging.py +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/socketsecurity/core/messages.py +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/socketsecurity/core/pull_request.py +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/socketsecurity/core/resource_utils.py +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/socketsecurity/core/scm/__init__.py +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/socketsecurity/core/scm/base.py +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/socketsecurity/core/scm/client.py +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/socketsecurity/core/scm/github.py +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/socketsecurity/core/scm/gitlab.py +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/socketsecurity/core/scm_comments.py +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/socketsecurity/core/socket_config.py +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/socketsecurity/core/streaming.py +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/socketsecurity/core/tools/coana-cache.mjs +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/socketsecurity/core/utils.py +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/socketsecurity/fossa_compat.py +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/socketsecurity/output.py +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/socketsecurity/plugins/__init__.py +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/socketsecurity/plugins/base.py +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/socketsecurity/plugins/formatters/__init__.py +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/socketsecurity/plugins/formatters/slack.py +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/socketsecurity/plugins/jira.py +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/socketsecurity/plugins/manager.py +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/socketsecurity/plugins/slack.py +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/socketsecurity/plugins/teams.py +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/socketsecurity/plugins/webhook.py +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/socketsecurity/socketcli.py +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/tests/__init__.py +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/tests/core/conftest.py +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/tests/core/create_diff_input.json +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/tests/core/test_diff_alerts.py +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/tests/core/test_diff_generation.py +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/tests/core/test_diff_scan_polling.py +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/tests/core/test_facts_compression.py +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/tests/core/test_full_scan_outputs.py +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/tests/core/test_has_manifest_files.py +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/tests/core/test_invalid_facts_marker.py +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/tests/core/test_package_and_alerts.py +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/tests/core/test_sdk_methods.py +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/tests/core/test_supporting_methods.py +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/tests/data/fullscans/create_response.json +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/tests/data/fullscans/diff/stream_diff.json +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/tests/data/fullscans/diff/stream_diff_full.json +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/tests/data/fullscans/head_scan/metadata.json +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/tests/data/fullscans/head_scan/stream_scan.json +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/tests/data/fullscans/head_scan/stream_scan_full.json +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/tests/data/fullscans/new_scan/metadata.json +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/tests/data/fullscans/new_scan/stream_scan.json +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/tests/data/repos/repo_info_error.json +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/tests/data/repos/repo_info_no_head.json +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/tests/data/repos/repo_info_success.json +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/tests/data/settings/security-policy.json +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/tests/e2e/fixtures/simple-npm/index.js +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/tests/e2e/fixtures/simple-npm/package.json +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/tests/e2e/fixtures/simple-pypi/requirements.txt +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/tests/e2e/validate-gitlab.sh +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/tests/e2e/validate-json.sh +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/tests/e2e/validate-sarif.sh +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/tests/e2e/validate-scan.sh +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/tests/fixtures/fossa/README.md +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/tests/fixtures/fossa/fossa-analyze-empty.json +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/tests/fixtures/fossa/fossa-analyze-populated.json +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/tests/fixtures/fossa/fossa-sbom-empty-deep.json +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/tests/fixtures/fossa/fossa-sbom-populated.json +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/tests/unit/__init__.py +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/tests/unit/test_alert_selection.py +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/tests/unit/test_cli_config.py +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/tests/unit/test_cli_run.py +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/tests/unit/test_client.py +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/tests/unit/test_commit_message_truncation.py +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/tests/unit/test_config.py +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/tests/unit/test_dependency_overview.py +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/tests/unit/test_disable_ignore.py +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/tests/unit/test_exclude_paths.py +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/tests/unit/test_fossa_compat.py +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/tests/unit/test_fossa_parity.py +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/tests/unit/test_full_scan_retry.py +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/tests/unit/test_git_interface.py +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/tests/unit/test_git_remote.py +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/tests/unit/test_github_buildkite_config.py +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/tests/unit/test_gitlab_auth.py +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/tests/unit/test_gitlab_auth_fallback.py +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/tests/unit/test_gitlab_commit_status.py +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/tests/unit/test_gitlab_format.py +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/tests/unit/test_ignore_authorization.py +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/tests/unit/test_ignore_telemetry_filtering.py +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/tests/unit/test_include_dirs.py +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/tests/unit/test_log_uploader.py +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/tests/unit/test_manifest_discovery.py +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/tests/unit/test_messages.py +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/tests/unit/test_output.py +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/tests/unit/test_pr_comment_rendering.py +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/tests/unit/test_pull_request_context.py +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/tests/unit/test_reachability.py +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/tests/unit/test_scan_scope.py +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/tests/unit/test_slack_plugin.py +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/tests/unit/test_slack_severity_normalization.py +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/tests/unit/test_socketcli.py +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/tests/unit/test_streaming.py +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/tests/unit/test_summary_text.py +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/tests/unit/test_tier1_finalize.py +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/tests/unit/test_user_agent.py +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/workflows/bitbucket-pipelines.yml +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/workflows/buildkite.yml +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/workflows/github-actions.yml +0 -0
- {socketsecurity-2.11.14 → socketsecurity-2.12.1}/workflows/gitlab-ci.yml +0 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# The image needs only the package source, its build metadata and the entrypoint
|
|
2
|
+
# script. dist/ holds the wheel Dockerfile.preview installs.
|
|
3
|
+
*
|
|
4
|
+
!socketsecurity
|
|
5
|
+
!pyproject.toml
|
|
6
|
+
!uv.lock
|
|
7
|
+
!README.md
|
|
8
|
+
!LICENSE
|
|
9
|
+
!scripts/docker-entrypoint.sh
|
|
10
|
+
!dist
|
|
11
|
+
**/__pycache__
|
|
12
|
+
**/*.pyc
|
|
@@ -22,7 +22,7 @@ runs:
|
|
|
22
22
|
- uses: docker/setup-qemu-action@99012661954931238ded8c8b007157a8430204e1 # v4.4.0
|
|
23
23
|
if: inputs.enable-qemu == 'true'
|
|
24
24
|
- uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4.4.1
|
|
25
|
-
- uses: docker/login-action@
|
|
25
|
+
- uses: docker/login-action@8aa5831fb8d48d8f76594c7ddde61ae58019f550 # v4.8.0
|
|
26
26
|
with:
|
|
27
27
|
username: ${{ inputs.dockerhub-username }}
|
|
28
28
|
password: ${{ inputs.dockerhub-token }}
|
|
@@ -66,6 +66,14 @@ updates:
|
|
|
66
66
|
schedule:
|
|
67
67
|
interval: "weekly"
|
|
68
68
|
open-pull-requests-limit: 2
|
|
69
|
+
# Node majors move by hand: the reachability engine sets a minimum Node
|
|
70
|
+
# version, and Dependabot doesn't know Node's release schedule, so it
|
|
71
|
+
# would propose odd-numbered majors, which never get LTS. Check a new
|
|
72
|
+
# major with e2e-image.yml. The floating node:<major>-alpine tag picks up
|
|
73
|
+
# minor and patch releases on every build without a Dependabot PR.
|
|
74
|
+
ignore:
|
|
75
|
+
- dependency-name: "node"
|
|
76
|
+
update-types: ["version-update:semver-major"]
|
|
69
77
|
labels:
|
|
70
78
|
- "dependencies"
|
|
71
79
|
- "docker"
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
name: Mark Release as Stable
|
|
2
|
+
on:
|
|
3
|
+
workflow_dispatch:
|
|
4
|
+
inputs:
|
|
5
|
+
version:
|
|
6
|
+
description: 'Version to mark as stable (e.g., 1.2.3)'
|
|
7
|
+
required: true
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: read
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
stable:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
17
|
+
with:
|
|
18
|
+
persist-credentials: false
|
|
19
|
+
|
|
20
|
+
- name: Set up Docker publishing
|
|
21
|
+
uses: $/.github/actions/setup-docker
|
|
22
|
+
with:
|
|
23
|
+
# Retagging copies manifests between tags; nothing is built.
|
|
24
|
+
enable-qemu: "false"
|
|
25
|
+
dockerhub-username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
26
|
+
dockerhub-token: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
27
|
+
|
|
28
|
+
# Stable must be the release's exact digest, attestations included.
|
|
29
|
+
- name: Tag the release image as stable
|
|
30
|
+
env:
|
|
31
|
+
INPUT_VERSION: ${{ inputs.version }}
|
|
32
|
+
run: |
|
|
33
|
+
if ! printf '%s' "$INPUT_VERSION" | grep -Eq '^[0-9]+(\.[0-9A-Za-z-]+)+$'; then
|
|
34
|
+
echo "Error: '${INPUT_VERSION}' is not a release version such as 1.2.3"
|
|
35
|
+
exit 1
|
|
36
|
+
fi
|
|
37
|
+
docker buildx imagetools create --tag socketdev/cli:stable "socketdev/cli:${INPUT_VERSION}"
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
name: E2E Image
|
|
2
|
+
|
|
3
|
+
# Runs reachability inside the Docker image built from this commit, so a missing
|
|
4
|
+
# or broken toolchain fails here rather than in a user's pipeline. e2e-test.yml
|
|
5
|
+
# covers reachability run directly on the runner.
|
|
6
|
+
on:
|
|
7
|
+
pull_request:
|
|
8
|
+
paths:
|
|
9
|
+
- "Dockerfile"
|
|
10
|
+
- ".dockerignore"
|
|
11
|
+
- "scripts/docker-entrypoint.sh"
|
|
12
|
+
- "socketsecurity/core/tools/**"
|
|
13
|
+
- "tests/e2e/**"
|
|
14
|
+
- ".github/workflows/e2e-image.yml"
|
|
15
|
+
push:
|
|
16
|
+
branches: [main]
|
|
17
|
+
paths:
|
|
18
|
+
- "Dockerfile"
|
|
19
|
+
- ".dockerignore"
|
|
20
|
+
- "scripts/docker-entrypoint.sh"
|
|
21
|
+
- "socketsecurity/core/tools/**"
|
|
22
|
+
- "tests/e2e/**"
|
|
23
|
+
- ".github/workflows/e2e-image.yml"
|
|
24
|
+
workflow_dispatch:
|
|
25
|
+
|
|
26
|
+
permissions:
|
|
27
|
+
contents: read
|
|
28
|
+
|
|
29
|
+
jobs:
|
|
30
|
+
reachability:
|
|
31
|
+
# Needs SOCKET_CLI_API_TOKEN, which fork and Dependabot PRs don't get.
|
|
32
|
+
if: >-
|
|
33
|
+
(github.event_name != 'pull_request' ||
|
|
34
|
+
github.event.pull_request.head.repo.full_name == github.repository) &&
|
|
35
|
+
github.event.pull_request.user.login != 'dependabot[bot]'
|
|
36
|
+
runs-on: ubuntu-latest
|
|
37
|
+
timeout-minutes: 60
|
|
38
|
+
name: e2e-image-reachability
|
|
39
|
+
env:
|
|
40
|
+
IMAGE: socket-python-cli:e2e
|
|
41
|
+
FIXTURES: simple-npm simple-cargo
|
|
42
|
+
steps:
|
|
43
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
44
|
+
with:
|
|
45
|
+
fetch-depth: 0
|
|
46
|
+
persist-credentials: false
|
|
47
|
+
|
|
48
|
+
- uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4.4.1
|
|
49
|
+
|
|
50
|
+
# One build for every fixture: the image is by far the most expensive
|
|
51
|
+
# part of this job.
|
|
52
|
+
- name: Build the image
|
|
53
|
+
uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7.4.0
|
|
54
|
+
with:
|
|
55
|
+
context: .
|
|
56
|
+
load: true
|
|
57
|
+
tags: ${{ env.IMAGE }}
|
|
58
|
+
build-args: |
|
|
59
|
+
USE_LOCAL_INSTALL=true
|
|
60
|
+
# Read-only: reuse the release build's toolchain layers without
|
|
61
|
+
# writing this commit's layers back.
|
|
62
|
+
cache-from: type=registry,ref=socketdev/cli:buildcache
|
|
63
|
+
|
|
64
|
+
- name: Run reachability in the image
|
|
65
|
+
id: run-cli
|
|
66
|
+
env:
|
|
67
|
+
SOCKET_SECURITY_API_KEY: ${{ secrets.SOCKET_CLI_API_TOKEN }}
|
|
68
|
+
run: |
|
|
69
|
+
# The checkout belongs to the runner user and the container runs as
|
|
70
|
+
# root, so git needs the mount marked safe to read repository details.
|
|
71
|
+
# The named volume keeps the downloaded reachability engine across
|
|
72
|
+
# runs.
|
|
73
|
+
in_image() {
|
|
74
|
+
docker run --rm -v "$PWD:/repo" -w /repo \
|
|
75
|
+
-v socket-cache:/root/.cache/socket \
|
|
76
|
+
-v /tmp/e2e-logs:/tmp/e2e-logs \
|
|
77
|
+
-e SOCKET_SECURITY_API_KEY \
|
|
78
|
+
-e GIT_CONFIG_COUNT=1 -e GIT_CONFIG_KEY_0=safe.directory -e GIT_CONFIG_VALUE_0=/repo \
|
|
79
|
+
"$@"
|
|
80
|
+
}
|
|
81
|
+
export -f in_image
|
|
82
|
+
mkdir -p /tmp/e2e-logs
|
|
83
|
+
|
|
84
|
+
# Every fixture runs even when an earlier one fails, so one failure
|
|
85
|
+
# can't hide another.
|
|
86
|
+
failed=""
|
|
87
|
+
for fixture in $FIXTURES; do
|
|
88
|
+
target="tests/e2e/fixtures/$fixture"
|
|
89
|
+
log="/tmp/e2e-logs/$fixture.log"
|
|
90
|
+
echo "::group::$fixture"
|
|
91
|
+
if bash tests/e2e/run-with-retries.sh "e2e-image-$fixture" \
|
|
92
|
+
"in_image --entrypoint python $IMAGE tests/e2e/reach_facts.py $target --probe" \
|
|
93
|
+
in_image "$IMAGE" --target-path "$target" --reach --disable-blocking --enable-debug; then
|
|
94
|
+
cp /tmp/e2e-output.log "$log"
|
|
95
|
+
in_image --entrypoint python "$IMAGE" tests/e2e/reach_facts.py "$target" --validate-analyzed "$log" \
|
|
96
|
+
|| failed="$failed $fixture"
|
|
97
|
+
else
|
|
98
|
+
cp /tmp/e2e-output.log "$log"
|
|
99
|
+
echo "FAIL: the CLI exited with an error for $fixture"
|
|
100
|
+
failed="$failed $fixture"
|
|
101
|
+
fi
|
|
102
|
+
echo "::endgroup::"
|
|
103
|
+
done
|
|
104
|
+
if [ -n "$failed" ]; then
|
|
105
|
+
echo "::error title=e2e-image-reachability::failed for:$failed"
|
|
106
|
+
exit 1
|
|
107
|
+
fi
|
|
108
|
+
|
|
109
|
+
- name: Upload diagnostics
|
|
110
|
+
if: failure() || steps.run-cli.outputs.diagnostics == 'true'
|
|
111
|
+
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
|
112
|
+
with:
|
|
113
|
+
name: e2e-image-diagnostics-attempt${{ github.run_attempt }}
|
|
114
|
+
path: |
|
|
115
|
+
/tmp/e2e-logs/
|
|
116
|
+
tests/e2e/fixtures/*/.socket.facts.json
|
|
117
|
+
if-no-files-found: ignore
|
|
118
|
+
include-hidden-files: true
|
|
119
|
+
retention-days: 14
|
|
@@ -50,7 +50,7 @@ jobs:
|
|
|
50
50
|
# results while the CLI reports success. The probe exits 0 when
|
|
51
51
|
# the facts file has alerted components; anything else is
|
|
52
52
|
# retried before validation fails the job.
|
|
53
|
-
retry-probe:
|
|
53
|
+
retry-probe: uv run python tests/e2e/reach_facts.py tests/e2e/fixtures/simple-npm --probe
|
|
54
54
|
|
|
55
55
|
- name: gitlab
|
|
56
56
|
args: >-
|
|
@@ -103,33 +103,13 @@ jobs:
|
|
|
103
103
|
env:
|
|
104
104
|
SOCKET_SECURITY_API_KEY: ${{ secrets.SOCKET_CLI_API_TOKEN }}
|
|
105
105
|
RETRY_PROBE: ${{ matrix.retry-probe }}
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
# inconclusive; any other empty result remains a failure. Retries are
|
|
114
|
-
# surfaced as warning annotations so flake frequency stays visible.
|
|
115
|
-
max_attempts=3
|
|
116
|
-
attempt=1
|
|
117
|
-
while :; do
|
|
118
|
-
socketcli ${{ matrix.args }} 2>&1 | tee /tmp/e2e-output.log
|
|
119
|
-
[ -z "$RETRY_PROBE" ] && break
|
|
120
|
-
if bash -c "$RETRY_PROBE"; then
|
|
121
|
-
break
|
|
122
|
-
fi
|
|
123
|
-
if [ "$attempt" -ge "$max_attempts" ]; then
|
|
124
|
-
echo "::warning title=e2e-${{ matrix.name }} incomplete results::output still fails the completeness probe after ${max_attempts} attempts; letting validation classify the result"
|
|
125
|
-
echo "diagnostics=true" >> "$GITHUB_OUTPUT"
|
|
126
|
-
break
|
|
127
|
-
fi
|
|
128
|
-
echo "::warning title=e2e-${{ matrix.name }} transient retry::attempt ${attempt} failed the completeness probe (suspected backend transient); retrying"
|
|
129
|
-
echo "e2e-${{ matrix.name }}: retry after attempt ${attempt} — completeness probe failed (suspected transient)" >> "$GITHUB_STEP_SUMMARY"
|
|
130
|
-
attempt=$((attempt+1))
|
|
131
|
-
sleep 30
|
|
132
|
-
done
|
|
106
|
+
CLI_ARGS: ${{ matrix.args }}
|
|
107
|
+
LABEL: e2e-${{ matrix.name }}
|
|
108
|
+
# Entries with retry-probe are retried while the probe fails. Validation
|
|
109
|
+
# treats only the known zero-project backend result as inconclusive;
|
|
110
|
+
# any other empty result remains a failure. CLI_ARGS is word-split on
|
|
111
|
+
# purpose.
|
|
112
|
+
run: bash tests/e2e/run-with-retries.sh "$LABEL" "$RETRY_PROBE" socketcli $CLI_ARGS
|
|
133
113
|
|
|
134
114
|
- name: Validate results
|
|
135
115
|
env:
|
|
@@ -13,6 +13,7 @@ on:
|
|
|
13
13
|
- "tests/core/**/*.py"
|
|
14
14
|
- "pyproject.toml"
|
|
15
15
|
- "uv.lock"
|
|
16
|
+
- "Dockerfile"
|
|
16
17
|
- ".github/workflows/python-tests.yml"
|
|
17
18
|
# Unfiltered: a required check behind a paths filter never reports on a
|
|
18
19
|
# pull request that misses the filter, which blocks the merge.
|
|
@@ -117,8 +117,15 @@ jobs:
|
|
|
117
117
|
with:
|
|
118
118
|
push: true
|
|
119
119
|
platforms: linux/amd64,linux/arm64
|
|
120
|
-
cache
|
|
121
|
-
|
|
120
|
+
# The cache lives in the registry because Actions caches are scoped to
|
|
121
|
+
# the ref that wrote them, and each release builds on its own tag.
|
|
122
|
+
# Reusing cached layers keeps their digests stable, so users
|
|
123
|
+
# upgrading pull only the layers that changed.
|
|
124
|
+
cache-from: type=registry,ref=socketdev/cli:buildcache
|
|
125
|
+
cache-to: type=registry,ref=socketdev/cli:buildcache,mode=max,image-manifest=true,oci-mediatypes=true
|
|
126
|
+
# Attach an SPDX SBOM generated from the built image, next to the
|
|
127
|
+
# provenance attestation the action already adds.
|
|
128
|
+
sbom: true
|
|
122
129
|
tags: |
|
|
123
130
|
socketdev/cli:latest
|
|
124
131
|
socketdev/cli:${{ env.VERSION }}
|
|
@@ -1,5 +1,59 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2.12.1
|
|
4
|
+
|
|
5
|
+
### Changed: bump pinned Coana CLI to 15.15.1
|
|
6
|
+
|
|
7
|
+
- Bumped the pinned reachability engine (the Coana CLI) from `15.15.0` to
|
|
8
|
+
`15.15.1`. See the
|
|
9
|
+
[reachability analysis changelog](https://docs.socket.dev/docs/reachability-analysis-changelog)
|
|
10
|
+
for engine changes.
|
|
11
|
+
|
|
12
|
+
## 2.12.0
|
|
13
|
+
|
|
14
|
+
### Added
|
|
15
|
+
|
|
16
|
+
- Release images on Docker Hub now carry an SPDX SBOM attestation alongside the
|
|
17
|
+
existing provenance attestation. See
|
|
18
|
+
[Verify the image](docs/ci-cd.md#verify-the-image).
|
|
19
|
+
- New [Docker image](docs/ci-cd.md#docker-image) section in the CI/CD guide,
|
|
20
|
+
covering how to cache the reachability engine between container runs and keep
|
|
21
|
+
image pulls cheap in CI.
|
|
22
|
+
|
|
23
|
+
### Changed
|
|
24
|
+
|
|
25
|
+
- The Docker image is about 1 GB smaller. Rust is installed with rustup's
|
|
26
|
+
minimal profile (`rustc`, `cargo`, `rust-std`), which leaves out Rust's offline
|
|
27
|
+
HTML documentation, and the npm and pip download caches are no longer kept.
|
|
28
|
+
- Upgrading `socketdev/cli` from one release to the next now downloads only the
|
|
29
|
+
layers that changed. Previously each release rebuilt every layer, so an upgrade
|
|
30
|
+
downloaded nearly the whole image.
|
|
31
|
+
- Marking a release stable now retags the image that release published instead
|
|
32
|
+
of rebuilding it, so `socketdev/cli:stable` is the same image as
|
|
33
|
+
`socketdev/cli:<version>`, attestations included.
|
|
34
|
+
|
|
35
|
+
### Removed
|
|
36
|
+
|
|
37
|
+
- The Docker image no longer includes `rustfmt` or `clippy` (left out of
|
|
38
|
+
rustup's minimal profile) or `strace`. Reachability analysis only needs
|
|
39
|
+
`cargo`. If you rely on these tools, add them in a derived image with
|
|
40
|
+
`rustup component add rustfmt clippy` or `apk add strace`.
|
|
41
|
+
|
|
42
|
+
### Fixed
|
|
43
|
+
|
|
44
|
+
- The Docker image now publishes reliably when PyPI is slow to list a new
|
|
45
|
+
release. A delay could leave a release on PyPI without a matching Docker image.
|
|
46
|
+
|
|
47
|
+
### Security
|
|
48
|
+
|
|
49
|
+
- Bumped the locked `soupsieve` (pulled in by `beautifulsoup4`) from `2.9.2` to
|
|
50
|
+
`4.1` on Python 3.11.5 and later, and to `2.10` on earlier 3.11 releases,
|
|
51
|
+
which `soupsieve` 4 doesn't support. This fixes
|
|
52
|
+
[GHSA-mmhr-3c5m-f64f](https://github.com/advisories/GHSA-mmhr-3c5m-f64f) and
|
|
53
|
+
[GHSA-4j63-6c4x-wfg4](https://github.com/advisories/GHSA-4j63-6c4x-wfg4), two
|
|
54
|
+
slow CSS-selector matching bugs. The CLI doesn't run CSS selectors, so it
|
|
55
|
+
wasn't exposed to either.
|
|
56
|
+
|
|
3
57
|
## 2.11.14
|
|
4
58
|
|
|
5
59
|
### Changed: bump pinned Coana CLI to 15.15.0
|
|
@@ -6,32 +6,29 @@ FROM node:24-alpine3.24 AS node
|
|
|
6
6
|
FROM python:3-alpine
|
|
7
7
|
LABEL org.opencontainers.image.authors="socket.dev"
|
|
8
8
|
|
|
9
|
+
# Build-time only. Keeps pip's cache out of the layers, and lets the CLI install
|
|
10
|
+
# retries see a release PyPI has just listed (pip caches its index for 10 min).
|
|
11
|
+
ARG PIP_NO_CACHE_DIR=1
|
|
12
|
+
|
|
9
13
|
# Language version arguments with defaults
|
|
10
14
|
ARG GO_VERSION=system
|
|
11
15
|
ARG JAVA_VERSION=17
|
|
12
16
|
ARG DOTNET_VERSION=8
|
|
13
17
|
|
|
14
|
-
# CLI and SDK arguments
|
|
15
|
-
ARG CLI_VERSION
|
|
16
|
-
ARG SDK_VERSION
|
|
17
|
-
ARG PIP_INDEX_URL=https://pypi.org/simple
|
|
18
|
-
ARG PIP_EXTRA_INDEX_URL=https://pypi.org/simple
|
|
19
|
-
ARG USE_LOCAL_INSTALL=false
|
|
20
|
-
|
|
21
18
|
# Install base packages first
|
|
22
19
|
# ca-certificates must be 20261020-r0 or newer, which drops the roots the
|
|
23
20
|
# compromised eMudhra intermediates chain to. The base image ships an older
|
|
24
21
|
# one, and `apk add` does not upgrade installed packages, so upgrade it here.
|
|
25
|
-
RUN apk
|
|
22
|
+
RUN apk add --no-cache \
|
|
26
23
|
git curl wget \
|
|
27
|
-
ruby ruby-dev build-base
|
|
24
|
+
ruby ruby-dev build-base && \
|
|
28
25
|
apk upgrade --no-cache ca-certificates && \
|
|
29
26
|
[ "$(apk version -t "$(apk list -I ca-certificates | awk '{print $1}' | sed 's/^ca-certificates-//')" 20261020-r0)" != "<" ]
|
|
30
27
|
|
|
31
28
|
# pip uses its own vendored CA bundle, not the system store, and the base image's
|
|
32
29
|
# pip trusts the compromised eMudhra intermediates. 26.2.2 vendors certifi
|
|
33
30
|
# 2026.10.19. Upgrade it against the system store fixed above.
|
|
34
|
-
RUN python -m pip install --
|
|
31
|
+
RUN python -m pip install --cert /etc/ssl/certs/ca-certificates.crt --upgrade "pip>=26.2.2" && \
|
|
35
32
|
python -c 'import sys, pip; sys.exit(tuple(map(int, pip.__version__.split(".")[:3])) < (26, 2, 2))'
|
|
36
33
|
|
|
37
34
|
# npm, npx and yarn are symlinks in the node image. COPY would dereference them
|
|
@@ -104,11 +101,14 @@ RUN if [ "$TARGETARCH" = "amd64" ]; then \
|
|
|
104
101
|
fi
|
|
105
102
|
|
|
106
103
|
# Install additional tools
|
|
104
|
+
# Reachability only runs cargo, so install the minimal Rust profile (rustc,
|
|
105
|
+
# cargo, rust-std). The default profile adds about 900 MB of offline HTML docs.
|
|
107
106
|
RUN npm install socket -g && \
|
|
107
|
+
npm cache clean --force && \
|
|
108
108
|
gem install bundler && \
|
|
109
|
-
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && \
|
|
109
|
+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal && \
|
|
110
110
|
. ~/.cargo/env && \
|
|
111
|
-
|
|
111
|
+
cargo --version
|
|
112
112
|
|
|
113
113
|
# Set environment paths
|
|
114
114
|
ENV PATH="/usr/local/go/bin:/usr/lib/go/bin:/root/.cargo/bin:${PATH}"
|
|
@@ -152,6 +152,17 @@ RUN uv export --directory /tmp/socket-cli-lock --frozen --no-dev --no-emit-proje
|
|
|
152
152
|
--index-url https://pypi.org/simple --extra-index-url https://pypi.org/simple \
|
|
153
153
|
-r /tmp/socket-cli-lock/requirements.txt
|
|
154
154
|
|
|
155
|
+
# CLI and SDK arguments
|
|
156
|
+
# Keep these below the toolchain layers. Every RUN after an ARG is cache-keyed on
|
|
157
|
+
# its value, and CLI_VERSION changes on every release, so declared any earlier
|
|
158
|
+
# they would rebuild every toolchain layer on each release, and every upgrade
|
|
159
|
+
# would be a full re-pull.
|
|
160
|
+
ARG CLI_VERSION
|
|
161
|
+
ARG SDK_VERSION
|
|
162
|
+
ARG PIP_INDEX_URL=https://pypi.org/simple
|
|
163
|
+
ARG PIP_EXTRA_INDEX_URL=https://pypi.org/simple
|
|
164
|
+
ARG USE_LOCAL_INSTALL=false
|
|
165
|
+
|
|
155
166
|
# Install CLI based on build mode
|
|
156
167
|
RUN if [ "$USE_LOCAL_INSTALL" = "true" ]; then \
|
|
157
168
|
echo "Using local development install"; \
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: socketsecurity
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.12.1
|
|
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>
|
|
@@ -38,7 +38,7 @@ Requires-Dist: brotli==1.2.1; platform_python_implementation == 'CPython'
|
|
|
38
38
|
Requires-Dist: brotlicffi==1.2.1.0; platform_python_implementation != 'CPython'
|
|
39
39
|
Requires-Dist: certifi>=2026.10.19
|
|
40
40
|
Requires-Dist: gitpython==3.2.1
|
|
41
|
-
Requires-Dist: markdown==3.11.
|
|
41
|
+
Requires-Dist: markdown==3.11.3
|
|
42
42
|
Requires-Dist: mdutils==1.8.1
|
|
43
43
|
Requires-Dist: packaging==26.3
|
|
44
44
|
Requires-Dist: prettytable==3.18.0
|
|
@@ -48,11 +48,11 @@ Requires-Dist: socketdev==3.6.2
|
|
|
48
48
|
Provides-Extra: dev
|
|
49
49
|
Requires-Dist: hatch==1.18.2; extra == 'dev'
|
|
50
50
|
Requires-Dist: pre-commit==4.7.0; extra == 'dev'
|
|
51
|
-
Requires-Dist: ruff==0.17.
|
|
51
|
+
Requires-Dist: ruff==0.17.4; extra == 'dev'
|
|
52
52
|
Requires-Dist: twine==7.0.0; extra == 'dev'
|
|
53
|
-
Requires-Dist: uv==0.13.
|
|
53
|
+
Requires-Dist: uv==0.13.7; extra == 'dev'
|
|
54
54
|
Provides-Extra: test
|
|
55
|
-
Requires-Dist: pytest-asyncio==1.4.1; extra == 'test'
|
|
55
|
+
Requires-Dist: pytest-asyncio==1.4.1.post1; extra == 'test'
|
|
56
56
|
Requires-Dist: pytest-cov==7.1.0; extra == 'test'
|
|
57
57
|
Requires-Dist: pytest-mock==3.17.0; extra == 'test'
|
|
58
58
|
Requires-Dist: pytest-watch==4.2.0; extra == 'test'
|
|
@@ -522,6 +522,83 @@ Dashboard metadata unless `--integration` was explicitly supplied. PR comments
|
|
|
522
522
|
remain limited to the existing GitHub and GitLab SCM adapters; Azure receives
|
|
523
523
|
console output and Dashboard association but does not post a PR comment.
|
|
524
524
|
|
|
525
|
+
## Docker image
|
|
526
|
+
|
|
527
|
+
`socketdev/cli` on Docker Hub packages the CLI with the toolchains reachability
|
|
528
|
+
analysis runs on: Node.js, Go, Java, .NET, Rust, Ruby, pyenv, and PyPy on
|
|
529
|
+
`linux/amd64`. The toolchains are most of the image's size. Tags are published
|
|
530
|
+
per release (`socketdev/cli:<version>`), plus `latest` and `stable`.
|
|
531
|
+
|
|
532
|
+
```sh
|
|
533
|
+
docker run --rm \
|
|
534
|
+
-e SOCKET_SECURITY_API_TOKEN \
|
|
535
|
+
-v "$PWD:/src" \
|
|
536
|
+
socketdev/cli:<version> --target-path /src --reach
|
|
537
|
+
```
|
|
538
|
+
|
|
539
|
+
### Cache the reachability engine
|
|
540
|
+
|
|
541
|
+
With `--reach`, the CLI downloads its pinned reachability engine on first use and
|
|
542
|
+
caches it (see [Reachability analysis](cli-reference.md#reachability-analysis)
|
|
543
|
+
for the location). In the image the cache is under `/root/.cache/socket`. A new
|
|
544
|
+
container starts with an empty cache, so without a persistent cache every run
|
|
545
|
+
downloads the engine again. Mount a volume to keep it:
|
|
546
|
+
|
|
547
|
+
```sh
|
|
548
|
+
docker run --rm \
|
|
549
|
+
-e SOCKET_SECURITY_API_TOKEN \
|
|
550
|
+
-v "$PWD:/src" \
|
|
551
|
+
-v socket-cache:/root/.cache/socket \
|
|
552
|
+
socketdev/cli:<version> --target-path /src --reach
|
|
553
|
+
```
|
|
554
|
+
|
|
555
|
+
On CI runners that start every job on a fresh machine, mount a directory your CI
|
|
556
|
+
provider caches instead, and key that cache on the CLI version, which determines
|
|
557
|
+
the engine version. In GitHub Actions:
|
|
558
|
+
|
|
559
|
+
```yaml
|
|
560
|
+
- uses: actions/cache@v4
|
|
561
|
+
with:
|
|
562
|
+
path: ${{ runner.temp }}/socket-cache
|
|
563
|
+
key: socket-cli-<version>
|
|
564
|
+
- run: |
|
|
565
|
+
docker run --rm \
|
|
566
|
+
-e SOCKET_SECURITY_API_TOKEN \
|
|
567
|
+
-v "$PWD:/src" \
|
|
568
|
+
-v "${{ runner.temp }}/socket-cache:/root/.cache/socket" \
|
|
569
|
+
socketdev/cli:<version> --target-path /src --reach
|
|
570
|
+
env:
|
|
571
|
+
SOCKET_SECURITY_API_TOKEN: ${{ secrets.SOCKET_SECURITY_API_TOKEN }}
|
|
572
|
+
```
|
|
573
|
+
|
|
574
|
+
Keep the cache outside the directory being scanned. A cache restored for a
|
|
575
|
+
different version is harmless: the CLI downloads the version it needs.
|
|
576
|
+
|
|
577
|
+
### Keep image pulls cheap
|
|
578
|
+
|
|
579
|
+
- Pin a version tag, or a digest, rather than `latest`, so runners that already
|
|
580
|
+
have the image reuse it.
|
|
581
|
+
- Mirror the image to a registry close to your runners (GHCR, ECR, Artifact
|
|
582
|
+
Registry, Artifactory). This also avoids Docker Hub's pull rate limits.
|
|
583
|
+
- Ephemeral hosted runners pull the whole image on every job. Long-lived or
|
|
584
|
+
self-hosted runners pull it once per host.
|
|
585
|
+
- Upgrading from one release to the next downloads only the layers that changed,
|
|
586
|
+
usually the CLI and its Python dependencies, not the toolchains.
|
|
587
|
+
|
|
588
|
+
### Verify the image
|
|
589
|
+
|
|
590
|
+
Each release image carries a provenance attestation and an SPDX SBOM:
|
|
591
|
+
|
|
592
|
+
```sh
|
|
593
|
+
docker buildx imagetools inspect socketdev/cli:<version> --format '{{ json .Provenance }}'
|
|
594
|
+
docker buildx imagetools inspect socketdev/cli:<version> --format '{{ json .SBOM }}'
|
|
595
|
+
```
|
|
596
|
+
|
|
597
|
+
The SBOM is generated from the built image, so it covers the Alpine packages and
|
|
598
|
+
the Python and npm packages installed in it. Toolchains installed from release
|
|
599
|
+
archives rather than a package manager, such as Rust (via rustup) and PyPy, are
|
|
600
|
+
listed thinly or not at all.
|
|
601
|
+
|
|
525
602
|
## Workflow templates
|
|
526
603
|
|
|
527
604
|
Prebuilt examples in this repo:
|
|
@@ -337,7 +337,7 @@ If you don't want to provide the Socket API Token every time then you can use th
|
|
|
337
337
|
| Parameter | Required | Default | Description |
|
|
338
338
|
|:---------------------------------|:---------|:--------|:---------------------------------------------------------------------------------------------------------------------------|
|
|
339
339
|
| `--reach` | False | False | Enable reachability analysis to identify which vulnerable functions are actually called by your code. Creates a full application reachability scan (`scan_type=socket_tier1`). |
|
|
340
|
-
| `--reach-version` | False | 15.15.
|
|
340
|
+
| `--reach-version` | False | 15.15.1 | Version of the Coana 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. |
|
|
341
341
|
| `--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` |
|
|
342
342
|
| `--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` |
|
|
343
343
|
| `--reach-concurrency` | False | 1 | Control parallel analysis execution (must be >= 1). Omitted by default, so coana applies its own default. |
|
|
@@ -6,7 +6,7 @@ build-backend = "hatchling.build"
|
|
|
6
6
|
|
|
7
7
|
[project]
|
|
8
8
|
name = "socketsecurity"
|
|
9
|
-
version = "2.
|
|
9
|
+
version = "2.12.1"
|
|
10
10
|
requires-python = ">= 3.11"
|
|
11
11
|
license = {"file" = "LICENSE"}
|
|
12
12
|
dependencies = [
|
|
@@ -18,7 +18,7 @@ dependencies = [
|
|
|
18
18
|
"python-dotenv==1.2.4",
|
|
19
19
|
"socketdev==3.6.2",
|
|
20
20
|
"beautifulsoup4==4.15.0",
|
|
21
|
-
"markdown==3.11.
|
|
21
|
+
"markdown==3.11.3",
|
|
22
22
|
"brotli==1.2.1; platform_python_implementation == 'CPython'",
|
|
23
23
|
"brotlicffi==1.2.1.0; platform_python_implementation != 'CPython'",
|
|
24
24
|
# requests' CA bundle. A floor rather than an exact pin, so later trust-store
|
|
@@ -47,13 +47,13 @@ test = [
|
|
|
47
47
|
"pytest==9.2.0",
|
|
48
48
|
"pytest-cov==7.1.0",
|
|
49
49
|
"pytest-mock==3.17.0",
|
|
50
|
-
"pytest-asyncio==1.4.1",
|
|
50
|
+
"pytest-asyncio==1.4.1.post1",
|
|
51
51
|
"pytest-watch==4.2.0"
|
|
52
52
|
]
|
|
53
53
|
dev = [
|
|
54
|
-
"ruff==0.17.
|
|
54
|
+
"ruff==0.17.4",
|
|
55
55
|
"twine==7.0.0", # for building
|
|
56
|
-
"uv==0.13.
|
|
56
|
+
"uv==0.13.7", # for dependency management
|
|
57
57
|
"pre-commit==4.7.0",
|
|
58
58
|
"hatch==1.18.2"
|
|
59
59
|
]
|
|
@@ -22,7 +22,7 @@ log = logging.getLogger(__name__)
|
|
|
22
22
|
# Pinned Coana CLI version. Bumped deliberately per Python CLI release so the
|
|
23
23
|
# reachability engine version only changes through a standard pip upgrade (advance notice).
|
|
24
24
|
# Pass --reach-version latest to opt into the newest published version instead.
|
|
25
|
-
DEFAULT_COANA_CLI_VERSION: Final = "15.15.
|
|
25
|
+
DEFAULT_COANA_CLI_VERSION: Final = "15.15.1"
|
|
26
26
|
|
|
27
27
|
# Vendored from coana-package-manager, where it is generated; the only code that may read or
|
|
28
28
|
# write the cache Coana shares with the Socket CLIs. See "Launching Coana" in that repo's
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# This file is automatically @generated by Cargo.
|
|
2
|
+
# It is not intended for manual editing.
|
|
3
|
+
version = 4
|
|
4
|
+
|
|
5
|
+
[[package]]
|
|
6
|
+
name = "simple-cargo"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
dependencies = [
|
|
9
|
+
"smallvec",
|
|
10
|
+
]
|
|
11
|
+
|
|
12
|
+
[[package]]
|
|
13
|
+
name = "smallvec"
|
|
14
|
+
version = "1.6.0"
|
|
15
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
16
|
+
checksum = "1a55ca5f3b68e41c979bf8c46a6f1da892ca4db8f94023ce0bd32407573b1ac0"
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
[package]
|
|
2
|
+
name = "simple-cargo"
|
|
3
|
+
version = "0.1.0"
|
|
4
|
+
edition = "2021"
|
|
5
|
+
publish = false
|
|
6
|
+
|
|
7
|
+
[dependencies]
|
|
8
|
+
# Pinned to a release affected by GHSA-43w2-9j62-hq99 (insert_many buffer
|
|
9
|
+
# overflow), so reachability has a known vulnerability to analyze.
|
|
10
|
+
smallvec = "=1.6.0"
|