@grafana/plugin-validator 0.38.0 → 0.38.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +22 -2
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -232,6 +232,26 @@ Locally:
232
232
  DEBUG=1 plugincheck2 -sourceCodeUri https://github.com/grafana/clock-panel/tree/v2.1.2 https://github.com/grafana/clock-panel/releases/download/v2.1.2/grafana-clock-panel-2.1.2.zip
233
233
  ```
234
234
 
235
+ ## LLM provider configuration
236
+
237
+ The `llmreview` and `codediff` analyzers use an LLM to review plugin source code. Three providers are supported: **Anthropic**, **OpenAI**, and **Google (Gemini)**.
238
+
239
+ Set one of the following environment variables to enable LLM-based analysis. The first key found (in the order below) is used:
240
+
241
+ | Environment Variable | Provider | Default Model |
242
+ |---|---|---|
243
+ | `ANTHROPIC_API_KEY` | Anthropic | `claude-opus-4-6` |
244
+ | `OPENAI_API_KEY` | OpenAI | `gpt-5.4` |
245
+ | `GEMINI_API_KEY` | Google | `gemini-3.1-flash-lite-preview` |
246
+
247
+ Example:
248
+
249
+ ```SHELL
250
+ ANTHROPIC_API_KEY=sk-ant-... plugincheck2 -sourceCodeUri https://github.com/org/repo/tree/v1.0.0 plugin.zip
251
+ ```
252
+
253
+ You can skip individual LLM analyzers with `SKIP_LLM_REVIEW=1` or `SKIP_LLM_CODEDIFF=1`.
254
+
235
255
  ## Security tools
236
256
 
237
257
  This validator makes uses of the following open source security tools:
@@ -265,7 +285,7 @@ Run "mage gen:readme" to regenerate this section.
265
285
  | Changelog (exists) / `changelog` | Ensures a `CHANGELOG.md` file exists within the zip file. | None |
266
286
  | Checksum / `checksum` | Validates that the passed checksum (as a validator arg) is the one calculated from the archive file. | `checksum` |
267
287
  | Circular Dependencies / `circulardependencies` | Ensures that there aren't any circular dependencies between plugins (`plugin.json`, `dependencies.plugins` field). | None |
268
- | Code Diff / `codediff` | | Google API Key with Generative AI access |
288
+ | Code Diff / `codediff` | | API key for one of: Anthropic (ANTHROPIC_API_KEY), OpenAI (OPENAI_API_KEY), or Google (GEMINI_API_KEY) |
269
289
  | Code Rules / `code-rules` | Checks for forbidden access to environment variables, file system or use of syscall module. | [semgrep](https://github.com/returntocorp/semgrep), `sourceCodeUri` |
270
290
  | Developer Jargon / `jargon` | Generally discourages use of code jargon in the documentation. | None |
271
291
  | Discoverability / `discoverability` | Warns about missing keywords and description that are used for plugin indexing in the catalog. | None |
@@ -275,7 +295,7 @@ Run "mage gen:readme" to regenerate this section.
275
295
  | Legacy Grafana Toolkit usage / `legacybuilder` | Detects the usage of the not longer supported Grafana Toolkit. | None |
276
296
  | Legacy Platform / `legacyplatform` | Detects use of Angular which is deprecated. | None |
277
297
  | License Type / `license` | Checks the declared license is one of: BSD, MIT, Apache 2.0, LGPL3, GPL3, AGPL3. | None |
278
- | LLM Review / `llmreview` | Runs the code through Gemini LLM to check for security issues or disallowed usage. | Gemini API key |
298
+ | LLM Review / `llmreview` | Runs the code through an LLM to check for security issues or disallowed usage. | API key for one of: Anthropic (ANTHROPIC_API_KEY), OpenAI (OPENAI_API_KEY), or Google (GEMINI_API_KEY) |
279
299
  | Logos / `logos` | Detects whether the plugin includes small and large logos to display in the plugin catalog. | None |
280
300
  | Manifest (Signing) / `manifest` | When a plugin is signed, the zip file will contain a signed `MANIFEST.txt` file. | None |
281
301
  | Metadata / `metadata` | Checks that `plugin.json` exists and is valid. | None |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grafana/plugin-validator",
3
- "version": "0.38.0",
3
+ "version": "0.38.2",
4
4
  "description": "Grafana Plugin Validator",
5
5
  "main": "index.js",
6
6
  "repository": {