@grafana/plugin-validator 0.20.0 → 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.
Files changed (2) hide show
  1. package/README.md +48 -39
  2. 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 /source_code /archive.zip
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,51 @@ 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
- | Analyzer | Description | Dependencies |
217
- | ------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------- |
218
- | Archive Structure / `archive` | Ensures the contents of the zip file have the expected layout. | None |
219
- | Archive Name / `archivename` | The name of the archive should be correctly formatted. | None |
220
- | Backend Binary / `backendbinary` | Validates the consistency between the existence of a binary file and plugin.json declarations for backend or alerting. | None |
221
- | Backend Debug / `backenddebug` | Checks that the standalone debug files for backend plugins are not present. | None |
222
- | Binary Permissions / `binarypermissions` | For datasources and apps with binaries, this ensures the plugin can run when extracted on a system. | None |
223
- | Broken Links / `brokenlinks` | Detects if any URL doesn't resolve to a valid location. | None |
224
- | Checksum / `checksum` | Validates that the passed checksum (as a validator arg) is the one calculated from the archive file. | `checksum` |
225
- | Code Rules / `coderules` | Checks for forbidden access to environment variables, file system or use of `syscall` module. | [semgrep](https://github.com/returntocorp/semgrep), `sourceCodeUri` |
226
- | Discoverability / `discoverability` | Warns about missing keywords and description that are used for plugin indexing in the catalog. | None |
227
- | Go Manifest / `gomanifest` | Validates the build manifest. | `sourceCodeUri` |
228
- | Go Security Checker / `gosec` | Inspects source code for security problems by scanning the Go AST. | [gosec](https://github.com/securego/gosec), `sourceCodeUri` |
229
- | Nested includes metadata / `includesnested` | Validates that nested plugins have the correct metadata. | |
230
- | Developer Jargon / `jargon` | Generally discourages use of code jargon in the documentation. | None |
231
- | JS Source Map / `jssourcemap` | Checks for required `module.js.map` file(s) in archive. | `sourceCodeUri` |
232
- | Legacy Grafana Toolkit usage / `legacybuilder` | Detects the usage of the not longer supported Grafana Toolkit. | None |
233
- | Legacy Platform / `legacyplatform` | Detects use of Angular which is deprecated. | None |
234
- | License Type / `license` | Checks the declared license is one of: BSD, MIT, Apache 2.0, LGPL3, GPL3, AGPL3. | None |
235
- | Logos / `logos` | Detects whether the plugin includes small and large logos to display in the plugin catalog. | none |
236
- | Manifest (Signing) / `manifest` | When a plugin is signed, the zip file will contain a signed `MANIFEST.txt` file. | None |
237
- | Metadata Paths / `metadatapaths` | Ensures all paths are valid and images referenced exist. | None |
238
- | Metadata Validity / `metadatavalid` | Ensures metadata is valid and matches plugin schema. | None |
239
- | module.js (exists) / `modulejs` | All plugins require a `module.js` to be loaded. | None |
240
- | Organization (exists) / `org` | Verifies the org specified in the plugin ID exists. | None |
241
- | Vulnerability Scanner / `osv-scanner` | Detects critical vulnerabilities in Go modules and yarn lock files. | [osv-scanner](https://github.com/google/osv-scanner), `sourceCodeUri` |
242
- | Plugin Name formatting / `pluginname` | Validates the plugin ID used conforms to our naming convention. | None |
243
- | Published / `published` | Detects whether any version of this plugin exists in the Grafana plugin catalog currently. | None |
244
- | Readme (exists) / `readme` | Ensures a `README.md` file exists within the zip file. | None |
245
- | Restrictive Dependency / `restrictivedep` | Specifies a valid range of Grafana versions that work with this version of the plugin. | None |
246
- | Screenshots / `screenshots` | Screenshots are specified in `plugin.json` that will be used in the Grafana plugin catalog. | None |
247
- | Signature / `signature` | Ensures the plugin has a valid signature. | None |
248
- | !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` |
249
- | Unique README.md / `templatereadme` | Ensures the plugin doesn't re-use the template from the `create-plugin` tool. | None |
250
- | No Tracking Scripts / `trackingscripts` | Detects if there are any known tracking scripts, which are not allowed. | None |
251
- | Type Suffix (panel/app/datasource) / `typesuffix` | Ensures the plugin has a valid type specified. | None |
252
- | Version / `version` | Ensures the version submitted is newer than the currently published plugin. If this is a new/unpublished plugin, this is skipped. | None |
253
- | Unsafe SVG / `unsafesvg` | Checks if any svg files are safe based on a whitelist of elements and attributes. | none |
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 -->
254
263
 
255
264
  ## Output
256
265
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grafana/plugin-validator",
3
- "version": "0.20.0",
3
+ "version": "0.20.1",
4
4
  "description": "Grafana Plugin Validator",
5
5
  "main": "index.js",
6
6
  "repository": {