Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(rust): Add support for cargo-auditable binaries #119

Merged
merged 5 commits into from
Aug 7, 2022

Conversation

tofay
Copy link
Contributor

@tofay tofay commented Aug 5, 2022

Per aquasecurity/trivy#2664, https://github.com/rust-secure-code/cargo-auditable is a cargo subcommand to embed Rust crate dependency information into binaries for subsequent vulnerability checking.

This PR updates go-dep-parser so that it can read this dependency information, using https://github.com/microsoft/go-rustaudit - a module that extracts and parses the dependency information.

Signed-off-by: Tom Fay tomfay@microsoft.com

Detect binary information embedded via
https://github.com/rust-secure-code/cargo-auditable

Signed-off-by: Tom Fay <tomfay@microsoft.com>
@CLAassistant
Copy link

CLAassistant commented Aug 5, 2022

CLA assistant check
All committers have signed the CLA.

Signed-off-by: Tom Fay <tomfay@microsoft.com>
@tofay tofay force-pushed the cargo-auditable-support branch from 1d7a13c to 9cb41d3 Compare August 5, 2022 12:56
Signed-off-by: Tom Fay <tomfay@microsoft.com>
Copy link
Collaborator

@knqyf263 knqyf263 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! I left a small comment.

}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
f, err := os.Open(tt.inputFile)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like defer f.Close() is missing.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added here, and to the golang binary tests which I based these off

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

tofay and others added 2 commits August 7, 2022 13:15
@knqyf263 knqyf263 merged commit b5a21d2 into aquasecurity:main Aug 7, 2022
@knqyf263
Copy link
Collaborator

knqyf263 commented Aug 7, 2022

Thanks for your great contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants