@grafana/plugin-validator 0.20.0 → 0.20.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.
- package/README.md +54 -39
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -51,7 +51,7 @@ docker run --pull=always -v /path/to/plugin_archive.zip:/archive.zip grafana/plu
|
|
|
51
51
|
#### Using a local archive file and local source code
|
|
52
52
|
|
|
53
53
|
```SHELL
|
|
54
|
-
docker run --pull=always -v /path/to/plugin_archive.zip:/archive.zip -v /path/to/source_code:/source_code grafana/plugin-validator-cli -sourceCodeUri
|
|
54
|
+
docker run --pull=always -v /path/to/plugin_archive.zip:/archive.zip -v /path/to/source_code:/source_code grafana/plugin-validator-cli -sourceCodeUri file:///source_code /archive.zip
|
|
55
55
|
```
|
|
56
56
|
|
|
57
57
|
> [!NOTE]
|
|
@@ -113,6 +113,8 @@ Usage plugincheck2:
|
|
|
113
113
|
If set, the checksum of the plugin archive will be checked against this value. MD5 and SHA256 are supported.
|
|
114
114
|
-analyzer string (optional)
|
|
115
115
|
If set, only an specific analyzer and it's dependencies will run.
|
|
116
|
+
-severity string (optional)
|
|
117
|
+
If used, it will set the severity of the analyzer (it has the highest priority).
|
|
116
118
|
|
|
117
119
|
```
|
|
118
120
|
|
|
@@ -213,44 +215,57 @@ If you run the validator locally or via NPX you can benefit from installing thes
|
|
|
213
215
|
|
|
214
216
|
The tool runs a series of analyzers to ensure submitted plugins are following best practices, and speed up the process of approving a plugin for publishing, detailed in the table below. The _Analyzer_ column includes the name required for altering the behavior of a given check in a [configuration file](#using-a-configuration-file). The _Dependencies_ column specifies whether the analyzer requires the source code for the plugin to be provided with `sourceCodeUri` or for any additional [security scanning tools](#security-tools) to be present.
|
|
215
217
|
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
|
222
|
-
|
|
223
|
-
|
|
|
224
|
-
|
|
|
225
|
-
|
|
|
226
|
-
|
|
|
227
|
-
|
|
|
228
|
-
|
|
|
229
|
-
|
|
|
230
|
-
|
|
|
231
|
-
|
|
|
232
|
-
|
|
|
233
|
-
|
|
|
234
|
-
|
|
|
235
|
-
|
|
|
236
|
-
|
|
|
237
|
-
|
|
|
238
|
-
|
|
|
239
|
-
|
|
|
240
|
-
|
|
|
241
|
-
|
|
|
242
|
-
|
|
|
243
|
-
|
|
|
244
|
-
|
|
|
245
|
-
|
|
|
246
|
-
|
|
|
247
|
-
|
|
|
248
|
-
|
|
|
249
|
-
|
|
|
250
|
-
|
|
|
251
|
-
|
|
|
252
|
-
|
|
|
253
|
-
|
|
|
218
|
+
<!-- analyzers-table-start -->
|
|
219
|
+
<!--
|
|
220
|
+
THE FOLLOWING SECTION IS GENERATED, DO NOT EDIT.
|
|
221
|
+
Run "mage gen:readme" to regenerate this section.
|
|
222
|
+
-->
|
|
223
|
+
| Analyzer | Description | Dependencies |
|
|
224
|
+
|----------|-------------|--------------|
|
|
225
|
+
| Archive Name / `archivename` | The name of the archive should be correctly formatted. | None |
|
|
226
|
+
| Archive Structure / `archive` | Ensures the contents of the zip file have the expected layout. | None |
|
|
227
|
+
| Backend Binary / `backendbinary` | Validates the consistency between the existence of a binary file and plugin.json declarations for backend or alerting. | None |
|
|
228
|
+
| Backend Debug / `backenddebug` | Checks that the standalone debug files for backend plugins are not present. | None |
|
|
229
|
+
| Binary Permissions / `binarypermissions` | For datasources and apps with binaries, this ensures the plugin can run when extracted on a system. | None |
|
|
230
|
+
| Broken Links / `brokenlinks` | Detects if any URL doesn't resolve to a valid location. | None |
|
|
231
|
+
| Checksum / `checksum` | Validates that the passed checksum (as a validator arg) is the one calculated from the archive file. | `checksum` |
|
|
232
|
+
| Circular Dependencies / `circulardependencies` | Ensures that there aren't any circular dependencies between plugins (`plugin.json`, `dependencies.plugins` field). | None |
|
|
233
|
+
| 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` |
|
|
234
|
+
| Developer Jargon / `jargon` | Generally discourages use of code jargon in the documentation. | None |
|
|
235
|
+
| Discoverability / `discoverability` | Warns about missing keywords and description that are used for plugin indexing in the catalog. | None |
|
|
236
|
+
| Go Manifest / `go-manifest` | Validates the build manifest. | None |
|
|
237
|
+
| Go Security Checker / `go-sec` | Inspects source code for security problems by scanning the Go AST. | [gosec](https://github.com/securego/gosec), `sourceCodeUri` |
|
|
238
|
+
| JS Source Map / `jsMap` | Checks for required `module.js.map` file(s) in archive. | `sourceCodeUri` |
|
|
239
|
+
| Legacy Grafana Toolkit usage / `legacybuilder` | Detects the usage of the not longer supported Grafana Toolkit. | None |
|
|
240
|
+
| Legacy Platform / `legacyplatform` | Detects use of Angular which is deprecated. | None |
|
|
241
|
+
| License Type / `license` | Checks the declared license is one of: BSD, MIT, Apache 2.0, LGPL3, GPL3, AGPL3. | None |
|
|
242
|
+
| LLM Review / `llmreview` | Runs the code through Gemini LLM to check for security issues or disallowed usage. | Gemini API key |
|
|
243
|
+
| Logos / `logos` | Detects whether the plugin includes small and large logos to display in the plugin catalog. | None |
|
|
244
|
+
| Manifest (Signing) / `manifest` | When a plugin is signed, the zip file will contain a signed `MANIFEST.txt` file. | None |
|
|
245
|
+
| Metadata / `metadata` | Checks that `plugin.json` exists and is valid. | None |
|
|
246
|
+
| Metadata Paths / `metadatapaths` | Ensures all paths are valid and images referenced exist. | None |
|
|
247
|
+
| Metadata Validity / `metadatavalid` | Ensures metadata is valid and matches plugin schema. | None |
|
|
248
|
+
| module.js (exists) / `modulejs` | All plugins require a `module.js` to be loaded. | None |
|
|
249
|
+
| Nested includes metadata / `includesnested` | Validates that nested plugins have the correct metadata. | None |
|
|
250
|
+
| Nested Metadata / `nestedmetadata` | Recursively checks that all `plugin.json` exist and are valid. | None |
|
|
251
|
+
| No Tracking Scripts / `trackingscripts` | Detects if there are any known tracking scripts, which are not allowed. | None |
|
|
252
|
+
| Organization (exists) / `org` | Verifies the org specified in the plugin ID exists. | None |
|
|
253
|
+
| package.json / `packagejson` | Ensures that package.json exists and the version matches the plugin.json | None |
|
|
254
|
+
| Plugin Name formatting / `pluginname` | Validates the plugin ID used conforms to our naming convention. | None |
|
|
255
|
+
| Published / `published-plugin` | Detects whether any version of this plugin exists in the Grafana plugin catalog currently. | None |
|
|
256
|
+
| Readme (exists) / `readme` | Ensures a `README.md` file exists within the zip file. | None |
|
|
257
|
+
| Restrictive Dependency / `restrictivedep` | Specifies a valid range of Grafana versions that work with this version of the plugin. | None |
|
|
258
|
+
| Screenshots / `screenshots` | Screenshots are specified in `plugin.json` that will be used in the Grafana plugin catalog. | None |
|
|
259
|
+
| SDK Usage / `sdkusage` | Ensures that `grafana-plugin-sdk-go` is up-to-date. | None |
|
|
260
|
+
| Signature / `signature` | Ensures the plugin has a valid signature. | None |
|
|
261
|
+
| Source Code / `sourcecode` | A comparison is made between the zip file and the source code to ensure what is released matches the repo associated with it. | `sourceCodeUri` |
|
|
262
|
+
| Type Suffix (panel/app/datasource) / `typesuffix` | Ensures the plugin has a valid type specified. | None |
|
|
263
|
+
| Unique README.md / `templatereadme` | Ensures the plugin doesn't re-use the template from the `create-plugin` tool. | None |
|
|
264
|
+
| Unsafe SVG / `manifest` | Checks if any svg files are safe based on a whitelist of elements and attributes. | None |
|
|
265
|
+
| Version / `version` | Ensures the version submitted is newer than the currently published plugin. If this is a new/unpublished plugin, this is skipped. | None |
|
|
266
|
+
| Virus Scan / `virusscan` | Runs a virus scan on the plugin archive and source code using `clamscan` (`clamav`). | clamscan |
|
|
267
|
+
| Vulnerability Scanner / `osv-scanner` | Detects critical vulnerabilities in Go modules and yarn lock files. | [osv-scanner](https://github.com/google/osv-scanner), `sourceCodeUri` |
|
|
268
|
+
<!-- analyzers-table-end -->
|
|
254
269
|
|
|
255
270
|
## Output
|
|
256
271
|
|