Copilot commented on code in PR #2299: URL: https://github.com/apache/nifi-minifi-cpp/pull/2299#discussion_r4515006073
########## .rat-excludes: ########## @@ -0,0 +1,48 @@ +# 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. + +**/*.patch +**/__init__.py +**/*.asc Review Comment: Apache RAT exclude files are commonly interpreted as regular expressions (depending on how RAT is invoked). The patterns `**/*.patch` and `**/__init__.py` are not valid regex and can either fail parsing or not exclude anything, making the RAT check unreliable. Prefer using RAT-compatible regex patterns (e.g., `.*\\.patch$`, `.*/__init__\\.py$`) and consider escaping dots in literal filenames to avoid accidental matches. ########## .github/workflows/ci.yml: ########## @@ -722,8 +724,15 @@ jobs: run: cargo clippy --workspace --all-targets -- -D warnings working-directory: minifi_rust + - id: apache_rat_check + name: Apache RAT check + continue-on-error: true + run: | + make rat Review Comment: Using `make rat` ties the workflow to the Makefiles generator. To make this step generator-agnostic (e.g., Ninja), invoke the build via CMake (e.g., building the `rat` target through the configured generator) from the build directory. ########## .github/workflows/ci.yml: ########## @@ -688,10 +688,12 @@ jobs: uses: actions/checkout@v6 - id: install_deps - run: pipx install ruff + run: | + pipx install ruff && \ + wget https://archive.apache.org/dist/creadur/apache-rat-0.18/apache-rat-0.18-bin.tar.gz -O ~/apache-rat-0.18-bin.tar.gz && tar -xzf ~/apache-rat-0.18-bin.tar.gz -C ~/ Review Comment: The workflow downloads and executes tooling (Apache RAT) without any integrity verification. To reduce supply-chain risk, verify the artifact (e.g., pinned SHA-512) and/or verify the Apache signature before extracting and using the jar. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
