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
+68-16Lines changed: 68 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,6 +20,7 @@ while you build your application.
20
20
- Yarn Berry and Classic (yarn)
21
21
- Gradle Kotlin and Groovy (gradle)
22
22
- Golang (go mod)
23
+
- Rust (cargo)
23
24
- Python (pip) ecosystems, and base images in Dockerfile.
24
25
25
26
In future releases, Red Hat plans to support other package managers.
@@ -45,14 +46,8 @@ vulnerability report.
45
46
46
47
**Prerequisites**
47
48
48
-
- For Maven projects, analyzing a `pom.xml` file, you must have the `mvn` binary in your IDE's `PATH` environment.
49
-
- For Node projects, analyzing a `package.json` file, you must have one of the corresponding package manager `npm`, `pnpm` or `yarn`, `node` binaries in your IDE's `PATH`
50
-
environment.
51
-
- For Golang projects, analyzing a `go.mod` file, you must have the `go` binary in your IDE's `PATH` environment.
52
-
- For Python projects, analyzing a `requirements.txt` file, you must have the `python3` and `pip3` binaries in your
53
-
IDE's `PATH` environment.
54
-
- For Gradle projects, analyzing a `build.gradle` file or `build.gradle.kts` file, you must have the `gradle` binary in your system's `PATH` environment.
55
-
- For base images, analyzing a `Dockerfile`, you must have the [`syft`](https://github.com/anchore/syft?tab=readme-ov-file#installation) and [`skopeo`](https://github.com/containers/skopeo/blob/main/install.md) binaries in your IDE's `PATH` environment.
49
+
- You must have the package manager binary for your ecosystem available in your IDE's `PATH` environment.
50
+
See the [Configuration](#configuration) section for the full list of supported package managers, their manifest files, and binary path settings.
56
51
57
52
**Procedure**
58
53
@@ -82,7 +77,7 @@ according to your preferences.
82
77
83
78
**Configurable parameters**
84
79
85
-
-**Maven** :
80
+
-**Maven**(`pom.xml`) :
86
81
<br >Set the full path of the Maven executable, which allows Exhort to locate and run the `mvn` command to resolve
87
82
dependencies for Maven projects.
88
83
<br >Path of the `JAVA_HOME` directory is required by the `mvn` executable.
@@ -95,20 +90,25 @@ according to your preferences.
95
90
<br >`false`: Never use the wrapper regardless of `Build,Execution,Deployment › Build Tools > Maven: Maven home path` setting
96
91
<br >`fallback`: Use IntelliJ's `Build,Execution,Deployment › Build Tools > Maven: Maven home path` setting (default behavior)
97
92
98
-
-**Node** :
93
+
-**Node**(`package.json`) :
99
94
<br >Set the full path of the Node executable, which allows Exhort to locate and run one of the corresponding `npm`, `pnpm` or `yarn` command to resolve
100
95
dependencies for Node projects.
101
96
<br >Path of the directory containing the `node` executable is required by one of the corresponding `npm`, `pnpm` or `yarn` executable.
102
97
<br >If the paths are not provided, your IDE's `PATH` environment will be used to locate the executables.
103
98
104
-
-**Golang** :
99
+
-**Golang**(`go.mod`) :
105
100
<br >Set the full path of the Go executable, which allows Exhort to locate and run the `go` command to resolve
106
101
dependencies for Go projects.
107
102
<br >If the path is not provided, your IDE's `PATH` environment will be used to locate the executable.
108
103
<br >When option `Strictly match package version` is selected, the resolved dependency versions will be compared to
109
104
the versions specified in the manifest file, and users will be alerted if any mismatch is detected.
110
105
111
-
-**Python** :
106
+
-**Rust** (`Cargo.toml`) :
107
+
<br >Set the full path of the Cargo executable, which allows Exhort to locate and run the `cargo` command to resolve
108
+
dependencies for Rust projects.
109
+
<br >If the path is not provided, your IDE's `PATH` environment will be used to locate the executable.
110
+
111
+
-**Python** (`requirements.txt`) :
112
112
<br >Set the full paths of the Python and the package installer for Python executables, which allows Exhort to locate
113
113
and run the `pip3` commands to resolve dependencies for Python projects.
114
114
<br >Python 2 executables `python` and `pip` can be used instead, if the `Use python 2.x` option is selected.
@@ -120,13 +120,13 @@ according to your preferences.
120
120
specified in the manifest file will be ignored, and dependency versions will be resolved dynamically instead (this
121
121
feature cannot be enabled when `Strictly match package version` is selected).
122
122
123
-
-**Gradle** :
123
+
-**Gradle**(`build.gradle`, `build.gradle.kts`) :
124
124
<br >Set the full path of the Gradle executable, which allows Exhort to locate and run the `gradle` command to resolve
125
125
dependencies for Gradle projects.
126
126
<br >By not setting a path to the gradle binary, IntelliJ IDEA uses its default path environment to locate the file.
127
127
128
128
129
-
-**Image** :
129
+
-**Image**(`Dockerfile`) :
130
130
<br >Set the full path of the Syft executable, which allows Exhort to locate and run the `syft` command to
131
131
generate Software Bill of Materials for the base images.
132
132
<br >Optionally, set the full path of the Docker or Podman executable. Syft will attempt to find the images in the
@@ -167,7 +167,7 @@ according to your preferences.
167
167
## Features
168
168
169
169
-**Component analysis**
170
-
<br >Upon opening a manifest file, such as a `pom.xml`, `package.json`, `go.mod` or `requirements.txt` file, a scan
170
+
<br >Upon opening a supported manifest file (see [Configuration](#configuration) for the full list), a scan
171
171
starts the analysis process.
172
172
The scan provides immediate inline feedback on detected security vulnerabilities for your application's dependencies.
173
173
Such dependencies are appropriately underlined in red, and hovering over it gives you a short summary of the security
@@ -301,14 +301,23 @@ When modifying the grammar or lexer files, you need to regenerate the parser cla
301
301
```text
302
302
requests==2.28.1 # trustify-da-ignore
303
303
```
304
-
If you want to ignore vulnerabilities for a dependency in a `build.gradle` file, you must add `trustify-da-ignore` as a
304
+
If you want to ignore vulnerabilities for a dependency in a `build.gradle`or `build.gradle.kts`file, you must add `trustify-da-ignore` as a
305
305
comment against the dependency in the manifest file.
If you want to ignore vulnerabilities for a dependency in a `Cargo.toml` file, you must add `trustify-da-ignore` as a comment
313
+
against the dependency in the manifest file.
314
+
For example:
315
+
```toml
316
+
[dependencies]
317
+
serde = "1.0"# trustify-da-ignore
318
+
tokio = { version = "1.0", features = ["full"] } # trustify-da-ignore
319
+
```
320
+
312
321
-**Excluding developmental or test dependencies**
313
322
<br >Red Hat Dependency Analytics does not analyze dependencies marked as `dev` or `test`, these dependencies are
314
323
ignored.
@@ -373,6 +382,49 @@ When modifying the grammar or lexer files, you need to regenerate the parser cla
373
382
Report** tab remains open.
374
383
Closing the tab removes the temporary HTML file.
375
384
385
+
## Rust/Cargo Component Analysis Limitations
386
+
387
+
The plugin provides vulnerability analysis for Rust projects using `Cargo.toml` manifest files. While stack analysis (full dependency report) works completely for all Cargo dependency formats, the component analysis feature (inline vulnerability detection) has some current limitations in version resolution and automatic fixes.
388
+
389
+
### Component Analysis Version Resolution
390
+
391
+
During inline component analysis, some dependency types cannot have their versions resolved directly from the manifest file and are marked as `UNRESOLVED_VERSION`. These dependencies will still appear in the full stack analysis report with correct version information.
392
+
393
+
Dependencies that result in unresolved versions in component analysis:
394
+
-**Workspace dependencies**: `workspace = true` (version inherited from workspace root)
395
+
-**Git dependencies**: `git = "https://github.com/user/repo"` (version resolved at build time)
396
+
-**Path dependencies**: `path = "../local"` (version from local Cargo.toml)
397
+
-**Registry dependencies without explicit version**: Dependencies that rely on registry resolution
398
+
399
+
Example:
400
+
```toml
401
+
[dependencies]
402
+
# These will show UNRESOLVED_VERSION in inline component analysis
The automatic version update feature (quick-fix suggestions) has varying support across different dependency declaration formats:
412
+
413
+
**Supported formats:**
414
+
- Simple string versions: `serde = "1.0"`
415
+
416
+
**Unsupported formats:**
417
+
- Complex inline tables: `tokio = { version = "1.0", features = ["full"] }`
418
+
- Complex inline tables without version field: `tokio = { features = ["full"] }`
419
+
- Standard table format:
420
+
```toml
421
+
[dependencies.cratename]
422
+
version = "1.0"
423
+
features = ["derive"]
424
+
```
425
+
426
+
For unsupported formats, vulnerability detection still works and the full stack analysis report will contain complete information and recommendations. Manual updates to the manifest file are required for these cases.
427
+
376
428
## Know more about the Red Hat Dependency Analytics platform
377
429
378
430
The goal of this project is to significantly enhance a developer's experience by providing helpful vulnerability
0 commit comments