Skip to content

Commit 0451ffa

Browse files
committed
Warn users when socket_org is missing and upload is skipped
When an API key lacks the socket-basics:read scope, the dashboard config cannot be loaded and socket_org is not auto-discovered. Previously this caused a silent skip of result uploads with only a debug-level log message. This change upgrades the log level to WARNING and directs users to create an API key with the correct scopes.
1 parent 968b113 commit 0451ffa

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

socket_basics/socket_basics.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,12 @@ def submit_socket_facts(self, socket_facts_path: Path, results: Dict[str, Any])
229229

230230
socket_org = self.config.get('socket_org')
231231
if not socket_org:
232-
logger.debug("No Socket organization configured, skipping full scan submission")
232+
logger.warning(
233+
"No Socket organization configured - scan results will not be uploaded to the dashboard. "
234+
"This typically means your API key is missing the 'socket-basics:read' scope. "
235+
"Please create an API key with the required scopes in Settings > API Tokens "
236+
"in the Socket dashboard (https://socket.dev)."
237+
)
233238
return results
234239

235240
# Import socketdev SDK

0 commit comments

Comments
 (0)