Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
381a031
add the new splunk matcher
ax-hsmith Apr 2, 2025
134e43c
add required splunkNotableEvent property and checkInterval to threate…
ax-hsmith Apr 2, 2025
2fb00eb
add CheckInterval to Scenario struct and builder
ax-hsmith Apr 2, 2025
053f1a5
set default check interval in Scenario builder and update logging for…
ax-hsmith Apr 2, 2025
00962c5
add support for Splunk notable event matcher and implement check inte…
ax-hsmith Apr 2, 2025
c37eb6d
update parser.go with new schema changes
ax-hsmith Apr 2, 2025
8694c20
use scenario-specific CheckInterval in runner configuration if available
ax-hsmith Apr 2, 2025
3c6e050
remove todo and change comment around job completion sleep
ax-hsmith Apr 2, 2025
07fd1ba
introduce closeBody function to make my IDE happy re: unhandled errors
ax-hsmith Apr 2, 2025
2f85aee
add debug statement to print final splunk search query
ax-hsmith Apr 2, 2025
b396d55
remove commented code
ax-hsmith Apr 2, 2025
5f467b0
Expect 2xx responses, 300s are no good either
ax-hsmith Apr 2, 2025
76f8659
add createRequest function documentation for clarity
ax-hsmith Apr 2, 2025
55c7049
handle non-2xx response status in search results retrieval
ax-hsmith Apr 2, 2025
0a67721
add more docs
ax-hsmith Apr 2, 2025
0cf598c
change log level from debug to info for assertion requeueing
ax-hsmith Apr 2, 2025
c44281f
remove commented code
ax-hsmith Apr 10, 2025
7ad2ef7
add autogenerated mock for SplunkAPI
ax-hsmith Apr 10, 2025
18526e8
rename executionID to detonationUuid
ax-hsmith Apr 10, 2025
282de4a
rename executionID to detonationUuid and add startTime fallback in pe…
ax-hsmith Apr 10, 2025
f41d733
add tests and utility functions for Splunk notable events handling
ax-hsmith Apr 10, 2025
b41ada9
add Splunk Enterprise Security notable events to supported alert matc…
ax-hsmith Apr 10, 2025
d9988d4
add schema for Splunk notable events matcher
ax-hsmith Apr 10, 2025
de7f350
refactor notable events generation to use custom type for improved re…
ax-hsmith Apr 11, 2025
886f2dd
add README for Splunk Enterprise Security notable event matcher confi…
ax-hsmith Apr 11, 2025
30e62da
updated go version to 1.23.0 and stratus-red-team to v2.23.2 along wi…
ax-hsmith Jun 9, 2025
99bd8f6
add ES version info and notes re: compatibility with Splunk Enterpris…
ax-hsmith Jul 8, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ An **alert matcher** is a platform-specific integration that can check if an exp

Supported alert matchers:
* Datadog security signals
* Splunk Enterprise Security notable events

### Detonation and alert correlation

Expand Down
10 changes: 9 additions & 1 deletion cmd/threatest/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,15 @@ func (m *RunCommand) runSingleScenario(scenarios <-chan *threatest.Scenario, res
for scenario := range scenarios {
runner := threatest.Threatest()
runner.Scenarios = append(runner.Scenarios, scenario)
runner.Interval = 2 * time.Second

// Use the scenario's CheckInterval if it's set, otherwise use default
if scenario.CheckInterval > 0 {
runner.Interval = scenario.CheckInterval
log.Debugf("Using scenario-specific check interval: %v", scenario.CheckInterval)
} else {
runner.Interval = 2 * time.Second
log.Debugf("Using default check interval: 2s")
}

start := time.Now()
err := runner.Run()
Expand Down
176 changes: 106 additions & 70 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,108 +2,142 @@ module github.com/datadog/threatest

require (
github.com/DataDog/datadog-api-client-go/v2 v2.19.0
github.com/aws/aws-sdk-go-v2 v1.17.1
github.com/aws/aws-sdk-go-v2/config v1.18.2
github.com/aws/aws-sdk-go-v2/service/iam v1.18.23
github.com/aws/smithy-go v1.13.4
github.com/datadog/stratus-red-team/v2 v2.4.8
github.com/google/uuid v1.3.1
github.com/aws/aws-sdk-go-v2 v1.36.1
github.com/aws/aws-sdk-go-v2/config v1.29.6
github.com/aws/aws-sdk-go-v2/service/iam v1.39.1
github.com/aws/smithy-go v1.22.2
github.com/datadog/stratus-red-team/v2 v2.23.2
github.com/google/uuid v1.6.0
github.com/hashicorp/go-uuid v1.0.3
github.com/kevinburke/ssh_config v1.2.0
github.com/sirupsen/logrus v1.9.0
github.com/spf13/cobra v1.7.0
github.com/stretchr/testify v1.8.1
golang.org/x/crypto v0.14.0
github.com/stretchr/testify v1.10.0
golang.org/x/crypto v0.36.0
gopkg.in/alessio/shellescape.v1 v1.0.0-20170105083845-52074bc9df61
sigs.k8s.io/yaml v1.3.0
)

require (
cloud.google.com/go/compute v1.20.1 // indirect
cloud.google.com/go/compute/metadata v0.2.3 // indirect
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.2.0 // indirect
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.0 // indirect
github.com/Azure/azure-sdk-for-go/sdk/internal v1.1.1 // indirect
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute v1.0.0 // indirect
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.0.0 // indirect
github.com/AzureAD/microsoft-authentication-library-for-go v0.7.0 // indirect
cloud.google.com/go/auth v0.14.0 // indirect
cloud.google.com/go/auth/oauth2adapt v0.2.7 // indirect
cloud.google.com/go/compute v1.31.1 // indirect
cloud.google.com/go/compute/metadata v0.6.0 // indirect
cloud.google.com/go/iam v1.3.1 // indirect
cloud.google.com/go/secretmanager v1.14.4 // indirect
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.14.0 // indirect
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.7.0 // indirect
github.com/Azure/azure-sdk-for-go/sdk/internal v1.10.0 // indirect
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v4 v4.2.1 // indirect
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6 v6.1.0 // indirect
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.2.0 // indirect
github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2 // indirect
github.com/DataDog/zstd v1.5.2 // indirect
github.com/ProtonMail/go-crypto v1.1.0-alpha.2 // indirect
github.com/alessio/shellescape v1.4.1 // indirect
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.9 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.13.2 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.19 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.25 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.19 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.3.26 // indirect
github.com/aws/aws-sdk-go-v2/internal/v4a v1.0.16 // indirect
github.com/aws/aws-sdk-go-v2/service/cloudtrail v1.20.2 // indirect
github.com/aws/aws-sdk-go-v2/service/ec2 v1.72.0 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.10 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.20 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.19 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.13.19 // indirect
github.com/aws/aws-sdk-go-v2/service/lambda v1.25.0 // indirect
github.com/aws/aws-sdk-go-v2/service/organizations v1.16.15 // indirect
github.com/aws/aws-sdk-go-v2/service/rds v1.30.0 // indirect
github.com/aws/aws-sdk-go-v2/service/rolesanywhere v1.0.12 // indirect
github.com/aws/aws-sdk-go-v2/service/s3 v1.29.3 // indirect
github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.16.7 // indirect
github.com/aws/aws-sdk-go-v2/service/ssm v1.33.0 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.11.25 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.13.8 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.17.4 // indirect
github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.8 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.17.59 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.28 // indirect
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.61 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.32 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.32 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.2 // indirect
github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.32 // indirect
github.com/aws/aws-sdk-go-v2/service/bedrockruntime v1.24.4 // indirect
github.com/aws/aws-sdk-go-v2/service/cloudtrail v1.47.4 // indirect
github.com/aws/aws-sdk-go-v2/service/ec2 v1.202.4 // indirect
github.com/aws/aws-sdk-go-v2/service/ec2instanceconnect v1.27.15 // indirect
github.com/aws/aws-sdk-go-v2/service/eks v1.58.0 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.2 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.6.0 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.13 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.13 // indirect
github.com/aws/aws-sdk-go-v2/service/lambda v1.69.12 // indirect
github.com/aws/aws-sdk-go-v2/service/organizations v1.37.8 // indirect
github.com/aws/aws-sdk-go-v2/service/rds v1.93.12 // indirect
github.com/aws/aws-sdk-go-v2/service/rolesanywhere v1.16.15 // indirect
github.com/aws/aws-sdk-go-v2/service/route53resolver v1.34.13 // indirect
github.com/aws/aws-sdk-go-v2/service/s3 v1.76.1 // indirect
github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.34.18 // indirect
github.com/aws/aws-sdk-go-v2/service/ses v1.29.10 // indirect
github.com/aws/aws-sdk-go-v2/service/ssm v1.56.12 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.24.15 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.14 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.33.14 // indirect
github.com/cenkalti/backoff/v4 v4.2.1 // indirect
github.com/cjlapao/common-go v0.0.39 // indirect
github.com/cloudflare/circl v1.3.7 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/emicklei/go-restful/v3 v3.10.1 // indirect
github.com/go-logr/logr v1.2.3 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/go-logr/logr v1.4.2 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-openapi/jsonpointer v0.19.5 // indirect
github.com/go-openapi/jsonreference v0.20.0 // indirect
github.com/go-openapi/swag v0.22.3 // indirect
github.com/goccy/go-json v0.10.2 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang-jwt/jwt v3.2.2+incompatible // indirect
github.com/golang-jwt/jwt/v4 v4.4.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/golang-jwt/jwt/v4 v4.5.2 // indirect
github.com/golang-jwt/jwt/v5 v5.2.2 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/google/gnostic v0.6.9 // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/s2a-go v0.1.4 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.2.3 // indirect
github.com/googleapis/gax-go/v2 v2.11.0 // indirect
github.com/google/s2a-go v0.1.9 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.3.4 // indirect
github.com/googleapis/gax-go/v2 v2.14.1 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-version v1.6.0 // indirect
github.com/hashicorp/hc-install v0.4.0 // indirect
github.com/hashicorp/terraform-exec v0.17.3 // indirect
github.com/hashicorp/terraform-json v0.14.0 // indirect
github.com/imdario/mergo v0.3.13 // indirect
github.com/hashicorp/hc-install v0.6.4 // indirect
github.com/hashicorp/terraform-exec v0.21.0 // indirect
github.com/hashicorp/terraform-json v0.22.1 // indirect
github.com/imdario/mergo v0.3.15 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/kr/pretty v0.3.0 // indirect
github.com/kylelemons/godebug v1.1.0 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/microsoft/kiota-abstractions-go v1.7.0 // indirect
github.com/microsoft/kiota-authentication-azure-go v1.1.0 // indirect
github.com/microsoft/kiota-http-go v1.4.4 // indirect
github.com/microsoft/kiota-serialization-form-go v1.0.0 // indirect
github.com/microsoft/kiota-serialization-json-go v1.0.8 // indirect
github.com/microsoft/kiota-serialization-multipart-go v1.0.0 // indirect
github.com/microsoft/kiota-serialization-text-go v1.0.0 // indirect
github.com/microsoftgraph/msgraph-beta-sdk-go v0.108.0 // indirect
github.com/microsoftgraph/msgraph-sdk-go v1.47.0 // indirect
github.com/microsoftgraph/msgraph-sdk-go-core v1.2.1 // indirect
github.com/moby/spdystream v0.2.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/stretchr/objx v0.5.0 // indirect
github.com/zclconf/go-cty v1.12.1 // indirect
go.opencensus.io v0.24.0 // indirect
golang.org/x/net v0.17.0 // indirect
golang.org/x/oauth2 v0.10.0 // indirect
golang.org/x/sys v0.13.0 // indirect
golang.org/x/term v0.13.0 // indirect
golang.org/x/text v0.13.0 // indirect
golang.org/x/time v0.2.0 // indirect
google.golang.org/api v0.126.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc // indirect
google.golang.org/grpc v1.55.0 // indirect
google.golang.org/protobuf v1.31.0 // indirect
github.com/std-uritemplate/std-uritemplate/go v0.0.57 // indirect
github.com/stretchr/objx v0.5.2 // indirect
github.com/zclconf/go-cty v1.14.4 // indirect
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.58.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.58.0 // indirect
go.opentelemetry.io/otel v1.34.0 // indirect
go.opentelemetry.io/otel/metric v1.34.0 // indirect
go.opentelemetry.io/otel/trace v1.34.0 // indirect
golang.org/x/mod v0.17.0 // indirect
golang.org/x/net v0.38.0 // indirect
golang.org/x/oauth2 v0.25.0 // indirect
golang.org/x/sync v0.12.0 // indirect
golang.org/x/sys v0.31.0 // indirect
golang.org/x/term v0.30.0 // indirect
golang.org/x/text v0.23.0 // indirect
golang.org/x/time v0.9.0 // indirect
google.golang.org/api v0.218.0 // indirect
google.golang.org/genproto v0.0.0-20250122153221-138b5a5a4fd4 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20250124145028-65684f501c47 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20250115164207-1a7da9e5054f // indirect
google.golang.org/grpc v1.70.0 // indirect
google.golang.org/protobuf v1.36.4 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
Expand All @@ -117,4 +151,6 @@ require (
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
)

go 1.18
go 1.23.0

toolchain go1.24.3
Loading