You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Scanner fails to read credentials from Socket CLI v2 settings (directory vs file path mismatch) #9
The bun security scanner cannot read authentication credentials saved by socket login, causing it to silently fall back to free mode even when valid credentials exist.
Root Cause
The scanner reads credentials from a hardcoded path assuming a flat file:
~/.local/share/socket/settings
(src/index.ts L14-L39 constructs path.join(dataHome, 'socket', 'settings') and calls Bun.file() on it)
However, the Socket CLI (v2) writes credentials to a directory structure:
~/.local/share/socket/settings/config.json
Since settings is a directory, Bun.file(defaultSettingsPath).exists() returns false and the scanner falls through to unauthenticated mode with no error, only the generic warning:
⚠ Socket Security Scanner free mode. Set SOCKET_API_KEY to use your Socket org settings.
Steps to Reproduce
socket login (authenticate successfully)
Confirm credentials exist: cat ~/.local/share/socket/settings/config.json (base64-encoded JSON with apiToken)
Run bun install with the scanner configured in bunfig.toml
Activity
fix: support Socket CLI v2 settings directory layout
fix: support Socket CLI v2 settings directory layout
fix: support Socket CLI v2 settings directory layout
fix: support Socket CLI v2 settings directory layout
jdalton commentedon Sep 8, 2026
fix(scanner): read socket cli directory credentials
Fixed on
mainin c9ef6e7. The scanner reads bothsettingsandsettings/config.json; an explicit environment token takes precedence.The credential regressions pass, including the directory layout and an unreadable flat entry. This fix is not yet in an npm release.