Commit Graph

1528 Commits

Author SHA1 Message Date
Bitshift 55a5812e8c
Update fuzzers to new Atheris version (#6060)
* Update fuzzers to new Atheris version

* Pin new atheris version

* Change = to ==

* Change path where Atheris fuzzers ld_preload from

* Update hypothesis fuzzer to work with new atheris

* Set version to 2.0.1

* Switch to Atheris 2.0.4

* Correct spelling of pygments_fuzzer decorator

* instrument yaml_reader

* Change to latest Atheris

* Set atheris version to 2.0.6
2021-08-16 08:56:54 -07:00
jonathanmetzman 01247be731
[infra][tests][NFC] Change mocked function prefix from "mocked_" to "mock_" (#6198)
Also rename mock_ functions to have impl suffix so we can use mock_ in place of mocked_
2021-08-12 11:25:57 -07:00
jonathanmetzman 7942bb4491
[helper] Change logging from error to info (#6200) 2021-08-11 11:09:24 -07:00
Fabian Meumertzheim ede1fb13ae
[infra] Enable Jazzer support for UBSan C++ features (#6202)
Jazzer now links in the UBSan C++ runtime and thus support the vptr
and function sanitizer settings.
2021-08-11 17:35:29 +00:00
jonathanmetzman 94cfc4fe2f
[cifuzz] Add pruning task (#6188)
Fixes: #6064
2021-08-10 11:10:10 -07:00
jonathanmetzman e407f54e61
[infra][build] Switch to f-strings. (#6182) 2021-08-10 10:48:16 -07:00
jonathanmetzman e7952dac25
[presubmit][NFC] Use descriptive tone in docstrings (#6192) 2021-08-10 10:47:42 -07:00
Robert Löhning 48fa0d4d41
[infra] Upgrade cmake to latest release (3.21.1) (#6185)
Qt now requires 3.20 or higher.
2021-08-09 08:49:25 -07:00
jonathanmetzman 7386a01060
[cifuzz][nfc] Switch log info to log error (#6178) 2021-08-06 10:34:20 -07:00
dependabot[bot] 165e3a368c
Bump jinja2 from 2.10 to 2.11.3 in /infra/ci (#6172)
Bumps [jinja2](https://github.com/pallets/jinja) from 2.10 to 2.11.3.
- [Release notes](https://github.com/pallets/jinja/releases)
- [Changelog](https://github.com/pallets/jinja/blob/main/CHANGES.rst)
- [Commits](https://github.com/pallets/jinja/compare/2.10...2.11.3)

---
updated-dependencies:
- dependency-name: jinja2
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-06 08:51:29 -07:00
jonathanmetzman 866f387c7a
[cifuzz] Speculative fix for issue with seed corpus/backup corpus (#6175)
This should fix #6173
2021-08-05 22:22:59 +00:00
jonathanmetzman fcca81b36f
[cifuzz] Add feedback for bad build check (#6174) 2021-08-05 22:20:56 +00:00
jonathanmetzman d01808333d
[cifuzz] Fuzz in cifuzz-base (#6142)
Fixes: #5926
2021-08-05 13:27:24 -07:00
jonathanmetzman af2617d7d0
[ClusterFuzzLite][docs] Start writing docs (#6165)
I started writing some important docs, such as overview, build_integration, and running_clusterfuzzlite. However, most important docs are still TODO.
This PR at least adds a skeleton for those docs.
2021-08-05 12:01:07 -07:00
DavidKorczynski be08bbd524
infra: add coverage sanitizer option (#6171)
* infra: add coverage sanitizer option

* fix lint
2021-08-05 18:53:20 +00:00
jonathanmetzman 7e35b01f7e
[presubmit][NFC] Fix copyright line 2021-08-04 19:38:54 -07:00
jonathanmetzman aac1cb8c76
[infra][NFC] Use one source of truth for engines, languages etc. (#6163)
Do this only where it makes sense. For example, since CIFuzz doesn't
support dataflow, maintain a separate source of truth.
2021-08-04 17:04:55 -07:00
jonathanmetzman f0a42fbb1f
[CIFuzz] Force external to use .clusterfuzzlite for build integrations. (#6167) 2021-08-04 16:13:51 -07:00
jonathanmetzman 88dba120a8
[CIFuzz][NFC] Add function for setting env vars in docker command. (#6162) 2021-08-04 14:19:22 -07:00
jonathanmetzman a944a0359f
[CIFuzz][helper] Fix external project support and add tests. (#6161) 2021-08-04 15:35:48 +00:00
jonathanmetzman d88b5e4aa7
[CIFuzz] Add support for external projects to helper.py (#6141)
Add support to helper.py for external projects for all subcommands except `download_corpora`.
External users just need to specify `build_integration_path`, `project_src_path` and `external`.

Also do a big refactor to pass a project object as part of args instead of a string containing the name of the project or its
path.
Related: #6125
2021-08-04 06:42:17 -07:00
jonathanmetzman 0bf87a10c4
[cifuzz] Only grab github-specific env vars on github (#6150)
This removes need for non-OSS-Fuzz users to fake using OSS-Fuzz.

Fixes: #6129
2021-08-03 18:13:59 -07:00
jonathanmetzman 6f0238764e
[infra][NFC] Use "testcase" instead of test_case for consistency. (#6159) 2021-08-03 18:05:00 -07:00
jonathanmetzman 0ea44bb355
[cifuzz][NFC] Move default configs to config_utils.py (#6157) 2021-08-03 17:59:17 -07:00
jonathanmetzman 432105a31a
[cifuzz][NFC] Move Workspace to workspace_utils. (#6158)
In hindsight, it doesn't have a lot to do with the rest of
config_utils. And config_utils is getting crowded.
2021-08-03 17:58:20 -07:00
jonathanmetzman 264c160e3a
[cifuzz] Add basic end-to-end tests. (#6139)
This test doesn't really do diffing or affected fuzzers properly.
Nor does it check the workspace for existence of certain things, nor
does check the filesystem for proof things happened. It is still
a WIP.
2021-08-03 15:40:31 -07:00
jonathanmetzman 88698dbf2f
[helper] Switch from print to log (#6149) 2021-08-03 09:25:15 -07:00
jonathanmetzman c75d1b362f
[cifuzz] Create validate method on BaseConfig (#6135)
* [cifuzz] Create validate method on BaseConfig

Use it to validate that either OSS_FUZZ_PROJECT_NAME
or BUILD_INTEGRATION_PATH is set.
Also use it to validate that workspace is set
(rather than duplicate code).
Add tests.

* Use env var hack to bypass valdiation

* fix

* fix

* fmt

* fix

* tmp

* fix
2021-08-02 12:37:37 -07:00
jonathanmetzman 021eaf1677
[cifuzz] Don't delete base-runner (#6143)
We shouldn't delete it, because we need to use it again.
This saves about 13 seconds per run.
Fixes: #5982
2021-07-30 12:51:27 -07:00
Oliver Chang 2bc0114b58
Handle CI fuzz builds from events other than push or pull_request. (#6055)
Don't try to find unaffected fuzzers by diffing against a base commit as
they don't exist in those contexts.

For #6053.
2021-07-30 02:40:00 +00:00
jonathanmetzman 8eb0455476
[CIFuzz] Allow users to specify if unreproducible crashes are reported (#6138) 2021-07-29 15:41:36 +00:00
jonathanmetzman 729a8fe695
[NFC][cifuzz] Improve env var handling. (#6137)
Also delete useless TODOs.
2021-07-29 08:31:51 -07:00
jonathanmetzman 7a33d092ea
[CIFuzz] Change behavior of PROJECT_SRC_PATH to be clearer. (#6136)
Don't assume that path is relative to workspace if it is not absolute.
Only make this assumption on GitHub where it will always be true.
Also, add tests.
2021-07-29 08:10:58 -07:00
jonathanmetzman 32519c1601
[cifuzz] Implement get_files_covered_by_target for external users (#6132)
This should mostly complete support for affected fuzzers for external users.
This implementation is still imperfect however. 
It relies on the name of the repo being the same as the name of the directory in $SRC/ that the repo is checked out in
(i.e. repo must be checked out in $SRC/$REPO_NAME).
2021-07-29 06:35:01 -07:00
jonathanmetzman 7e420c7411
[CIFuzz] Don't overwrite the repo in external builds. (#6131)
Fixes: #6119

Also add more tests for continuous_integration module.
2021-07-29 06:28:09 -07:00
jonathanmetzman 71959211a5
[CIFuzz][NFC] Add tests for config_utils and do some minor refactoring (#6128) 2021-07-28 08:59:27 -07:00
jonathanmetzman 2dda5eedef
[CIFuzz][NFC] Fix some comments. (#6130) 2021-07-28 07:25:59 -07:00
jonathanmetzman 89da7cffce
[cifuzz][NFC] Make changes suggested in #6118 (#6127) 2021-07-28 07:11:51 -07:00
jonathanmetzman 6f0aa82cd1
[NFC][cifuzz] Move Workspace from docker into config_utils. (#6117)
It doesn't really fit into docker.
2021-07-27 12:11:53 -07:00
jonathanmetzman 192bf5f951
[CIFuzz] Add script to run cifuzz (#6118)
This can be used by non-github users.
Related: #6100
2021-07-27 12:11:27 -07:00
Fabian Meumertzheim 84578fe2a3
Remove JDK dependency not available on ClusterFuzz (#6105)
While installing `libxext-dev` in `base-runner` makes it available for local fuzzing via `infra/helper.py run_fuzzer`, it is not installed in the image used by ClusterFuzz to run fuzz targets. ​Fuzz targets that rely on any JDK system dependency rather have to install it manually using the method described in https://google.github.io/oss-fuzz/further-reading/fuzzer-environment/#runtime-dependencies. 

By removing this package from `base-runner`, a failure to do so will already be detected via a local `check_build` rather than only during fuzzer execution on ClusterFuzz.
2021-07-27 11:57:33 -07:00
jonathanmetzman 103e002ac1
[cifuzz] Get rid of MANUAL_SRC_PATH (#6120) 2021-07-27 11:49:52 -07:00
Oliver Chang 69400fb24b
Add a Git backed filestore. (#6088)
- Add storage-repo, storage-repo-branch, and
  storage-repo-branch-coverage fields to the actions, to indicate that
  the Git filestore should be used.
- The CI provided filestore is still used for crashes and builds.
- Replace generic Filestore.upload_directory with typed upload methods
  which matches the download methods.
- Rename upload_latest_build to upload_build to make it more generic.
- Make artifact name prefixes an implementation detail of the store.

For #6052.
2021-07-27 10:46:20 +10:00
Jonathan Metzman 3bd4c2d3ac [cifuzz] Fix last commit pushed to master 2021-07-23 08:12:52 -07:00
Jonathan Metzman 781749884b [cifuzz][github_actions] Create methods/functions for uploading without tar
This can be useful for artifacts we want to upload that we know
do not need to be tarred, such as crashes. It's important not
to tar these because they will need to be viewed by users.
2021-07-23 08:00:35 -07:00
Oliver Chang 1f679f0dd2
Add external actions. (#6086)
This will be used for testing and can be moved elsewhere later.
2021-07-23 08:19:10 +10:00
jonathanmetzman c67d5b8626
[CIFuzz] Fix build uploading. (#6096)
Previously, the downloaded build was uploaded instead of the new build.
This regression was introduced when the big workspace change was made.
Also, add more logging.
2021-07-22 12:52:07 -07:00
jonathanmetzman 24eb7e6668
[NFC][cifuzz] Add tests for github actions. (#6094)
To avoid issues like #6087 before they land.
2021-07-22 12:51:34 -07:00
jonathanmetzman 3d75fc9fb4
[cifuzz][NFC] Use f-strings instead of format function (#6095) 2021-07-22 09:22:29 -07:00
jonathanmetzman cdd78c464b
[cifuzz] Fix corpus usage in coverage reports (#6093)
Fixes #6089
2021-07-22 08:09:49 -07:00