EmbarkStudios / cargo-deny

❌ Cargo plugin for linting your dependencies 🦀
http://embark.rs
Apache License 2.0
1.62k stars 80 forks source link

Bug: cargo-deny misrecognizes Apache-2.0 without appendix as Pixar license #625

Closed itegulov closed 4 months ago

itegulov commented 4 months ago

Describe the bug

It seems like after https://github.com/EmbarkStudios/cargo-deny/pull/617 cargo-deny started reporting Apache-2.0 without appendix as Pixar. 0.14.13 and below are unaffected.

To reproduce

  1. git clone https://github.com/itegulov/cargo-deny-issue
  2. cargo install cargo-deny@0.14.15
  3. cargo deny check and observe:
    
    2024-03-06 03:43:54 [WARN] unable to find a config path, falling back to default config
    error[rejected]: failed to satisfy license requirements
    ┌─ cargo-deny-issue 0.1.0 (path+file:///Users/itegulov/Work/cargo-deny-issue):5:15
    │
    4 │ license = ""
    │            - license expression was not specified
    5 │ files-expr = "Pixar"
    │               ^^^^^
    │               │
    │               license expression retrieved via LICENSE-APACHE
    │               rejected: license was not explicitly allowed
    │
    = cargo-deny-issue v0.1.0

advisories ok, bans ok, licenses FAILED, sources ok



### cargo-deny version

Starting from 0.14.14

### What OS were you running cargo-deny on?

MacOS

### Additional context

_No response_
Jake-Shadle commented 4 months ago

License detection is not exact, the Pixar license was added in the 3.23 version and is almost identical to the Apache-2.0 license text, so I guess I'll have to add an exception for this particular license since I assume this will be a common error.