Skip to content

Commit b8f8a8e

Browse files
author
Vikranth Subramanian
committed
update the examples and integration tests
1 parent b854099 commit b8f8a8e

File tree

4 files changed

+19
-13
lines changed

4 files changed

+19
-13
lines changed

examples/nullify.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,8 @@ attack_surface:
119119
- domain_names: [live.prod.hosting.com]
120120
http:
121121
paths: [/main, /api/**/create]
122-
aws_integration_configuration:
123-
enable_aws_integration: true
122+
aws_integration:
123+
enable: true
124124
primary_account_id: 123456789012
125125
primary_region: ap-southeast-2
126126
target_regions: [ap-southeast-2, us-east-2]

pkg/models/attack_surface.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,19 @@ type AttackSurface struct {
44
// global only
55
Enable bool `yaml:"enable"`
66
EnableDNSEnumeration bool `yaml:"enable_dns_enumeration"`
7-
AWSIntegration *AWSIntegration `yaml:"aws_integration,omitempty"`
7+
AWSIntegration *AWSIntegration `yaml:"aws_integration"`
88
IPAddresses []string `yaml:"ip_addresses,omitempty"`
99
DomainNames []string `yaml:"domain_names,omitempty"`
1010
IncludeOnly []AttackSurfaceIncludeOnly `yaml:"include_only,omitempty"`
1111
Ignore []AttackSurfaceIgnore `yaml:"ignore,omitempty"`
1212
}
1313

1414
type AWSIntegration struct {
15-
EnableAWSIntegration bool `yaml:"enable_aws_integration"`
16-
PrimaryAccountID string `yaml:"primary_account_id"`
17-
PrimaryRegion string `yaml:"primary_region"`
18-
TargetRegions *[]string `yaml:"target_regions,omitempty"`
19-
TargetAccounts *[]string `yaml:"target_accounts,omitempty"`
15+
Enable bool `yaml:"enable"`
16+
PrimaryAccountID string `yaml:"primary_account_id,omitempty"`
17+
PrimaryRegion string `yaml:"primary_region,omitempty"`
18+
TargetRegions *[]string `yaml:"target_regions,omitempty"`
19+
TargetAccounts *[]string `yaml:"target_accounts,omitempty"`
2020
}
2121

2222
type AttackSurfaceIncludeOnly struct {

tests/integration_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -189,11 +189,11 @@ func TestIntegration(t *testing.T) {
189189
},
190190
},
191191
AWSIntegration: &models.AWSIntegration{
192-
EnableAWSIntegration: true,
193-
PrimaryAccountID: "123456789012",
194-
PrimaryRegion: "ap-southeast-2",
195-
TargetRegions: &[]string{"ap-southeast-2", "us-east-2"},
196-
TargetAccounts: &[]string{"123456789012", "123456789013"},
192+
Enable: true,
193+
PrimaryAccountID: "123456789012",
194+
PrimaryRegion: "ap-southeast-2",
195+
TargetRegions: &[]string{"ap-southeast-2", "us-east-2"},
196+
TargetAccounts: &[]string{"123456789012", "123456789013"},
197197
},
198198
},
199199
}

tests/nullify.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,3 +114,9 @@ attack_surface:
114114
http:
115115
paths: [/auth]
116116
methods: [POST]
117+
aws_integration:
118+
enable: true
119+
primary_account_id: 123456789012
120+
primary_region: ap-southeast-2
121+
target_regions: [ap-southeast-2, us-east-2]
122+
target_accounts: [123456789012, 123456789013]

0 commit comments

Comments
 (0)