code-intelligence.com/cifuzz@v0.40.0/CONTRIBUTING.md (about) 1 # Contributing 2 3 ## Release process 4 5 For more information, see [how to create and publish a new release](./docs/RELEASE.md). 6 7 ## Building from Source (Linux / macOS) 8 9 ### Prerequisites 10 11 #### Build dependencies: 12 13 - [git](https://git-scm.com/) 14 - [go >= 1.20](https://go.dev/doc/install) 15 - [libcap](https://man7.org/linux/man-pages/man3/libcap.3.html) 16 17 #### Test dependencies: 18 19 - [LLVM >= 14](https://clang.llvm.org/get_started.html) 20 - [make](https://www.gnu.org/software/make/) 21 - [CMake >= 3.21](https://cmake.org/) 22 - [Bazel >= 5.3.2](https://bazel.build/install) 23 - Java JDK >= 8 (e.g. [OpenJDK](https://openjdk.java.net/install/) or 24 [Zulu](https://www.azul.com/downloads/zulu-community/)) 25 - [Maven](https://maven.apache.org/install.html) 26 - [Gradle](https://gradle.org/install/) >= 6.1 27 28 #### Dev Tooling 29 30 - [Node.js/npm](https://nodejs.org/) 31 32 ### Ubuntu / Debian 33 34 <!-- when changing this, please make sure it is in sync with the E2E pipeline --> 35 36 ```bash 37 sudo apt install git make cmake clang llvm golang-go libcap-dev default-jdk maven gradle nodejs 38 39 # install bazelisk 40 sudo curl -L https://github.com/bazelbuild/bazelisk/releases/latest/download/bazelisk-linux-amd64 -o /usr/local/bin/bazel 41 sudo chmod +x /usr/local/bin/bazel 42 ``` 43 44 ### Arch 45 46 <!-- when changing this, please make sure it is in sync with the E2E pipeline --> 47 48 ```bash 49 sudo pacman -S git make cmake clang llvm go jdk-openjdk maven gradle nodejs npm 50 51 # install bazelisk 52 sudo curl -L https://github.com/bazelbuild/bazelisk/releases/latest/download/bazelisk-linux-amd64 -o /usr/local/bin/bazel 53 sudo chmod +x /usr/local/bin/bazel 54 ``` 55 56 Unfortunately, the Arch `libcap` package does not include the static 57 libcap library, which is needed to build cifuzz. You have to build it from 58 source instead: 59 60 ```bash 61 pacman -Sy --noconfirm glibc pam linux-api-headers make diffutils 62 git clone git://git.kernel.org/pub/scm/libs/libcap/libcap.git 63 cd libcap 64 git checkout libcap-2.65 65 make 66 make install 67 ``` 68 69 ### macOS 70 71 <!-- when changing this, please make sure it`is in sync with the E2E pipeline --> 72 73 ```bash 74 brew install git cmake llvm lcov go openjdk maven gradle bazelisk node 75 ``` 76 77 Finally, add the following to your `~/.zshrc` or `~/.bashrc` to use the correct version of 78 LLVM: 79 80 ```bash 81 export PATH=$(brew --prefix)/opt/llvm/bin:$PATH 82 export LDFLAGS="-L$(brew --prefix)/opt/llvm/lib" 83 export CPPFLAGS="-I$(brew --prefix)/opt/llvm/include" 84 ``` 85 86 ## Steps 87 88 To build **cifuzz** from source you have to execute the following steps: 89 90 ```bash 91 git clone https://github.com/CodeIntelligenceTesting/cifuzz.git 92 cd cifuzz 93 make test 94 make install 95 ``` 96 97 To verify the installation we recommend you to start a fuzzing run 98 in one of our example projects: 99 100 ```bash 101 cd examples/cmake 102 cifuzz run my_fuzz_test 103 ``` 104 105 This should stop after a few seconds with an actual finding. 106 107 ### Windows 108 109 We use symlinks in our repository. Developer mode needs to be 110 activated in order to create symlinks without admin privileges. 111 It can be activated in the system settings under: 112 113 ``` 114 Settings > Update & Security > For developers > Developer Mode 115 ```