Skip to content
This repository has been archived by the owner on Nov 1, 2023. It is now read-only.

Commit

Permalink
Switch over to new coverage task (#2741)
Browse files Browse the repository at this point in the history
  • Loading branch information
ranweiler authored Feb 15, 2023
1 parent 2d59a2a commit 58f756d
Show file tree
Hide file tree
Showing 46 changed files with 383 additions and 6,804 deletions.
96 changes: 96 additions & 0 deletions docs/webhook_events.md
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,10 @@ If webhook is set to have Event Grid message format then the payload will look a
"title": "Expect Crash On Failure",
"type": "boolean"
},
"function_allowlist": {
"title": "Function Allowlist",
"type": "string"
},
"generator_env": {
"additionalProperties": {
"type": "string"
Expand All @@ -438,6 +442,10 @@ If webhook is set to have Event Grid message format then the payload will look a
"title": "Minimized Stack Depth",
"type": "integer"
},
"module_allowlist": {
"title": "Module Allowlist",
"type": "string"
},
"preserve_existing_outputs": {
"title": "Preserve Existing Outputs",
"type": "boolean"
Expand All @@ -457,6 +465,10 @@ If webhook is set to have Event Grid message format then the payload will look a
"title": "Report List",
"type": "array"
},
"source_allowlist": {
"title": "Source Allowlist",
"type": "string"
},
"stats_file": {
"title": "Stats File",
"type": "string"
Expand Down Expand Up @@ -2323,6 +2335,10 @@ If webhook is set to have Event Grid message format then the payload will look a
"title": "Expect Crash On Failure",
"type": "boolean"
},
"function_allowlist": {
"title": "Function Allowlist",
"type": "string"
},
"generator_env": {
"additionalProperties": {
"type": "string"
Expand All @@ -2345,6 +2361,10 @@ If webhook is set to have Event Grid message format then the payload will look a
"title": "Minimized Stack Depth",
"type": "integer"
},
"module_allowlist": {
"title": "Module Allowlist",
"type": "string"
},
"preserve_existing_outputs": {
"title": "Preserve Existing Outputs",
"type": "boolean"
Expand All @@ -2364,6 +2384,10 @@ If webhook is set to have Event Grid message format then the payload will look a
"title": "Report List",
"type": "array"
},
"source_allowlist": {
"title": "Source Allowlist",
"type": "string"
},
"stats_file": {
"title": "Stats File",
"type": "string"
Expand Down Expand Up @@ -3051,6 +3075,10 @@ If webhook is set to have Event Grid message format then the payload will look a
"title": "Expect Crash On Failure",
"type": "boolean"
},
"function_allowlist": {
"title": "Function Allowlist",
"type": "string"
},
"generator_env": {
"additionalProperties": {
"type": "string"
Expand All @@ -3073,6 +3101,10 @@ If webhook is set to have Event Grid message format then the payload will look a
"title": "Minimized Stack Depth",
"type": "integer"
},
"module_allowlist": {
"title": "Module Allowlist",
"type": "string"
},
"preserve_existing_outputs": {
"title": "Preserve Existing Outputs",
"type": "boolean"
Expand All @@ -3092,6 +3124,10 @@ If webhook is set to have Event Grid message format then the payload will look a
"title": "Report List",
"type": "array"
},
"source_allowlist": {
"title": "Source Allowlist",
"type": "string"
},
"stats_file": {
"title": "Stats File",
"type": "string"
Expand Down Expand Up @@ -3570,6 +3606,10 @@ If webhook is set to have Event Grid message format then the payload will look a
"title": "Expect Crash On Failure",
"type": "boolean"
},
"function_allowlist": {
"title": "Function Allowlist",
"type": "string"
},
"generator_env": {
"additionalProperties": {
"type": "string"
Expand All @@ -3592,6 +3632,10 @@ If webhook is set to have Event Grid message format then the payload will look a
"title": "Minimized Stack Depth",
"type": "integer"
},
"module_allowlist": {
"title": "Module Allowlist",
"type": "string"
},
"preserve_existing_outputs": {
"title": "Preserve Existing Outputs",
"type": "boolean"
Expand All @@ -3611,6 +3655,10 @@ If webhook is set to have Event Grid message format then the payload will look a
"title": "Report List",
"type": "array"
},
"source_allowlist": {
"title": "Source Allowlist",
"type": "string"
},
"stats_file": {
"title": "Stats File",
"type": "string"
Expand Down Expand Up @@ -4032,6 +4080,10 @@ If webhook is set to have Event Grid message format then the payload will look a
"title": "Expect Crash On Failure",
"type": "boolean"
},
"function_allowlist": {
"title": "Function Allowlist",
"type": "string"
},
"generator_env": {
"additionalProperties": {
"type": "string"
Expand All @@ -4054,6 +4106,10 @@ If webhook is set to have Event Grid message format then the payload will look a
"title": "Minimized Stack Depth",
"type": "integer"
},
"module_allowlist": {
"title": "Module Allowlist",
"type": "string"
},
"preserve_existing_outputs": {
"title": "Preserve Existing Outputs",
"type": "boolean"
Expand All @@ -4073,6 +4129,10 @@ If webhook is set to have Event Grid message format then the payload will look a
"title": "Report List",
"type": "array"
},
"source_allowlist": {
"title": "Source Allowlist",
"type": "string"
},
"stats_file": {
"title": "Stats File",
"type": "string"
Expand Down Expand Up @@ -4468,6 +4528,10 @@ If webhook is set to have Event Grid message format then the payload will look a
"title": "Expect Crash On Failure",
"type": "boolean"
},
"function_allowlist": {
"title": "Function Allowlist",
"type": "string"
},
"generator_env": {
"additionalProperties": {
"type": "string"
Expand All @@ -4490,6 +4554,10 @@ If webhook is set to have Event Grid message format then the payload will look a
"title": "Minimized Stack Depth",
"type": "integer"
},
"module_allowlist": {
"title": "Module Allowlist",
"type": "string"
},
"preserve_existing_outputs": {
"title": "Preserve Existing Outputs",
"type": "boolean"
Expand All @@ -4509,6 +4577,10 @@ If webhook is set to have Event Grid message format then the payload will look a
"title": "Report List",
"type": "array"
},
"source_allowlist": {
"title": "Source Allowlist",
"type": "string"
},
"stats_file": {
"title": "Stats File",
"type": "string"
Expand Down Expand Up @@ -4931,6 +5003,10 @@ If webhook is set to have Event Grid message format then the payload will look a
"title": "Expect Crash On Failure",
"type": "boolean"
},
"function_allowlist": {
"title": "Function Allowlist",
"type": "string"
},
"generator_env": {
"additionalProperties": {
"type": "string"
Expand All @@ -4953,6 +5029,10 @@ If webhook is set to have Event Grid message format then the payload will look a
"title": "Minimized Stack Depth",
"type": "integer"
},
"module_allowlist": {
"title": "Module Allowlist",
"type": "string"
},
"preserve_existing_outputs": {
"title": "Preserve Existing Outputs",
"type": "boolean"
Expand All @@ -4972,6 +5052,10 @@ If webhook is set to have Event Grid message format then the payload will look a
"title": "Report List",
"type": "array"
},
"source_allowlist": {
"title": "Source Allowlist",
"type": "string"
},
"stats_file": {
"title": "Stats File",
"type": "string"
Expand Down Expand Up @@ -6678,6 +6762,10 @@ If webhook is set to have Event Grid message format then the payload will look a
"title": "Expect Crash On Failure",
"type": "boolean"
},
"function_allowlist": {
"title": "Function Allowlist",
"type": "string"
},
"generator_env": {
"additionalProperties": {
"type": "string"
Expand All @@ -6700,6 +6788,10 @@ If webhook is set to have Event Grid message format then the payload will look a
"title": "Minimized Stack Depth",
"type": "integer"
},
"module_allowlist": {
"title": "Module Allowlist",
"type": "string"
},
"preserve_existing_outputs": {
"title": "Preserve Existing Outputs",
"type": "boolean"
Expand All @@ -6719,6 +6811,10 @@ If webhook is set to have Event Grid message format then the payload will look a
"title": "Report List",
"type": "array"
},
"source_allowlist": {
"title": "Source Allowlist",
"type": "string"
},
"stats_file": {
"title": "Stats File",
"type": "string"
Expand Down
3 changes: 3 additions & 0 deletions src/ApiService/ApiService/OneFuzzTypes/Enums.cs
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,9 @@ public enum TaskFeature {
ReportList,
MinimizedStackDepth,
CoverageFilter,
FunctionAllowlist,
ModuleAllowlist,
SourceAllowlist,
TargetMustUseInput,
TargetAssembly,
TargetClass,
Expand Down
12 changes: 12 additions & 0 deletions src/ApiService/ApiService/OneFuzzTypes/Model.cs
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,13 @@ public record TaskDetails(
bool? PreserveExistingOutputs = null,
List<string>? ReportList = null,
long? MinimizedStackDepth = null,

// Deprecated. Retained for processing old table data.
string? CoverageFilter = null,

string? FunctionAllowlist = null,
string? ModuleAllowlist = null,
string? SourceAllowlist = null,
string? TargetAssembly = null,
string? TargetClass = null,
string? TargetMethod = null
Expand Down Expand Up @@ -977,7 +983,13 @@ Uri HeartbeatQueue
public long? EnsembleSyncDelay { get; set; }
public List<string>? ReportList { get; set; }
public long? MinimizedStackDepth { get; set; }

// Deprecated. Retained for processing old table data.
public string? CoverageFilter { get; set; }

public string? FunctionAllowlist { get; set; }
public string? ModuleAllowlist { get; set; }
public string? SourceAllowlist { get; set; }
public string? TargetAssembly { get; set; }
public string? TargetClass { get; set; }
public string? TargetMethod { get; set; }
Expand Down
18 changes: 18 additions & 0 deletions src/ApiService/ApiService/onefuzzlib/Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,24 @@ await _containers.GetContainerSasUrl(x.Item2.Name, StorageType.Corpus, ConvertPe
}
}

if (definition.Features.Contains(TaskFeature.FunctionAllowlist)) {
if (task.Config.Task.FunctionAllowlist != null) {
config.FunctionAllowlist = task.Config.Task.FunctionAllowlist;
}
}

if (definition.Features.Contains(TaskFeature.ModuleAllowlist)) {
if (task.Config.Task.ModuleAllowlist != null) {
config.ModuleAllowlist = task.Config.Task.ModuleAllowlist;
}
}

if (definition.Features.Contains(TaskFeature.SourceAllowlist)) {
if (task.Config.Task.SourceAllowlist != null) {
config.SourceAllowlist = task.Config.Task.SourceAllowlist;
}
}

if (definition.Features.Contains(TaskFeature.TargetAssembly)) {
config.TargetAssembly = task.Config.Task.TargetAssembly;
}
Expand Down
8 changes: 7 additions & 1 deletion src/ApiService/ApiService/onefuzzlib/Defs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,14 @@ public static class Defs {
TaskFeature.TargetEnv,
TaskFeature.TargetOptions,
TaskFeature.TargetTimeout,
TaskFeature.CoverageFilter,
TaskFeature.TargetMustUseInput,

// Deprecated. Retained for processing old table data.
TaskFeature.CoverageFilter,

TaskFeature.FunctionAllowlist,
TaskFeature.ModuleAllowlist,
TaskFeature.SourceAllowlist,
},
Vm: new VmDefinition(Compare: Compare.Equal, Value:1),
Containers: new [] {
Expand Down
Loading

0 comments on commit 58f756d

Please sign in to comment.