You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+45-2Lines changed: 45 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,6 +15,7 @@ The Red Hat Dependency Analytics extension uses vulnerability data sources for t
15
15
- Golang
16
16
- Python
17
17
- Gradle (Kotlin / Groovy DSL)
18
+
- Rust (Cargo)
18
19
19
20
<br >**NOTE:**
20
21
The Red Hat Dependency Analytics extension is an online service hosted and maintained by Red Hat.
@@ -55,6 +56,7 @@ When a specific path is configured in the settings, it takes precedence over the
55
56
| Golang |`go`|`go.mod`|
56
57
| Python |`python3/pip3` or `python/pip`|`requirements.txt`|
57
58
| Gradle |`gradle`|`build.gradle`|
59
+
| Rust |`cargo`|`Cargo.toml`|
58
60
59
61
**Note:** For NPM, PNPM, and Yarn projects, you can use [fnm](https://github.com/Schniz/fnm) or [nvm](https://github.com/nvm-sh/nvm) for Node.js version management. The extension will automatically detect and use the binary path from the `FNM_DIR` or `NVM_DIR` environment variables.
60
62
@@ -117,6 +119,9 @@ You can set the vulnerability severity alert level to `Error` or `Warning` for i
117
119
#### Golang:
118
120
*`useGoMVS` : Use the minimal version selection algorithm to select a set of module versions to use when building Go packages.
119
121
122
+
#### Rust (Cargo):
123
+
*`cargo.executable.path` : Specify the absolute path to the `cargo` executable. If not set, the extension uses `cargo` from your system `PATH`.
124
+
120
125
#### HTTP Proxy:
121
126
*`httpProxy` : Configure HTTP proxy settings for the extension. There are three options available:
122
127
-`on`: Always use the HTTP proxy regardless of VS Code's proxy settings
@@ -156,7 +161,7 @@ Specify glob patterns for manifests to be ignored for background analysis e.g. `
156
161
## Features
157
162
158
163
-**Component analysis**
159
-
<br >Upon opening a manifest file, such as a `pom.xml`, `package.json`, `go.mod` or `requirements.txt` file, a vulnerability scan starts the analysis process.
164
+
<br >Upon opening a manifest file, such as a `pom.xml`, `package.json`, `go.mod`, `requirements.txt`, or `Cargo.toml` file, a vulnerability scan starts the analysis process.
160
165
The scan provides immediate inline feedback on detected security vulnerabilities for your application's, and container's dependencies.
161
166
Such dependencies are appropriately underlined in red, and hovering over it gives you a short summary of the security concern from the available data sources.
162
167
The summary has the full package name, version number, the amount of known security vulnerabilities, and the highest severity status of said vulnerabilities.
@@ -178,7 +183,7 @@ Specify glob patterns for manifests to be ignored for background analysis e.g. `
178
183
-**License compatibility checking**
179
184
<br >Red Hat Dependency Analytics automatically checks for license compatibility issues in your project:
180
185
181
-
- **License mismatch detection**: For projects with license fields in their manifest files (`package.json`, `pom.xml`, `build.gradle`), the extension detects mismatches between the license declared in the manifest and the LICENSE file. A red underline appears on the license field with a quick fix to update the manifest with the LICENSE file's value.
186
+
- **License mismatch detection**: For projects with license fields in their manifest files (`package.json`, `pom.xml`, `build.gradle`, `Cargo.toml`), the extension detects mismatches between the license declared in the manifest and the LICENSE file. A red underline appears on the license field with a quick fix to update the manifest with the LICENSE file's value.
182
187
183
188
- **Incompatible dependency licenses**: The extension identifies dependencies whose licenses are more restrictive than your project's license. A notification displays the count of incompatible dependencies, helping you maintain license compliance.
184
189
@@ -287,6 +292,24 @@ Specify glob patterns for manifests to be ignored for background analysis e.g. `
287
292
}
288
293
```
289
294
295
+
- **Rust (Cargo)**
296
+
<br >If you want to ignore vulnerabilities for a dependency in a `Cargo.toml` file, you must add `# exhortignore` to the end of the line as a comment against the dependency in the manifest file.
297
+
For inline dependencies:
298
+
299
+
```toml
300
+
[dependencies]
301
+
serde = "1.0" # exhortignore
302
+
tokio = { version = "1.0", features = ["full"] } # exhortignore
303
+
```
304
+
305
+
For table-style dependencies, add the comment on the section header:
306
+
307
+
```toml
308
+
[dependencies.reqwest] # exhortignore
309
+
version = "0.11"
310
+
features = ["json"]
311
+
```
312
+
290
313
-**Excluding developmental or test dependencies**
291
314
<br >Red Hat Dependency Analytics does not analyze dependencies marked as `dev` or `test`, these dependencies are ignored.
292
315
@@ -346,6 +369,26 @@ Specify glob patterns for manifests to be ignored for background analysis e.g. `
346
369
```
347
370
348
371
For example, creating an alternative file to `requirements.txt`, like `requirements-dev.txt` or `requirements-test.txt` and adding the dev or test dependencies there instead.
372
+
373
+
For example, placing dependencies under `[dev-dependencies]` or `[build-dependencies]` in a `Cargo.toml` file. Red Hat Dependency Analytics excludes these from analysis and only reports on `[dependencies]`, `[workspace.dependencies]`, and platform-specific sections such as `[target.'cfg(windows)'.dependencies]`.
374
+
375
+
```toml
376
+
[package]
377
+
name = "my-crate"
378
+
version = "0.1.0"
379
+
380
+
[dependencies]
381
+
serde = "1.0"
382
+
383
+
[dev-dependencies]
384
+
# Excluded from analysis
385
+
mockall = "0.11"
386
+
387
+
[build-dependencies]
388
+
# Excluded from analysis
389
+
cc = "1.0"
390
+
```
391
+
349
392
350
393
-**Red Hat Dependency Analytics report**
351
394
<br >The Red Hat Dependency Analytics report is a temporary HTML file that exist if the **Red Hat Dependency Analytics Report** tab remains open.
0 commit comments