Repository navigation
TC CFG 010
| Severity | medium; low under a fixture directory, and for a Claude Code plugin manifest or marketplace also under a test directory |
| Harnesses | OpenCode, Claude Code |
| Files |
opencode.json, opencode.jsonc, .opencode/plugin/*, .opencode/plugins/*, .opencode/tool/*, .opencode/tools/*, .claude-plugin/plugin.json, .claude-plugin/marketplace.json, .claude/settings.json (any depth, repository scope) |
| Rule | rules/TC-CFG-010.yaml |
A plugin is code the agent loads and runs with the user's privileges. An OpenCode plugin is a JavaScript or TypeScript module imported when OpenCode starts. A Claude Code plugin can bring hooks, MCP servers, agents, and commands. A repository that ships or enables one asks every contributor's agent to run it.
Reported, once per plugin entry:
- OpenCode: each entry of
plugininopencode.jsonoropencode.jsonc(an npm package OpenCode installs and loads), and each JS/TS file directly inside.opencode/plugin/,.opencode/plugins/,.opencode/tool/, or.opencode/tools/. - Claude Code: a
.claude-plugin/plugin.jsonmanifest, each plugin listed in a.claude-plugin/marketplace.json, and in the shared.claude/settings.jsonanenabledPluginsobject with at least one plugin set totrue, or a non-emptyextraKnownMarketplaces.
Not reported:
-
.claude/settings.local.json, which is personal. -
enabledPluginsentries that are allfalse, and an emptyextraKnownMarketplaces. - OpenCode files nested below a plugin or tool directory, which OpenCode does not load.
- User-scope plugins.
Scan mode reads the repository as it is. It sees that a plugin is there, not whether a change just added it, and not what the plugin's code does. Shipping a reviewed plugin with a project is a legitimate use, so a plugin's presence alone does not fail a scan at the default fail-on (high); it is listed for review. Raising an addition in a pull request is the job of a pull-request context, which is not implemented yet.
Two cases are test input that no harness loads from the checkout. They are still reported, at low, so a plugin placed there stays visible; they are not dropped.
- A Claude Code
.claude-plugin/plugin.jsonor.claude-plugin/marketplace.jsonunder a directory namedfixtures,__fixtures__,testdata,test-fixtures,test_fixtures,tests, ortest, at any depth. A test suite reads it or installs it into a temporary home. For exampletest/e2e/fixtures/market/.claude-plugin/marketplace.jsonandtests/modules/sample-plugin/.claude-plugin/plugin.jsonare low. - Any other match, for every harness the rule reads, under a
fixture-type directory only:
fixtures,testdata, or__fixtures__, at any depth (tests/fixtures/is covered throughfixtures/). That covers an OpenCodeopencode.json(c)plugin entry, a module under.opencode/plugin(s)/or.opencode/tool(s)/, and a Claude Code.claude/settings.jsonentry. For exampletests/fixtures/plugin-case/opencode.jsonand its.opencode/plugins/local.tsare low.
A config under plain tests/ or test/ that is not a Claude Code
plugin manifest or marketplace stays medium: it can be one the agent
really loads when started in that directory, such as a test
environment's tests/dev-env/opencode.json. A directory whose name only
contains one of these words (contests/, latest/) stays medium, and so
does the repository-root config.
Reported:
{"plugin": ["opencode-acme-notify@1.2.0"]}{"enabledPlugins": {"formatter@acme-tools": true}}Not reported:
{"enabledPlugins": {"formatter@acme-tools": false}}Review the plugin's code and what it registers (hooks, MCP servers, commands) before you keep it. Prefer a plugin pinned to a reviewed version or commit, and remove plugins the project does not need. To accept a reviewed plugin, add a policy exception for this rule and file.
This wiki is generated from docs/ on main by cmd/wikigen. Do not edit it here: change docs/ and open a pull request. Apache-2.0.
Start
Commands
CI and hooks
Configuration
Adapters
- Claude Code
- Codex
- Cursor
- GitHub Copilot
- Gemini CLI
- OpenCode
- Windsurf
- Devin
- Dev Container
- Shared Files
Project