Skip to content

Commit dc3ec42

Browse files
authored
Merge pull request #779 from CycloneDX/document-security-considerations
Document security considerations in the toplevel README
2 parents 0687b48 + e2eaada commit dc3ec42

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,15 @@ cargo install cargo-cyclonedx
4141
cargo cyclonedx
4242
```
4343

44+
## Security considerations
45+
46+
`cargo-cyclonedx` calls into Cargo internally to get information about a Rust project. Like nearly any other build system,
47+
Cargo [may run arbitrary code](https://shnatsel.medium.com/do-not-run-any-cargo-commands-on-untrusted-projects-4c31c89a78d6)
48+
when invoked on an untrusted project, so `cargo-cyclonedx` should not be called on untrusted projects either.
49+
50+
Some of the other tools for generating CycloneDX SBOMs do not invoke Cargo and only parse the `Cargo.lock` file.
51+
However, the only way to generate the `Cargo.lock` file for them to scan is to invoke Cargo, so this issue is currently unavoidable for any tool that describes a Cargo project.
52+
4453
## Contributing
4554

4655
Contributions are welcome.

0 commit comments

Comments
 (0)