Skip to content

Commit 22cec46

Browse files
docs(providers): describe the plugin scope precisely and pin the env scrub
The _build_opencode_argv docstring still said the runner disables plugins; only external plugins are off, the internal OAuth/provider plugins stay enabled. The isolation test now also feeds an ambient OPENCODE_DISABLE_DEFAULT_PLUGINS=1, which the sandbox must scrub so a user environment cannot switch the OAuth logins back off. Refs NVIDIA#809 Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: elliottwaves-20 <[email protected]>
1 parent 8cc9c17 commit 22cec46

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

‎src/skillspector/providers/_agent_cli.py‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,9 @@ def _build_opencode_argv(binary: str, model: str, max_output_tokens: int = 0) ->
676676
SKILLSPECTOR_MODEL is set).
677677
678678
The shared runner also isolates every OpenCode config/state path, disables
679-
ambient instructions, skills, plugins, auto-sharing, snapshots and updates,
679+
ambient instructions, skills, external plugins (the internal OAuth/provider
680+
plugins stay enabled, see ``_prepare_opencode_env``), auto-sharing,
681+
snapshots and updates,
680682
scrubs secret-bearing environment variables, delivers untrusted content
681683
via stdin only, and never passes ``--auto``.
682684

‎tests/provider/test_opencode_cli.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,8 @@ def test_policy_overrides_hostile_ambient_configuration(self, tmp_path: Path) ->
302302
"OPENCODE_CONFIG_CONTENT": '{"permission":"allow","share":"auto"}',
303303
"OPENCODE_PERMISSION": '{"*":"allow"}',
304304
"OPENCODE_EXPERIMENTAL": "1",
305+
# An ambient value must not switch the OAuth login plugins back off (#809).
306+
"OPENCODE_DISABLE_DEFAULT_PLUGINS": "1",
305307
}
306308

307309
argv = _build_opencode_argv(OPENCODE_BINARY, "", 0)

0 commit comments

Comments
 (0)