Skip to content

Commit

Permalink
contrib/grpc: update security rules in appsec tests (#1596)
Browse files Browse the repository at this point in the history
Co-authored-by: Julio Guerra <julio@datadog.com>
  • Loading branch information
Hellzy and Julio Guerra committed Nov 30, 2022
1 parent 153cabf commit a35a123
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions contrib/google.golang.org/grpc/appsec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func TestAppSec(t *testing.T) {
// The request should have the attack attempts
event, _ := finished[0].Tag("_dd.appsec.json").(string)
require.NotNil(t, event)
require.True(t, strings.Contains(event, "crs-941-100")) // XSS attack attempt
require.True(t, strings.Contains(event, "crs-941-110")) // XSS attack attempt
require.True(t, strings.Contains(event, "ua0-600-55x")) // canary rule attack attempt
})

Expand Down Expand Up @@ -89,7 +89,7 @@ func TestAppSec(t *testing.T) {
// The request should have the attack attempts
event, _ := finished[5].Tag("_dd.appsec.json").(string)
require.NotNil(t, event)
require.True(t, strings.Contains(event, "crs-941-100")) // XSS attack attempt
require.True(t, strings.Contains(event, "crs-941-110")) // XSS attack attempt
require.True(t, strings.Contains(event, "crs-942-100")) // SQL-injection attack attempt
require.True(t, strings.Contains(event, "ua0-600-55x")) // canary rule attack attempt
})
Expand Down

0 comments on commit a35a123

Please sign in to comment.