Commit Graph

45 Commits

Author SHA1 Message Date
jonathanmetzman 571dbfb39f
Reland 55d9a81. (#4269)
The issue with 55d9a81 that caused it to be reverted by 3370f8f
was probably due to the build trigger on GCB being stale. I've
updated it so this commit should stick.
2020-08-06 14:33:08 -07:00
Evgeny Vereshchagin 3370f8f7e5
Revert "[CIFuzz] Allow supplying a manual source checkout (#4250)" (#4263)
This reverts commit 55d9a81cd7.

Closes https://github.com/google/oss-fuzz/issues/4262
2020-08-06 06:11:59 -07:00
jonathanmetzman 55d9a81cd7
[CIFuzz] Allow supplying a manual source checkout (#4250)
Make CIFuzz building accept an env var `MANUAL_SRC_PATH` that points to a manually prepared checkout of the project-under-tests's source code. This allows projects like Skia which are not on OSS-Fuzz and/or need to make changes to the repo after checking out the right commit to use CIFuzz.
Note that for now we aren't supporting this in GitHub, so projects that need to modify the source after checkout can't use it until
we do support it.

Also, use the local copy of OSS-Fuzz when building cifuzz-base instead of cloning it from GitHub. This makes local debugging/development much easier since it allows one to use CIFuzz with local changes.
2020-08-05 18:45:12 -07:00
Abhishek Arya 21ea9d6e3d
Remove sanitizer validation checks in CIFuzz, (#4131)
Sanitizer validation is not needed and it is hacky code with
no proper yaml parsing. sanitizer attribute is properly
documented.
Fixes #3996.
2020-07-15 13:00:57 -07:00
Oliver Chang 2816e8729c
Fix infra tests. (#4097) 2020-07-10 07:00:02 +10:00
jonathanmetzman cac6118315
[cifuzz] Temporary fix for sanitizer validation. (#3997)
Temporary fix for sanitizer validation.

Our sanitizer validation is hacky and isn't using pyyaml to actually
parse the project.yaml file. Temporarily work around #3996 by not
validating sanitizers if no sanitizers are specified in project.yaml.
2020-06-17 10:32:42 -07:00
Evgeny Vereshchagin 26e8d7c772
[CIFuzz] Add support for different sanitizers (#3969)
* Revert "Revert "[CIFuzz] Add support for different sanitizers (#3516)""

This reverts commit c580d0d626.

* cifuzz: pass "sanitizer" to the "run fuzzer" step

It's a follow-up to https://github.com/google/oss-fuzz/pull/3516 that
should fix https://github.com/google/oss-fuzz/issues/3727.

* [cifuzz] drop a $

That's another follow-up to #3516 that should help to pass sanitizer correctly.
Otherwise, it always falls back to address with:

2020-06-11 21:10:14,852 - root - INFO - $address is not a project sanitizer, defaulting to address.
2020-06-11 18:27:01 -07:00
jonathanmetzman 659d4e8228
Fix CIFuzz issue where targets assumed in OSS-Fuzz build if exists (#3817)
Make some other changes:
1. Refactor fuzz_target.py and fuzz_target_test.py
2. Introduce pyfakefs and parameterized as dependencies and use them
in tests.
3. Fix infra-tests in CI so that they use installed dependencies
2020-05-28 10:14:57 -07:00
Evgeny Vereshchagin 0b35444f73
cifuzz: use pull_request.number instead of GITHUB_REF (#3845)
Closes https://github.com/google/oss-fuzz/issues/3732
2020-05-18 18:37:39 -07:00
Abhishek Arya 8d5aef84db
Use hardcoded FUZZING_LANGUAGE to unbreak CIFuzz. (#3844) 2020-05-18 08:23:28 -07:00
jonathanmetzman 1f533163cc
[CIFuzz] Support ALLOWED_BROKEN_TARGETS_PERCENTAGE (#3726)
Currently we use Github action's inputs as inputs to cifuzz.
This means we need to do an extra step to convert each input into
an env var so our scripts can actually use it.
This is pretty bug prone and unnecessary, we should probably
get rid of this abstraction and switch to encouraging devs to set
the env vars directly.
2020-05-13 12:44:11 -07:00
Evgeny Vereshchagin 8ba4f3a375
cifuzz: upload artifacts only when the "run fuzzers" step fails (#3733)
Closes https://github.com/google/oss-fuzz/issues/3711
2020-04-30 09:40:39 -07:00
Jonathan Metzman c580d0d626 Revert "[CIFuzz] Add support for different sanitizers (#3516)"
This reverts commit 9b30127675.
2020-04-28 14:38:10 -07:00
Jonathan Metzman dac83d7b8e Revert "[CIFuzz] Support ALLOWED_BROKEN_TARGETS_PERCENTAGE"
This reverts commit 6f1a7f7911.
2020-04-28 13:37:58 -07:00
Jonathan Metzman 6f1a7f7911 [CIFuzz] Support ALLOWED_BROKEN_TARGETS_PERCENTAGE 2020-04-28 13:36:21 -07:00
Leo Neat 9b30127675
[CIFuzz] Add support for different sanitizers (#3516) 2020-04-28 12:31:36 -07:00
Leo Neat 9d52175ca0
Affected fuzzer fix (#3510)
Fix bug in affected fuzzer caused by miss matched naming. The git diff was returning file paths relative to the root of the project and the coverage files was returning file paths relative to one directory above the project directory.
2020-03-16 12:02:16 -07:00
Leo Neat a1c7499830
[CIFuzz] Logging updates (#3503)
Provide some simple logging updates to assert that affected fuzzers is running correctly.
Also prevents the clouding of longs when the reproduction script runs.
2020-03-16 10:00:56 -07:00
Leo Neat 6f02735d0c
[CIFuzz] Dynamic fuzzer scheduling (#3453)
Allocates time for fuzzers based on amount of fuzzing time left. This is beneficial when a fuzzer fails early in its allotted time because of a reproducible OSS-Fuzz bug. It will then give the remaining portion of its allotted time to the following fuzzers.
2020-03-13 10:35:33 -07:00
Leo Neat b6a1d4dcb1
Revert "Revert "[CIFuzz] Affected fuzzers (#3450)" (#3488)" (#3496)
This reverts commit e58ee49e20.
2020-03-12 13:51:33 -07:00
Leo Neat b0cd13e3bb
Affected fuzzer fix (#3494)
Fixing json decode error with affected fuzzer functionality.
2020-03-12 12:01:57 -07:00
Leo Neat e58ee49e20
Revert "[CIFuzz] Affected fuzzers (#3450)" (#3488)
This reverts commit e8ebda10ee.
2020-03-10 15:59:43 -07:00
Leo Neat e8ebda10ee
[CIFuzz] Affected fuzzers (#3450)
Add feature to only run fuzzers that are affected by the code change. This change prevents valuable time being wasted on fuzzing unchanged code.
2020-03-10 13:22:11 -07:00
Leo Neat 5869bb7341
[CIFuzz] Download code coverage (#3434)
This is the foundation for affected fuzzers. It provides the ability to map fuzzers to files. In the future we will use this functionality to pick which fuzzers to run during CI.
2020-03-05 11:22:44 -08:00
Leo Neat ffa49091d6
[infra] Presubmit fix - test (#3443)
Fixes issue that presubmit test was not returning failure even when a test failed.
2020-03-05 08:44:18 -08:00
Leo Neat 7fb97cb3d6
[CIFuzz] Timeout orphan process fix (#3462)
This fix adds the -max_total_time argument to the cifuzz run_fuzzers command. The bug that was occurring was the docker process was being killed but the fuzzing was continuing wasting valuable compute resources. So a project with a large number of fuzzers would have all of them running by the end of CIFUzz leading to no actual fuzzing getting done because of resource scarcity. This patch should fix that.
2020-03-04 14:58:09 -08:00
Leo Neat 8d905b08c2
[CIFuzz] Adding dry_run mode to check_build (#3444)
Prevents crash from surfacing when dry run mode is enabled and check fuzzers fails.
2020-02-28 09:41:44 -08:00
Leo Neat f8a4ad1a8f
[CIFuzz] Reproduce bug fix (#3442)
This patch should fix the reproduce bug that has been occurring. It should distinguish between novel and old bugs better.
2020-02-27 15:33:00 -08:00
Leo Neat 12a2e86d46
[CIFuzz] Check fuzzers (#3419)
Checks that the fuzzer build was a success in the build action.
2020-02-27 08:54:52 -08:00
Leo Neat 2aa7a0d558
[CIFuzz] Use backup corpus for fuzzing (#3380)
This allows fuzzing using fuzz target's backup corpora. It will make fuzzing more efficient for targets that have a backup OSS-Fuzz corpus avaliable to the public. It will not effect targets that don't have backups.
2020-02-26 08:47:13 -08:00
Leo Neat f16f391a18
Docs fix (#3416)
Small change to example file to reflect the current action state.
2020-02-21 10:48:22 -08:00
Leo Neat 1522a7428c
[Infra] Add tests to presubmit (#3405)
Adds unit/integration tests to travis presubmit.
2020-02-21 08:47:13 -08:00
Leo Neat 39fe0d725b
[CIFuzz] Check crash on most recent OSS-Fuzz build (#3385)
Adds functionality to check if a crash exists in the most recent OSS-Fuzz build. This is necessary to determine if a crash was introduced in the current pull request or existed in the project already.  Crashes that are surfaced to the user will be both reproducible and novel to the OSS-Fuzz project.
2020-02-19 15:32:30 -08:00
Leo Neat e661c8c4a8
[CIFuzz] log bug fix (#3407)
* Fixing log bug

* Fixing log bug
2020-02-18 15:45:31 -08:00
Leo Neat 9f52d142aa
[CIFuzz] Only report reproducible crashes (#3376)
* Tests for Reproduce

* Leo comments

* Maxs comments pt.2

* Olivers comments

* Olivers comments

* Add fuzz target module tests

* Formatting

* Small punct and spelling

* Test update

* Format
2020-02-12 14:44:11 -08:00
Leo Neat 0ed0f37ca2
[CIFuzz] Change 'bug_report' directory to 'artifacts'. (#3369) 2020-02-11 08:42:10 -08:00
Leo Neat ffc6af6d1d
[CIFuzz] Add parse fuzzer output functionality (#3342) 2020-02-10 10:00:54 -08:00
Leo Neat 460661c700
Fixing entrypoint (#3354) 2020-02-06 14:00:55 -08:00
Leo Neat 5cefaac000
[CIFuzz] Separate build and run actions (#3336)
* Separating actions into build and run

* Formatting

* Formatting

* Removing project-name from run action

* Jonathan comments

* Maxs comments pt.1

* Updating example_main.yml

* Switch 1 0 to true false

* Add base Dockerfile for CIFuzz

* Adding license to dockerfile
2020-02-06 13:39:42 -08:00
Max Moroz 67353e882d [cifuzz] Dummy change to test something. 2020-02-06 10:47:18 -08:00
Leo Neat da04f5e431
[CIFuzz] Add seed and len control to fuzzer arguments (#3321) 2020-02-04 10:54:28 -08:00
Leo Neat 83d951bd1d
[CIFuzz] Prevent action from failing option (#3315)
* Adding opt to workflow to prevent failures

* fclose bug

* Undoing double negitive

* Undoing double negitive

* Undoing double negitive

* Syntax and formatting

* Olivers comments

* Presubmit fix

* Trying boolean argument

* cleaning

* cleaning fuzz disassembles

* Maxs comments pt.2

* Updating dry_run parse

* Comments added

* Formatting

* Olivers comments
2020-02-03 15:35:04 -08:00
Leo Neat 1a87da68c8
[cifuzz] - commit and pull request hook functionality (#3310) 2020-01-31 15:31:18 -08:00
Leo Neat 8ffc6db00c
[Infra] CIFuzz pipeline complete. (#3281)
* Testing action build

* Testing action build

* Testing action build

* Testing action build

* Testing action build

* Testing action build

* Testing action build

* Testing action build

* Testing action build

* Testing action build

* Testing action build

* Testing action build

* Testing action build

* Testing action build

* Testing action build

* Testing action build

* Testing action build

* Testing action build

* Testing action build

* Testing action build

* Testing action build

* Working build

* Working build

* Working build

* Working build

* Working build

* Working build

* Working build

* Working build

* Working build

* Working build

* Working build

* Working build

* Working build

* Working build

* Working build

* Working build

* Working build

* Working build

* Working build

* Working build

* Working build

* Working build

* Working build

* Working build

* Working build

* Working build

* Working fuzzers with out error surface

* Working fuzzers with out error surface

* Working fuzzers with out error surface

* Printing std err

* Adding fuzzer timeout

* Adding fuzzer timeout

* Changing fuzzer timeout to fuzz time

* Formatting and refactoring

* Spelling in fuzz_target.py

* Spelling in fuzz_target.py

* Spelling in fuzz_target.py

* Upload artifact fix

* Upload artifact fix

* Upload artifact fix

* Upload artifact fix

* Upload artifact fix

* Upload artifact fix

* Upload artifact fix

* Refactoring error codes.

* reverting helper.py

* reverting helper.py

* reverting helper.py

* chaning method to static

* moving cifuzz file

* Jonathan changes

* Oliver and Jonathan comments

* Oliver and Jonathan comments

* Oliver and Jonathan comments

* Utils unit tests

* Test formatting and documentation

* Build fuzzer test added

* Changed repo manager errors

* Unit and integration tests complete

* Jonathan comments pt.1

* Jonathan comments pt.1

* Jonathan comments pt.1

* adding cifuzz_test

* Build fuzzer test completed

* Run fuzzers test finished.

* Removed SRC dependency

* Jonathan comments pt.2

* Max comments pt.1

* Max comments pt.2

* removing log specified out stream

* Max comments pt.3

* Adding OSS_FUZZ_HOME env var

* Jonathan comments pt.3

* Formatting

* Olivers comments

* Jonathan comments
2020-01-29 11:03:43 -08:00
Leo Neat 40fa9e5e9c [infra] CIFuzz - Add github action to OSS-Fuzz repo (#3214) 2020-01-13 15:25:12 -08:00