Skip to content

[BUG] Release 4.3.4 breaking change with SPDX expressions #792

@jtomkiew-mng

Description

@jtomkiew-mng

Describe the bug
Release 4.3.4 changes how license list is parsed and having SPDX expression like Apache-2.0 AND MIT now causes all license checks to fail. But also does not seem to work as intended (qustion mark?).

To Reproduce

  1. specify Apache-2.0 AND MIT expression in the allow-licenses input, like so:
allow-licenses: >-
  Apache-2.0,
  Apache-2.0 AND MIT,
  MIT
  1. have project with package using Apache-2.0 AND MIT license expression (like morelinq 4.2.0)
  2. (optional) have other packages using Apache-2.0 or MIT licenses
  3. run the action in versions 4.3.3 and 4.3.4

On version 4.3.3 it passes, on version 4.3.4 all packages fail with Incompatible License, and if Apache-2.0 AND MIT is removed from the list, only morelinq fails as incompatible.

Expected behavior
Apache-2.0 AND MIT should be able to pass.

Screenshots
v4.3.4 with Apache-2.0 AND MIT in allow-licenses input:
image

v4.3.4 without Apache-2.0 AND MIT:
image

v4.3.3 with Apache-2.0 AND MIT (no screenshot as it passes)

Action version
4.3.4

Examples
Project file:

<Project Sdk="Microsoft.NET.Sdk">

    <PropertyGroup>
        <TargetFramework>net8.0</TargetFramework>
        <ImplicitUsings>enable</ImplicitUsings>
        <Nullable>enable</Nullable>
        <IsPackable>false</IsPackable>
        <IsTestProject>true</IsTestProject>
    </PropertyGroup>

    <ItemGroup>
        <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0"/>
        <PackageReference Include="xunit" Version="2.5.3"/>
        <PackageReference Include="xunit.runner.visualstudio" Version="2.5.3"/>
        <PackageReference Include="morelinq" Version="4.2.0"/>
    </ItemGroup>

</Project>

Action:

- name: Dependency Review
  uses: actions/dependency-review-action@v4.3.4
  with:
    license-check: true
    allow-licenses: >-
      Apache-2.0,
      Apache-2.0 AND MIT,
      MIT

Additional context
None.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions