anomalyco / anomalyco/opencode
skills: inline @mention injects a denied skill's body without a permission check
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Summary
A skill denied via permissions is still injected into the session when referenced with an @<skill-id> mention. The mention path loads the skill body directly and does not consult the skill permission.
Environment
- opencode version: 2.0.8
- OS: Darwin 25.6.0 (darwin arm64)
- Terminal: Ghostty, xterm-256color, truecolor
- Shell: /bin/zsh
- Install/channel: release/latest
- Active plugins: none
Reproduction
-
Configure:
{ "permissions": [ { "action": "skill", "resource": "create-plan", "effect": "deny" } ] } -
Start a session and send
@create-plan. -
The full
SKILL.mdbody is injected into the conversation despite the deny. -
Control: loading the same skill via the
skilltool returns{"type":"permission.rejected","message":"Permission denied: skill"}.
Expected Behavior
Per the docs, a deny effect "Hides matching skills from the model and rejects loading." An explicit mention should not bypass it, or the docs should define explicit user activation as a separate source/permission action.
Actual Behavior
The mention injects the skill body with no permission check. This was reproduced after a full client restart.
Additional Context
- Also tried
metadata.opencode/slash: falseand top-levelslash: falsein the skill frontmatter; neither affected the mention injection. - Related: #43872 reports the inverse on
0.0.0-beta-17793(@skill-idcorrectly denied,/skill-idbypasses). On 2.0.8 the@mention appears not to route through theskilltool at all.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Trace the @ mention path and compare it with the skill tool path, which returns a permission.rejected response for denied skills. Start from the mention handling entry point and the skill permission check; done means a denied skill is not injected through an explicit mention and the existing allowed-skill behavior remains intact.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- authorization, security
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 72/100