Skip to content

Commit b6a6dfc

Browse files
committed
Update README to document new CLI flag, and differentiate it from existing workspace-name flag
Signed-off-by: lelia <lelia@socket.dev>
1 parent 03a34b7 commit b6a6dfc

File tree

1 file changed

+18
-9
lines changed

1 file changed

+18
-9
lines changed

README.md

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ These examples are production-ready and include best practices for each platform
4343

4444
## Monorepo Workspace Support
4545

46+
> **Note:** If you're looking to associate a scan with a named Socket workspace (e.g. because your repo is identified as `org/repo`), see the [`--workspace` flag](#repository) instead. The `--workspace-name` flag described in this section is an unrelated monorepo feature.
47+
4648
The Socket CLI supports scanning specific workspaces within monorepo structures while preserving git context from the repository root. This is useful for organizations that maintain multiple applications or services in a single repository.
4749

4850
### Key Features
@@ -114,7 +116,7 @@ This will simultaneously generate:
114116
## Usage
115117

116118
```` shell
117-
socketcli [-h] [--api-token API_TOKEN] [--repo REPO] [--repo-is-public] [--branch BRANCH] [--integration {api,github,gitlab,azure,bitbucket}]
119+
socketcli [-h] [--api-token API_TOKEN] [--repo REPO] [--workspace WORKSPACE] [--repo-is-public] [--branch BRANCH] [--integration {api,github,gitlab,azure,bitbucket}]
118120
[--owner OWNER] [--pr-number PR_NUMBER] [--commit-message COMMIT_MESSAGE] [--commit-sha COMMIT_SHA] [--committers [COMMITTERS ...]]
119121
[--target-path TARGET_PATH] [--sbom-file SBOM_FILE] [--license-file-name LICENSE_FILE_NAME] [--save-submitted-files-list SAVE_SUBMITTED_FILES_LIST]
120122
[--save-manifest-tar SAVE_MANIFEST_TAR] [--files FILES] [--sub-path SUB_PATH] [--workspace-name WORKSPACE_NAME]
@@ -138,14 +140,21 @@ If you don't want to provide the Socket API Token every time then you can use th
138140
| --api-token | False | | Socket Security API token (can also be set via SOCKET_SECURITY_API_TOKEN env var) |
139141
140142
#### Repository
141-
| Parameter | Required | Default | Description |
142-
|:-----------------|:---------|:--------|:------------------------------------------------------------------------|
143-
| --repo | False | *auto* | Repository name in owner/repo format (auto-detected from git remote) |
144-
| --repo-is-public | False | False | If set, flags a new repository creation as public. Defaults to false. |
145-
| --integration | False | api | Integration type (api, github, gitlab, azure, bitbucket) |
146-
| --owner | False | | Name of the integration owner, defaults to the socket organization slug |
147-
| --branch | False | *auto* | Branch name (auto-detected from git) |
148-
| --committers | False | *auto* | Committer(s) to filter by (auto-detected from git commit) |
143+
| Parameter | Required | Default | Description |
144+
|:-----------------|:---------|:--------|:------------------------------------------------------------------------------------------------------------------|
145+
| --repo | False | *auto* | Repository name in owner/repo format (auto-detected from git remote) |
146+
| --workspace | False | | The Socket workspace to associate the scan with (e.g. `grofers` in `grofers/assembly`). See note below. |
147+
| --repo-is-public | False | False | If set, flags a new repository creation as public. Defaults to false. |
148+
| --integration | False | api | Integration type (api, github, gitlab, azure, bitbucket) |
149+
| --owner | False | | Name of the integration owner, defaults to the socket organization slug |
150+
| --branch | False | *auto* | Branch name (auto-detected from git) |
151+
| --committers | False | *auto* | Committer(s) to filter by (auto-detected from git commit) |
152+
153+
> **`--workspace` vs `--workspace-name`** — these are two distinct flags for different purposes:
154+
>
155+
> - **`--workspace <string>`** maps to the Socket API's `workspace` query parameter on `CreateOrgFullScan`. Use it when your repository belongs to a named Socket workspace (e.g. an org with multiple workspace groups). Example: `--repo assembly --workspace grofers`. Without this flag, scans are created without workspace context and may not appear under the correct workspace in the Socket dashboard.
156+
>
157+
> - **`--workspace-name <string>`** is a monorepo feature. It appends a suffix to the repository slug to create a unique name in Socket (e.g. `my-repo-frontend`). It must always be paired with `--sub-path` and has nothing to do with the API `workspace` field. See [Monorepo Workspace Support](#monorepo-workspace-support) below.
149158

150159
#### Pull Request and Commit
151160
| Parameter | Required | Default | Description |

0 commit comments

Comments
 (0)