-
Notifications
You must be signed in to change notification settings - Fork 140
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## Summary of changes Fixed a regression bug. The key variable for the process update wasn't the right one. # Bug explanation The Path of the file wasn't get from the right variable. `result.TypedFile` is a `JToken`, getting the `Path` from this object would get the path of the JSON token. The path is an empty string and totally not the info we wanted to get. ## Test coverage - Add a way to set custom headers instead of the default `Mistake Not...` to trigger a blocking event from the default ruleset - Added an integration test where it tests deletion and switch back to default rules but keep updated blocking action.
- Loading branch information
Showing
6 changed files
with
220 additions
and
6 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
43 changes: 43 additions & 0 deletions
43
tracer/test/Datadog.Trace.Security.IntegrationTests/remote-rules-override-blocking.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
{ | ||
"version": "2.2", | ||
"metadata": { | ||
"rules_version": "18.18.18" | ||
}, | ||
"rules": [ | ||
{ | ||
"id": "new-test-non-blocking", | ||
"name": "Datadog test scanner - NON blocking version: user-agent", | ||
"tags": { | ||
"type": "attack_tool", | ||
"category": "attack_attempt", | ||
"cwe": "200", | ||
"capec": "1000/118/169", | ||
"tool_name": "Datadog Canary Test", | ||
"confidence": "1" | ||
}, | ||
"conditions": [ | ||
{ | ||
"parameters": { | ||
"inputs": [ | ||
{ | ||
"address": "server.request.headers.no_cookies", | ||
"key_path": [ | ||
"user-agent" | ||
] | ||
}, | ||
{ | ||
"address": "grpc.server.request.metadata", | ||
"key_path": [ | ||
"dd-canary" | ||
] | ||
} | ||
], | ||
"regex": "^dd-test-scanner-log-block(?:$|/|\\s)" | ||
}, | ||
"operator": "match_regex" | ||
} | ||
], | ||
"transformers": [] | ||
} | ||
] | ||
} |
This file contains 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