Skip to content

fix: warn users when socket_org is missing#23

Merged
lelia merged 1 commit into
mainfrom
fix/socket-org-missing-warning
Jun 26, 2026
Merged

fix: warn users when socket_org is missing#23
lelia merged 1 commit into
mainfrom
fix/socket-org-missing-warning

Conversation

@dc-larsen

@dc-larsen David Larsen (dc-larsen) commented Jan 26, 2026

Copy link
Copy Markdown
Contributor

Summary

When using an API key that lacks the socket-basics:read scope, result uploads are silently skipped because socket_org cannot be auto-discovered. This leaves users confused about why their scan results don't appear in the dashboard.

This PR changes the log level from debug to warning and directs users to create an API key with the correct scopes.

Problem

A customer reported that scan results weren't uploading when using their existing SCA API key (which lacks socket-basics:read). The only indication was a debug-level log message that most users never see:

DEBUG - No Socket organization configured, skipping full scan submission

Solution

Upgrade to a warning that explains the issue and directs users to the fix:

WARNING - No Socket organization configured - scan results will not be uploaded to the dashboard. 
This typically means your API key is missing the 'socket-basics:read' scope. 
Please create an API key with the required scopes in Settings > API Tokens 
in the Socket dashboard (https://socket.dev).

Test plan

  • Verified warning appears when socket_org is not configured
  • Message directs users to create properly-scoped API key
  • Test in GitHub Actions workflow with limited-scope API key

@dc-larsen David Larsen (dc-larsen) requested a review from a team as a code owner January 26, 2026 19:32
@dc-larsen David Larsen (dc-larsen) force-pushed the fix/socket-org-missing-warning branch from 9cb4392 to 0451ffa Compare January 26, 2026 19:33
@lelia lelia requested a review from a team as a code owner March 3, 2026 00:09
@lelia lelia self-assigned this Jun 26, 2026
Warn when scan results cannot be uploaded because socket_org is unavailable after API key configuration.
@lelia lelia force-pushed the fix/socket-org-missing-warning branch from f71abf9 to 386426b Compare June 26, 2026 21:10
@lelia lelia changed the title Warn users when socket_org is missing and upload is skipped fix: warn users when socket_org is missing and upload is skipped Jun 26, 2026
@lelia lelia changed the title fix: warn users when socket_org is missing and upload is skipped fix: warn users when socket_org is missing Jun 26, 2026
@lelia lelia merged commit e7e24ee into main Jun 26, 2026
12 of 13 checks passed
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.

2 participants