Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 4 additions & 0 deletions packages/jest-runner/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ export function loadConfig(optionsKey = "jazzerjs"): Options {
config.mode = "fuzzing";
}

if (config.mode === "fuzzing") {
config.dryRun = false;
}

if (config.verbose) {
process.env.JAZZER_DEBUG = "1";
}
Expand Down
12 changes: 12 additions & 0 deletions tests/bug-detectors/command-injection.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ describe("Command injection", () => {

it("exec with EVIL command", () => {
const fuzzTest = new FuzzTestBuilder()
.runs(0)
.sync(false)
.fuzzEntryPoint("execEVIL")
.dir(bugDetectorDirectory)
Expand All @@ -41,6 +42,7 @@ describe("Command injection", () => {

it("exec with FRIENDLY command", () => {
const fuzzTest = new FuzzTestBuilder()
.runs(0)
.sync(false)
.fuzzEntryPoint("execFRIENDLY")
.dir(bugDetectorDirectory)
Expand All @@ -51,6 +53,7 @@ describe("Command injection", () => {

it("execFile with EVIL file", () => {
const fuzzTest = new FuzzTestBuilder()
.runs(0)
.sync(false)
.fuzzEntryPoint("execFileEVIL")
.dir(bugDetectorDirectory)
Expand All @@ -63,6 +66,7 @@ describe("Command injection", () => {

it("execFile with FRIENDLY file", () => {
const fuzzTest = new FuzzTestBuilder()
.runs(0)
.sync(false)
.fuzzEntryPoint("execFileFRIENDLY")
.dir(bugDetectorDirectory)
Expand All @@ -73,6 +77,7 @@ describe("Command injection", () => {

it("execFileSync with EVIL file", () => {
const fuzzTest = new FuzzTestBuilder()
.runs(0)
.sync(false)
.fuzzEntryPoint("execFileSyncEVIL")
.dir(bugDetectorDirectory)
Expand All @@ -85,6 +90,7 @@ describe("Command injection", () => {

it("execFileSync with FRIENDLY file", () => {
const fuzzTest = new FuzzTestBuilder()
.runs(0)
.sync(false)
.fuzzEntryPoint("execFileSyncFRIENDLY")
.dir(bugDetectorDirectory)
Expand All @@ -95,6 +101,7 @@ describe("Command injection", () => {

it("spawn with EVIL command", () => {
const fuzzTest = new FuzzTestBuilder()
.runs(0)
.sync(false)
.fuzzEntryPoint("spawnEVIL")
.dir(bugDetectorDirectory)
Expand All @@ -107,6 +114,7 @@ describe("Command injection", () => {

it("spawn with FRIENDLY command", () => {
const fuzzTest = new FuzzTestBuilder()
.runs(0)
.sync(false)
.fuzzEntryPoint("spawnFRIENDLY")
.dir(bugDetectorDirectory)
Expand All @@ -117,6 +125,7 @@ describe("Command injection", () => {

it("spawnSync with EVIL command", () => {
const fuzzTest = new FuzzTestBuilder()
.runs(0)
.sync(false)
.fuzzEntryPoint("spawnSyncEVIL")
.dir(bugDetectorDirectory)
Expand All @@ -129,6 +138,7 @@ describe("Command injection", () => {

it("spawnSync with FRIENDLY command", () => {
const fuzzTest = new FuzzTestBuilder()
.runs(0)
.sync(false)
.fuzzEntryPoint("spawnSyncFRIENDLY")
.dir(bugDetectorDirectory)
Expand All @@ -139,6 +149,7 @@ describe("Command injection", () => {

it("fork with EVIL command", () => {
const fuzzTest = new FuzzTestBuilder()
.runs(0)
.sync(false)
.fuzzEntryPoint("forkEVIL")
.dir(bugDetectorDirectory)
Expand All @@ -151,6 +162,7 @@ describe("Command injection", () => {

it("fork with FRIENDLY command", () => {
const fuzzTest = new FuzzTestBuilder()
.runs(0)
.sync(false)
.fuzzEntryPoint("forkFRIENDLY")
.dir(bugDetectorDirectory)
Expand Down
15 changes: 15 additions & 0 deletions tests/bug-detectors/general.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ describe("General tests", () => {

it("Call with EVIL string; SYNC", () => {
const fuzzTest = new FuzzTestBuilder()
.runs(0)
.sync(true)
.fuzzEntryPoint("CallOriginalEvilSync")
.dir(bugDetectorDirectory)
Expand All @@ -69,6 +70,7 @@ describe("General tests", () => {

it("Call with FRIENDLY string; ASYNC", () => {
const fuzzTest = new FuzzTestBuilder()
.runs(0)
.sync(false)
.fuzzEntryPoint("CallOriginalFriendlyAsync")
.dir(bugDetectorDirectory)
Expand All @@ -79,6 +81,7 @@ describe("General tests", () => {

it("Call with FRIENDLY string; SYNC", () => {
const fuzzTest = new FuzzTestBuilder()
.runs(0)
.sync(true)
.fuzzEntryPoint("CallOriginalFriendlySync")
.dir(bugDetectorDirectory)
Expand All @@ -89,6 +92,7 @@ describe("General tests", () => {

it("Call with EVIL string; With done callback", () => {
const fuzzTest = new FuzzTestBuilder()
.runs(0)
.sync(false)
.fuzzEntryPoint("CallOriginalEvilDoneCallback")
.dir(bugDetectorDirectory)
Expand All @@ -102,6 +106,7 @@ describe("General tests", () => {

it("Call with EVIL string; With done callback; With try/catch", () => {
const fuzzTest = new FuzzTestBuilder()
.runs(0)
.sync(false)
.fuzzEntryPoint("CallOriginalEvilDoneCallbackWithTryCatch")
.dir(bugDetectorDirectory)
Expand All @@ -115,6 +120,7 @@ describe("General tests", () => {

it("Call with EVIL string; With done callback; With timeout", () => {
const fuzzTest = new FuzzTestBuilder()
.runs(0)
.sync(false)
.fuzzEntryPoint("CallOriginalEvilDoneCallbackWithTimeout")
.dir(bugDetectorDirectory)
Expand All @@ -129,6 +135,7 @@ describe("General tests", () => {

it("Call with EVIL string; With done callback; With timeout; With try/catch", () => {
const fuzzTest = new FuzzTestBuilder()
.runs(0)
.sync(false)
.fuzzEntryPoint("CallOriginalEvilDoneCallbackWithTimeoutWithTryCatch")
.dir(bugDetectorDirectory)
Expand All @@ -141,6 +148,7 @@ describe("General tests", () => {

it("Call with FRIENDLY string; With done callback", () => {
const fuzzTest = new FuzzTestBuilder()
.runs(0)
.sync(false)
.fuzzEntryPoint("CallOriginalFriendlyDoneCallback")
.dir(bugDetectorDirectory)
Expand Down Expand Up @@ -227,6 +235,7 @@ describe("General tests", () => {

it("Disable all bug detectors; Call with evil", () => {
const fuzzTest = new FuzzTestBuilder()
.runs(0)
.sync(false)
.fuzzEntryPoint("DisableAllBugDetectors")
.dir(bugDetectorDirectory)
Expand All @@ -240,6 +249,7 @@ describe("General tests", () => {

it("Jest: Test with EVIL command; SYNC", () => {
const fuzzTest = new FuzzTestBuilder()
.runs(0)
.sync(false)
.dir(bugDetectorDirectory)
.jestTestFile("tests.fuzz.js")
Expand All @@ -254,6 +264,7 @@ describe("General tests", () => {

it("Jest: Test with EVIL command; ASYNC", () => {
const fuzzTest = new FuzzTestBuilder()
.runs(0)
.sync(false)
.dir(bugDetectorDirectory)
.jestTestFile("tests.fuzz.js")
Expand All @@ -270,6 +281,7 @@ describe("General tests", () => {

it("Jest: Test with FRIENDLY command", () => {
const fuzzTest = new FuzzTestBuilder()
.runs(0)
.sync(false)
.dir(bugDetectorDirectory)
.jestTestFile("tests.fuzz.js")
Expand All @@ -281,6 +293,7 @@ describe("General tests", () => {

it("Jest: Test with FRIENDLY command; ASYNC", () => {
const fuzzTest = new FuzzTestBuilder()
.runs(0)
.sync(false)
.dir(bugDetectorDirectory)
.jestTestFile("tests.fuzz.js")
Expand Down Expand Up @@ -329,6 +342,7 @@ describe("General tests", () => {

it("Jest: Test with EVIL command; Done callback", () => {
const fuzzTest = new FuzzTestBuilder()
.runs(0)
.sync(false)
.dir(bugDetectorDirectory)
.jestTestFile("tests.fuzz.js")
Expand All @@ -345,6 +359,7 @@ describe("General tests", () => {

it("Jest: Test with FRIENDLY command; Done callback", () => {
const fuzzTest = new FuzzTestBuilder()
.runs(0)
.sync(false)
.dir(bugDetectorDirectory)
.jestTestFile("tests.fuzz.js")
Expand Down
13 changes: 13 additions & 0 deletions tests/bug-detectors/path-traversal.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ describe("Path Traversal", () => {

it("openSync with EVIL path", () => {
const fuzzTest = new FuzzTestBuilder()
.runs(0)
.sync(true)
.fuzzEntryPoint("PathTraversalFsOpenEvilSync")
.dir(bugDetectorDirectory)
Expand All @@ -41,6 +42,7 @@ describe("Path Traversal", () => {

it("open with EVIL path", () => {
const fuzzTest = new FuzzTestBuilder()
.runs(0)
.sync(false)
.fuzzEntryPoint("PathTraversalFsOpenEvilAsync")
.dir(bugDetectorDirectory)
Expand All @@ -52,6 +54,7 @@ describe("Path Traversal", () => {

it("mkdirSync with EVIL path", () => {
const fuzzTest = new FuzzTestBuilder()
.runs(0)
.sync(true)
.fuzzEntryPoint("PathTraversalFsMkdirEvilSync")
.dir(bugDetectorDirectory)
Expand All @@ -65,6 +68,7 @@ describe("Path Traversal", () => {

it("mkdirSync with SAFE path", () => {
const fuzzTest = new FuzzTestBuilder()
.runs(0)
.sync(true)
.fuzzEntryPoint("PathTraversalFsMkdirSafeSync")
.dir(bugDetectorDirectory)
Expand All @@ -76,6 +80,7 @@ describe("Path Traversal", () => {

it("mkdirAsync with EVIL path", () => {
const fuzzTest = new FuzzTestBuilder()
.runs(0)
.sync(false)
.fuzzEntryPoint("PathTraversalFsMkdirEvilAsync")
.dir(bugDetectorDirectory)
Expand All @@ -89,6 +94,7 @@ describe("Path Traversal", () => {

it("mkdirAsync with SAFE path", () => {
const fuzzTest = new FuzzTestBuilder()
.runs(0)
.sync(false)
.fuzzEntryPoint("PathTraversalFsMkdirSafeAsync")
.dir(bugDetectorDirectory)
Expand All @@ -100,6 +106,7 @@ describe("Path Traversal", () => {

it("mkdir PROMISES with SAFE path", () => {
const fuzzTest = new FuzzTestBuilder()
.runs(0)
.sync(false)
.fuzzEntryPoint("PathTraversalFspMkdirSafeAsync")
.dir(bugDetectorDirectory)
Expand All @@ -111,6 +118,7 @@ describe("Path Traversal", () => {

it("mkdir PROMISES with EVIL path", () => {
const fuzzTest = new FuzzTestBuilder()
.runs(0)
.sync(false)
.fuzzEntryPoint("PathTraversalFspMkdirEvilAsync")
.dir(bugDetectorDirectory)
Expand All @@ -124,6 +132,7 @@ describe("Path Traversal", () => {

it("open PROMISES with EVIL path", () => {
const fuzzTest = new FuzzTestBuilder()
.runs(0)
.sync(false)
.fuzzEntryPoint("PathTraversalFspOpenEvilAsync")
.dir(bugDetectorDirectory)
Expand All @@ -135,6 +144,7 @@ describe("Path Traversal", () => {

it("joinSync with EVIL path", () => {
const fuzzTest = new FuzzTestBuilder()
.runs(0)
.sync(true)
.fuzzEntryPoint("PathTraversalJoinEvilSync")
.dir(bugDetectorDirectory)
Expand All @@ -146,6 +156,7 @@ describe("Path Traversal", () => {

it("joinSync with SAFE path", () => {
const fuzzTest = new FuzzTestBuilder()
.runs(0)
.sync(true)
.fuzzEntryPoint("PathTraversalJoinSafeSync")
.dir(bugDetectorDirectory)
Expand All @@ -155,6 +166,7 @@ describe("Path Traversal", () => {

it("join with EVIL path", () => {
const fuzzTest = new FuzzTestBuilder()
.runs(0)
.sync(false)
.fuzzEntryPoint("PathTraversalJoinEvilAsync")
.dir(bugDetectorDirectory)
Expand All @@ -166,6 +178,7 @@ describe("Path Traversal", () => {

it("join with SAFE path", () => {
const fuzzTest = new FuzzTestBuilder()
.runs(0)
.sync(false)
.fuzzEntryPoint("PathTraversalJoinSafeAsync")
.dir(bugDetectorDirectory)
Expand Down
Loading