feat(llm-security): honor LLM_SECURITY_IDE_ROOTS for JetBrains discovery

Symmetric with the existing VS Code branch — the env var was only wired
into getVSCodeExtensionRoots(), so the plan's master verification
(`LLM_SECURITY_IDE_ROOTS=... --intellij-only`) reported 0 discovered
plugins. Adding the same fallback to discoverJetBrainsExtensions makes
both families honor the CLI override and closes the gap.
This commit is contained in:
Kjell Tore Guttormsen 2026-04-18 11:09:02 +02:00
commit 23aaaa6e6c

View file

@ -305,6 +305,8 @@ export async function discoverJetBrainsExtensions(options = {}) {
let baseDirs;
if (Array.isArray(options.rootsOverride) && options.rootsOverride.length > 0) {
baseDirs = options.rootsOverride;
} else if (process.env.LLM_SECURITY_IDE_ROOTS) {
baseDirs = process.env.LLM_SECURITY_IDE_ROOTS.split(':').filter(Boolean);
} else {
baseDirs = [getJetBrainsBaseDir(), getAndroidStudioBaseDir()].filter(Boolean);
}