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(vuln): remove duplicates in Fixed Version #5596

Merged
merged 2 commits into from
Dec 4, 2023
Merged

feat(vuln): remove duplicates in Fixed Version #5596

merged 2 commits into from
Dec 4, 2023

Conversation

ilpianista
Copy link
Contributor

@ilpianista ilpianista commented Nov 15, 2023

Description

Sometime, the Fixed Version column may contains the same versions repeatedly:

Python (python-pkg)
===================
Total: 2 (UNKNOWN: 0, LOW: 0, MEDIUM: 0, HIGH: 1, CRITICAL: 1)

┌───────────────────────┬────────────────┬──────────┬────────┬───────────────────┬──────────────────────────────────────────────┬──────────────────────────────────────────────────────────────┐
│        Library        │ Vulnerability  │ Severity │ Status │ Installed Version │                Fixed Version                 │                            Title                             │
├───────────────────────┼────────────────┼──────────┼────────┼───────────────────┼──────────────────────────────────────────────┼──────────────────────────────────────────────────────────────┤
│ Django (METADATA)     │ CVE-2023-31047 │ CRITICAL │ fixed  │ 4.0.10            │ 3.2.19, 4.1.9, 4.2.1                         │ Potential bypass of validation when uploading multiple files │
│                       │                │          │        │                   │                                              │ using one form field...                                      │
│                       │                │          │        │                   │                                              │ https://avd.aquasec.com/nvd/cve-2023-31047                   │
│                       ├────────────────┼──────────┤        │                   ├──────────────────────────────────────────────┼──────────────────────────────────────────────────────────────┤
│                       │ CVE-2023-36053 │ HIGH     │        │                   │ 3.2.20, 4.1.10, 4.2.3, 4.2.3, 4.1.10, 3.2.20 │ Potential regular expression denial of service vulnerability │
│                       │                │          │        │                   │                                              │ in EmailValidator/URLValidator                               │
│                       │                │          │        │                   │                                              │ https://avd.aquasec.com/nvd/cve-2023-36053                   │
└───────────────────────┴────────────────┴──────────┴────────┴───────────────────┴──────────────────────────────────────────────┴──────────────────────────────────────────────────────────────┘

AFTER:

┌───────────────────────┬────────────────┬──────────┬────────┬───────────────────┬───────────────────────┬──────────────────────────────────────────────────────────────┐
│        Library        │ Vulnerability  │ Severity │ Status │ Installed Version │     Fixed Version     │                            Title                             │
│                       ├────────────────┼──────────┼────────┼───────────────────┼───────────────────────┼──────────────────────────────────────────────────────────────┤
│ Django (METADATA)     │ CVE-2023-31047 │ CRITICAL │ fixed  │ 4.0.10            │ 3.2.19, 4.1.9, 4.2.1  │ Potential bypass of validation when uploading multiple files │
│                       │                │          │        │                   │                       │ using one form field...                                      │
│                       │                │          │        │                   │                       │ https://avd.aquasec.com/nvd/cve-2023-31047                   │
│                       ├────────────────┼──────────┤        │                   ├───────────────────────┼──────────────────────────────────────────────────────────────┤
│                       │ CVE-2023-36053 │ HIGH     │        │                   │ 3.2.20, 4.1.10, 4.2.3 │ Potential regular expression denial of service vulnerability │
│                       │                │          │        │                   │                       │ in EmailValidator/URLValidator                               │
│                       │                │          │        │                   │                       │ https://avd.aquasec.com/nvd/cve-2023-36053                   │
└───────────────────────┴────────────────┴──────────┴────────┴───────────────────┴───────────────────────┴──────────────────────────────────────────────────────────────┘

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).

@ilpianista ilpianista changed the title Remove duplicates in Fixed Version feat(vuln): remove duplicates in Fixed Version Nov 15, 2023
@ilpianista
Copy link
Contributor Author

@knqyf263 any chance you have time to review this? 🙏

@knqyf263
Copy link
Collaborator

Could you fix tests first?

@ilpianista
Copy link
Contributor Author

Could you fix tests first?

Done, sorry, I didn't realize that.

@DmitriyLewen
Copy link
Contributor

DmitriyLewen commented Nov 30, 2023

Hm... this is strange case.
GitHub contains 2 same packages for CVE-2023-36053 (Django and django (lower and upper case for 1st character))

@ilpianista do you know reason for this?

Copy link
Contributor

@DmitriyLewen DmitriyLewen left a comment

Choose a reason for hiding this comment

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

Hello @ilpianista
Thanks for your work!

I left 1 comment.

Can you also add a small test case to driver_test.go to make sure your changes work.

pkg/detector/library/driver.go Outdated Show resolved Hide resolved
Copy link
Contributor

@DmitriyLewen DmitriyLewen left a comment

Choose a reason for hiding this comment

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

LGTM
@knqyf263 take a look, when you have time, please

Signed-off-by: knqyf263 <knqyf263@gmail.com>
@knqyf263 knqyf263 added this pull request to the merge queue Dec 4, 2023
Merged via the queue into aquasecurity:main with commit a54d1e9 Dec 4, 2023
12 checks passed
@ilpianista ilpianista deleted the feature/no-duplicated-fixed-version branch December 4, 2023 19:43
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.

None yet

3 participants