-
Notifications
You must be signed in to change notification settings - Fork 74
migrate PO00{1,2,3,4,5} to ST00{3,4,5,6,7} #342
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
Conversation
- To consider Condition placements, and to report line numbers on the endpoint file, checks must be on Step, not Policy. Therefore move PO00{1,2,3,4,5} to ST00{3,4,5,6,7}, and re-design those plugins so they report on the Endpoint. - Also introduce new tests for these cases, for Sharedflows. - And modify Endpoint so that it correctly reports errors in Sharedflows. (This never worked!) And introduce new tests to verify that this is working correctly.
Also see the PR #343 |
@@ -27,13 +27,31 @@ const plugin = { | |||
"A check for a body element must be performed before policy execution.", | |||
fatal: false, | |||
severity: 2, //error |
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.
change to warning
@@ -27,13 +26,31 @@ const plugin = { | |||
"A check for a body element must be performed before policy execution.", | |||
fatal: false, | |||
severity: 2, //error |
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.
change to warning
lib/package/plugins/ST006-threatProtectionJSONConditionCheck.js
Outdated
Show resolved
Hide resolved
test/fixtures/resources/ThreatProtection-Attachment/apiproxy/proxies/endpoint1.xml
Show resolved
Hide resolved
Given a policy with:
I get 3 errors - ST005 - for the steps using Extract-Variables-FormParam policy.
|
- also add tests for specific formparams
I have modified ST005 , so that the condition must be one of these:
If there are multiple |
More changes coming. . . . . |
This took me awhile to find, given a policy without a Source element (optional - default uses message) or with a Source element that is anything but
These Conditions are insufficient without a Source element in the policy.
Easy to reproduce, just remove Source element from your test policy in Also, I think we should add the test conditions to the warning message, it took me a while to figure out the right Condition. Perhaps: |
these messages now include example conditions
@DinoChiesa - Should we add a note in the README about the plugin rule change from PO to ST? |
This fixes issue #339
To consider Condition placements, and to report line numbers on the endpoint file, these checks should be on the Step, not on the Policy, and should use onProxyEndpoint and onTargetEndpoint. Therefore move PO00{1,2,3,4,5} to ST00{3,4,5,6,7}, and re-factor those plugins so they report on the Endpoints.
Also introduce new tests for these cases, for Sharedflows.
And modify the Endpoint module so that it correctly reports errors in Sharedflows. (This never worked!) And introduce new tests to verify that this is working correctly. With this change, I see that EP002 and PD005 are incorrectly reporting errors on Step elements within SharedFlows. I will fix that in a subsequent PR.