Skip to content

Commit 8343ecd

Browse files
committed
Merge branch 'master' of github.com:sonatype-nexus-community/cargo-pants
2 parents be3a08a + 7e811e7 commit 8343ecd

File tree

1 file changed

+93
-3
lines changed

1 file changed

+93
-3
lines changed

README.md

+93-3
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,98 @@ limitations under the License.
2222
<a href="https://crates.io/crates/cargo-pants"><img src="https://img.shields.io/crates/v/cargo-pants.svg"></img></a>
2323
</p>
2424

25-
# cargo -pants
25+
# cargo pants
2626

27-
`cargo pants` is a Cargo subcommand that provides a bill of materials in a project, and any vulnerabilities that are found on those dependencies, powered by [Sonatype OSS Index](https://ossindex.sonatype.org/).
27+
`cargo-pants` is a Cargo subcommand that provides a bill of materials in a project, and any vulnerabilities that are found on those dependencies, powered by [Sonatype OSS Index](https://ossindex.sonatype.org/).
28+
29+
## Why pants?
30+
31+
Don't you check your pants for holes? Similarly, we think you should check your app's dependencies for vulnerabilities, and that's what `cargo-pants` does! As well, we provide a Bill Of Materials from parsing your `Cargo.lock` file, so you can see all the dependencies you are using.
32+
33+
## Requirements
34+
35+
`cargo-pants` was built with Rust 1.31, you should likely start there.
36+
37+
## Installation
38+
39+
`cargo-pants` is a Cargo subcommand, and can be installed using `cargo install`:
40+
41+
```
42+
$ cargo install cargo-pants
43+
```
44+
45+
Once you have installed `cargo-pants`, you can run it like so:
46+
47+
```
48+
$ cargo pants
49+
```
50+
51+
## Usage
52+
53+
`cargo pants` can be run in your builds context, or ran separately. Two command line flags are supported:
54+
55+
```
56+
$ cargo pants --lock_file /path/to/Cargo.lock
57+
```
58+
59+
This allows you to run `cargo pants` on a `Cargo.lock` file anywhere on your filesystem.
60+
61+
If this flag is not supplied, `cargo pants` will assume a local `Cargo.lock` file.
62+
63+
We will also inform you of our opinions of your pants style choice:
64+
65+
```
66+
$ cargo pants --pants_style JNCO
67+
```
68+
69+
We are very serious about pants.
70+
71+
If vulnerabilities are found, `cargo-pants` exits with status code 3, and prints the Bill Of Materials/Found Vulnerabilities. If there are no issues, it will exit with status code 0.
72+
73+
## CI Usage
74+
75+
Similar to `cargo audit` but with more pants, you can run `cargo pants` on your builds using this example config:
76+
77+
```
78+
language: rust
79+
before_script:
80+
- cargo install --force cargo-pants
81+
script:
82+
- cargo pants
83+
```
84+
85+
## Contributing
86+
87+
We care a lot about making the world a safer place, and that's why we created `cargo-pants`. If you as well want to
88+
speed up the pace of software development by working on this project, jump on in! Before you start work, create
89+
a new issue, or comment on an existing issue, to let others know you are!
90+
91+
## Acknowledgements
92+
93+
The code for `cargo-pants` was largely written by Glenn Mohre, and we want to give ultimate thanks, kudos, congratulations to Glenn for contributing this to the community. Open Source is awesome, and you help make it better!
94+
95+
The `cargo-pants` logo was grabbed from [www.pexels.com](https://www.pexels.com), specifically from [this image](https://www.pexels.com/photo/people-wearing-denim-jeans-1353361/).
96+
97+
Code for `cargo-pants` was influenced by `cargo-audit`, and we acknowledge we stand on the shoulders of giants.
98+
99+
## The Fine Print
100+
101+
It is worth noting that this is **NOT SUPPORTED** by Sonatype, and is a contribution of ours
102+
to the open source community (read: you!)
103+
104+
Remember:
105+
106+
* Use this contribution at the risk tolerance that you have
107+
* Do NOT file Sonatype support tickets related to `cargo-pants` support in regard to this project
108+
* DO file issues here on GitHub, so that the community can pitch in
109+
110+
Phew, that was easier than I thought. Last but not least of all:
111+
112+
Have fun creating and using `cargo-pants` and the [Sonatype OSS Index](https://ossindex.sonatype.org/), we are glad to have you here!
113+
114+
## Getting help
115+
116+
Looking to contribute to our code but need some help? There's a few ways to get information:
117+
118+
* Chat with us on [Gitter](https://gitter.im/sonatype/nexus-developers)
28119

29-
### TBD - Add usage

0 commit comments

Comments
 (0)