@grafana/plugin-validator 0.11.1 → 0.11.3

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 +27 -28
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -4,14 +4,14 @@
4
4
  [![Drone](https://drone.grafana.net/api/badges/grafana/plugin-validator/status.svg)](https://drone.grafana.net/grafana/plugin-validator)
5
5
  [![Go Report Card](https://goreportcard.com/badge/github.com/grafana/plugin-validator)](https://goreportcard.com/report/github.com/grafana/plugin-validator)
6
6
 
7
- The tool helps speed up the process of publishing plugins to [Grafana.com](https://grafana.com/grafana/plugins/). It runs a series of [analyzers](#analyzers) to ensure plugins are following best practices; checking for security and structural issues, as well as specific requirements related to publishing. A general overview of these requirements can be found here: <https://grafana.com/docs/grafana/latest/developers/plugins/publishing-and-signing-criteria/>.
7
+ This tool helps speed up the process of publishing plugins to [Grafana.com](https://grafana.com/grafana/plugins/). It runs a series of [analyzers](#analyzers) to ensure plugins are following best practices, checking for security and structural issues, as well as specific requirements related to publishing. A general overview of these requirements can be found here: <https://grafana.com/docs/grafana/latest/developers/plugins/publishing-and-signing-criteria/>.
8
8
 
9
9
  It requires a path to a remote or local ZIP archive of the plugin to be specified, for example:
10
10
 
11
11
  - **Remote**: `https://github.com/grafana/clock-panel/releases/download/v2.1.2/grafana-clock-panel-2.1.2.zip`
12
12
  - **Local**: `file://Users/me/Downloads/grafana-clock-panel-2.1.2.zip`
13
13
 
14
- You can **additionally** provide a link to the source code for the project with `-sourceCodeUri` to enable additional analyzers such as the Vulnerability Scan.
14
+ You can _additionally_ provide a link to the source code for the project with `-sourceCodeUri` to enable additional analyzers such as the Vulnerability Scan.
15
15
 
16
16
  ## Installation and usage
17
17
 
@@ -57,9 +57,9 @@ Then you can run the utility:
57
57
  plugincheck2 -sourceCodeUri [source_code_location/] [plugin_archive.zip]
58
58
  ```
59
59
 
60
- ### Generating Local Files For Validation
60
+ ### Generating local files For validation
61
61
 
62
- You must create a `.zip` archive containing the `dist/` directory but named as your plugin ID.
62
+ You must create a `.zip` archive containing the `dist/` directory but named as your plugin ID:
63
63
 
64
64
  ```SHELL
65
65
  PLUGIN_ID=$(grep '"id"' < src/plugin.json | sed -E 's/.*"id" *: *"(.*)".*/\1/')
@@ -92,13 +92,13 @@ Usage plugincheck2:
92
92
 
93
93
  ### Using a configuration file
94
94
 
95
- You can pass a configuration YAML file to the validator with the `-config` option. Several configuration examples are available to use here <https://github.com/grafana/plugin-validator/tree/main/config>
95
+ You can pass a configuration YAML file to the validator with the `-config` option. Several configuration examples are available to use here: <https://github.com/grafana/plugin-validator/tree/main/config>.
96
96
 
97
97
  #### Enabling and disabling analyzers via config
98
98
 
99
- If you wish to disable an specific check (analyzer) you can define this in your [configuration file](#using-a-configuration-file), adding an `analyzers` section and specifying which analyzer or analyzer rules to enable and disable.
99
+ If you want to disable an specific check (analyzer) you can define this in your [configuration file](#using-a-configuration-file), adding an `analyzers` section, and specifying which analyzer or analyzer rules to enable and disable.
100
100
 
101
- E.g.: disable the `version` analyzer
101
+ For example, disable the `version` analyzer:
102
102
 
103
103
  ```yaml
104
104
  global:
@@ -127,7 +127,7 @@ analyzers:
127
127
  severity: warning
128
128
  ```
129
129
 
130
- Severity levels could be: `error`, `warning`, `ok`
130
+ Severity levels could be: `error`, `warning`, or `ok`.
131
131
 
132
132
  > Note: Grafana Labs enforces its own configuration for plugins submissions and your own config file can't change these rules.
133
133
 
@@ -137,7 +137,7 @@ You can specify the location of the plugin source code to the validator with the
137
137
 
138
138
  ### Supported remote Git services
139
139
 
140
- The following **public** git services are supported
140
+ The following **public** Git services are supported:
141
141
 
142
142
  - GitHub
143
143
  - GitLab
@@ -145,9 +145,9 @@ The following **public** git services are supported
145
145
 
146
146
  Private repositories are not currently supported.
147
147
 
148
- Make sure to include the ref (branch or tag) of the corresponding source code.
148
+ Make sure to include the `ref` (branch or tag) of the corresponding source code.
149
149
 
150
- e.g.: You are validating version `v2.1.2` and your project is in github. Make sure you create a corresponding tag or branch and use the url `https://github.com/grafana/clock-panel/tree/v2.1.2`
150
+ For example: you are validating version `v2.1.2` and your project is in GitHub. Make sure you create a corresponding tag or branch and use the URL `https://github.com/grafana/clock-panel/tree/v2.1.2`.
151
151
 
152
152
  ## Debug mode
153
153
 
@@ -185,7 +185,7 @@ If you run the validator locally or via NPX you can benefit from installing thes
185
185
 
186
186
  ## Analyzers
187
187
 
188
- 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.
188
+ 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.
189
189
 
190
190
  | Analyzer | Description | Dependencies |
191
191
  | ------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------- |
@@ -193,37 +193,37 @@ The tool runs a series of analyzers to ensure submitted plugins are following be
193
193
  | Archive Name / `archivename` | The name of the archive should be correctly formatted. | None |
194
194
  | Backend Debug / `backenddebug` | Checks that the standalone debug files for backend plugins are not present. | None |
195
195
  | Binary Permissions / `binarypermissions` | For datasources and apps with binaries, this ensures the plugin can run when extracted on a system. | None |
196
- | Broken Links / `brokenlinks` | Detects if any url does not resolve to a valid location. | None |
196
+ | Broken Links / `brokenlinks` | Detects if any URL doesn't resolve to a valid location. | None |
197
197
  | Code Rules / `coderules` | Checks for forbidden access to environment variables, file system or use of `syscall` module. | [semgrep](https://github.com/returntocorp/semgrep), `sourceCodeUri` |
198
198
  | Go Manifest / `gomanifest` | Validates the build manifest. | `sourceCodeUri` |
199
199
  | Go Security Checker / `gosec` | Inspects source code for security problems by scanning the Go AST. | [gosec](https://github.com/securego/gosec), `sourceCodeUri` |
200
- | JS Source Map / `jssourcemap` | Checks for required module.js.map file(s) in archive. | `sourceCodeUri` |
200
+ | JS Source Map / `jssourcemap` | Checks for required `module.js.map` file(s) in archive. | `sourceCodeUri` |
201
201
  | Logos / `logos` | Detects whether the plugin includes small and large logos to display in the Plugin catalog | none |
202
- | Developer Jargon / `jargon` | Generally discourage use of code jargon in the documentation. | None |
202
+ | Developer Jargon / `jargon` | Generally discourages use of code jargon in the documentation. | None |
203
203
  | Legacy Platform / `legacyplatform` | Detects use of Angular which is deprecated. | None |
204
204
  | License Type / `license` | Checks the declared license is one of: BSD, MIT, Apache 2.0, LGPL3, GPL3, AGPL3. | None |
205
- | Manifest (Signing) / `manifest` | When a plugin is signed, the zip file will contain a signed MANIFEST.txt file. | None |
205
+ | Manifest (Signing) / `manifest` | When a plugin is signed, the zip file will contain a signed `MANIFEST.txt` file. | None |
206
206
  | Metadata Paths / `metadatapaths` | Ensures all paths are valid and images referenced exist. | None |
207
207
  | Metadata Validity / `metadatavalid` | Ensures metadata is valid and matches plugin schema. | None |
208
- | module.js (exists) / `modulejs` | All plugins require a module.js to be loaded. | None |
208
+ | module.js (exists) / `modulejs` | All plugins require a `module.js` to be loaded. | None |
209
209
  | Organization (exists) / `org` | Verifies the org specified in the plugin ID exists. | None |
210
- | Plugin Name formatting / `pluginname` | Validates the plugin id used conforms to our naming convention. | None |
211
- | Published / `published` | Detects whether any version of this plugin exists in the Plugin catalog currently. | None |
212
- | Readme (exists) / `readme` | Ensures a README.md file exists within the zip file. | None |
210
+ | Plugin Name formatting / `pluginname` | Validates the plugin ID used conforms to our naming convention. | None |
211
+ | Published / `published` | Detects whether any version of this plugin exists in the Grafana plugin catalog currently. | None |
212
+ | Readme (exists) / `readme` | Ensures a `README.md` file exists within the zip file. | None |
213
213
  | Restrictive Dependency / `restrictivedep` | Specifies a valid range of Grafana versions that work with this version of the plugin. | None |
214
- | Screenshots / `screenshots` | Screenshots are specified in plugin.json that will be used in the Plugin catalog. | None |
214
+ | Screenshots / `screenshots` | Screenshots are specified in `plugin.json` that will be used in the Grafana plugin catalog. | None |
215
215
  | Signature / `signature` | Ensures the plugin has a valid signature. | None |
216
216
  | !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` |
217
- | Unique README.md / `templatereadme` | Ensures the plugin does not re-use the template from the create-plugin tool. | None |
217
+ | Unique README.md / `templatereadme` | Ensures the plugin doesn't re-use the template from the `create-plugin` tool. | None |
218
218
  | No Tracking Scripts / `trackingscripts` | Detects if there are any known tracking scripts, which are not allowed. | None |
219
219
  | Type Suffix (panel/app/datasource) / `typesuffix` | Ensures the plugin has a valid type specified. | None |
220
220
  | Version / `version` | Ensures the version submitted is newer than the currently published plugin. If this is a new/unpublished plugin, this is skipped. | None |
221
- | Vulnerability Scanner / `osv-scanner` | Detects critical vulnerabilities in go modules and yarn lock files. | [osv-scanner](https://github.com/google/osv-scanner), `sourceCodeUri` |
222
- | Unsafe SVG / `unsafesvg` | Checks if any svg files are safe based on a whitelist of elements and attributes | none |
221
+ | Vulnerability Scanner / `osv-scanner` | Detects critical vulnerabilities in Go modules and yarn lock files. | [osv-scanner](https://github.com/google/osv-scanner), `sourceCodeUri` |
222
+ | Unsafe SVG / `unsafesvg` | Checks if any svg files are safe based on a whitelist of elements and attributes. | none |
223
223
 
224
224
  ## Output
225
225
 
226
- By default, the tool will output results in plain text as shown below.
226
+ By default, the tool outputs results in plain text as shown below.
227
227
 
228
228
  Default:
229
229
 
@@ -298,7 +298,7 @@ Resulting in output similar to:
298
298
 
299
299
  ### Severity
300
300
 
301
- By default the tool will show any warning or error level results from the analyzers. To see all results including successes, you can pass a configuration file which includes:
301
+ By default, the tool will show any warning or error level results from the analyzers. To see all results including successes, you can pass a configuration file which includes:
302
302
 
303
303
  ```yaml
304
304
  global:
@@ -307,8 +307,7 @@ global:
307
307
 
308
308
  ## Getting Help
309
309
 
310
- - :open_book: Check out our plugin [documentation](https://grafana.com/docs/grafana/latest/developers/plugins/).
311
- - :rocket: See our other [Plugin Tools](https://grafana.github.io/plugin-tools/) to create and update plugins.
310
+ - :open_book: Check out our plugin [documentation](https://grafana.com/developers/plugin-tools).
312
311
  - :handshake: Join the [community forum](https://community.grafana.com/tag/plugins).
313
312
  - :speech_balloon: Chat to us in the Grafana Slack [#plugins channel](https://grafana.slack.com/archives/C3HJV5PNE).
314
313
  - :memo: [File an issue](https://github.com/grafana/plugin-validator/issues) for any bugs or feature requests.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grafana/plugin-validator",
3
- "version": "0.11.1",
3
+ "version": "0.11.3",
4
4
  "description": "Grafana Plugin Validator",
5
5
  "main": "index.js",
6
6
  "scripts": {