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: add support for conan.lock file #2779

Merged
merged 21 commits into from Sep 6, 2022
Merged

feat: add support for conan.lock file #2779

merged 21 commits into from Sep 6, 2022

Conversation

DmitriyLewen
Copy link
Contributor

@DmitriyLewen DmitriyLewen commented Aug 25, 2022

Description

Add support for conan.lock file.
Currently only the default conan lock file name (canon.lock) is supported.

example:

➜ ./trivy -q fs conan.lock 

conan.lock (conanlock)

Total: 2 (UNKNOWN: 0, LOW: 0, MEDIUM: 1, HIGH: 1, CRITICAL: 0)

┌─────────┬───────────────┬──────────┬───────────────────┬───────────────┬─────────────────────────────────────────────────────────┐
│ Library │ Vulnerability │ Severity │ Installed Version │ Fixed Version │                          Title                          │
├─────────┼───────────────┼──────────┼───────────────────┼───────────────┼─────────────────────────────────────────────────────────┤
│ openssl │ CVE-2022-0778 │ HIGH     │ 1.1.1k            │ 1.1.1n, 3.0.2 │ openssl: Infinite loop in BN_mod_sqrt() reachable when  │
│         │               │          │                   │               │ parsing certificates                                    │
│         │               │          │                   │               │ https://avd.aquasec.com/nvd/cve-2022-0778               │
│         ├───────────────┼──────────┤                   ├───────────────┼─────────────────────────────────────────────────────────┤
│         │ CVE-2021-4160 │ MEDIUM   │                   │ 1.1.1m, 3.0.3 │ openssl: Carry propagation bug in the MIPS32 and MIPS64 │
│         │               │          │                   │               │ squaring procedure                                      │
│         │               │          │                   │               │ https://avd.aquasec.com/nvd/cve-2021-4160               │
└─────────┴───────────────┴──────────┴───────────────────┴───────────────┴─────────────────────────────────────────────────────────┘

Related issues

Related PRs

Checklist

  • I've read the guidelines for contributing to this repository.
  • I've followed the conventions in the PR title.
  • I've added tests that prove my fix is effective or that my feature works.
  • I've updated the documentation with the relevant information (if needed).
  • I've added usage information (if the PR introduces new options)
  • I've included a "before" and "after" example to the description (if the PR is a user interface change).

@DmitriyLewen DmitriyLewen changed the title feat(c): add support for conan.lock file feat: add support for conan.lock file Aug 25, 2022
@DmitriyLewen DmitriyLewen self-assigned this Aug 25, 2022
go.mod Outdated
Comment on lines 382 to 383

replace github.com/aquasecurity/go-dep-parser => github.com/aquasecurity/go-dep-parser v0.0.0-20220824112054-4bdc944fa0f9
Copy link
Contributor

Choose a reason for hiding this comment

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

why can we just update go-dep-parser? or it's for testing

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You are right. It is for testing.
So we can see, that Trivy works correctly with these changes.

I will remove replace and update go-dep-parser version after merge #128.
I will also change status to ready for review

@CLAassistant
Copy link

CLAassistant commented Sep 1, 2022

CLA assistant check
All committers have signed the CLA.

@knqyf263 knqyf263 marked this pull request as ready for review September 6, 2022 13:42
@knqyf263 knqyf263 self-requested a review as a code owner September 6, 2022 13:42
@afdesk
Copy link
Contributor

afdesk commented Sep 6, 2022

about conan I have only one concern about usecase when a package version is system, because i don't fully understand this moment.

@knqyf263
Copy link
Collaborator

knqyf263 commented Sep 6, 2022

about conan I have only one concern about usecase when a package version is system, because i don't fully understand this moment.

Me too. But we cannot detect vulnerabilities properly anyway if the version is system. Let's see how it goes.

@knqyf263 knqyf263 merged commit 4839075 into main Sep 6, 2022
@knqyf263 knqyf263 deleted the feat/glad-conan branch September 6, 2022 18:59
owenrumney pushed a commit that referenced this pull request Sep 7, 2022
Co-authored-by: knqyf263 <knqyf263@gmail.com>
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.

Add support for cpp/conan
4 participants