#62

Anthropic keychain OAuth never loads in Binary Ninja

Openwizardengineeropened 2mo ago

With the anthropic provider and "Use OAuth from Claude Code (macOS Keychain)" checked, the settings dialog still reports "No Anthropic credential found. Set ANTHROPIC_API_KEY, paste a key in settings, or run `claude setup-token`", even with a valid token in the keychain and oauth_consent_accepted: true in config.json.

The log shows what actually happens:

[Rikugan WARNING MainThread] Unable to import auth cache: No module named 'rikugan.providers'

auth_compat._load_auth_cache() imports by the absolute name rikugan.providers.auth_cache. Binary Ninja loads the plugin directory itself as top-level rikugan, so the real package is rikugan.rikugan.providers and that name does not exist. The import fails, apply_keychain_consent() returns False, _keychain_consent stays False, and resolve_anthropic_auth() skips the keychain lookup entirely.

Reading the keychain works fine under bnpython3, so the token was never the problem. IDA is unaffected because install_ida.sh symlinks rikugan/ in as a genuine top-level package.

Rikugan on Binary Ninja 5.1, macOS.

Activity

0

No activity yet.