From f9d234fafe7420176ea9ddb0f5ebc88462a6abfa Mon Sep 17 00:00:00 2001 From: Erisu Date: Tue, 12 Mar 2024 23:29:31 +0900 Subject: [PATCH] ci(gh-action): add Apache RAT & package license checker workflow w/ license header additions --- .github/workflows/release-audit.yml | 45 ++++++++++++++ .ratignore | 13 ++-- .../CordovaLib.xcodeproj/project.pbxproj | 18 ++++++ .../contents.xcworkspacedata | 18 ++++++ .../xcshareddata/xcschemes/Cordova.xcscheme | 18 ++++++ CordovaLib/Info.plist | 18 ++++++ CordovaLib/PrivacyInfo.xcprivacy | 18 ++++++ licence_checker.yml | 60 +++++++++++++++++++ .../project.pbxproj | 18 ++++++ .../contents.xcworkspacedata | 18 ++++++ .../contents.xcworkspacedata | 18 ++++++ .../xcschemes/__PROJECT_NAME__.xcscheme | 18 ++++++ .../__PROJECT_NAME__/PrivacyInfo.xcprivacy | 18 ++++++ .../__PROJECT_NAME__-Info.plist | 18 ++++++ .../CordovaLibApp/CordovaLibApp-Info.plist | 18 ++++++ .../CordovaLibTests.xcodeproj/project.pbxproj | 18 ++++++ .../contents.xcworkspacedata | 18 ++++++ .../xcshareddata/cordova-ios.xccheckout | 18 ++++++ .../xcschemes/CordovaFrameworkApp.xcscheme | 18 ++++++ .../xcschemes/CordovaLib.xcscheme | 18 ++++++ .../xcschemes/CordovaLibApp.xcscheme | 18 ++++++ .../xcschemes/CordovaLibTests.xcscheme | 18 ++++++ 22 files changed, 455 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/release-audit.yml create mode 100644 licence_checker.yml diff --git a/.github/workflows/release-audit.yml b/.github/workflows/release-audit.yml new file mode 100644 index 000000000..830909440 --- /dev/null +++ b/.github/workflows/release-audit.yml @@ -0,0 +1,45 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +name: Release Auditing + +on: [push, pull_request] + +jobs: + test: + name: Audit Licenses + runs-on: ubuntu-latest + steps: + # Checkout project + - uses: actions/checkout@v4 + + # Check license headers + - uses: erisu/apache-rat-action@555ae80334a535eb6c1f8920b121563a5a985a75 + + # Setup environment with node + - uses: actions/setup-node@v4 + with: + node-version: 20 + + # Install node packages + - name: npm install packages + run: npm i + + # Check node package licenses + - uses: erisu/license-checker-action@e929758f9416f30234ac454fc9054ca4b803871d + with: + license-config: 'licence_checker.yml' diff --git a/.ratignore b/.ratignore index 95aa72f0b..841e3a8d7 100644 --- a/.ratignore +++ b/.ratignore @@ -1,3 +1,6 @@ +# Ignore dot files +\.(.*) + # yes, not .gitignore gitignore @@ -5,10 +8,10 @@ gitignore NSData+Base64.h NSData+Base64.m -Contents.json -jasmine.json -fixtures -i386 - # Xcode Auto Generated Files IDEWorkspaceChecks.plist + +# Testing Figures +fixtures + +node_modules diff --git a/CordovaLib/CordovaLib.xcodeproj/project.pbxproj b/CordovaLib/CordovaLib.xcodeproj/project.pbxproj index d6ceb49fb..1f934fb9d 100644 --- a/CordovaLib/CordovaLib.xcodeproj/project.pbxproj +++ b/CordovaLib/CordovaLib.xcodeproj/project.pbxproj @@ -1,4 +1,22 @@ // !$*UTF8*$! +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ { archiveVersion = 1; classes = { diff --git a/CordovaLib/CordovaLib.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/CordovaLib/CordovaLib.xcodeproj/project.xcworkspace/contents.xcworkspacedata index 028f7fe65..38402560b 100644 --- a/CordovaLib/CordovaLib.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ b/CordovaLib/CordovaLib.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -1,4 +1,22 @@ + + diff --git a/CordovaLib/Info.plist b/CordovaLib/Info.plist index 3c0bd0d3a..9d41ed244 100644 --- a/CordovaLib/Info.plist +++ b/CordovaLib/Info.plist @@ -1,4 +1,22 @@ + diff --git a/CordovaLib/PrivacyInfo.xcprivacy b/CordovaLib/PrivacyInfo.xcprivacy index 2f893d89a..4b2e70fdd 100644 --- a/CordovaLib/PrivacyInfo.xcprivacy +++ b/CordovaLib/PrivacyInfo.xcprivacy @@ -1,4 +1,22 @@ + diff --git a/licence_checker.yml b/licence_checker.yml new file mode 100644 index 000000000..50818a509 --- /dev/null +++ b/licence_checker.yml @@ -0,0 +1,60 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +# Compiled list of allowed 3RD PARTY LICENSES from: +# +# ASF CATEGORY A: WHAT CAN WE INCLUDE IN AN ASF PROJECT +# https://www.apache.org/legal/resolved.html#category-a +# +# Licenses converted into the SPDX standardized short identifier format. +# https://spdx.org/licenses/ +allowed-licenses: + - 0BSD + - AFL-3.0 + - Apache-1.1 + - Apache-2.0 + - APAFML + - BlueOak-1.0.0 + - BSD-2-Clause + - BSD-3-Clause + - BSD-3-Clause-LBNL + - BSL-1.0 + - CC-PDDC + - CC0-1.0 + - EPICS + - HPND + - ICU + - ISC + - MIT + - MIT-0 + - MS-PL + - MulanPSL-2.0 + - NCSA + - OGL-UK-3.0 + - PHP-3.01 + - PostgreSQL + - PSF-2.0 + - SMLNJ + - Unicode-DFS-2016 + - Unlicense + - UPL-1.0 + - W3C + - WTFPL + - X11 + - Xnet + - Zlib + - ZPL-2.0 diff --git a/templates/project/__PROJECT_NAME__.xcodeproj/project.pbxproj b/templates/project/__PROJECT_NAME__.xcodeproj/project.pbxproj index 1b6273262..b703cacfc 100755 --- a/templates/project/__PROJECT_NAME__.xcodeproj/project.pbxproj +++ b/templates/project/__PROJECT_NAME__.xcodeproj/project.pbxproj @@ -1,4 +1,22 @@ // !$*UTF8*$! +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ { archiveVersion = 1; classes = { diff --git a/templates/project/__PROJECT_NAME__.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/templates/project/__PROJECT_NAME__.xcodeproj/project.xcworkspace/contents.xcworkspacedata index 919434a62..21fc716e2 100644 --- a/templates/project/__PROJECT_NAME__.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ b/templates/project/__PROJECT_NAME__.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -1,4 +1,22 @@ + + + diff --git a/templates/project/__PROJECT_NAME__/PrivacyInfo.xcprivacy b/templates/project/__PROJECT_NAME__/PrivacyInfo.xcprivacy index 2f893d89a..4b2e70fdd 100644 --- a/templates/project/__PROJECT_NAME__/PrivacyInfo.xcprivacy +++ b/templates/project/__PROJECT_NAME__/PrivacyInfo.xcprivacy @@ -1,4 +1,22 @@ + diff --git a/templates/project/__PROJECT_NAME__/__PROJECT_NAME__-Info.plist b/templates/project/__PROJECT_NAME__/__PROJECT_NAME__-Info.plist index 8d52020d6..2f7101b6a 100644 --- a/templates/project/__PROJECT_NAME__/__PROJECT_NAME__-Info.plist +++ b/templates/project/__PROJECT_NAME__/__PROJECT_NAME__-Info.plist @@ -1,4 +1,22 @@ + diff --git a/tests/CordovaLibTests/CordovaLibApp/CordovaLibApp-Info.plist b/tests/CordovaLibTests/CordovaLibApp/CordovaLibApp-Info.plist index 6a012bd36..19fce15a5 100644 --- a/tests/CordovaLibTests/CordovaLibApp/CordovaLibApp-Info.plist +++ b/tests/CordovaLibTests/CordovaLibApp/CordovaLibApp-Info.plist @@ -1,4 +1,22 @@ + diff --git a/tests/CordovaLibTests/CordovaLibTests.xcodeproj/project.pbxproj b/tests/CordovaLibTests/CordovaLibTests.xcodeproj/project.pbxproj index 5e014bdc5..c67c0f5a0 100644 --- a/tests/CordovaLibTests/CordovaLibTests.xcodeproj/project.pbxproj +++ b/tests/CordovaLibTests/CordovaLibTests.xcodeproj/project.pbxproj @@ -1,4 +1,22 @@ // !$*UTF8*$! +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ { archiveVersion = 1; classes = { diff --git a/tests/cordova-ios.xcworkspace/contents.xcworkspacedata b/tests/cordova-ios.xcworkspace/contents.xcworkspacedata index 369ca4011..75ac22f2e 100644 --- a/tests/cordova-ios.xcworkspace/contents.xcworkspacedata +++ b/tests/cordova-ios.xcworkspace/contents.xcworkspacedata @@ -1,4 +1,22 @@ + + diff --git a/tests/cordova-ios.xcworkspace/xcshareddata/xcschemes/CordovaFrameworkApp.xcscheme b/tests/cordova-ios.xcworkspace/xcshareddata/xcschemes/CordovaFrameworkApp.xcscheme index 990a1f2f1..2865727a8 100644 --- a/tests/cordova-ios.xcworkspace/xcshareddata/xcschemes/CordovaFrameworkApp.xcscheme +++ b/tests/cordova-ios.xcworkspace/xcshareddata/xcschemes/CordovaFrameworkApp.xcscheme @@ -1,4 +1,22 @@ + diff --git a/tests/cordova-ios.xcworkspace/xcshareddata/xcschemes/CordovaLib.xcscheme b/tests/cordova-ios.xcworkspace/xcshareddata/xcschemes/CordovaLib.xcscheme index 98aab17ce..7e866a1c7 100644 --- a/tests/cordova-ios.xcworkspace/xcshareddata/xcschemes/CordovaLib.xcscheme +++ b/tests/cordova-ios.xcworkspace/xcshareddata/xcschemes/CordovaLib.xcscheme @@ -1,4 +1,22 @@ + diff --git a/tests/cordova-ios.xcworkspace/xcshareddata/xcschemes/CordovaLibApp.xcscheme b/tests/cordova-ios.xcworkspace/xcshareddata/xcschemes/CordovaLibApp.xcscheme index 75fb1233a..1f955e099 100644 --- a/tests/cordova-ios.xcworkspace/xcshareddata/xcschemes/CordovaLibApp.xcscheme +++ b/tests/cordova-ios.xcworkspace/xcshareddata/xcschemes/CordovaLibApp.xcscheme @@ -1,4 +1,22 @@ + diff --git a/tests/cordova-ios.xcworkspace/xcshareddata/xcschemes/CordovaLibTests.xcscheme b/tests/cordova-ios.xcworkspace/xcshareddata/xcschemes/CordovaLibTests.xcscheme index dcbe4a90b..e94f26140 100644 --- a/tests/cordova-ios.xcworkspace/xcshareddata/xcschemes/CordovaLibTests.xcscheme +++ b/tests/cordova-ios.xcworkspace/xcshareddata/xcschemes/CordovaLibTests.xcscheme @@ -1,4 +1,22 @@ +