diff --git a/.ci/allowedLicenses.json b/.ci/allowedLicenses.json new file mode 100644 index 0000000000..718ecd4c22 --- /dev/null +++ b/.ci/allowedLicenses.json @@ -0,0 +1,56 @@ +[ + "AFL-2.1", + "AFLv2.1", + "AFL-3.0", + "AFLv3.0", + "APSL-2.0", + "Apache-1.1", + "Apache-2.0", + "Apache 2.0", + "Artistic-1.0", + "Artistic-2.0", + "BlueOak-1.0.0", + "BSD", + "BSD-2-Clause", + "BSD-3-Clause", + "BSL-1.0", + "CC-BY-1.0", + "CC-BY-2.0", + "CC-BY-2.5", + "CC-BY-3.0", + "CC-BY-4.0", + "CC0-1.0", + "CDDL-1.0", + "CDDL-1.1", + "CPL-1.0", + "EPL-1.0", + "FTL", + "IPL-1.0", + "ISC", + "LGPL-2.0", + "LGPL-2.1", + "LGPL-3.0", + "LPL-1.02", + "MIT", + "MIT*", + "MPL-1.0", + "MPL-1.1", + "MPL-2.0", + "MS-PL", + "NCSA", + "OpenSSL", + "PHP-3.0", + "Ruby", + "Unlicense", + "W3C", + "Xnet", + "ZPL-2.0", + "Zend-2.0", + "Zlib", + "libtiff", + "Public Domain", + "0BSD", + "WTFPL", + "Python-2.0", + "PostgreSQL" +] diff --git a/.ci/ignoredPackages.json b/.ci/ignoredPackages.json new file mode 100644 index 0000000000..cbd7f13ad0 --- /dev/null +++ b/.ci/ignoredPackages.json @@ -0,0 +1,7 @@ +[ + "Microsoft.AspNet.WebApi.Client", + "Microsoft.AspNetCore.Http.Abstractions", + "MockQueryable.FakeItEasy", + "Serilog.Enrichers.Demystifier", + "SpecFlow.NUnit" +] diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b19854e066..486b59639f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -341,3 +341,24 @@ jobs: run: ./.ci/helm/buildChart.js env: VERSION: 0.0.0 + + validate-licenses: + name: Validate Open Source Licenses + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup Dotnet + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 8.x + - name: Install nuget-licenses tool + run: dotnet tool install --global nuget-license + - name: Show Allowed Licenses + run: cat ./.ci/allowedLicenses.json + - name: Show Ignored Packages + run: cat ./.ci/ignoredPackages.json + - name: Restore Solution + run: dotnet restore ./Backbone.sln + - name: Validate Licenses + run: nuget-license --input ./Backbone.sln --allowed-license-types ./.ci/allowedLicenses.json --ignored-packages ./.ci/ignoredPackages.json --output table --error-only