Reducing unhandled exceptions for the certificate rules#544
Merged
Conversation
eddynaka
commented
Aug 25, 2021
|
|
||
| $SEC101/026.MailgunApiCredentialsId=(?is)(?:[^0-9a-z]|^)(?P<id>[0-9a-z]+?)\.mailgun\.org(?:[^0-9a-z]|$) | ||
| $SEC101/026.MailgunApiCredentialsSecret=(?is)(?:[^0-9a-z]|^)(?P<secret>[0-9a-z]{32}-[0-9a-z]{8}-[0-9a-z]{8})(?:[^0-9a-z]|$) | ||
| $SEC101/026.MailgunApiCredentialsId=(?si)(?:[^0-9a-z]|^)(?P<id>[0-9a-z]+?)\.mailgun\.org(?:[^0-9a-z]|$) |
Collaborator
Author
Member
There was a problem hiding this comment.
thanks for making this consistent! nice.
eddynaka
commented
Aug 25, 2021
| $SEC101/013/Putty.CryptographicPrivateKey=(?is)PuTTY-User-Key-File-2.+?Private-Lines:\s*[0-9]+\s*(?P<secret>.+?)Private-MAC:\s[0-9a-z]+(?:[^0-9a-d]|$) | ||
| $SEC101/013/Pem.CryptographicPrivateKey=(?si)-{5}BEGIN (?:DSA|EC|OPENSSH|PGP|RSA|SSH2 ENCRYPTED)?\s*PRIVATE (?:KEY BLOCK|KEY)-{5}.*?(?:VERSION: [^\n]+\n)*\n?(?P<secret>[^:]*?)-{5}END (?:DSA|EC|OPENSSH|PGP|RSA|SSH2 ENCRYPTED)?\s*PRIVATE (?:KEY BLOCK|KEY)-{5} | ||
| $SEC101/013/Putty.CryptographicPrivateKey=(?si)PuTTY-User-Key-File-2.+?Private-Lines:\s*[0-9]+\s*(?P<secret>.+?)Private-MAC:\s[0-9a-z]+(?:[^0-9a-d]|$) | ||
| $SEC101/013/Pem.CryptographicPrivateKey=(?si)-{5}BEGIN (?:DSA|EC|OPENSSH|PGP|RSA|SSH2 ENCRYPTED)?\s*PRIVATE (?:KEY BLOCK|KEY)-{5}.*?(?:(?:VERSION|Proc-Type|DEK-Info): [^\n]+\n)*\n?(?P<secret>[^:]*?)-{5}END (?:DSA|EC|OPENSSH|PGP|RSA|SSH2 ENCRYPTED)?\s*PRIVATE (?:KEY BLOCK|KEY)-{5} |
Collaborator
Author
Collaborator
Author
There was a problem hiding this comment.
this will prevent an error when we try to convert to byte[]
eddynaka
commented
Aug 25, 2021
| { | ||
| try | ||
| { | ||
| byte[] bytes = Convert.FromBase64String(content.Value); |
Collaborator
Author
|
|
||
| - Plugin Improvement: Required properties will throw exception if they do not exist. [#539](https://github.com/microsoft/sarif-pattern-matcher/pull/539) | ||
| - Tool Improvement: Tool will emit fixes with comprehensive region properties. [#540](https://github.com/microsoft/sarif-pattern-matcher/pull/540) | ||
| - Rule Improvement: Improving certificate handling. [#544](https://github.com/microsoft/sarif-pattern-matcher/pull/544) |
Member
There was a problem hiding this comment.
Eddy, can we please start documenting changes by their actual impact at analysis time?
Does this change eliminate unhandled exceptions? Increase results (i.e., eliminates false negatives), decrease false positives?
This is the data we need in a change log. 'Rule improvement' doesn't tell us anything about how analysis is impacted. We use the change log to help explain deltas between test runs. #Closed
| ref message, | ||
| ref resultLevelKind); | ||
| } | ||
| catch (Exception) |
Member
Collaborator
Author
There was a problem hiding this comment.
changed to get formatexception that would generate a nomatch.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
Please provide a brief description of the changes here.
For significant contributions please make sure you have completed the following items:
ReleaseHistory.mdupdated for non-trivial changes