@grafana/plugin-validator 0.19.2 → 0.20.1
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 +50 -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]
|
|
@@ -111,6 +111,10 @@ Usage plugincheck2:
|
|
|
111
111
|
If set, plugincheck returns non-zero exit code for warnings
|
|
112
112
|
-checksum string (optional)
|
|
113
113
|
If set, the checksum of the plugin archive will be checked against this value. MD5 and SHA256 are supported.
|
|
114
|
+
-analyzer string (optional)
|
|
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).
|
|
114
118
|
|
|
115
119
|
```
|
|
116
120
|
|
|
@@ -211,44 +215,51 @@ If you run the validator locally or via NPX you can benefit from installing thes
|
|
|
211
215
|
|
|
212
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.
|
|
213
217
|
|
|
214
|
-
|
|
215
|
-
|
|
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
|
-
|
|
|
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
|
+
| Logos / `logos` | Detects whether the plugin includes small and large logos to display in the plugin catalog. | None |
|
|
243
|
+
| Manifest (Signing) / `manifest` | When a plugin is signed, the zip file will contain a signed `MANIFEST.txt` file. | None |
|
|
244
|
+
| Metadata Paths / `metadatapaths` | Ensures all paths are valid and images referenced exist. | None |
|
|
245
|
+
| Metadata Validity / `metadatavalid` | Ensures metadata is valid and matches plugin schema. | None |
|
|
246
|
+
| module.js (exists) / `modulejs` | All plugins require a `module.js` to be loaded. | None |
|
|
247
|
+
| Nested includes metadata / `includesnested` | Validates that nested plugins have the correct metadata. | None |
|
|
248
|
+
| No Tracking Scripts / `trackingscripts` | Detects if there are any known tracking scripts, which are not allowed. | None |
|
|
249
|
+
| Organization (exists) / `org` | Verifies the org specified in the plugin ID exists. | None |
|
|
250
|
+
| Plugin Name formatting / `pluginname` | Validates the plugin ID used conforms to our naming convention. | None |
|
|
251
|
+
| Published / `published-plugin` | Detects whether any version of this plugin exists in the Grafana plugin catalog currently. | None |
|
|
252
|
+
| Readme (exists) / `readme` | Ensures a `README.md` file exists within the zip file. | None |
|
|
253
|
+
| Restrictive Dependency / `restrictivedep` | Specifies a valid range of Grafana versions that work with this version of the plugin. | None |
|
|
254
|
+
| Screenshots / `screenshots` | Screenshots are specified in `plugin.json` that will be used in the Grafana plugin catalog. | None |
|
|
255
|
+
| Signature / `signature` | Ensures the plugin has a valid signature. | None |
|
|
256
|
+
| 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` |
|
|
257
|
+
| Type Suffix (panel/app/datasource) / `typesuffix` | Ensures the plugin has a valid type specified. | None |
|
|
258
|
+
| Unique README.md / `templatereadme` | Ensures the plugin doesn't re-use the template from the `create-plugin` tool. | None |
|
|
259
|
+
| Unsafe SVG / `manifest` | Checks if any svg files are safe based on a whitelist of elements and attributes. | None |
|
|
260
|
+
| Version / `version` | Ensures the version submitted is newer than the currently published plugin. If this is a new/unpublished plugin, this is skipped. | None |
|
|
261
|
+
| Vulnerability Scanner / `osv-scanner` | Detects critical vulnerabilities in Go modules and yarn lock files. | [osv-scanner](https://github.com/google/osv-scanner), `sourceCodeUri` |
|
|
262
|
+
<!-- analyzers-table-end -->
|
|
252
263
|
|
|
253
264
|
## Output
|
|
254
265
|
|