From 15c96a3579bdc66cefca7aa405fd3d9259081b74 Mon Sep 17 00:00:00 2001 From: David Arllen Date: Mon, 5 Aug 2024 16:50:25 -0400 Subject: [PATCH] track secureScoreControlProfile.rank as control.tag.rank --- libs/hdf-converters/src/msft-secure-score-mapper.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libs/hdf-converters/src/msft-secure-score-mapper.ts b/libs/hdf-converters/src/msft-secure-score-mapper.ts index b116e1bac8..460b620a85 100644 --- a/libs/hdf-converters/src/msft-secure-score-mapper.ts +++ b/libs/hdf-converters/src/msft-secure-score-mapper.ts @@ -122,6 +122,14 @@ export class MsftSecureScoreMapper extends BaseConverter { ); } }, + rank: { + transformer: (data: ControlScore) => { + // return rank from the profile document where its id matches the controlName + return this.getProfiles(data.controlName || '').map( + (profile) => profile.rank + ); + } + }, userImpacts: { transformer: (data: ControlScore) => { // return userImpacts from the profile document where its id matches the controlName