From 0451ffa8d9530f1f3ce17d5f7c6b7ba78ccaa59f Mon Sep 17 00:00:00 2001 From: David Larsen Date: Mon, 26 Jan 2026 14:31:58 -0500 Subject: [PATCH] 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. --- socket_basics/socket_basics.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/socket_basics/socket_basics.py b/socket_basics/socket_basics.py index 72214af..bfedbe1 100644 --- a/socket_basics/socket_basics.py +++ b/socket_basics/socket_basics.py @@ -229,7 +229,12 @@ def submit_socket_facts(self, socket_facts_path: Path, results: Dict[str, Any]) socket_org = self.config.get('socket_org') if not socket_org: - logger.debug("No Socket organization configured, skipping full scan submission") + logger.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)." + ) return results # Import socketdev SDK