Skip to content

Commit 9cb4392

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 provides actionable guidance: set SOCKET_ORG environment variable to enable uploads without requiring the socket-basics:read scope.
1 parent 968b113 commit 9cb4392

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+
"To fix this, set the SOCKET_ORG environment variable to your organization slug "
235+
"(e.g., SOCKET_ORG: your-org-slug). This is required when your API key lacks the "
236+
"socket-basics:read scope needed to auto-discover the organization."
237+
)
233238
return results
234239

235240
# Import socketdev SDK

0 commit comments

Comments
 (0)