Commit Graph
9 Commits
Author SHA1 Message Date
yashrajbasav f1c82dec37 fix(opencode): scan assignment names once during redaction
Signed-off-by: yashrajbasav <yashrajbasav@nvidia.com>
2026-10-06 12:50:41 +05:30
yashrajbasav e0f8aa7197 fix(opencode): redact credentials adjacent to configured values
Signed-off-by: yashrajbasav <yashrajbasav@nvidia.com>
2026-10-06 12:41:31 +05:30
github-actions[bot] 03af0fb7f4 Merge branch 'main' into yashraj/redact-short-opencode-credentials 2026-10-05 16:26:04 +00:00
yashrajbasav 263b76e703 fix(opencode): cover overlapping credential redaction spans
Signed-off-by: yashrajbasav <yashrajbasav@nvidia.com>
2026-10-05 21:37:21 +05:30
yashrajbasav 9604577a1b test(opencode): exercise standalone short values at truncation boundaries
Signed-off-by: yashrajbasav <yashrajbasav@nvidia.com>
2026-10-05 21:22:41 +05:30
yashrajbasav 4ff755c583 fix(opencode): preserve whole credentials and JSON during redaction
Signed-off-by: yashrajbasav <yashrajbasav@nvidia.com>
2026-10-05 21:22:02 +05:30
yashrajbasav 46b02a51bb fix(opencode): allow the default LLM workflow to finish
Signed-off-by: yashrajbasav <yashrajbasav@nvidia.com>
2026-10-05 15:02:15 +05:30
yashrajbasav 7fea140897 Redact short credential values in OpenCode output
Signed-off-by: yashrajbasav <yashrajbasav@nvidia.com>
2026-10-05 11:29:50 +05:30
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