Skip to content

Commit

Permalink
Update Iast Log Warning to Error
Browse files Browse the repository at this point in the history
  • Loading branch information
e-n-0 committed Dec 31, 2024
1 parent 6486306 commit 1c35fa8
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public class MongoDatabaseAspect
}
catch (global::System.Exception ex)
{
IastModule.Log.Warning(ex, $"Error invoking {nameof(MongoDatabaseAspect)}.{nameof(AnalyzeCommand)}");
IastModule.Log.Error(ex, $"Error invoking {nameof(MongoDatabaseAspect)}.{nameof(AnalyzeCommand)}");
return command;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ static NewtonsoftJsonAspects()
}
catch (Exception ex)
{
IastModule.Log.Warning(ex, "Error while tainting the JObject");
IastModule.Log.Error(ex, "Error while tainting the JObject");
}

return result;
Expand Down Expand Up @@ -113,7 +113,7 @@ static NewtonsoftJsonAspects()
}
catch (Exception ex)
{
IastModule.Log.Warning(ex, "Error while tainting the JArray");
IastModule.Log.Error(ex, "Error while tainting the JArray");
}

return result;
Expand All @@ -136,7 +136,7 @@ static NewtonsoftJsonAspects()
}
catch (Exception ex)
{
IastModule.Log.Warning(ex, "Error while tainting the JToken");
IastModule.Log.Error(ex, "Error while tainting the JToken");
}

return result;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public static void AppendFormatted1(ref DefaultInterpolatedStringHandler target,
}
catch (Exception ex)
{
IastModule.Log.Warning(ex, $"Error invoking {nameof(DefaultInterpolatedStringHandlerAspect)}.{nameof(AppendFormatted1)}");
IastModule.Log.Error(ex, $"Error invoking {nameof(DefaultInterpolatedStringHandlerAspect)}.{nameof(AppendFormatted1)}");
}
}

Expand All @@ -59,7 +59,7 @@ public static void AppendFormatted2(ref DefaultInterpolatedStringHandler target,
}
catch (Exception ex)
{
IastModule.Log.Warning(ex, $"Error invoking {nameof(DefaultInterpolatedStringHandlerAspect)}.{nameof(AppendFormatted2)}");
IastModule.Log.Error(ex, $"Error invoking {nameof(DefaultInterpolatedStringHandlerAspect)}.{nameof(AppendFormatted2)}");
}
}

Expand All @@ -83,7 +83,7 @@ public static void AppendFormatted3(ref DefaultInterpolatedStringHandler target,
}
catch (Exception ex)
{
IastModule.Log.Warning(ex, $"Error invoking {nameof(DefaultInterpolatedStringHandlerAspect)}.{nameof(AppendFormatted3)}");
IastModule.Log.Error(ex, $"Error invoking {nameof(DefaultInterpolatedStringHandlerAspect)}.{nameof(AppendFormatted3)}");
}
}

Expand All @@ -106,7 +106,7 @@ public static void AppendFormatted4<T>(ref DefaultInterpolatedStringHandler targ
}
catch (Exception ex)
{
IastModule.Log.Warning(ex, $"Error invoking {nameof(DefaultInterpolatedStringHandlerAspect)}.{nameof(AppendFormatted4)}");
IastModule.Log.Error(ex, $"Error invoking {nameof(DefaultInterpolatedStringHandlerAspect)}.{nameof(AppendFormatted4)}");
}
}

Expand All @@ -130,7 +130,7 @@ public static void AppendFormatted5<T>(ref DefaultInterpolatedStringHandler targ
}
catch (Exception ex)
{
IastModule.Log.Warning(ex, $"Error invoking {nameof(DefaultInterpolatedStringHandlerAspect)}.{nameof(AppendFormatted5)}");
IastModule.Log.Error(ex, $"Error invoking {nameof(DefaultInterpolatedStringHandlerAspect)}.{nameof(AppendFormatted5)}");
}
}

Expand All @@ -154,7 +154,7 @@ public static void AppendFormatted6<T>(ref DefaultInterpolatedStringHandler targ
}
catch (Exception ex)
{
IastModule.Log.Warning(ex, $"Error invoking {nameof(DefaultInterpolatedStringHandlerAspect)}.{nameof(AppendFormatted6)}");
IastModule.Log.Error(ex, $"Error invoking {nameof(DefaultInterpolatedStringHandlerAspect)}.{nameof(AppendFormatted6)}");
}
}

Expand All @@ -179,7 +179,7 @@ public static void AppendFormatted7<T>(ref DefaultInterpolatedStringHandler targ
}
catch (Exception ex)
{
IastModule.Log.Warning(ex, $"Error invoking {nameof(DefaultInterpolatedStringHandlerAspect)}.{nameof(AppendFormatted7)}");
IastModule.Log.Error(ex, $"Error invoking {nameof(DefaultInterpolatedStringHandlerAspect)}.{nameof(AppendFormatted7)}");
}
}

Expand All @@ -198,7 +198,7 @@ public static void AppendLiteral(ref DefaultInterpolatedStringHandler target, st
}
catch (Exception ex)
{
IastModule.Log.Warning(ex, $"Error invoking {nameof(DefaultInterpolatedStringHandlerAspect)}.{nameof(AppendLiteral)}");
IastModule.Log.Error(ex, $"Error invoking {nameof(DefaultInterpolatedStringHandlerAspect)}.{nameof(AppendLiteral)}");
}
}

Expand All @@ -217,7 +217,7 @@ public static string ToStringAndClear(ref DefaultInterpolatedStringHandler targe
}
catch (Exception ex)
{
IastModule.Log.Warning(ex, $"Error invoking {nameof(DefaultInterpolatedStringHandlerAspect)}.{nameof(ToStringAndClear)}");
IastModule.Log.Error(ex, $"Error invoking {nameof(DefaultInterpolatedStringHandlerAspect)}.{nameof(ToStringAndClear)}");
}

return result;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public static object Parse(string json, JsonDocumentOptions options)
}
catch (Exception ex)
{
IastModule.Log.Warning(ex, "Error tainting JsonDocument.Parse result");
IastModule.Log.Error(ex, "Error tainting JsonDocument.Parse result");
}

return doc;
Expand All @@ -60,7 +60,7 @@ public static object Parse(string json, JsonDocumentOptions options)
}
catch (Exception ex)
{
IastModule.Log.Warning(ex, "Error casting to IJsonElement");
IastModule.Log.Error(ex, "Error casting to IJsonElement");
return null;
}

Expand All @@ -77,7 +77,7 @@ public static object Parse(string json, JsonDocumentOptions options)
}
catch (Exception ex)
{
IastModule.Log.Warning(ex, "Error tainting JsonElement.GetString result");
IastModule.Log.Error(ex, "Error tainting JsonElement.GetString result");
}

return str;
Expand All @@ -101,7 +101,7 @@ public static object Parse(string json, JsonDocumentOptions options)
}
catch (Exception ex)
{
IastModule.Log.Warning(ex, "Error casting to IJsonElement");
IastModule.Log.Error(ex, "Error casting to IJsonElement");
return null;
}

Expand All @@ -118,7 +118,7 @@ public static object Parse(string json, JsonDocumentOptions options)
}
catch (Exception ex)
{
IastModule.Log.Warning(ex, "Error tainting JsonElement.GetRawText result");
IastModule.Log.Error(ex, "Error tainting JsonElement.GetRawText result");
}

return str;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public class JavaScriptSerializerAspects
}
catch (Exception ex)
{
IastModule.Log.Warning(ex, "Error while tainting json in DeserializeObject");
IastModule.Log.Error(ex, "Error while tainting json in DeserializeObject");
}

return result;
Expand Down

0 comments on commit 1c35fa8

Please sign in to comment.