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

fix(license): using common way for splitting licenses #4434

Merged
merged 6 commits into from
Jul 19, 2023

Conversation

afdesk
Copy link
Contributor

@afdesk afdesk commented May 18, 2023

Description

The command for tests:

$ trivy -d i 2020ksdocker/ks-repository:ForInvestigation --scanners license --license-full

Before:

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

┌─────────────┬────────────────────────────────────────┬────────────────┬──────────┐
│   Package   │                License                 │ Classification │ Severity │
├─────────────┼────────────────────────────────────────┼────────────────┼──────────┤
│ pip         │ MIT                                    │ Notice         │ LOW      │
├─────────────┼────────────────────────────────────────┼────────────────┼──────────┤
│ uritemplate │ BSD 3-Clause License or Apache License │ Non Standard   │ UNKNOWN  │
│             ├────────────────────────────────────────┤                │          │
│             │ Version 2.0                            │                │          │
├─────────────┼────────────────────────────────────────┼────────────────┼──────────┤
│ click       │ BSD-3-Clause                           │ Notice         │ LOW      │
└─────────────┴────────────────────────────────────────┴────────────────┴──────────┘

after:

Python (license)

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

┌─────────────┬─────────────────────────────┬────────────────┬──────────┐
│   Package   │           License           │ Classification │ Severity │
├─────────────┼─────────────────────────────┼────────────────┼──────────┤
│ uritemplate │ BSD 3-Clause License        │ Non Standard   │ UNKNOWN  │
│             ├─────────────────────────────┤                │          │
│             │ Apache License, Version 2.0 │                │          │
├─────────────┼─────────────────────────────┼────────────────┼──────────┤
│ click       │ BSD-3-Clause                │ Notice         │ LOW      │
├─────────────┼─────────────────────────────┤                │          │
│ pip         │ MIT                         │                │          │
└─────────────┴─────────────────────────────┴────────────────┴──────────┘

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

@nikpivkin
Copy link
Contributor

after:

Python (license)

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

┌─────────────┬─────────────────────────────┬────────────────┬──────────┐
│   Package   │           License           │ Classification │ Severity │
├─────────────┼─────────────────────────────┼────────────────┼──────────┤
│ uritemplate │ BSD 3-Clause License        │ Non Standard   │ UNKNOWN  │
│             ├─────────────────────────────┤                │          │
│             │ Apache License, Version 2.0 │                │          │
├─────────────┼─────────────────────────────┼────────────────┼──────────┤
│ click       │ BSD-3-Clause                │ Notice         │ LOW      │
├─────────────┼─────────────────────────────┤                │          │
│ pip         │ MIT                         │                │          │
└─────────────┴─────────────────────────────┴────────────────┴──────────┘

@itaysk
Copy link
Contributor

itaysk commented Jun 27, 2023

@afdesk is there an issue?

@afdesk
Copy link
Contributor Author

afdesk commented Jun 27, 2023

@afdesk is there an issue?

there is no issue yet. but there is a discussion #4261 (comment), that brings two questions. This PR should fix one of them.

@afdesk afdesk marked this pull request as ready for review June 27, 2023 07:48
@afdesk afdesk requested a review from knqyf263 as a code owner June 27, 2023 07:48
@itaysk
Copy link
Contributor

itaysk commented Jul 2, 2023

if a discussion leads to work, we need to create an issue to track that work item, and the pr needs to refer to the issue. otherwise we just replaced issues with discussions

@knqyf263
Copy link
Collaborator

knqyf263 commented Jul 2, 2023

@nikpivkin Can you please sort out the problem and open an issue?

@nikpivkin
Copy link
Contributor

@afdesk I created an issue, can you update the description?

@afdesk
Copy link
Contributor Author

afdesk commented Jul 10, 2023

@afdesk I created an issue, can you update the description?

done

@knqyf263 knqyf263 added this pull request to the merge queue Jul 19, 2023
Merged via the queue into aquasecurity:main with commit 9399604 Jul 19, 2023
AnaisUrlichs pushed a commit to AnaisUrlichs/trivy that referenced this pull request Aug 10, 2023
)

* fix(license): using common way for splitting licenses

* add test cases

* TEST new regex

* extract function

* fix version detection

---------

Co-authored-by: Nikita Pivkin <nikita.pivkin@smartforce.io>
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.

fix(license): fix splitting licenses
4 participants