Skip to content

Commit ba2942c

Browse files
committed
update to v2.1.4
1 parent ec18fd2 commit ba2942c

File tree

25 files changed

+17380
-6657
lines changed

25 files changed

+17380
-6657
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@ All notable changes to this project are documented in this file.
55
Based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [2.1.4] - 2024-1-18
9+
10+
### Fixed
11+
12+
- Discovery Process Assumes Root Account Is Management Account [496](https://github.com/aws-solutions/workload-discovery-on-aws/issues/496)
13+
- Security [vulnerability](https://github.com/advisories/GHSA-jchw-25xp-jwwc) in `follow-redirects`.
14+
- Security [vulnerability](https://github.com/advisories/GHSA-92r3-m2mg-pj97) in `vite`.
15+
816
## [2.1.3] - 2023-12-18
917

1018
### Fixed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Workload Discovery on AWS (v2.1.3)
1+
# Workload Discovery on AWS (v2.1.4)
22

33
Workload Discovery on AWS is a tool that quickly visualizes AWS Cloud workloads as architecture diagrams.
44
You can use the solution to build, customize, and share detailed workload visualizations based on live data from AWS.

source/backend/discovery/package-lock.json

Lines changed: 15505 additions & 6592 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

source/backend/discovery/package.json

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "wd-discovery",
3-
"version": "2.1.3",
3+
"version": "2.1.4",
44
"description": "This contains the code that forms the discovery process for AWS Perspective.",
55
"main": "index.js",
66
"scripts": {
@@ -20,24 +20,24 @@
2020
},
2121
"license": "Apache-2.0",
2222
"dependencies": {
23-
"@aws-sdk/client-api-gateway": "3.359.0",
24-
"@aws-sdk/client-cognito-identity-provider": "3.359.0",
25-
"@aws-sdk/client-config-service": "3.359.0",
26-
"@aws-sdk/client-dynamodb-streams": "3.359.0",
27-
"@aws-sdk/client-ec2": "3.359.0",
28-
"@aws-sdk/client-ecs": "3.359.0",
29-
"@aws-sdk/client-eks": "3.359.0",
30-
"@aws-sdk/client-elastic-load-balancing": "3.359.0",
31-
"@aws-sdk/client-elastic-load-balancing-v2": "3.359.0",
32-
"@aws-sdk/client-iam": "3.359.0",
33-
"@aws-sdk/client-lambda": "3.359.0",
34-
"@aws-sdk/client-opensearch": "3.359.0",
35-
"@aws-sdk/client-organizations": "3.359.0",
36-
"@aws-sdk/client-sns": "3.359.0",
37-
"@aws-sdk/client-sts": "3.359.0",
38-
"@aws-sdk/credential-providers": "3.359.0",
39-
"@aws-sdk/util-arn-parser": "3.310.0",
40-
"@smithy/util-retry": "2.0.6",
23+
"@aws-sdk/client-api-gateway": "3.485.0",
24+
"@aws-sdk/client-cognito-identity-provider": "3.485.0",
25+
"@aws-sdk/client-config-service": "3.486.0",
26+
"@aws-sdk/client-dynamodb-streams": "3.485.0",
27+
"@aws-sdk/client-ec2": "3.488.0",
28+
"@aws-sdk/client-ecs": "3.489.0",
29+
"@aws-sdk/client-eks": "3.485.0",
30+
"@aws-sdk/client-elastic-load-balancing": "3.485.0",
31+
"@aws-sdk/client-elastic-load-balancing-v2": "3.485.0",
32+
"@aws-sdk/client-iam": "3.489.0",
33+
"@aws-sdk/client-lambda": "3.485.0",
34+
"@aws-sdk/client-opensearch": "3.486.0",
35+
"@aws-sdk/client-organizations": "3.485.0",
36+
"@aws-sdk/client-sns": "3.485.0",
37+
"@aws-sdk/client-sts": "3.489.0",
38+
"@aws-sdk/credential-providers": "3.489.0",
39+
"@aws-sdk/util-arn-parser": "3.465.0",
40+
"@smithy/util-retry": "2.0.9",
4141
"@supercharge/promise-pool": "3.1.0",
4242
"async-retry": "1.3.3",
4343
"aws4": "1.12.0",
@@ -48,6 +48,7 @@
4848
"winston": "3.3.3"
4949
},
5050
"devDependencies": {
51+
"aws-sdk-client-mock": "3.0.1",
5152
"chai": "^4.3.10",
5253
"mocha": "^10.2.0",
5354
"nyc": "^15.1.0",

source/backend/discovery/src/lib/awsClient.js

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,12 @@ function createOrganizationsClient(credentials, region) {
138138

139139
return {
140140
async getAllActiveAccountsFromParent(ouId) {
141-
const {Roots} = await organizationsClient.listRoots({});
142-
const {Id: rootId, Arn: managementAccountArn} = Roots[0];
143-
const managementAccountId = parseArn(managementAccountArn).accountId;
141+
const [{Roots}, {Organization}] = await Promise.all([
142+
organizationsClient.listRoots({}),
143+
organizationsClient.describeOrganization({})
144+
]);
145+
const {Id: rootId} = Roots[0];
146+
const {MasterAccountId: managementAccountId} = Organization;
144147

145148
const accounts = await (ouId === rootId ? getAllAccounts() : getAllAccountsFromParent(ouId));
146149

@@ -596,9 +599,9 @@ function createStsClient(credentials, region) {
596599
const CredentialsProvider = fromNodeProviderChain();
597600

598601
return {
599-
async getCredentials(role) {
602+
async getCredentials(RoleArn) {
600603
const {Credentials} = await sts.assumeRole({
601-
RoleArn: `${role}`,
604+
RoleArn,
602605
RoleSessionName: 'discovery'
603606
}
604607
);

0 commit comments

Comments
 (0)