github-advanced-security[bot] commented on code in PR #5347: URL: https://github.com/apache/calcite/pull/5347#discussion_r4327633531
########## .github/workflows/pr-ci.yml: ########## @@ -0,0 +1,96 @@ +# 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: PR CI + +on: + pull_request_target: + types: [opened, edited, synchronize, reopened, labeled, unlabeled, ready_for_review] + workflow_run: + workflows: ['**', '!PR CI'] + types: [requested, in_progress, completed] + check_run: + types: [created, rerequested, completed] + status: + workflow_dispatch: + inputs: + pull_number: + description: 'PR number to refresh (leave empty to refresh all open PRs)' + required: false + type: string + +permissions: + actions: read + checks: read + contents: read + pull-requests: read + statuses: read + +jobs: + find-pulls: + name: Find PRs for merge gate + runs-on: ubuntu-latest + timeout-minutes: 5 + outputs: + pulls: ${{ steps.find.outputs.pulls }} + steps: + # Always load trusted code, including for manual dispatches to another ref. + - uses: actions/checkout@v7 + with: + ref: ${{ github.event.repository.default_branch }} + persist-credentials: false + - uses: actions/github-script@v8 + id: find + with: + retries: 3 + script: | + const gate = require('./.github/scripts/pr-ci.cjs'); + const pulls = await gate.findPullRequests({ github, context }); + core.setOutput('pulls', JSON.stringify(pulls)); + + update: + name: Update PR merge gate + needs: find-pulls + if: needs.find-pulls.outputs.pulls != '[]' + strategy: + fail-fast: false + matrix: + pull: ${{ fromJSON(needs.find-pulls.outputs.pulls) }} + runs-on: ubuntu-latest + timeout-minutes: 5 + permissions: + actions: read + checks: read + contents: read + pull-requests: read + statuses: write + concurrency: + # Serialize updates for each PR; a queued update always reads the current state. + group: pr-merge-gate-${{ github.repository }}-${{ matrix.pull }} + cancel-in-progress: false + steps: + # Never execute PR code, download artifacts, or restore caches with this token. + - uses: actions/checkout@v7 Review Comment: ## SonarCloud / Forked repository code should not be checked out in privileged workflow contexts <!--SONAR_ISSUE_KEY:AaFaMyZ0rD-IvDRUFWGI-->Make sure that no untrusted code is executed from a fork. <p>See more on <a href="https://sonarcloud.io/project/issues?id=apache_calcite&issues=AaFaMyZ0rD-IvDRUFWGI&open=AaFaMyZ0rD-IvDRUFWGI&pullRequest=5347">SonarQube Cloud</a></p> [Show more details](https://github.com/apache/calcite/security/code-scanning/184) ########## .github/workflows/pr-ci.yml: ########## @@ -0,0 +1,96 @@ +# 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: PR CI + +on: + pull_request_target: + types: [opened, edited, synchronize, reopened, labeled, unlabeled, ready_for_review] + workflow_run: + workflows: ['**', '!PR CI'] + types: [requested, in_progress, completed] + check_run: + types: [created, rerequested, completed] + status: + workflow_dispatch: + inputs: + pull_number: + description: 'PR number to refresh (leave empty to refresh all open PRs)' + required: false + type: string + +permissions: + actions: read + checks: read Review Comment: ## SonarCloud / Read permissions should be defined at the job level <!--SONAR_ISSUE_KEY:AaFaMyZ0rD-IvDRUFWGE-->Move this read permission from workflow level to job level. <p>See more on <a href="https://sonarcloud.io/project/issues?id=apache_calcite&issues=AaFaMyZ0rD-IvDRUFWGE&open=AaFaMyZ0rD-IvDRUFWGE&pullRequest=5347">SonarQube Cloud</a></p> [Show more details](https://github.com/apache/calcite/security/code-scanning/180) ########## .github/workflows/pr-ci.yml: ########## @@ -0,0 +1,96 @@ +# 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: PR CI + +on: + pull_request_target: + types: [opened, edited, synchronize, reopened, labeled, unlabeled, ready_for_review] + workflow_run: + workflows: ['**', '!PR CI'] + types: [requested, in_progress, completed] + check_run: + types: [created, rerequested, completed] + status: + workflow_dispatch: + inputs: + pull_number: + description: 'PR number to refresh (leave empty to refresh all open PRs)' + required: false + type: string + +permissions: + actions: read Review Comment: ## SonarCloud / Read permissions should be defined at the job level <!--SONAR_ISSUE_KEY:AaFaMyZ0rD-IvDRUFWGD-->Move this read permission from workflow level to job level. <p>See more on <a href="https://sonarcloud.io/project/issues?id=apache_calcite&issues=AaFaMyZ0rD-IvDRUFWGD&open=AaFaMyZ0rD-IvDRUFWGD&pullRequest=5347">SonarQube Cloud</a></p> [Show more details](https://github.com/apache/calcite/security/code-scanning/179) ########## .github/workflows/pr-ci.yml: ########## @@ -0,0 +1,96 @@ +# 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: PR CI + +on: + pull_request_target: + types: [opened, edited, synchronize, reopened, labeled, unlabeled, ready_for_review] + workflow_run: + workflows: ['**', '!PR CI'] + types: [requested, in_progress, completed] + check_run: + types: [created, rerequested, completed] + status: + workflow_dispatch: + inputs: + pull_number: + description: 'PR number to refresh (leave empty to refresh all open PRs)' + required: false + type: string + +permissions: + actions: read + checks: read + contents: read + pull-requests: read + statuses: read Review Comment: ## SonarCloud / Read permissions should be defined at the job level <!--SONAR_ISSUE_KEY:AaFaMyZ0rD-IvDRUFWGG-->Move this read permission from workflow level to job level. <p>See more on <a href="https://sonarcloud.io/project/issues?id=apache_calcite&issues=AaFaMyZ0rD-IvDRUFWGG&open=AaFaMyZ0rD-IvDRUFWGG&pullRequest=5347">SonarQube Cloud</a></p> [Show more details](https://github.com/apache/calcite/security/code-scanning/182) ########## .github/workflows/pr-ci.yml: ########## @@ -0,0 +1,96 @@ +# 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: PR CI + +on: + pull_request_target: + types: [opened, edited, synchronize, reopened, labeled, unlabeled, ready_for_review] + workflow_run: + workflows: ['**', '!PR CI'] + types: [requested, in_progress, completed] + check_run: + types: [created, rerequested, completed] + status: + workflow_dispatch: + inputs: + pull_number: + description: 'PR number to refresh (leave empty to refresh all open PRs)' + required: false + type: string + +permissions: + actions: read + checks: read + contents: read + pull-requests: read + statuses: read + +jobs: + find-pulls: + name: Find PRs for merge gate + runs-on: ubuntu-latest + timeout-minutes: 5 + outputs: + pulls: ${{ steps.find.outputs.pulls }} + steps: + # Always load trusted code, including for manual dispatches to another ref. + - uses: actions/checkout@v7 Review Comment: ## SonarCloud / Forked repository code should not be checked out in privileged workflow contexts <!--SONAR_ISSUE_KEY:AaFaMyZ0rD-IvDRUFWGH-->Make sure that no untrusted code is executed from a fork. <p>See more on <a href="https://sonarcloud.io/project/issues?id=apache_calcite&issues=AaFaMyZ0rD-IvDRUFWGH&open=AaFaMyZ0rD-IvDRUFWGH&pullRequest=5347">SonarQube Cloud</a></p> [Show more details](https://github.com/apache/calcite/security/code-scanning/183) ########## .github/workflows/pr-ci.yml: ########## @@ -0,0 +1,96 @@ +# 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: PR CI + +on: + pull_request_target: + types: [opened, edited, synchronize, reopened, labeled, unlabeled, ready_for_review] + workflow_run: + workflows: ['**', '!PR CI'] + types: [requested, in_progress, completed] + check_run: + types: [created, rerequested, completed] + status: + workflow_dispatch: + inputs: + pull_number: + description: 'PR number to refresh (leave empty to refresh all open PRs)' + required: false + type: string + +permissions: + actions: read + checks: read + contents: read + pull-requests: read Review Comment: ## SonarCloud / Read permissions should be defined at the job level <!--SONAR_ISSUE_KEY:AaFaMyZ0rD-IvDRUFWGF-->Move this read permission from workflow level to job level. <p>See more on <a href="https://sonarcloud.io/project/issues?id=apache_calcite&issues=AaFaMyZ0rD-IvDRUFWGF&open=AaFaMyZ0rD-IvDRUFWGF&pullRequest=5347">SonarQube Cloud</a></p> [Show more details](https://github.com/apache/calcite/security/code-scanning/181) -- 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]
