{"record":{"id":"3341eb7531e8a4ab","repo":"SonarSource/sonarqube","slug":"sonarsource-commercial-plugin-with-key-s-can-on","errorCode":null,"errorMessage":"SonarSource commercial plugin with key '%s' can only be installed as part of a SonarSource edition","messagePattern":"SonarSource commercial plugin with key '(.+?)' can only be installed as part of a SonarSource edition","errorType":"http","errorClass":"IllegalArgumentException","httpStatus":400,"severity":"error","filePath":"server/sonar-webserver-webapi/src/main/java/org/sonar/server/plugins/ws/InstallAction.java","lineNumber":128,"sourceCode":"  private PluginUpdate findAvailablePluginByKey(String key) {\n    PluginUpdate pluginUpdate = null;\n\n    Optional<UpdateCenter> updateCenter = updateCenterFactory.getUpdateCenter(false);\n    if (updateCenter.isPresent()) {\n      pluginUpdate = updateCenter.get().findAvailablePlugins()\n        .stream()\n        .filter(Objects::nonNull)\n        .filter(u -> key.equals(u.getPlugin().getKey()))\n        .findFirst()\n        .orElse(null);\n    }\n\n    if (pluginUpdate == null) {\n      throw new IllegalArgumentException(\n        format(\"No plugin with key '%s' or plugin '%s' is already installed in latest version\", key, key));\n    }\n    if (isEditionBundled(pluginUpdate.getPlugin())) {\n      throw new IllegalArgumentException(format(\n        \"SonarSource commercial plugin with key '%s' can only be installed as part of a SonarSource edition\",\n        pluginUpdate.getPlugin().getKey()));\n    }\n\n    return pluginUpdate;\n  }\n}\n","sourceCodeStart":110,"sourceCodeEnd":136,"githubUrl":"https://github.com/SonarSource/sonarqube/blob/184c821202192afc1c599fc912d0889b69fffa53/server/sonar-webserver-webapi/src/main/java/org/sonar/server/plugins/ws/InstallAction.java#L110-L136","documentation":"If the resolved PluginUpdate refers to a SonarSource commercial plugin (edition-bundled, e.g. a Developer/Enterprise-only analyzer), InstallAction refuses to install it standalone with this IllegalArgumentException, because such plugins may only be delivered as part of a SonarSource edition.","triggerScenarios":"POST api/plugins/install?key=<key> where key denotes a commercial plugin (e.g. sonarsecurity, governance, developer-tier analyzers) that is flagged edition-bundled by isEditionBundled, on a Community Edition server.","commonSituations":"Trying to add commercial analyzers (e.g. for C/IoT languages) or governance features to Community Edition via the marketplace API; scripts enumerating update-center entries and blindly installing every plugin, hitting bundled ones.","solutions":["Purchase and install the corresponding SonarSource edition (Developer/Enterprise/Data Center) which bundles the plugin; do not install it individually.","Exclude edition-bundled plugins from automation install lists (filter by edition availability in api/plugins/available).","If the goal is the language support, check whether a community-compatible analyzer exists and use that key instead."],"exampleFix":"// before\nfor (const key of wantedKeys) await api.plugins.install({ key });\n// after\nfor (const key of wantedKeys.filter(k => !editionBundledKeys.includes(k))) {\n  await api.plugins.install({ key });\n}","handlingStrategy":"validation","validationCode":"const available = (await api.plugins.available()).plugins;\nconst entry = available.find(p => p.key === key);\nif (entry && editionBundledKeys.includes(key)) {\n  throw new Error(`${key} ships only with a commercial edition`);\n}","typeGuard":"function isEditionBundled(available, key) {\n  const e = available.find(p => p.key === key);\n  return !!e && e.editionBundled === true;\n}","tryCatchPattern":"try {\n  await api.plugins.install({ key });\n} catch (e) {\n  if (String(e.message).includes('only be installed as part of a SonarSource edition')) {\n    throw new Error(`${key} requires a commercial edition license`);\n  }\n  throw e;\n}","preventionTips":["Maintain a deny-list of edition-bundled plugin keys in automation.","Filter marketplace listings by community-edition availability before batch installs.","Obtain the proper edition license when commercial plugins are required."],"tags":["sonarqube","webapi","plugin","commercial-edition"],"backgroundTag":"unsupported-operation","analyzedSha":"184c821202192afc1c599fc912d0889b69fffa53","analyzedAt":"2026-09-09T12:23:51.573Z","contentChangedAt":"2026-09-09T12:23:51.573Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}