From 66eba3564e71c28090ef50f89a7c9f223f3adcaa Mon Sep 17 00:00:00 2001 From: lelia <2418071+lelia@users.noreply.github.com> Date: Fri, 13 Nov 2026 21:00:41 -0500 Subject: [PATCH 1/4] docs: List the API token scopes Socket Basics needs The docs named the scopes `full-scans` and `socket-basics`, which are not scope names; the API checks `full-scans:create` and `socket-basics:read`. They also left out that Socket Tier 1 needs `full-scans:create`, and that a missing scope never fails the run. - Add an API token scopes section to the parameters reference: a least-privilege scope table, then every Socket API call by step (dashboard configuration, result upload, Socket Tier 1) with the scope it checks, when it is called and how a denial shows up in the log - Note that on an Enterprise organization a key without `socket-basics:read` also loses organization discovery, so `SOCKET_ORG` must be set for the upload - Note which token variables each step reads, and that the Socket npm CLI prefers its own variables over the one Tier 1 passes - Correct the scope names in the README, the GitHub Action guide and the Docker guide, and link them to the new section --- README.md | 14 +++-- docs/github-action.md | 15 ++--- docs/local-install-docker.md | 7 ++- docs/parameters.md | 108 +++++++++++++++++++++++++++++++++-- 4 files changed, 123 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 8a3cffa..041c403 100644 --- a/README.md +++ b/README.md @@ -154,7 +154,7 @@ Socket Enterprise customers can configure Socket Basics directly from the [Socke ![Socket Basics Settings](docs/screenshots/socket_basics_settings.png) -Configure scanning policies, notification channels, and rule sets for your entire organization in one place. Socket Basics loads these settings on every run when its API key has the `socket-basics` scope, and they take precedence over the matching workflow inputs, including fields you leave blank. See [Dashboard Settings and Workflow Inputs](docs/github-action.md#dashboard-settings-and-workflow-inputs) for the exceptions and for setting values per repository. +Configure scanning policies, notification channels, and rule sets for your entire organization in one place. Socket Basics loads these settings on every run when its API key has the `socket-basics:read` scope, and they take precedence over the matching workflow inputs, including fields you leave blank. See [Dashboard Settings and Workflow Inputs](docs/github-action.md#dashboard-settings-and-workflow-inputs) for the exceptions and for setting values per repository. ![Socket Basics Section Config](docs/screenshots/socket_basics_section_config.png) @@ -164,12 +164,14 @@ Create your `SOCKET_SECURITY_API_KEY` in the [Socket Dashboard](https://socket.d | Scope | Required for | |-------|--------------| -| `full-scans` | Submitting scan results to your organization | -| `socket-basics` | Loading scanner configuration from the Socket Dashboard | +| `full-scans:create` | Submitting scan results to your organization, and running Socket Tier 1 reachability | +| `socket-basics:read` | Loading scanner configuration from the Socket Dashboard (Enterprise organizations) | -If Socket Basics is configured from the Socket Dashboard, the `socket-basics` scope is required. If it is missing, you will see `Insufficient permissions` when Socket Basics loads dashboard configuration. +If Socket Basics is configured from the Socket Dashboard, `socket-basics:read` is required. If it is missing, the log shows `Insufficient permissions` and `Error loading Socket Basics config`, and the scan runs with the workflow inputs alone. On an Enterprise organization the organization is then not discovered from the key either, so results are not uploaded unless `SOCKET_ORG` is set. -If Socket Basics is configured with CLI arguments, environment variables, or a JSON config file, only `full-scans` permissions are required for result submission. Set `SOCKET_ORG` explicitly in your workflow when using this mode. +If Socket Basics is configured with CLI arguments, environment variables, or a JSON config file, only `full-scans:create` is required. Set `SOCKET_ORG` explicitly in your workflow when using this mode. + +A missing scope does not change the exit code. See [API token scopes](docs/parameters.md#api-token-scopes) for every Socket API call Socket Basics makes and the scope each one checks. ## 💻 Other Usage Methods @@ -270,7 +272,7 @@ Add new connectors by: **Socket API errors / results missing from the dashboard:** - Ensure `SOCKET_SECURITY_API_KEY` and `SOCKET_ORG` are set correctly -- `No Socket organization configured` in the log means nothing was uploaded: set `SOCKET_ORG`, or use a key with the `socket-basics` scope so the organization can be discovered +- `No Socket organization configured` in the log means nothing was uploaded: set `SOCKET_ORG`, or use a key with the `socket-basics:read` scope so the organization can be discovered - `Need at least one file to be uploaded` means the facts file was written outside the scanned workspace; keep `--output` inside it (see [Save Results to File](docs/local-install-docker.md#save-results-to-file)) - Verify your Socket Enterprise subscription is active - If you see `Insufficient permissions`, confirm your API token has the scopes required for your configuration mode (see [Required API Token Scopes](#required-api-token-scopes)) diff --git a/docs/github-action.md b/docs/github-action.md index 64f7bc5..1409ae8 100644 --- a/docs/github-action.md +++ b/docs/github-action.md @@ -210,7 +210,7 @@ Include these in your workflow's `jobs..permissions` section. - Without it the scan still runs and comments on the PR, but nothing reaches the Socket dashboard. **`socket_org`** (optional) -- Discovered from the API key when the key has the `socket-basics` scope. Set it +- Discovered from the API key when the key has the `socket-basics:read` scope. Set it explicitly when configuring the scan from `with:` inputs instead of the dashboard. - Outside the action the same value is `SOCKET_ORG` or `--socket-org`. See the [name mapping](parameters.md#name-mapping) for the equivalents of every input. @@ -498,7 +498,7 @@ The dashboard configuration loads when all three of these are true: - The organization is on a Socket Enterprise plan. - Socket Basics is enabled for the organization. -- The API key has the `socket-basics` scope. +- The API key has the `socket-basics:read` scope. Fields you leave blank in the dashboard still count. The dashboard sends a blank field as an empty value and a switched-off toggle as `false`, and either one @@ -1112,11 +1112,12 @@ env: **Solutions:** 1. Provide `socket_security_api_key`. Without it the scan runs locally only. 2. Check the log for `No Socket organization configured`. Either set `socket_org` - or use an API key with the `socket-basics` scope so the organization can be - discovered from the key. -3. Check the token scopes: `full-scans` is required to upload; - `socket-basics` is required to load dashboard configuration. `Insufficient - permissions` in the log means a scope is missing. + or use an API key with the `socket-basics:read` scope so the organization can + be discovered from the key. +3. Check the token scopes: `full-scans:create` is required to upload; + `socket-basics:read` is required to load dashboard configuration. + `Insufficient permissions` in the log means a scope is missing. See + [API token scopes](parameters.md#api-token-scopes). 4. `pr_comment_enabled: 'false'` does **not** affect the upload; results still reach the dashboard. diff --git a/docs/local-install-docker.md b/docs/local-install-docker.md index 8ffc93c..f90375b 100644 --- a/docs/local-install-docker.md +++ b/docs/local-install-docker.md @@ -785,12 +785,13 @@ security-scan: 1. `Need at least one file to be uploaded` in the log: the facts file was written outside the workspace. Use a path under `/workspace` for `--output`. 2. `No Socket organization configured` in the log: set `SOCKET_ORG`, or use an - API key with the `socket-basics` scope so the organization can be discovered. + API key with the `socket-basics:read` scope so the organization can be discovered. 3. `Socket API key not detected - running in free plan mode`: the key did not reach the container. Check the `.env` file or `-e` flags and the variable name (`SOCKET_SECURITY_API_KEY`). -4. `Insufficient permissions`: the key is missing the `full-scans` scope (upload) - or the `socket-basics` scope (dashboard configuration). +4. `Insufficient permissions`: the key is missing the `full-scans:create` scope + (upload) or the `socket-basics:read` scope (dashboard configuration). See + [API token scopes](parameters.md#api-token-scopes). ### PR Comment Not Posted diff --git a/docs/parameters.md b/docs/parameters.md index 86b4794..5c77d80 100644 --- a/docs/parameters.md +++ b/docs/parameters.md @@ -37,7 +37,7 @@ GitHub Action input is delivered to the container as the environment variable | `--console-tabular-enabled` | `console_tabular_enabled` | `INPUT_CONSOLE_TABULAR_ENABLED` | `console_tabular_enabled` | Print consolidated findings as tables. | | `--console-json-enabled` | `console_json_enabled` | `INPUT_CONSOLE_JSON_ENABLED` | `console_json_enabled` | Print consolidated findings as JSON. | | `--socket-org` | `socket_org` | `SOCKET_ORG` (also `SOCKET_ORG_SLUG`, `INPUT_SOCKET_ORG`) | `socket_org` | Socket organization slug. Not the same thing as `--repo`. | -| —2 | `socket_security_api_key` | `SOCKET_SECURITY_API_KEY` (also `SOCKET_SECURITY_API_TOKEN`, `SOCKET_API_KEY`, `INPUT_SOCKET_SECURITY_API_KEY`) | `socket_api_key`3 | Socket API key (`full-scans` scope to upload, `socket-basics` scope to load dashboard config). | +| —2 | `socket_security_api_key` | `SOCKET_SECURITY_API_KEY` (also `SOCKET_SECURITY_API_TOKEN`, `SOCKET_API_KEY`, `INPUT_SOCKET_SECURITY_API_KEY`) | `socket_api_key`3 | Socket API key (`full-scans:create` scope to upload, `socket-basics:read` scope to load dashboard config; see [API token scopes](#api-token-scopes)). | | `--repo` | — | `GITHUB_REPOSITORY` | `repo` | `owner/repo` recorded on the scan and used to find the PR. Discovered from git when omitted. | | `--branch` | — | `GITHUB_HEAD_REF`, `GITHUB_REF_NAME` | `branch` | Branch recorded on the scan. Discovered from git when omitted. | | `--pull-request` | — | `GITHUB_PR_NUMBER` (also `INPUT_PR_NUMBER`) | — | PR number. The PR notifier reads the environment variable. | @@ -701,12 +701,110 @@ export SOCKET_SECURITY_API_KEY="scrt_..." socket-basics --socket-org your-org-slug --python --secrets ``` -The key needs the `full-scans` scope to upload results and the `socket-basics` -scope to load dashboard configuration. With the latter the organization is -discovered from the key; otherwise set `SOCKET_ORG` explicitly or the run logs +The key needs `full-scans:create` to upload results and `socket-basics:read` +to load dashboard configuration; see [API token scopes](#api-token-scopes). +When `SOCKET_ORG` is not set, the organization is discovered from the key. On +an Enterprise organization that discovery is lost if the key lacks +`socket-basics:read`, so set `SOCKET_ORG` explicitly or the run logs `No Socket organization configured` and uploads nothing. `--repo` names the repository, not the organization. +### API token scopes + +Socket Basics authenticates with a single Socket organization API token. A +token missing a scope does **not** fail the run. Each Socket API call that is +denied logs an error or a warning and the scan continues, so check the log +rather than the exit code. + +#### Scopes to grant + +For a least-privilege token, grant these: + +| Scope | Needed for | +|:---|:---| +| `full-scans:create` | Uploading results to the Socket dashboard. Socket Tier 1 also needs it to upload manifests and record the reachability scan | +| `socket-basics:read` | Loading scanner configuration from the Socket dashboard, on Enterprise organizations. Without it on an Enterprise organization, the organization is also not discovered from the key | + +The scopes each endpoint checks are listed in the +[API reference](https://docs.socket.dev/reference). A few calls check no scope +and work with any valid token for the organization: `GET organizations` and +`GET orgs/{org}/supported-files`. + +Socket Basics does not use the `repo:*`, `full-scans:list`, `diff-scans:*`, +`packages:list`, `security-policy:read` or `triage:*` scopes. It never looks up +or creates the repository with a separate call. The repository name travels as +a parameter of the scan upload. + +The [CI/CD token setup guide](https://docs.socket.dev/docs/create-socket-api-key-for-cicd) +is written for the Socket CLIs. Its list includes `full-scans:create`, so a +token made from it can upload results, but it does not include +`socket-basics:read`. Add that scope to load dashboard configuration. + +#### API calls by run type + +**Dashboard configuration**, at startup on every run where the key is set and +no `--config` file is given: + +| API call | Scope | Purpose | +|:---|:---|:---| +| `GET organizations` | none | Find the organization (the one named by `SOCKET_ORG`, or the first one the key belongs to) and its plan | +| `GET orgs/{org}/settings/socket-basics` | `socket-basics:read` | Load the dashboard configuration. **Only called when the plan is Enterprise** | + +This step reads the key from `SOCKET_SECURITY_API_KEY`, +`SOCKET_SECURITY_API_TOKEN` or `INPUT_SOCKET_SECURITY_API_KEY` only. A key set +only as `SOCKET_API_KEY` or `INPUT_SOCKET_API_KEY` is used for uploads and +Tier 1 but skips this step. + +If either call fails, the log shows `Error loading Socket Basics config` and +the run continues with the environment and workflow inputs alone. Nothing from +this step is kept, including the discovered organization, so set `SOCKET_ORG` +when the key lacks `socket-basics:read`. When the settings call is denied for a +missing scope, the error logged just before it starts with +`Insufficient permissions`. + +**Result upload**, after the scanners finish: + +| API call | Scope | Purpose | +|:---|:---|:---| +| `POST orgs/{org}/full-scans` | `full-scans:create` | Upload `.socket.facts.json` as a full scan | + +The upload is skipped, without calling the API, when the facts file has no +components, when no key or organization is configured, or when +`SKIP_SOCKET_SUBMISSION=1`. If the repository does not exist in Socket yet, the +upload creates it, and an organization API token needs no scope beyond +`full-scans:create` for that. A denied upload logs +`Failed to submit socket facts file` and does not change the exit code. + +**Socket Tier 1** (`--socket-tier1`), unless `SKIP_SOCKET_REACH=1`. Socket +Basics runs the Socket npm CLI (`socket scan reach --org `), which makes +these calls with the same token: + +| API call | Scope | Purpose | +|:---|:---|:---| +| `GET organizations` | none | Check that the organization is on an Enterprise plan | +| `GET orgs/{org}/supported-files` | none | Fetch the supported manifest file patterns | +| `POST orgs/{org}/coana-cli/artifacts` | none | Find the reachability engine download. Only called when the engine is not cached, which is every run in a fresh container (see [Network access for Tier 1](#network-access-for-tier-1)) | +| `POST orgs/{org}/upload-manifest-files` | `full-scans:create` | Upload the manifests for analysis | +| `POST tier1-reachability-scan/finalize` | `full-scans:create` | Mark the reachability scan done. A failure here only logs a warning | + +The reachability engine (Coana) runs with the same token, and its calls check +`full-scans:create`. The `coana-cli/artifacts`, `upload-manifest-files` and +`tier1-reachability-scan/finalize` endpoints are not in the public API +reference. Options passed through +`socket_additional_params` can make further calls that this table does not +cover. + +A Tier 1 failure logs `Error running connector socket_tier1` and does not +change the exit code. Tier 1 passes the key to the Socket npm CLI as +`SOCKET_SECURITY_API_KEY`, but that CLI prefers `SOCKET_CLI_API_TOKEN`, +`SOCKET_CLI_API_KEY` or `SOCKET_SECURITY_API_TOKEN` when one of them is set in +the environment. If you set more than one of these, give them the same token. + +The heavy image's Python CLI (`socketcli`) is a separate tool that Socket +Basics does not run. For the scopes it needs, see +[API token permissions](https://github.com/SocketDev/socket-python-cli/blob/main/docs/troubleshooting.md#api-token-permissions) +in its documentation. + ### `--socket-tier1` Enable Socket Tier 1 reachability analysis for dependency scanning. @@ -1021,7 +1119,7 @@ Configuration is merged in the following order (later sources override earlier o 1. Default values 2. Environment variables, including GitHub Action inputs (the action passes each `with:` input as an `INPUT_*` variable) -3. Socket Basics dashboard configuration (when the organization is on an Enterprise plan with Socket Basics enabled, the API key has the `socket-basics` scope, and no `--config` file is used) +3. Socket Basics dashboard configuration (when the organization is on an Enterprise plan with Socket Basics enabled, the API key has the `socket-basics:read` scope, and no `--config` file is used) 4. JSON configuration file (via `--config`) 5. Command-line arguments From be47b1e54de054519953e903d7127d54661fb0f3 Mon Sep 17 00:00:00 2001 From: lelia <2418071+lelia@users.noreply.github.com> Date: Wed, 18 Nov 2026 14:56:16 -0500 Subject: [PATCH 2/4] docs: Correct org discovery, the engine-download scope and the scope names - The organization is discovered from the key without socket-basics:read on non-Enterprise plans, where the settings call is never made. Four places said discovery always needs the scope. - POST coana-cli/artifacts checks full-scans:create or fixes:list in its handler; it was listed as needing no scope. - A denied settings call logs one warning, "Error loading Socket Basics config: Insufficient permissions", not a separate line before it. - full-scans and socket-basics are the scope groups, which also work. socket-basics:read is the only scope in its group, so the API reports it as socket-basics. - The setup-guide paragraph no longer states which scopes that guide lists, since the list is changing. --- README.md | 6 ++++-- docs/github-action.md | 11 ++++++----- docs/local-install-docker.md | 5 +++-- docs/parameters.md | 31 +++++++++++++++++++++---------- 4 files changed, 34 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 041c403..490f365 100644 --- a/README.md +++ b/README.md @@ -167,7 +167,9 @@ Create your `SOCKET_SECURITY_API_KEY` in the [Socket Dashboard](https://socket.d | `full-scans:create` | Submitting scan results to your organization, and running Socket Tier 1 reachability | | `socket-basics:read` | Loading scanner configuration from the Socket Dashboard (Enterprise organizations) | -If Socket Basics is configured from the Socket Dashboard, `socket-basics:read` is required. If it is missing, the log shows `Insufficient permissions` and `Error loading Socket Basics config`, and the scan runs with the workflow inputs alone. On an Enterprise organization the organization is then not discovered from the key either, so results are not uploaded unless `SOCKET_ORG` is set. +If Socket Basics is configured from the Socket Dashboard, `socket-basics:read` is required. If it is missing, the log shows `Error loading Socket Basics config: Insufficient permissions`, and the scan runs with the workflow inputs alone. On an Enterprise organization the organization is then not discovered from the key either, so results are not uploaded unless `SOCKET_ORG` is set. + +Each scope sits in a group named by its prefix, and granting the group also works: `full-scans` includes `full-scans:create`, and `socket-basics` contains only `socket-basics:read`. If Socket Basics is configured with CLI arguments, environment variables, or a JSON config file, only `full-scans:create` is required. Set `SOCKET_ORG` explicitly in your workflow when using this mode. @@ -272,7 +274,7 @@ Add new connectors by: **Socket API errors / results missing from the dashboard:** - Ensure `SOCKET_SECURITY_API_KEY` and `SOCKET_ORG` are set correctly -- `No Socket organization configured` in the log means nothing was uploaded: set `SOCKET_ORG`, or use a key with the `socket-basics:read` scope so the organization can be discovered +- `No Socket organization configured` in the log means nothing was uploaded: set `SOCKET_ORG`. The organization is normally discovered from the key, but on an Enterprise organization that also needs the `socket-basics:read` scope - `Need at least one file to be uploaded` means the facts file was written outside the scanned workspace; keep `--output` inside it (see [Save Results to File](docs/local-install-docker.md#save-results-to-file)) - Verify your Socket Enterprise subscription is active - If you see `Insufficient permissions`, confirm your API token has the scopes required for your configuration mode (see [Required API Token Scopes](#required-api-token-scopes)) diff --git a/docs/github-action.md b/docs/github-action.md index 1409ae8..4eaf762 100644 --- a/docs/github-action.md +++ b/docs/github-action.md @@ -210,8 +210,9 @@ Include these in your workflow's `jobs..permissions` section. - Without it the scan still runs and comments on the PR, but nothing reaches the Socket dashboard. **`socket_org`** (optional) -- Discovered from the API key when the key has the `socket-basics:read` scope. Set it - explicitly when configuring the scan from `with:` inputs instead of the dashboard. +- Discovered from the API key. On an Enterprise organization, discovery also needs + the `socket-basics:read` scope. Set it explicitly when configuring the scan from + `with:` inputs instead of the dashboard. - Outside the action the same value is `SOCKET_ORG` or `--socket-org`. See the [name mapping](parameters.md#name-mapping) for the equivalents of every input. @@ -1111,9 +1112,9 @@ env: **Solutions:** 1. Provide `socket_security_api_key`. Without it the scan runs locally only. -2. Check the log for `No Socket organization configured`. Either set `socket_org` - or use an API key with the `socket-basics:read` scope so the organization can - be discovered from the key. +2. Check the log for `No Socket organization configured`, and set `socket_org`. + The organization is normally discovered from the key, but on an Enterprise + organization that also needs the `socket-basics:read` scope. 3. Check the token scopes: `full-scans:create` is required to upload; `socket-basics:read` is required to load dashboard configuration. `Insufficient permissions` in the log means a scope is missing. See diff --git a/docs/local-install-docker.md b/docs/local-install-docker.md index f90375b..8e4b885 100644 --- a/docs/local-install-docker.md +++ b/docs/local-install-docker.md @@ -784,8 +784,9 @@ security-scan: 1. `Need at least one file to be uploaded` in the log: the facts file was written outside the workspace. Use a path under `/workspace` for `--output`. -2. `No Socket organization configured` in the log: set `SOCKET_ORG`, or use an - API key with the `socket-basics:read` scope so the organization can be discovered. +2. `No Socket organization configured` in the log: set `SOCKET_ORG`. The + organization is normally discovered from the key, but on an Enterprise + organization that also needs the `socket-basics:read` scope. 3. `Socket API key not detected - running in free plan mode`: the key did not reach the container. Check the `.env` file or `-e` flags and the variable name (`SOCKET_SECURITY_API_KEY`). diff --git a/docs/parameters.md b/docs/parameters.md index 5c77d80..ad5059d 100644 --- a/docs/parameters.md +++ b/docs/parameters.md @@ -725,6 +725,13 @@ For a least-privilege token, grant these: | `full-scans:create` | Uploading results to the Socket dashboard. Socket Tier 1 also needs it to upload manifests and record the reachability scan | | `socket-basics:read` | Loading scanner configuration from the Socket dashboard, on Enterprise organizations. Without it on an Enterprise organization, the organization is also not discovered from the key | +Scopes are grouped by their prefix, and granting a group grants every scope in +it. The `full-scans` group covers `full-scans:create`, `full-scans:list` and +`full-scans:delete`, so it works here but holds more than Socket Basics uses. +`socket-basics:read` is the only scope in the `socket-basics` group, so +selecting either one is the same token: the dashboard shows both checked, and +the API reports the scope as `socket-basics`. + The scopes each endpoint checks are listed in the [API reference](https://docs.socket.dev/reference). A few calls check no scope and work with any valid token for the organization: `GET organizations` and @@ -736,9 +743,10 @@ or creates the repository with a separate call. The repository name travels as a parameter of the scan upload. The [CI/CD token setup guide](https://docs.socket.dev/docs/create-socket-api-key-for-cicd) -is written for the Socket CLIs. Its list includes `full-scans:create`, so a -token made from it can upload results, but it does not include -`socket-basics:read`. Add that scope to load dashboard configuration. +lists scopes for several Socket tools. Socket Basics needs only the two above. +A token created for the Socket CLIs can upload results if it has +`full-scans:create`. Check that it also has `socket-basics:read` before relying +on dashboard configuration. #### API calls by run type @@ -755,12 +763,15 @@ This step reads the key from `SOCKET_SECURITY_API_KEY`, only as `SOCKET_API_KEY` or `INPUT_SOCKET_API_KEY` is used for uploads and Tier 1 but skips this step. -If either call fails, the log shows `Error loading Socket Basics config` and -the run continues with the environment and workflow inputs alone. Nothing from -this step is kept, including the discovered organization, so set `SOCKET_ORG` -when the key lacks `socket-basics:read`. When the settings call is denied for a -missing scope, the error logged just before it starts with -`Insufficient permissions`. +If either call fails, the log shows one warning, +`Error loading Socket Basics config: ...`, and the run continues with the +environment and workflow inputs alone. When the settings call is denied for a +missing scope, that warning reads +`Error loading Socket Basics config: Insufficient permissions`, followed by the +request path. Nothing from this step is kept, including the discovered +organization, so on an Enterprise organization set `SOCKET_ORG` when the key +lacks `socket-basics:read`. On other plans the settings call is never made, and +the organization is discovered without that scope. **Result upload**, after the scanners finish: @@ -783,7 +794,7 @@ these calls with the same token: |:---|:---|:---| | `GET organizations` | none | Check that the organization is on an Enterprise plan | | `GET orgs/{org}/supported-files` | none | Fetch the supported manifest file patterns | -| `POST orgs/{org}/coana-cli/artifacts` | none | Find the reachability engine download. Only called when the engine is not cached, which is every run in a fresh container (see [Network access for Tier 1](#network-access-for-tier-1)) | +| `POST orgs/{org}/coana-cli/artifacts` | `full-scans:create` or `fixes:list` | Find the reachability engine download. Only called when the engine is not cached, which is every run in a fresh container (see [Network access for Tier 1](#network-access-for-tier-1)) | | `POST orgs/{org}/upload-manifest-files` | `full-scans:create` | Upload the manifests for analysis | | `POST tier1-reachability-scan/finalize` | `full-scans:create` | Mark the reachability scan done. A failure here only logs a warning | From 61eafb8efe2a30e28f7b6486cc7457f36756a4cd Mon Sep 17 00:00:00 2001 From: lelia <2418071+lelia@users.noreply.github.com> Date: Fri, 20 Nov 2026 17:17:29 -0500 Subject: [PATCH 3/4] chore(deps): Lock the Socket Python SDK at 3.6.3 socketdev 3.6.3 fixes settings.integration_events(), which Socket Basics does not call. The lockfile moves so the image runs the current SDK. The >=3.6.2 floor stays, because the bundled Socket Python CLI pins 3.6.2 exactly and installs on the same system interpreter. --- CHANGELOG.md | 5 +++++ uv.lock | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 10a5abc..c2dbc35 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). ## [Unreleased] +### Changed +- socketdev 3.6.2 -> 3.6.3 in the lockfile. The `>=3.6.2` floor in + `pyproject.toml` is unchanged, because the bundled Socket Python CLI still + pins 3.6.2 exactly. + ## [3.5.0] - 2026-11-13 Minor rather than patch: Socket Tier 1 parses `socket_additional_params` diff --git a/uv.lock b/uv.lock index 6009341..f185019 100644 --- a/uv.lock +++ b/uv.lock @@ -735,16 +735,16 @@ dev = [] [[package]] name = "socketdev" -version = "3.6.2" +version = "3.6.3" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "certifi" }, { name = "requests" }, { name = "typing-extensions" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/3a/c2/48db5863e4e1d86f7b92334b91e8f9c59f4e96fc5949f0b594fff86dfeed/socketdev-3.6.2.tar.gz", hash = "sha256:ad51c879cad8d897ed1b949339fb7aded30d0fe25b2a3810c83079887e8610b5", size = 182918, upload-time = "2026-11-03T23:18:52.18Z" } +sdist = { url = "https://files.pythonhosted.org/packages/3b/94/1ac6e7da44a86571b2b91538e750a854d91f8f225da6bc324e433e9df222/socketdev-3.6.3.tar.gz", hash = "sha256:71a6dc6d1e0359f5f215e6da8c63bf479038ae07dd0ce29ec6c9fc8bf88054b0", size = 189957, upload-time = "2026-11-20T22:12:29.769Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/c2/3a/7ed253ade4cd47e6af02bf61668c9c2824a35e617668b6f4f12e41d617a5/socketdev-3.6.2-py3-none-any.whl", hash = "sha256:ea94b2da1bdb89f3b70209b606f3abe5c609f66549c1deb160cf18f58e0c2e48", size = 75559, upload-time = "2026-11-03T23:18:50.423Z" }, + { url = "https://files.pythonhosted.org/packages/da/39/775de959c64847fde70599bc67c4dcf9057ad540657c46157971f564f69c/socketdev-3.6.3-py3-none-any.whl", hash = "sha256:ba5fb7bbce566ddd7c9ecdfbc37389708f5115f9edbb42eeff14ce7dc2278be8", size = 78954, upload-time = "2026-11-20T22:12:28.453Z" }, ] [[package]] From 236957947c07177856413eea61d97533323c3be7 Mon Sep 17 00:00:00 2001 From: lelia <2418071+lelia@users.noreply.github.com> Date: Fri, 20 Nov 2026 17:26:42 -0500 Subject: [PATCH 4/4] chore(deps): Bundle Socket Python CLI 2.13.1 in the heavy image The heavy and app-tests images move the bundled Socket Python CLI from 2.12.0 to 2.13.1. That release pins socketdev 3.6.3 exactly, so the source-install floor moves to >=3.6.3 with it. The changelog carries the upgrade notes that reach heavy-image users: 2.13.0 changed the CLI's exit codes and made --strict-blocking fail on existing blocking alerts. Socket Basics does not run socketcli itself. The bundled CLI also pins the Coana engine 15.15.2, while Socket Tier 1 still runs 15.15.0 through the npm CLI. --- CHANGELOG.md | 20 +++++++++++++++++--- Dockerfile.heavy | 2 +- app_tests/Dockerfile | 2 +- pyproject.toml | 2 +- uv.lock | 2 +- 5 files changed, 21 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c2dbc35..e32407f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,10 +8,24 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). ## [Unreleased] +### Upgrade notes +- **The heavy image's Socket Python CLI changes its exit codes.** It moves from + 2.12.0 to 2.13.1, and 2.13.0 exits `2` for invalid flags (was `1`), `130` for + Ctrl+C (was `2`), and applies `--disable-blocking` and + `--exit-code-on-api-error` to missing tokens and other setup failures. + `--strict-blocking` now also fails on existing blocking alerts. Check any + pipeline step that runs `socketcli` from the heavy image and matches on an + exit code; see the CLI's + [upgrade guidance](https://github.com/SocketDev/socket-python-cli#upgrading-to-2130). + Socket Basics does not run `socketcli` itself, so its own exit codes are + unchanged. + ### Changed -- socketdev 3.6.2 -> 3.6.3 in the lockfile. The `>=3.6.2` floor in - `pyproject.toml` is unchanged, because the bundled Socket Python CLI still - pins 3.6.2 exactly. +- Bundled tools: Socket Python CLI 2.12.0 -> 2.13.1. +- The bundled Socket Python CLI now pins the Coana reachability engine 15.15.2. + Socket Tier 1 runs through the Socket npm CLI, which still pins 15.15.0. +- Socket Python SDK (`socketdev`) 3.6.2 -> 3.6.3, which Socket Python CLI + 2.13.1 pins exactly. Source installs now require `socketdev>=3.6.3`. ## [3.5.0] - 2026-11-13 diff --git a/Dockerfile.heavy b/Dockerfile.heavy index 4a544cd..3f7b015 100644 --- a/Dockerfile.heavy +++ b/Dockerfile.heavy @@ -5,7 +5,7 @@ # hand. See the note at the top of ./Dockerfile for why. ARG OPENGREP_VERSION=v1.33.1 ARG SOCKET_NPM_CLI_VERSION=1.15.0 -ARG SOCKET_PYTHON_CLI_VERSION=2.12.0 +ARG SOCKET_PYTHON_CLI_VERSION=2.13.1 # Socket-built Trivy, pinned by digest — see the note in ./Dockerfile. ARG TRIVY_IMAGE=ghcr.io/socketdev/trivy:0.76.1@sha256:883da3593a60e311b2ed87c3a55241051b27bba15ffc3ce041ae570cd0f00915 diff --git a/app_tests/Dockerfile b/app_tests/Dockerfile index 6e5cac4..7fbdedc 100644 --- a/app_tests/Dockerfile +++ b/app_tests/Dockerfile @@ -10,7 +10,7 @@ ARG GOSEC_VERSION=v2.30.0 ARG OPENGREP_VERSION=v1.33.1 ARG SOCKET_NPM_CLI_VERSION=1.15.0 -ARG SOCKET_PYTHON_CLI_VERSION=2.12.0 +ARG SOCKET_PYTHON_CLI_VERSION=2.13.1 # # Socket-built Trivy, pinned by digest and deliberately kept out of Dependabot's # reach; updated by Socket's trivy-dist release process. See the root diff --git a/pyproject.toml b/pyproject.toml index 0ca80f9..83af42e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,7 +28,7 @@ dependencies = [ "light-s3-client~=0.0.30", "PyYAML>=6.0.0", "tomli; python_version < '3.11'", - "socketdev>=3.6.2", + "socketdev>=3.6.3", "jsonschema>=4.25.1", # requests' CA bundle; 2026.10.19 drops the roots behind the compromised # eMudhra intermediates. Covers source installs (`pip install -e .`). diff --git a/uv.lock b/uv.lock index f185019..0399cf8 100644 --- a/uv.lock +++ b/uv.lock @@ -724,7 +724,7 @@ requires-dist = [ { name = "pytest-cov", marker = "extra == 'dev'", specifier = ">=7.1.0" }, { name = "pyyaml", specifier = ">=6.0.0" }, { name = "requests", specifier = ">=2.33.0" }, - { name = "socketdev", specifier = ">=3.6.2" }, + { name = "socketdev", specifier = ">=3.6.3" }, { name = "tabulate", specifier = "~=0.10.0" }, { name = "tomli", marker = "python_full_version < '3.11'" }, ]