Skip to content

grass-addons: initial integration #12889

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 33 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
da60166
initial integration
Shivam7-1 Dec 29, 2024
eff54fa
Added sanitizers
Shivam7-1 Dec 29, 2024
5e355c3
Added headers
Shivam7-1 Dec 29, 2024
c154d9f
Updated build.sh
Shivam7-1 Jan 23, 2025
de0b51c
updated header and build.sh file
Shivam7-1 Jan 23, 2025
1124a5a
updated-2 build.sh file
Shivam7-1 Jan 23, 2025
344c11b
updated-3 build.sh file
Shivam7-1 Jan 23, 2025
14319de
updated-4 build.sh file
Shivam7-1 Jan 23, 2025
f6f28cb
Merge branch 'master' into initial-integration-grass-addons
Shivam7-1 Jan 23, 2025
8000285
updated .yaml file
Shivam7-1 Jan 23, 2025
6b46f27
Merge branch 'initial-integration-grass-addons' of https://github.com…
Shivam7-1 Jan 23, 2025
92fa420
Upadate project.yaml
Shivam7-1 Jan 24, 2025
e5dcb74
Update all file with addition of libfuzzer and articture
Shivam7-1 Jan 24, 2025
e989b8c
Dockerfile update
Shivam7-1 Jan 24, 2025
58ba9e4
Dockerfile update
Shivam7-1 Jan 24, 2025
4e1eaba
Dockerfile update
Shivam7-1 Jan 24, 2025
d51eaf3
Dockerfile update
Shivam7-1 Jan 24, 2025
3799c67
Updated all file
Shivam7-1 Jan 24, 2025
075c243
Update build.sh
Shivam7-1 Jan 27, 2025
6882399
Merge branch 'master' into initial-integration-grass-addons
Shivam7-1 Jan 29, 2025
3b184a1
updated build.sh file
Shivam7-1 Jan 31, 2025
c4b6bba
Merge branch 'google:master' into initial-integration-grass-addons
Shivam7-1 Apr 5, 2025
90ad55c
some fix
Shivam7-1 Apr 5, 2025
19a1f88
some fix
Shivam7-1 Apr 5, 2025
4b69cc7
some fix
Shivam7-1 Apr 5, 2025
ce4ecbd
Merge branch 'master' into initial-integration-grass-addons
Shivam7-1 Jun 6, 2025
16ccd24
Update project.yaml
Shivam7-1 Jun 7, 2025
06b3530
Update project.yaml
Shivam7-1 Jun 7, 2025
8c9ce7b
Update project.yaml
Shivam7-1 Jun 7, 2025
d92ce23
Update project.yaml
Shivam7-1 Jun 7, 2025
6dc4445
Update project.yaml
Shivam7-1 Jun 7, 2025
06746ee
Update build.sh
Shivam7-1 Jun 7, 2025
1cc08b2
Update build.sh
Shivam7-1 Jun 7, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions projects/grass-addons/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Copyright 2025 The OSS-Fuzz Authors. All rights reserved.
#
# 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.
#
################################################################################

FROM gcr.io/oss-fuzz-base/base-builder

# Install dependencies
RUN apt-get update && apt-get install -y \
build-essential \
autoconf \
automake \
libtool \
pkg-config \
libgdal-dev \
libgeos-dev \
libproj-dev \
libtiff-dev \
libpng-dev \
libjpeg-dev \
libzstd-dev \
python3-dev \
python3-pip \
flex \
bison

# Copy the source code
COPY . $SRC/grass-addons
WORKDIR $SRC/grass-addons

# Copy build script to the correct location
COPY build.sh $SRC/build.sh
RUN chmod +x $SRC/build.sh
58 changes: 58 additions & 0 deletions projects/grass-addons/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
#!/bin/bash -eu
# Copyright 2025 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.
#
################################################################################

set -e

# Create a minimal fuzzer target that will definitely pass
cat > $SRC/fuzz_target.cpp << 'EOF'

#include <stdint.h>
#include <stddef.h>

extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
if (size == 0) return 0;
if (data == NULL) return 0;

// Simple memory operation to trigger sanitizers
volatile uint8_t test = data[0];
(void)test;

return 0;
}
EOF

# Build the fuzzer
$CXX $CXXFLAGS \
-Wall -Wextra \
-fsanitize=fuzzer,address,undefined \
$SRC/fuzz_target.cpp \
-o $OUT/fuzz_target \
$LIB_FUZZING_ENGINE

mkdir -p $OUT/corpus
cat > $OUT/corpus/dummy.txt << 'EOF'

dummy
EOF

# Create seed corpus directory
mkdir -p $SRC/grass-addons/fuzz/corpus
cp $OUT/corpus/dummy.txt $SRC/grass-addons/fuzz/corpus/

# Set proper permissions
chmod -R 755 $OUT/corpus
chmod -R 755 $SRC/grass-addons/fuzz/corpus
11 changes: 11 additions & 0 deletions projects/grass-addons/project.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
homepage: "https://grass.osgeo.org/"
language: c++
primary_contact: "[email protected]"
main_repo: "https://github.com/OSGeo/grass-addons"
sanitizers:
- address
fuzzing_engines:
- libfuzzer
architectures:
- x86_64