  
|
9c546dc0b3
|
feat(analyzer): add OpenCode-native SkillSpector invocation skill and tool (#537)
* feat(analyzer): add OpenCode-native SkillSpector invocation tool and command
- Add .opencode/tools/skillspector_scan.ts: tool wrapping skillspector CLI
via execFile with binary chain (SKILLSPECTOR_BIN env -> .venv -> PATH),
120s timeout, stdout/stderr truncation, secret redaction
- Add .opencode/commands/skillspector.md: slash command forwarding
$ARGUMENTS with LLM opt-in via noLlm flag
- Default to --no-llm for instant static scans; LLM opt-in via noLlm=false
or env passthrough (SKILLSPECTOR_PROVIDER, SKILLSPECTOR_MODEL)
Signed-off-by: Yoseph Zuskin <zuskinyoseph@gmail.com>
Co-Authored-By: OpenCode Muse Spark 1.3 Free (1M context) <noreply@opencode.ai>
Co-Authored-By: OpenCode Nemotron 3 Ultra Free (1M context) <noreply@opencode.ai>
* fix(analyzer): re-apply tool arg defaults omitted by the host
- The host may omit declared arg defaults, so re-apply them in execute():
format falls back to "json" (avoids `--format undefined`, exit 2),
noLlm falls back to true (an omitted noLlm would otherwise silently
opt into LLM analysis against the static-by-default contract)
- Verified headless on opencode 1.18.30: `/skillspector` round-trip green,
fixture 0/LOW SAFE
Signed-off-by: Yoseph Zuskin <zuskinyoseph@gmail.com>
Co-Authored-By: OpenCode Muse Spark 1.3 Free (1M context) <noreply@opencode.ai>
* fix(analyzer): re-apply tool arg defaults and cover helpers with tests
- The host may omit declared arg defaults, so execute() re-applies them:
format falls back to "json" (avoids `--format undefined`, exit 2),
noLlm falls back to true (an omitted noLlm would otherwise silently
opt into LLM analysis against the static-by-default contract)
- Extract pure helpers (truncate, redact, resolveBinary, arg building,
exit-code mapping) into dependency-free
.opencode/tools/skillspector_scan_lib.ts; thin the tool file to wiring
- Cover the lib with skillspector_scan_lib.test.ts via stdlib node --test
(18/18, zero new deps; Node 22+ type stripping)
- Verified: node --test 18/18; headless `/skillspector` round-trips green
on opencode 1.18.30, fixture 0/LOW SAFE (twice, including once with the
host omitting all defaults)
Signed-off-by: Yoseph Zuskin <zuskinyoseph@gmail.com>
Co-Authored-By: OpenCode Muse Spark 1.3 Free (1M context) <noreply@opencode.ai>
* docs(analyzer): rename OpenCode plugin doc to extension
- Add docs/OPENCODE_EXTENSION.md modeled on docs/PI_EXTENSION.md:
requirements, install (copy .opencode/, skillspector on PATH or
SKILLSPECTOR_BIN), basic /skillspector scan, tool parameters,
env-based LLM opt-in, unit-test invocation, removal
- Note the deliberate param differences vs the Pi extension
(no provider/model/yaraRulesDir/verbose; LLM via environment)
- Link the new doc from the README Documentation section next to
the Pi extension entry
Signed-off-by: Yoseph Zuskin <zuskinyoseph@gmail.com>
Co-Authored-By: OpenCode Muse Spark 1.3 Free (1M context) <noreply@opencode.ai>
* fix(opencode): gate host access and preserve evidence
Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com>
---------
Signed-off-by: Yoseph Zuskin <zuskinyoseph@gmail.com>
Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com>
Co-authored-by: OpenCode Muse Spark 1.3 Free (1M context) <noreply@opencode.ai>
Co-authored-by: Narendran Raghavan <nraghavan@nvidia.com>
Co-authored-by: Narendran Raghavan <32655573+rng1995@users.noreply.github.com>
|
2026-09-16 12:51:41 -07:00 |
|