claude-code - 💡(How to fix) Fix Feature: version constraints for enabledPlugins in project settings [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#46936Fetched 2026-04-12 13:29:16
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Author
Timeline (top)
labeled ×3commented ×1

Fix Action

Fix / Workaround

Current Workaround

Code Example

{
  "enabledPlugins": {
    "my-plugin@my-marketplace": ["^2.0.0"]
  }
}
RAW_BUFFERClick to expand / collapse

Feature Request

Support semver version constraints in enabledPlugins to allow project maintainers to control which plugin versions are loaded.

Proposed Syntax

{
  "enabledPlugins": {
    "my-plugin@my-marketplace": ["^2.0.0"]
  }
}

The JSON schema already accepts an array of strings for enabledPlugins values and describes it as supporting "extended format with version constraints," but this is not currently implemented.

Why: Security

When a project's .claude/settings.json uses extraKnownMarketplaces + enabledPlugins to distribute plugins to a team, there is no way to guard against breaking or malicious changes in a plugin update. A compromised or buggy plugin version would immediately propagate to every developer on the team.

With version constraints, project maintainers can:

  • Pin to a known-good major version (^2.0.0) — prevents untested major bumps from reaching developers
  • Pin to an exact version (=2.0.0) — maximum control for security-sensitive environments
  • Set a minimum version (>=2.1.0) — ensure a security fix is picked up by all team members

This is especially important for large teams (100+ developers) where plugins include hooks that execute shell commands. A version constraint in the checked-in project settings acts as a gate, requiring a deliberate commit to upgrade.

Current Workaround

None. The only option is true/false, which always installs whatever version the marketplace provides.

extent analysis

TL;DR

Implement semver version constraints in enabledPlugins to control plugin versions and enhance security.

Guidance

  • Modify the JSON schema to support semver version constraints for enabledPlugins values.
  • Update the implementation to parse and apply the version constraints, allowing project maintainers to pin to specific versions or set minimum version requirements.
  • Test the new functionality with various version constraints, such as ^2.0.0, =2.0.0, and >=2.1.0, to ensure correct behavior.
  • Consider adding validation to prevent invalid version constraints from being applied.

Example

{
  "enabledPlugins": {
    "my-plugin@my-marketplace": ["^2.0.0", "=2.0.1", ">=2.1.0"]
  }
}

Notes

The proposed syntax and functionality are designed to address a specific security concern, but the implementation details may vary depending on the underlying technology stack and requirements.

Recommendation

Apply workaround by implementing the proposed semver version constraints in enabledPlugins to enhance security and control over plugin versions. This will allow project maintainers to deliberately manage plugin updates and prevent potential security risks.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING