Skip to content

docs: document required API token scopes for Socket Basics#68

Open
David Larsen (dc-larsen) wants to merge 1 commit intomainfrom
docs/api-token-scopes
Open

docs: document required API token scopes for Socket Basics#68
David Larsen (dc-larsen) wants to merge 1 commit intomainfrom
docs/api-token-scopes

Conversation

@dc-larsen
Copy link
Copy Markdown
Contributor

Summary

Document the minimum Socket API token scopes required for Socket Basics. Customers consistently hit Insufficient permissions errors when their token is missing the socket-basics scope, and there's no current guidance in the README on which scopes to grant when creating a token.

What scopes does Socket Basics actually need?

Verified against api.socket.dev/v0 by testing each endpoint Socket Basics calls with tokens of varying scope:

Token scopes sdk.org.get() sdk.basics.get_config() sdk.fullscans.post()
socket-basics only works works fails (Insufficient permissions)
socket-basics + full-scans works works works
full-scans + repo works fails works
socket-basics + full-scans + repo works works works

The repo scope is not needed — /full-scans creates the repo implicitly when the named repo doesn't exist yet.

Changes

  • New "Required API Token Scopes" subsection under Enterprise Dashboard Configuration listing the two required scopes and their purpose.
  • Updated Troubleshooting → Socket API errors to point readers at the new section when they see Insufficient permissions.

Test plan

  • Verified scope requirements by creating test tokens with each scope combination and exercising every endpoint Socket Basics calls (sdk.org.get, sdk.basics.get_config, sdk.fullscans.post).
  • Markdown table renders correctly in GitHub preview.
  • Anchor link #required-api-token-scopes resolves.

@dc-larsen David Larsen (dc-larsen) requested a review from a team as a code owner April 28, 2026 03:54
Comment thread README.md
| `socket-basics` | Loading scanner configuration from the Socket Dashboard |
| `full-scans` | Submitting scan results to your organization |

If your token is missing the `socket-basics` scope, you will see `Insufficient permissions` when Socket Basics tries to load dashboard config. As a workaround, set `SOCKET_ORG` explicitly in your workflow to skip the dashboard config load and run with CLI/environment configuration only.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"tries to load dashboard config", and why this workaround is needed is not super clear. We can probably highlight the breakdown a bit differently. Maybe something like this? Or, alternatively, should we just say that socket-basics is needed no matter what to simplify things?


If the Socket dashboard has been used to configure Socket Basics the socket-basics scope is required. If missing, a Insufficient permissions error will occur.

If Socket Basics is configured via CLI or environment files, only full-scans permissions are required. Note, this does require setting the SOCKET_ORG field appropriately.

Comment thread README.md

### Required API Token Scopes

Create your `SOCKET_SECURITY_API_KEY` in the Socket Dashboard under **Settings → API Tokens**. Socket Basics needs the following scopes:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a shortcut link we can include that takes customers directly to the API creation page for convenience? or will this not work as the URI would be org-slug-specific?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants