github-advanced-security[bot] commented on code in PR #2310: URL: https://github.com/apache/sedona/pull/2310#discussion_r2299829708
########## .github/workflows/databricks-tester.yml: ########## @@ -0,0 +1,213 @@ +# 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: Databricks Spark integration test + +on: + push: + branches: + - master + pull_request_target: # This is a dangerous operation. Only people who are within Wherobots organization should be able to trigger this PR. + types: + - opened + - synchronize + - reopened + +env: + MAVEN_OPTS: -Dmaven.wagon.httpconnectionManager.ttlSeconds=60 + DO_NOT_TRACK: true + SPARK_LOCAL_IP: 127.0.0.1 + DATABRICKS_HOST: ${{ vars.DATABRICKS_HOST }} + DATABRICKS_VOLUME_PATH: ${{ vars.DATABRICKS_VOLUME_PATH }} + DATABRICKS_WORKSPACE_PATH: ${{ vars.DATABRICKS_WORKSPACE_PATH }} + DATABRICKS_TOKEN: ${{ secrets.DATABRICKS_TOKEN }} + GEOTOOLS_VERSION: '1.8.0-33.1-rc1' + +permissions: + contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.ref != 'refs/heads/master' }} + +jobs: + build: + runs-on: ubuntu-22.04 + strategy: + fail-fast: true + matrix: + include: + - spark: 3.5 + scala: 2.12 + jdk: '11' + enable_databricks_test: true + outputs: + jar-path: ${{ steps.build-info.outputs.jar-path }} + sedona-version: ${{ steps.build-info.outputs.sedona-version }} + geotools-path: ${{ steps.build-info.outputs.geotools-path }} + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.sha }} + - uses: actions/setup-java@v4 + with: + distribution: 'zulu' + java-version: ${{ matrix.jdk }} + - name: Cache Maven packages + uses: actions/cache@v4 + with: + path: ~/.m2 + key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} + restore-keys: ${{ runner.os }}-m2 + - name: Create temporary directory for artifacts + run: mkdir -p databricks-artifacts/tmp + - name: Build Sedona Spark + env: + SPARK_VERSION: ${{ matrix.spark }} + SCALA_VERSION: ${{ matrix.scala }} + run: | + # Build Sedona with specific Spark and Scala versions + mvn clean package -DskipTests -Dspark=${SPARK_VERSION} -Dscala=${SCALA_VERSION} -pl spark-shaded -am + - name: Copy Sedona JAR to artifacts directory Review Comment: ## Checkout of untrusted code in a privileged context Potential execution of untrusted code on a privileged workflow ([pull_request_target](1)) [Show more details](https://github.com/apache/sedona/security/code-scanning/8) ########## .github/workflows/snowflake-tester.yml: ########## @@ -0,0 +1,63 @@ +# 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: Snowflake integration test with real snowflake env + +on: + push: + branches: + - master + pull_request_target: # This is a dangerous operation. Only people who are within Wherobots organization should be able to trigger this PR. + types: + - opened + - synchronize + - reopened + +env: + SNOWFLAKE_AUTH_METHOD: ${{vars.SNOWFLAKE_AUTH_METHOD}} + SNOWFLAKE_USER: ${{secrets.SNOWFLAKE_USER}} + SNOWFLAKE_PASSWORD: ${{secrets.SNOWFLAKE_PASSWORD}} + SNOWFLAKE_DB: ${{vars.SNOWFLAKE_DB}} + SNOWFLAKE_SCHEMA: ${{vars.SNOWFLAKE_SCHEMA}} + SNOWFLAKE_WAREHOUSE: ${{vars.SNOWFLAKE_WAREHOUSE}} + SNOWFLAKE_ROLE: ${{vars.SNOWFLAKE_ROLE}} + SNOWFLAKE_ACCOUNT: ${{vars.SNOWFLAKE_ACCOUNT}} + SNOWFLAKE_GEOTOOLS_VERSION: '1.8.0-33.1-rc1' + +jobs: + build: + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v2 + with: + ref: ${{ github.event.pull_request.head.sha }} + - uses: actions/setup-java@v4 + with: + distribution: 'zulu' + java-version: '11' + - name: Cache Maven packages + uses: actions/cache@v4 + with: + path: ~/.m2 + key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} + restore-keys: ${{ runner.os }}-m2 + - run: mkdir snowflake-tester/tmp + - run: sudo apt-get update && sudo apt-get -y install wget + - run: wget https://repo1.maven.org/maven2/org/datasyslab/geotools-wrapper/${SNOWFLAKE_GEOTOOLS_VERSION}/geotools-wrapper-${SNOWFLAKE_GEOTOOLS_VERSION}.jar -O snowflake-tester/tmp/geotools-wrapper-${SNOWFLAKE_GEOTOOLS_VERSION}.jar + - run: mvn clean package -DskipTests -pl snowflake -am + - run: find snowflake/target -name sedona-snowflake-*.jar -exec cp {} snowflake-tester/tmp/ \; Review Comment: ## Checkout of untrusted code in a privileged context Potential execution of untrusted code on a privileged workflow ([pull_request_target](1)) [Show more details](https://github.com/apache/sedona/security/code-scanning/9) ########## .github/workflows/snowflake-tester.yml: ########## @@ -0,0 +1,63 @@ +# 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: Snowflake integration test with real snowflake env + +on: + push: + branches: + - master + pull_request_target: # This is a dangerous operation. Only people who are within Wherobots organization should be able to trigger this PR. + types: + - opened + - synchronize + - reopened + +env: + SNOWFLAKE_AUTH_METHOD: ${{vars.SNOWFLAKE_AUTH_METHOD}} + SNOWFLAKE_USER: ${{secrets.SNOWFLAKE_USER}} + SNOWFLAKE_PASSWORD: ${{secrets.SNOWFLAKE_PASSWORD}} + SNOWFLAKE_DB: ${{vars.SNOWFLAKE_DB}} + SNOWFLAKE_SCHEMA: ${{vars.SNOWFLAKE_SCHEMA}} + SNOWFLAKE_WAREHOUSE: ${{vars.SNOWFLAKE_WAREHOUSE}} + SNOWFLAKE_ROLE: ${{vars.SNOWFLAKE_ROLE}} + SNOWFLAKE_ACCOUNT: ${{vars.SNOWFLAKE_ACCOUNT}} + SNOWFLAKE_GEOTOOLS_VERSION: '1.8.0-33.1-rc1' + +jobs: + build: + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v2 + with: + ref: ${{ github.event.pull_request.head.sha }} + - uses: actions/setup-java@v4 + with: + distribution: 'zulu' + java-version: '11' + - name: Cache Maven packages + uses: actions/cache@v4 + with: + path: ~/.m2 + key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} + restore-keys: ${{ runner.os }}-m2 + - run: mkdir snowflake-tester/tmp + - run: sudo apt-get update && sudo apt-get -y install wget + - run: wget https://repo1.maven.org/maven2/org/datasyslab/geotools-wrapper/${SNOWFLAKE_GEOTOOLS_VERSION}/geotools-wrapper-${SNOWFLAKE_GEOTOOLS_VERSION}.jar -O snowflake-tester/tmp/geotools-wrapper-${SNOWFLAKE_GEOTOOLS_VERSION}.jar + - run: mvn clean package -DskipTests -pl snowflake -am + - run: find snowflake/target -name sedona-snowflake-*.jar -exec cp {} snowflake-tester/tmp/ \; + - run: export SEDONA_VERSION=$(find snowflake/target -name "sedona-snowflake-*.jar" -not -name "*-javadoc.jar" | sed 's/.*sedona-snowflake-\(.*\)\.jar/\1/') && echo $SEDONA_VERSION && mvn test -P snowflake Review Comment: ## Workflow does not contain permissions Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {{contents: read}} [Show more details](https://github.com/apache/sedona/security/code-scanning/7) ########## .github/workflows/snowflake-tester.yml: ########## @@ -0,0 +1,63 @@ +# 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: Snowflake integration test with real snowflake env + +on: + push: + branches: + - master + pull_request_target: # This is a dangerous operation. Only people who are within Wherobots organization should be able to trigger this PR. + types: + - opened + - synchronize + - reopened + +env: + SNOWFLAKE_AUTH_METHOD: ${{vars.SNOWFLAKE_AUTH_METHOD}} + SNOWFLAKE_USER: ${{secrets.SNOWFLAKE_USER}} + SNOWFLAKE_PASSWORD: ${{secrets.SNOWFLAKE_PASSWORD}} + SNOWFLAKE_DB: ${{vars.SNOWFLAKE_DB}} + SNOWFLAKE_SCHEMA: ${{vars.SNOWFLAKE_SCHEMA}} + SNOWFLAKE_WAREHOUSE: ${{vars.SNOWFLAKE_WAREHOUSE}} + SNOWFLAKE_ROLE: ${{vars.SNOWFLAKE_ROLE}} + SNOWFLAKE_ACCOUNT: ${{vars.SNOWFLAKE_ACCOUNT}} + SNOWFLAKE_GEOTOOLS_VERSION: '1.8.0-33.1-rc1' + +jobs: + build: + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v2 + with: + ref: ${{ github.event.pull_request.head.sha }} + - uses: actions/setup-java@v4 + with: + distribution: 'zulu' + java-version: '11' + - name: Cache Maven packages + uses: actions/cache@v4 + with: + path: ~/.m2 + key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} + restore-keys: ${{ runner.os }}-m2 + - run: mkdir snowflake-tester/tmp + - run: sudo apt-get update && sudo apt-get -y install wget + - run: wget https://repo1.maven.org/maven2/org/datasyslab/geotools-wrapper/${SNOWFLAKE_GEOTOOLS_VERSION}/geotools-wrapper-${SNOWFLAKE_GEOTOOLS_VERSION}.jar -O snowflake-tester/tmp/geotools-wrapper-${SNOWFLAKE_GEOTOOLS_VERSION}.jar + - run: mvn clean package -DskipTests -pl snowflake -am + - run: find snowflake/target -name sedona-snowflake-*.jar -exec cp {} snowflake-tester/tmp/ \; + - run: export SEDONA_VERSION=$(find snowflake/target -name "sedona-snowflake-*.jar" -not -name "*-javadoc.jar" | sed 's/.*sedona-snowflake-\(.*\)\.jar/\1/') && echo $SEDONA_VERSION && mvn test -P snowflake Review Comment: ## Checkout of untrusted code in a privileged context Potential execution of untrusted code on a privileged workflow ([pull_request_target](1)) [Show more details](https://github.com/apache/sedona/security/code-scanning/10) -- 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]
