-
Notifications
You must be signed in to change notification settings - Fork 93
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
Add new AdvSec & GHAS validation rules to Multitool #2761
Add new AdvSec & GHAS validation rules to Multitool #2761
Conversation
Service-specific rules derived from common base as appropriate. These are real rules that can be used as samples for this new pattern.
@@ -15,6 +15,14 @@ | |||
|
|||
namespace Microsoft.CodeAnalysis.Sarif.Multitool.Rules | |||
{ | |||
[Flags] | |||
public enum RuleKinds |
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.
I see we have rules name like:
SARIF2015
GHAS1003
GH1006
ADO1003
the first one SARIF is apply to all,
looks like we are missing GH here.
Should user able to enable any number of the: GH, GHAS,ADO checklist? or just one of them.
e.g. I want to scan once with 3 of them enabled: SARIF+GH+GHAS but not the ADO rules.
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.
Yes I think that is how it should work.
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.
BTW, I still have cleanup to do wrt naming.
src/Sarif.Multitool.Library/Rules/SarifValidationSkimmerBase.cs
Outdated
Show resolved
Hide resolved
src/Test.FunctionalTests.Sarif/TestData/Multitool/BaselineOption/Inputs/TEST1001.Baseline.sarif
Show resolved
Hide resolved
src/Test.FunctionalTests.Sarif/TestData/Multitool/BaselineOption/Inputs/TEST1002.Baseline.sarif
Show resolved
Hide resolved
src/Test.FunctionalTests.Sarif/TestData/Multitool/BaselineOption/Inputs/TEST1002.Baseline.sarif
Show resolved
Hide resolved
FYI I'm going to look into the test failures now. #Resolved |
…hub.com/microsoft/sarif-sdk into users/cmeyer/multitool-validation-rules
We need this PR to be wrapped up, would appreciate everyone to get the branch in sync, tests passing, please explicitly mark this PR as approved or add your current feedback based on Chris changes. Thanks! Will be very good to get this closed and deployed to the web site. |
My current thought:
In reply to: 1899188676 Refers to: src/Sarif.Multitool.Library/Rules/RuleId.cs:43 in e9c27e5. [](commit_id = e9c27e5, deletion_comment = False) |
Yes there is likely some overlap. I will review this once we are stable. I also want to add some tests. In reply to: 1899188676 Refers to: src/Sarif.Multitool.Library/Rules/RuleId.cs:43 in e9c27e5. [](commit_id = e9c27e5, deletion_comment = False) |
( CodeFlow now throws error when I try to add comments so I have to use the web UI now, I guess it is the PR getting bigger ) |
I remember there was requirement from Michael, need to be able to use the config from file, when I work on SARIF SDK feature before. |
This change adds SARIF validation rules for ADO AdvSec and GHAS to the Multitool library. Some of the rules are partially or entirely the same between the two services. Base rule classes are used to model this. This change includes a few rules to demonstrate the architecture.
Note: there are some unit tests that fail when they are run by ADO or BuildAndTest.cmd. I'll look into that by EOD Thursday.