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

Declared license curations not being applied #9111

Open
bennati opened this issue Sep 9, 2024 · 0 comments
Open

Declared license curations not being applied #9111

bennati opened this issue Sep 9, 2024 · 0 comments
Labels
bug Issues that are considered to be bugs to triage Issues that need triaging

Comments

@bennati
Copy link
Contributor

bennati commented Sep 9, 2024

Declared license curations are correectly parsed into the resolved_configuration section of analyzer report, but the declared license is still represented as the original value and a rule violation is shown in the report (both webapp and html).

To reproduce:

  1. Configure ORT to use the curation from curations.yml.txt
  2. Configure ORT to use the rule below:
fun RuleSet.unmappedDeclaredLicenseRule() = packageRule("UNMAPPED_DECLARED_LICENSE") {
    pkg.metadata.declaredLicensesProcessed.unmapped.forEach { unmappedLicense ->
        error(
            "The declared license '$unmappedLicense' could not be mapped to a valid license or parsed as an SPDX " +
                    "expression. The license was found in package ${pkg.metadata.id.toCoordinates()}.",
            ""
        )
    }
}
  1. Scan the file requirements.txt
  2. Check in the analyzer-result.json that the curation is present in the resolved_configuration section
  3. Check that the rule UNMAPPED_DECLARED_LICENSE is triggered in the scan report.
@bennati bennati added bug Issues that are considered to be bugs to triage Issues that need triaging labels Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues that are considered to be bugs to triage Issues that need triaging
Projects
None yet
Development

No branches or pull requests

1 participant