{"id":21602751,"url":"https://github.com/codeintelligencetesting/gofuzz","last_synced_at":"2025-04-11T02:34:02.267Z","repository":{"id":64672598,"uuid":"502066567","full_name":"CodeIntelligenceTesting/gofuzz","owner":"CodeIntelligenceTesting","description":"Bug detectors for Golang","archived":false,"fork":false,"pushed_at":"2023-08-08T00:40:55.000Z","size":190,"stargazers_count":5,"open_issues_count":4,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-24T23:51:37.792Z","etag":null,"topics":["bug-detection","fuzzing","golang","security"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CodeIntelligenceTesting.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-06-10T14:08:01.000Z","updated_at":"2024-08-19T21:18:30.000Z","dependencies_parsed_at":"2024-06-19T23:04:38.882Z","dependency_job_id":null,"html_url":"https://github.com/CodeIntelligenceTesting/gofuzz","commit_stats":{"total_commits":45,"total_committers":3,"mean_commits":15.0,"dds":"0.11111111111111116","last_synced_commit":"8c53acf957e2f211231d9a3f6b051fd0515691f0"},"previous_names":["codeintelligencetesting/go-fuzz"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeIntelligenceTesting%2Fgofuzz","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeIntelligenceTesting%2Fgofuzz/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeIntelligenceTesting%2Fgofuzz/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeIntelligenceTesting%2Fgofuzz/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CodeIntelligenceTesting","download_url":"https://codeload.github.com/CodeIntelligenceTesting/gofuzz/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248329922,"owners_count":21085618,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bug-detection","fuzzing","golang","security"],"created_at":"2024-11-24T19:14:14.029Z","updated_at":"2025-04-11T02:34:02.250Z","avatar_url":"https://github.com/CodeIntelligenceTesting.png","language":"Go","readme":"\u003cdiv align=\"center\"\u003e\n  \u003ch1\u003egofuzz\u003c/h1\u003e\n  \u003cp\u003eBug detectors for Golang\u003c/p\u003e\n  \u003ca href=\"https://github.com/CodeIntelligenceTesting/gofuzz/actions/workflows/run-all-tests.yml\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/actions/workflow/status/CodeIntelligenceTesting/gofuzz/run-all-tests.yml?branch=main\u0026logo=github\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/CodeIntelligenceTesting/gofuzz/blob/main/CONTRIBUTING.md\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/PRs-welcome-brightgreen.svg\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/CodeIntelligenceTesting/gofuzz/blob/main/LICENSE\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/license/CodeIntelligenceTesting/gofuzz\" /\u003e\n  \u003c/a\u003e\n  \u003cbr /\u003e\n\n\u003ca href=\"https://www.code-intelligence.com/\" target=\"_blank\"\u003eWebsite\u003c/a\u003e\n|\n\u003ca href=\"https://www.code-intelligence.com/blog\" target=\"_blank\"\u003eBlog\u003c/a\u003e\n|\n\u003ca href=\"https://twitter.com/CI_Fuzz\" target=\"_blank\"\u003eTwitter\u003c/a\u003e\n\n\u003c/div\u003e\n\n## gofuzz\n\n**gofuzz** is a CLI tool to add bug detection capabilities into your Go code.\nIt transforms the source code and replaces calls to functions/methods of interest by calls to corresponding hooks in the `github.com/CodeIntelligenceTesting/gofuzz/sanitizers` module.\n**gofuzz** does not change the code in-place, but generates the instrumented source code in a temporary directory.\nIt produces an [overlay file](https://go.dev/doc/go1.16) that can be used by Go's standard build tools.\n\n## How to use\n\n1. (Once) Install the **gofuzz** CLI\n\n   ```shell\n   go install github.com/CodeIntelligenceTesting/gofuzz/cmd/gofuzz@latest\n   ```\n\n   The minimum required Golang version is Go 1.18.\n\n2. (Once) Add the **sanitizers** package as a dependency for the code base you want to test.\n   This package contains the implementation of the hooks inserted by **gofuzz** into your code,\n   and therefore must be available when the instrumented code is being compiled.\n\n   ```shell\n   cd \u003cmy project\u003e\n   go get -u github.com/CodeIntelligenceTesting/gofuzz/sanitizers@latest\n   ```\n\n   This command also adds the **sanitizers** package as a dependency in the `go.mod` file.\n3. Instrument your code using the **sanitize** subcommand\n\n   ```shell\n   gofuzz sanitize \u003cpackage\u003e -o \u003coverlay.json\u003e\n   ```\n\n   This instruments the specified package and writes the instrumented file into a temporary\n   directory. The corresponding file replacements are stored in the \u003coverlay.json\u003e file.\n   By default, **gofuzz** writes a file named overlay.json in the current directory.\n\n4. Instrument your code for fuzzing using [go114-fuzz-build](https://github.com/kyakdan/go114-fuzz-build).\n   Note that we use a fork of the original [repo](https://github.com/mdempsky/go114-fuzz-build)\n   because we need a change that has not yet been merged upstream.\n\n   ```shell\n   go114-fuzz-build -o target.a -func \u003cfuzz_test\u003e -overlay \u003coverlay.json\u003e \u003cpackage\u003e\n   ```\n\n   This tool uses the host Go to instrument the code using the libFuzzer mode. We recommend using\n   a Go version later than 1.19 as it contains [several improvements](https://www.code-intelligence.com/blog/golang-fuzzing-1.19) to make fuzzing considerably more effective.\n\n5. Link the created archive with libFuzzer\n\n   ```shell\n   clang -fsanitize=fuzzer target.a -o fuzzer\n   ```\n\n6. Run the fuzzer\n\n   ```shell\n   ./fuzzer [fuzzer args]\n   ```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeintelligencetesting%2Fgofuzz","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodeintelligencetesting%2Fgofuzz","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeintelligencetesting%2Fgofuzz/lists"}