From d8a2d7ae467ad113394daf9e31db837c879b5ca8 Mon Sep 17 00:00:00 2001 From: Javan Lacerda Date: Mon, 27 Jul 2026 06:28:15 -0300 Subject: [PATCH 1/3] fix some repo_main for several projects (#15902) ## Overview This PR fixes repository URLs in `project.yaml` (`main_repo` / `homepage`) and corresponding `Dockerfile`s for four OSS-Fuzz projects (`geos`, `poppler`, `postgis`, `python-markdownify`). These changes resolve repository mirroring errors caused by domain host migrations (OSGeo Gitea, Freedesktop GitLab) and enforce HTTPS for GitHub links. --- ## Detailed Summary of Changes | Project | Target Files | Previous URL | Updated URL | Reason | | :--- | :--- | :--- | :--- | :--- | | **`geos`** | `project.yaml`, `Dockerfile` | `https://git.osgeo.org/gitea/geos/geos.git` | `https://gitea.osgeo.org/geos/geos` | Migrated OSGeo Gitea domain host | | **`poppler`** | `project.yaml` | `https://anongit.freedesktop.org/git/poppler/poppler.git` | `https://gitlab.freedesktop.org/poppler/poppler` | Migrated Freedesktop Git host | | **`postgis`** | `project.yaml`, `Dockerfile` | `https://git.osgeo.org/gitea/postgis/postgis.git` | `https://gitea.osgeo.org/postgis/postgis` | Migrated OSGeo Gitea domain host | | **`python-markdownify`** | `project.yaml`, `Dockerfile` | `http://github.com/matthewwithanm/python-markdownify` | `https://github.com/matthewwithanm/python-markdownify` | Enforce HTTPS protocol | --- ## Testing & Verification - Executed `python3 infra/presubmit.py` locally; all modified project configurations and Dockerfiles passed validation cleanly. Signed-off-by: Javan Lacerda --- projects/geos/Dockerfile | 2 +- projects/geos/project.yaml | 2 +- projects/poppler/project.yaml | 2 +- projects/postgis/Dockerfile | 2 +- projects/postgis/project.yaml | 2 +- projects/python-markdownify/Dockerfile | 2 +- projects/python-markdownify/project.yaml | 4 ++-- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/projects/geos/Dockerfile b/projects/geos/Dockerfile index 735e0afd3495..a009ab7e87c2 100644 --- a/projects/geos/Dockerfile +++ b/projects/geos/Dockerfile @@ -17,6 +17,6 @@ FROM gcr.io/oss-fuzz-base/base-builder RUN apt-get update && apt-get install -y cmake # fallback to github if main git server is not responding -RUN git clone --depth 1 https://git.osgeo.org/gitea/geos/geos.git || git clone --depth 1 https://github.com/libgeos/geos.git +RUN git clone --depth 1 https://gitea.osgeo.org/geos/geos || git clone --depth 1 https://github.com/libgeos/geos.git COPY run_tests.sh build.sh $SRC/ WORKDIR $SRC/geos diff --git a/projects/geos/project.yaml b/projects/geos/project.yaml index 940f0c93eff9..739388aca0c2 100644 --- a/projects/geos/project.yaml +++ b/projects/geos/project.yaml @@ -9,7 +9,7 @@ auto_ccs : sanitizers: - address - undefined -main_repo: 'https://git.osgeo.org/gitea/geos/geos.git' +main_repo: "https://gitea.osgeo.org/geos/geos" fuzzing_engines: - afl diff --git a/projects/poppler/project.yaml b/projects/poppler/project.yaml index 0e752a504283..66d7e8da827c 100644 --- a/projects/poppler/project.yaml +++ b/projects/poppler/project.yaml @@ -12,7 +12,7 @@ fuzzing_engines: auto_ccs: - jonathan@titanous.com - adam.reichold@t-online.de -main_repo: 'https://anongit.freedesktop.org/git/poppler/poppler.git' +main_repo: "https://gitlab.freedesktop.org/poppler/poppler" fuzzing_engines: - afl - honggfuzz diff --git a/projects/postgis/Dockerfile b/projects/postgis/Dockerfile index 824a76075ce9..69bdf947215d 100644 --- a/projects/postgis/Dockerfile +++ b/projects/postgis/Dockerfile @@ -16,7 +16,7 @@ FROM gcr.io/oss-fuzz-base/base-builder:ubuntu-24-04 -RUN git clone --depth 1 https://git.osgeo.org/gitea/postgis/postgis.git postgis +RUN git clone --depth 1 https://gitea.osgeo.org/postgis/postgis postgis WORKDIR postgis RUN bash ./fuzzers/install_oss_fuzz_build_deps.sh RUN apt-get update && \ diff --git a/projects/postgis/project.yaml b/projects/postgis/project.yaml index a345e12c55df..686801bc0ce1 100644 --- a/projects/postgis/project.yaml +++ b/projects/postgis/project.yaml @@ -6,7 +6,7 @@ auto_ccs: - "even.rouault@gmail.com" - "pramsey@cleverelephant.ca" - "komzpa@gmail.com" -main_repo: 'https://git.osgeo.org/gitea/postgis/postgis.git' +main_repo: "https://gitea.osgeo.org/postgis/postgis" fuzzing_engines: - afl diff --git a/projects/python-markdownify/Dockerfile b/projects/python-markdownify/Dockerfile index a924e07ebd5e..448c3aebbd34 100644 --- a/projects/python-markdownify/Dockerfile +++ b/projects/python-markdownify/Dockerfile @@ -15,6 +15,6 @@ ########################################################################## FROM gcr.io/oss-fuzz-base/base-builder-python RUN pip3 install --upgrade pip -RUN git clone http://github.com/matthewwithanm/python-markdownify python-markdownify +RUN git clone https://github.com/matthewwithanm/python-markdownify python-markdownify COPY *.sh *py $SRC/ WORKDIR $SRC/python-markdownify diff --git a/projects/python-markdownify/project.yaml b/projects/python-markdownify/project.yaml index de472f426174..5899fedaa390 100644 --- a/projects/python-markdownify/project.yaml +++ b/projects/python-markdownify/project.yaml @@ -1,5 +1,5 @@ -homepage: http://github.com/matthewwithanm/python-markdownify -main_repo: http://github.com/matthewwithanm/python-markdownify +homepage: https://github.com/matthewwithanm/python-markdownify +main_repo: https://github.com/matthewwithanm/python-markdownify language: python fuzzing_engines: - libfuzzer From 2c3985e1e1e7c04070d3e154cc45a0b2698c9a4a Mon Sep 17 00:00:00 2001 From: Vishal S <130894175+vishalcoc44@users.noreply.github.com> Date: Mon, 27 Jul 2026 16:42:23 +0530 Subject: [PATCH 2/3] calcite-avatica: Transition to Ideal Integration (Upstream Source) (#15131) All 6 deep fuzzers have been upstreamed to the [apache/calcite-avatica](https://github.com/apache/calcite-avatica) repository. Consequently, this PR removes the redundant local fuzzer source files from this repository and updates the build configuration to utilize the the upstream project's build system. ### Changes: 1. **Upstream Integration**: Updated the Dockerfile to clone the official Apache Calcite Avatica repository instead of using local files. 2. **Dynamic Fuzzer Discovery**: Rewrote build.sh to leverage the upstream Gradle build process. It now dynamically discovers all fuzzer classes in the org.apache.calcite.avatica.fuzz package. This allows for new fuzzers added upstream to be automatically included in the OSS-Fuzz build without further configuration changes here. 3. **Clean Configuration**: Removed local fuzzer source files (ConnectStringParserFuzzer.java, Base64Fuzzer.java) to establish a clean upstream-sync workflow. In process of adding fuzzers has been as told in this pr https://github.com/apache/calcite-avatica/pull/300 --------- Co-authored-by: DavidKorczynski --- projects/calcite-avatica/Base64Fuzzer.java | 36 -------------- .../ConnectStringParserFuzzer.java | 33 ------------- projects/calcite-avatica/Dockerfile | 2 +- projects/calcite-avatica/build.sh | 47 +++++++++++-------- 4 files changed, 29 insertions(+), 89 deletions(-) delete mode 100644 projects/calcite-avatica/Base64Fuzzer.java delete mode 100644 projects/calcite-avatica/ConnectStringParserFuzzer.java diff --git a/projects/calcite-avatica/Base64Fuzzer.java b/projects/calcite-avatica/Base64Fuzzer.java deleted file mode 100644 index 2f2cb51ed540..000000000000 --- a/projects/calcite-avatica/Base64Fuzzer.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed 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. -// -/////////////////////////////////////////////////////////////////////////// -import com.code_intelligence.jazzer.api.FuzzedDataProvider; -import java.io.IOException; -import org.apache.calcite.avatica.util.Base64; - -// Generated with https://github.com/ossf/fuzz-introspector/tree/main/tools/auto-fuzz -// Minor modifications to beautify code and ensure exception is caught. -// Heuristic name: jvm-autofuzz-heuristics-1 -// Target method: [org.apache.calcite.avatica.util.Base64] public static java.lang.String encodeBytes(byte[],int) throws java.io.IOException -public class Base64Fuzzer { - public static void fuzzerTestOneInput(FuzzedDataProvider data) { - try { - if (data.consumeBoolean()) { - Base64.encodeBytes(data.consumeRemainingAsBytes()); - } else { - Base64.decode(data.consumeRemainingAsBytes()); - } - } catch (IOException | IllegalArgumentException e) { - // Known exception - } - } -} diff --git a/projects/calcite-avatica/ConnectStringParserFuzzer.java b/projects/calcite-avatica/ConnectStringParserFuzzer.java deleted file mode 100644 index 282c6d3c9ddd..000000000000 --- a/projects/calcite-avatica/ConnectStringParserFuzzer.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed 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. -// -/////////////////////////////////////////////////////////////////////////// -import com.code_intelligence.jazzer.api.FuzzedDataProvider; -import java.sql.SQLException; -import java.util.Properties; -import org.apache.calcite.avatica.ConnectStringParser; - -// Generated with https://github.com/ossf/fuzz-introspector/tree/main/tools/auto-fuzz -// Minor modifications to beautify code and ensure exception is caught. -// Heuristic name: jvm-autofuzz-heuristics-1 -// Target method: [org.apache.calcite.avatica.ConnectStringParser] public static java.util.Properties parse(java.lang.String) throws java.sql.SQLException -public class ConnectStringParserFuzzer { - public static void fuzzerTestOneInput(FuzzedDataProvider data) { - try { - ConnectStringParser.parse(data.consumeRemainingAsString()); - } catch (SQLException e) { - // Known exception - } - } -} diff --git a/projects/calcite-avatica/Dockerfile b/projects/calcite-avatica/Dockerfile index cd492ad27b49..880b47070ef5 100644 --- a/projects/calcite-avatica/Dockerfile +++ b/projects/calcite-avatica/Dockerfile @@ -15,5 +15,5 @@ ########################################################################## FROM gcr.io/oss-fuzz-base/base-builder-jvm RUN git clone --depth 1 https://github.com/apache/calcite-avatica calcite-avatica -COPY *.sh *.java $SRC/ +COPY *.sh $SRC/ WORKDIR $SRC/calcite-avatica diff --git a/projects/calcite-avatica/build.sh b/projects/calcite-avatica/build.sh index aa4d8ad499a2..17cc52e0266e 100644 --- a/projects/calcite-avatica/build.sh +++ b/projects/calcite-avatica/build.sh @@ -15,31 +15,40 @@ # ########################################################################## -# Gradle build with gradle wrapper +# Clean up caches rm -rf $HOME/.gradle/caches/ -./gradlew clean build shadowJar -x test + +# Build project and copy dependencies +./gradlew clean :core:jar :core:testClasses :core:copyFuzzDependencies -x test ./gradlew --stop +# Find version CURRENT_VERSION=$(./gradlew properties | grep ^version: | cut -d" " -f2) -cp "./shaded/core/build/libs/avatica-$CURRENT_VERSION-shadow.jar" $OUT/avatica.jar -ALL_JARS="avatica.jar" -# The classpath at build-time includes the project jars in $OUT as well as the -# Jazzer API. -BUILD_CLASSPATH=$(echo $ALL_JARS | xargs printf -- "$OUT/%s:"):$JAZZER_API_PATH +# Copy jars to $OUT +cp core/build/fuzz-dependencies/*.jar $OUT/ +cp core/build/libs/avatica-core-$CURRENT_VERSION.jar $OUT/avatica-core.jar +cp metrics/build/libs/avatica-metrics-$CURRENT_VERSION.jar $OUT/avatica-metrics.jar + +# Copy fuzzer classes to $OUT (preserving package structure) +cp -r core/build/classes/java/test/* $OUT/ + +# Create a consolidated list of all jars for the classpath +ALL_JARS=$(find $OUT -maxdepth 1 -name "*.jar" | xargs -n1 basename) -# All .jar and .class files lie in the same directory as the fuzzer at runtime. +# The runtime classpath will include all jars in $OUT and the this_dir itself for classes RUNTIME_CLASSPATH=$(echo $ALL_JARS | xargs printf -- "\$this_dir/%s:"):\$this_dir -for fuzzer in $(find $SRC -maxdepth 1 -name '*Fuzzer.java') -do - fuzzer_basename=$(basename -s .java $fuzzer) - javac -cp $BUILD_CLASSPATH $fuzzer - cp $SRC/$fuzzer_basename.class $OUT/ +# Dynamically find all fuzzer classes in the specified package +FUZZER_CLASSES_DIR="$OUT/org/apache/calcite/avatica/fuzz" +FUZZERS=$(find "$FUZZER_CLASSES_DIR" -maxdepth 1 -name "*Fuzzer.class" -exec basename {} .class \;) - # Create an execution wrapper that executes Jazzer with the correct arguments. +# For each fuzzer, create a wrapper script +for fuzzer_basename in $FUZZERS +do + target_class="org.apache.calcite.avatica.fuzz.$fuzzer_basename" + echo "#!/bin/bash - # LLVMFuzzerTestOneInput for fuzzer detection. this_dir=\$(dirname "\$0") if [[ "\$@" =~ (^| )-runs=[0-9]+($| ) ]] @@ -49,13 +58,13 @@ do mem_settings='-Xmx2048m:-Xss1024k' fi - LD_LIBRARY_PATH="$JVM_LD_LIBRARY_PATH":\$this_dir \ + LD_LIBRARY_PATH=\"$JVM_LD_LIBRARY_PATH\":\$this_dir \ \$this_dir/jazzer_driver \ --agent_path=\$this_dir/jazzer_agent_deploy.jar \ --cp=$RUNTIME_CLASSPATH \ - --target_class=$fuzzer_basename \ - --jvm_args="\$mem_settings" \ + --target_class=$target_class \ + --jvm_args=\"\$mem_settings\" \ \$@" > $OUT/$fuzzer_basename - chmod u+x $OUT/$fuzzer_basename + chmod u+x $OUT/$fuzzer_basename done From bb35b9969e56eafb50a0ac9078492dbdd76ec764 Mon Sep 17 00:00:00 2001 From: OSS-Fuzz Team Date: Mon, 27 Jul 2026 04:52:50 -0700 Subject: [PATCH 3/3] Resolve symlinks in source dir. PiperOrigin-RevId: 954559384 --- infra/base-images/base-builder/indexer/manifest_types.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/infra/base-images/base-builder/indexer/manifest_types.py b/infra/base-images/base-builder/indexer/manifest_types.py index bb4239c695be..664d4dc01ee5 100644 --- a/infra/base-images/base-builder/indexer/manifest_types.py +++ b/infra/base-images/base-builder/indexer/manifest_types.py @@ -38,6 +38,7 @@ import urllib.request import manifest_constants + import pathlib SRC_DIR = manifest_constants.SRC_DIR @@ -433,7 +434,7 @@ def save_build( with tempfile.NamedTemporaryFile() as tmp: mode = "w:gz" if archive_path.suffix.endswith("gz") else "w" - with tarfile.open(tmp.name, mode) as tar: + with tarfile.open(tmp.name, mode, dereference=True) as tar: def _save_dir( path: pathlib.PurePath,