-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Single match expression should run multiple regex types #553
Conversation
@@ -454,24 +454,32 @@ private static void MergeDictionary(IList<Dictionary<string, FlexMatch>> mergeFr | |||
|
|||
private void RunMatchExpression(FlexMatch binary64DecodedMatch, AnalyzeContext context, MatchExpression matchExpression) | |||
{ | |||
bool isMalformed = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -314,9 +314,9 @@ private Assembly CurrentDomain_AssemblyResolve(object sender, ResolveEventArgs a | |||
// We will only attempt to resolve an assembly a single time | |||
// to avoid re-entrance in cases where our logic below fails | |||
string assemblyName = args.Name.Split(',')[0]; | |||
if (this._resolvedNames.ContainsKey(assemblyName)) | |||
if (this._resolvedNames.TryGetValue(assemblyName, out resolved)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Src/ReleaseHistory.md
Outdated
@@ -22,6 +22,8 @@ | |||
`SEC101/036.MySqlCredential`, `SEC101/037.SqlCredentials`, | |||
`SEC101/038.PostgreSqlCredentials` won't accept spaces in `id` and `secret`. | |||
[#550](https://github.com/microsoft/sarif-pattern-matcher/pull/550) | |||
- PRF: Single match expression can run multiple regex types. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
if (matchExpression.IntrafileRegexes?.Count > 0 || | ||
matchExpression.SingleLineRegexes?.Count > 0) | ||
else |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -314,9 +314,9 @@ private Assembly CurrentDomain_AssemblyResolve(object sender, ResolveEventArgs a | |||
// We will only attempt to resolve an assembly a single time | |||
// to avoid re-entrance in cases where our logic below fails | |||
string assemblyName = args.Name.Split(',')[0]; | |||
if (this._resolvedNames.ContainsKey(assemblyName)) | |||
if (this._resolvedNames.TryGetValue(assemblyName, out resolved)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes
Please provide a brief description of the changes here.
For significant contributions please make sure you have completed the following items:
ReleaseHistory.md
updated for non-trivial changes