Skip to content

Commit f1a4256

Browse files
author
awstools
committed
feat(client-guardduty): Add domainWithSuffix finding field to dnsRequestAction
1 parent 9d179e8 commit f1a4256

File tree

5 files changed

+67
-46
lines changed

5 files changed

+67
-46
lines changed

clients/client-guardduty/src/commands/GetFindingsCommand.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,7 @@ export interface GetFindingsCommandOutput extends GetFindingsResponse, __Metadat
414414
* // Domain: "STRING_VALUE",
415415
* // Protocol: "STRING_VALUE",
416416
* // Blocked: true || false,
417+
* // DomainWithSuffix: "STRING_VALUE",
417418
* // },
418419
* // NetworkConnectionAction: { // NetworkConnectionAction
419420
* // Blocked: true || false,

clients/client-guardduty/src/endpoint/ruleset.ts

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -6,27 +6,29 @@ import { RuleSetObject } from "@smithy/types";
66
or see "smithy.rules#endpointRuleSet"
77
in codegen/sdk-codegen/aws-models/guardduty.json */
88

9-
const s="required",
10-
t="fn",
11-
u="argv",
12-
v="ref";
13-
const a="isSet",
14-
b="tree",
15-
c="error",
16-
d="endpoint",
17-
e="PartitionResult",
18-
f="getAttr",
19-
g={[s]:false,"type":"String"},
20-
h={[s]:true,"default":false,"type":"Boolean"},
21-
i={[v]:"Endpoint"},
22-
j={[t]:"booleanEquals",[u]:[{[v]:"UseFIPS"},true]},
23-
k={[t]:"booleanEquals",[u]:[{[v]:"UseDualStack"},true]},
24-
l={},
25-
m={[t]:"booleanEquals",[u]:[true,{[t]:f,[u]:[{[v]:e},"supportsFIPS"]}]},
26-
n={[v]:e},
27-
o={[t]:"booleanEquals",[u]:[true,{[t]:f,[u]:[n,"supportsDualStack"]}]},
28-
p=[j],
29-
q=[k],
30-
r=[{[v]:"Region"}];
31-
const _data={version:"1.0",parameters:{Region:g,UseDualStack:h,UseFIPS:h,Endpoint:g},rules:[{conditions:[{[t]:a,[u]:[i]}],type:b,rules:[{conditions:p,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:c},{conditions:q,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:c},{endpoint:{url:i,properties:l,headers:l},type:d}]},{conditions:[{[t]:a,[u]:r}],type:b,rules:[{conditions:[{[t]:"aws.partition",[u]:r,assign:e}],type:b,rules:[{conditions:[j,k],type:b,rules:[{conditions:[m,o],type:b,rules:[{endpoint:{url:"https://guardduty-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:l,headers:l},type:d}]},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:c}]},{conditions:p,type:b,rules:[{conditions:[m],type:b,rules:[{conditions:[{[t]:"stringEquals",[u]:["aws-us-gov",{[t]:f,[u]:[n,"name"]}]}],endpoint:{url:"https://guardduty.{Region}.amazonaws.com",properties:l,headers:l},type:d},{endpoint:{url:"https://guardduty-fips.{Region}.{PartitionResult#dnsSuffix}",properties:l,headers:l},type:d}]},{error:"FIPS is enabled but this partition does not support FIPS",type:c}]},{conditions:q,type:b,rules:[{conditions:[o],type:b,rules:[{endpoint:{url:"https://guardduty.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:l,headers:l},type:d}]},{error:"DualStack is enabled but this partition does not support DualStack",type:c}]},{endpoint:{url:"https://guardduty.{Region}.{PartitionResult#dnsSuffix}",properties:l,headers:l},type:d}]}]},{error:"Invalid Configuration: Missing Region",type:c}]};
9+
const u="required",
10+
v="fn",
11+
w="argv",
12+
x="ref";
13+
const a=true,
14+
b="isSet",
15+
c="booleanEquals",
16+
d="error",
17+
e="endpoint",
18+
f="tree",
19+
g="PartitionResult",
20+
h="getAttr",
21+
i={[u]:false,"type":"String"},
22+
j={[u]:true,"default":false,"type":"Boolean"},
23+
k={[x]:"Endpoint"},
24+
l={[v]:c,[w]:[{[x]:"UseFIPS"},true]},
25+
m={[v]:c,[w]:[{[x]:"UseDualStack"},true]},
26+
n={},
27+
o={[v]:h,[w]:[{[x]:g},"supportsFIPS"]},
28+
p={[x]:g},
29+
q={[v]:c,[w]:[true,{[v]:h,[w]:[p,"supportsDualStack"]}]},
30+
r=[l],
31+
s=[m],
32+
t=[{[x]:"Region"}];
33+
const _data={version:"1.0",parameters:{Region:i,UseDualStack:j,UseFIPS:j,Endpoint:i},rules:[{conditions:[{[v]:b,[w]:[k]}],rules:[{conditions:r,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:d},{conditions:s,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:d},{endpoint:{url:k,properties:n,headers:n},type:e}],type:f},{conditions:[{[v]:b,[w]:t}],rules:[{conditions:[{[v]:"aws.partition",[w]:t,assign:g}],rules:[{conditions:[l,m],rules:[{conditions:[{[v]:c,[w]:[a,o]},q],rules:[{endpoint:{url:"https://guardduty-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:n,headers:n},type:e}],type:f},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:d}],type:f},{conditions:r,rules:[{conditions:[{[v]:c,[w]:[o,a]}],rules:[{conditions:[{[v]:"stringEquals",[w]:[{[v]:h,[w]:[p,"name"]},"aws-us-gov"]}],endpoint:{url:"https://guardduty.{Region}.amazonaws.com",properties:n,headers:n},type:e},{endpoint:{url:"https://guardduty-fips.{Region}.{PartitionResult#dnsSuffix}",properties:n,headers:n},type:e}],type:f},{error:"FIPS is enabled but this partition does not support FIPS",type:d}],type:f},{conditions:s,rules:[{conditions:[q],rules:[{endpoint:{url:"https://guardduty.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:n,headers:n},type:e}],type:f},{error:"DualStack is enabled but this partition does not support DualStack",type:d}],type:f},{endpoint:{url:"https://guardduty.{Region}.{PartitionResult#dnsSuffix}",properties:n,headers:n},type:e}],type:f}],type:f},{error:"Invalid Configuration: Missing Region",type:d}]};
3234
export const ruleSet: RuleSetObject = _data;

clients/client-guardduty/src/models/models_0.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -654,6 +654,13 @@ export interface DnsRequestAction {
654654
* <p>Indicates whether the targeted port is blocked.</p>
655655
*/
656656
Blocked?: boolean;
657+
658+
/**
659+
* @public
660+
* <p>The second and top level domain involved in the
661+
* activity that prompted GuardDuty to generate this finding.</p>
662+
*/
663+
DomainWithSuffix?: string;
657664
}
658665

659666
/**
@@ -7123,6 +7130,9 @@ export interface ListFindingsRequest {
71237130
* <p>service.action.dnsRequestAction.domain</p>
71247131
* </li>
71257132
* <li>
7133+
* <p>service.action.dnsRequestAction.domainWithSuffix</p>
7134+
* </li>
7135+
* <li>
71267136
* <p>service.action.networkConnectionAction.blocked</p>
71277137
* </li>
71287138
* <li>

clients/client-guardduty/src/protocols/Aws_restJson1.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6922,6 +6922,7 @@ const de_DnsRequestAction = (output: any, context: __SerdeContext): DnsRequestAc
69226922
return take(output, {
69236923
Blocked: [, __expectBoolean, `blocked`],
69246924
Domain: [, __expectString, `domain`],
6925+
DomainWithSuffix: [, __expectString, `domainWithSuffix`],
69256926
Protocol: [, __expectString, `protocol`],
69266927
}) as any;
69276928
};

0 commit comments

Comments
 (0)