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
+25-4Lines changed: 25 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,7 +49,7 @@ let imageAnalysisWithArch = await client.imageAnalysis(['httpd:2.4.49^^amd64'])
49
49
The client automatically detects your project's license with intelligent fallback:
50
50
</p>
51
51
<ul>
52
-
<li><strong>Manifest-first:</strong> For ecosystems with license support (Maven, JavaScript), reads from manifest file (<code>pom.xml</code>, <code>package.json</code>)</li>
52
+
<li><strong>Manifest-first:</strong> For ecosystems with license support (Maven, JavaScript, Rust Cargo), reads from manifest file (<code>pom.xml</code>, <code>package.json</code>, <code>Cargo.toml</code>)</li>
53
53
<li><strong>LICENSE file fallback:</strong> If no license in manifest, or for ecosystems without license support (Gradle, Go, Python), automatically reads from <code>LICENSE</code>, <code>LICENSE.md</code>, or <code>LICENSE.txt</code></li>
54
54
<li><strong>SBOM integration:</strong> Detected licenses are included in generated SBOMs for all ecosystems</li>
55
55
<li><strong>SPDX support:</strong> Automatically detects common licenses (Apache-2.0, MIT, GPL, BSD) from LICENSE file content</li>
The client automatically detects your project's license with intelligent fallback:
204
205
</p>
205
206
<ul>
206
-
<li><strong>Manifest-first:</strong> For ecosystems with license support (Maven, JavaScript), reads from manifest file (<code>pom.xml</code>, <code>package.json</code>)</li>
207
+
<li><strong>Manifest-first:</strong> For ecosystems with license support (Maven, JavaScript, Rust Cargo), reads from manifest file (<code>pom.xml</code>, <code>package.json</code>, <code>Cargo.toml</code>)</li>
207
208
<li><strong>LICENSE file fallback:</strong> If no license in manifest, or for ecosystems without license support (Gradle, Go, Python), automatically reads from <code>LICENSE</code>, <code>LICENSE.md</code>, or <code>LICENSE.txt</code></li>
208
209
<li><strong>SBOM integration:</strong> Detected licenses are included in generated SBOMs for all ecosystems</li>
209
210
<li><strong>SPDX support:</strong> Automatically detects common licenses (Apache-2.0, MIT, GPL, BSD) from LICENSE file content</li>
@@ -334,7 +335,21 @@ test {
334
335
}
335
336
```
336
337
337
-
All of the 5 above examples are valid for marking a package to be ignored
338
+
<em>Rust Cargo</em> users can add a comment with <code># trustify-da-ignore</code> (or <code># exhortignore</code>) in <em>Cargo.toml</em> next to the dependency to be ignored. This works for inline declarations, table-based declarations, and workspace-level dependency sections:
339
+
340
+
```toml
341
+
[dependencies]
342
+
serde = "1.0"# trustify-da-ignore
343
+
tokio = { version = "1.35", features = ["full"] }
344
+
345
+
[dependencies.regex] # trustify-da-ignore
346
+
version = "1.10"
347
+
348
+
[workspace.dependencies]
349
+
log = "0.4"# trustify-da-ignore
350
+
```
351
+
352
+
All of the 6 above examples are valid for marking a package to be ignored
@@ -411,7 +427,7 @@ The proxy URL should be in the format: `http://host:port` or `https://host:port`
411
427
412
428
<h4>License resolution and dependency license compliance</h4>
413
429
<p>
414
-
The client can resolve the <strong>project license</strong> from the manifest (e.g. <code>package.json</code> <code>license</code>, <code>pom.xml</code> <code><licenses></code>) and from a <code>LICENSE</code> or <code>LICENSE.md</code> file in the project, and report when they differ. For <strong>component analysis</strong>, you can optionally run a license check: the client fetches dependency licenses from the backend (by purl) and reports dependencies whose licenses are incompatible with the project license. See <ahref="docs/license-resolution-and-compliance.md">License resolution and compliance</a> for design and behavior. To disable the check on component analysis, set <code>TRUSTIFY_DA_LICENSE_CHECK=false</code> or pass <code>licenseCheck: false</code> in the options.
430
+
The client can resolve the <strong>project license</strong> from the manifest (e.g. <code>package.json</code> <code>license</code>, <code>pom.xml</code> <code><licenses></code>, <code>Cargo.toml</code> <code>license</code>) and from a <code>LICENSE</code> or <code>LICENSE.md</code> file in the project, and report when they differ. For <strong>component analysis</strong>, you can optionally run a license check: the client fetches dependency licenses from the backend (by purl) and reports dependencies whose licenses are incompatible with the project license. See <ahref="docs/license-resolution-and-compliance.md">License resolution and compliance</a> for design and behavior. To disable the check on component analysis, set <code>TRUSTIFY_DA_LICENSE_CHECK=false</code> or pass <code>licenseCheck: false</code> in the options.
415
431
</p>
416
432
417
433
<h4>Customizing Executables</h4>
@@ -487,6 +503,11 @@ following keys for setting custom paths for the said executables.
Copy file name to clipboardExpand all lines: docs/license-resolution-and-compliance.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,14 +20,15 @@ The client looks for your project’s license with **automatic fallback**:
20
20
1.**Primary: Manifest file** — Reads the license field from:
21
21
-`package.json`: `license` field
22
22
-`pom.xml`: `<licenses><license><name>` element
23
+
-`Cargo.toml`: `license` field under `[package]` or `[workspace.package]`
23
24
-`build.gradle` / `build.gradle.kts`: No standard license field (falls back to LICENSE file)
24
25
-`go.mod`: No standard license field (falls back to LICENSE file)
25
26
-`requirements.txt`: No standard license field (falls back to LICENSE file)
26
27
27
28
2.**Fallback: LICENSE file** — If no license is found in the manifest, searches for `LICENSE`, `LICENSE.md`, or `LICENSE.txt` in the same directory as your manifest
28
29
29
30
**How the fallback works:**
30
-
-**Ecosystems with manifest license support** (Maven, JavaScript): Uses manifest license if present, otherwise falls back to LICENSE file
31
+
-**Ecosystems with manifest license support** (Maven, JavaScript, Rust Cargo): Uses manifest license if present, otherwise falls back to LICENSE file
31
32
-**Ecosystems without manifest license support** (Gradle, Go, Python): Automatically reads from LICENSE file
32
33
-**SPDX detection**: Common licenses (Apache-2.0, MIT, GPL-2.0/3.0, LGPL-2.1/3.0, AGPL-3.0, BSD-2-Clause/3-Clause) are automatically detected from LICENSE file content
33
34
@@ -167,5 +168,5 @@ Project license information is automatically included in generated SBOMs (Cyclon
167
168
**LICENSE file fallback in SBOMs:**
168
169
-**All ecosystems** now include license information in the SBOM when available
169
170
-**Gradle, Go, Python projects**: Even though these ecosystems don’t have manifest license fields, the SBOM will include the license from your LICENSE file
170
-
-**Maven, JavaScript projects**: The SBOM uses the manifest license, or falls back to LICENSE file if not specified in manifest
171
+
-**Maven, JavaScript, Rust Cargo projects**: The SBOM uses the manifest license, or falls back to LICENSE file if not specified in manifest
171
172
- If neither manifest nor LICENSE file contains a license, the SBOM root component will have no `licenses` field
0 commit comments