-
Notifications
You must be signed in to change notification settings - Fork 231
[BUG] SkillSpector adapter fails without LLM API key -- needs --no-llm support #1640
Copy link
Copy link
Closed
Labels
area/audit-policyapm-policy.yml schema, custom_checks, install-time enforcement.apm-policy.yml schema, custom_checks, install-time enforcement.area/content-securityUnicode scanning, Glassworm, apm audit content checks, SARIF output.Unicode scanning, Glassworm, apm audit content checks, SARIF output.area/securitypriority/highShips in current or next milestoneShips in current or next milestonestatus/acceptedDirection approved, safe to start work.Direction approved, safe to start work.status/triagedInitial agentic triage complete; pending maintainer ratification (silence = approval).Initial agentic triage complete; pending maintainer ratification (silence = approval).theme/securitySecure by default. Content scanning, lockfile integrity, MCP trust boundaries.Secure by default. Content scanning, lockfile integrity, MCP trust boundaries.type/bugSomething does not work as documented.Something does not work as documented.
Metadata
Metadata
Assignees
Labels
area/audit-policyapm-policy.yml schema, custom_checks, install-time enforcement.apm-policy.yml schema, custom_checks, install-time enforcement.area/content-securityUnicode scanning, Glassworm, apm audit content checks, SARIF output.Unicode scanning, Glassworm, apm audit content checks, SARIF output.area/securitypriority/highShips in current or next milestoneShips in current or next milestonestatus/acceptedDirection approved, safe to start work.Direction approved, safe to start work.status/triagedInitial agentic triage complete; pending maintainer ratification (silence = approval).Initial agentic triage complete; pending maintainer ratification (silence = approval).theme/securitySecure by default. Content scanning, lockfile integrity, MCP trust boundaries.Secure by default. Content scanning, lockfile integrity, MCP trust boundaries.type/bugSomething does not work as documented.Something does not work as documented.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Projects
StatusShow more project fields
Done
Describe the bug
The SkillSpector CLI adapter (
src/apm_cli/security/external/skillspector.py) fails with "SkillSpector output is not valid JSON SARIF" when no LLM API key (e.g.OPENAI_API_KEY) is configured. The adapter builds the command without--no-llm, and SkillSpector writes its error to stdout (not stderr), which APM tries to parse as SARIF JSON.To Reproduce
pip install -e .from github.com/NVIDIA/SkillSpector)apm experimental enable external-scannersunset OPENAI_API_KEY NVIDIA_INFERENCE_KEY ANTHROPIC_API_KEYapm audit --external skillspector[x] External scanner 'skillspector' failed: SkillSpector output is not valid JSON SARIFExpected behavior
The adapter should either pass
--no-llmby default (for headless/CI use) or gracefully handle stdout containing non-JSON content by checking stderr and exit code first.Environment (please complete the following information):
Logs
Additional context
skillspector.pyline 61 builds[binary, "scan", "--format", "sarif", *targets]without--no-llmskillspector scan --format sarif --no-llm . > report.sarifthenapm audit --external sarif --external-sarif report.sarif