diff --git a/bitwarden_license/bit-common/src/dirt/reports/risk-insights/models/mocks/mock-data.ts b/bitwarden_license/bit-common/src/dirt/reports/risk-insights/models/mocks/mock-data.ts index 33dd8676223..022b0aa42fb 100644 --- a/bitwarden_license/bit-common/src/dirt/reports/risk-insights/models/mocks/mock-data.ts +++ b/bitwarden_license/bit-common/src/dirt/reports/risk-insights/models/mocks/mock-data.ts @@ -92,8 +92,8 @@ export const mockApplicationData: OrganizationReportApplication[] = [ ]; export const mockEnrichedReportData: ApplicationHealthReportDetailEnriched[] = [ - { ...mockApplication1, isMarkedAsCritical: true }, - { ...mockApplication2, isMarkedAsCritical: false }, + { ...mockApplication1, isMarkedAsCritical: true, ciphers: [] }, + { ...mockApplication2, isMarkedAsCritical: false, ciphers: [] }, ]; export const mockCipherViews: CipherView[] = [ diff --git a/bitwarden_license/bit-common/src/dirt/reports/risk-insights/models/report-data-service.types.ts b/bitwarden_license/bit-common/src/dirt/reports/risk-insights/models/report-data-service.types.ts index 77a3cea419b..6196c788ecd 100644 --- a/bitwarden_license/bit-common/src/dirt/reports/risk-insights/models/report-data-service.types.ts +++ b/bitwarden_license/bit-common/src/dirt/reports/risk-insights/models/report-data-service.types.ts @@ -1,3 +1,5 @@ +import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view"; + import { ApplicationHealthReportDetail, OrganizationReportApplication, @@ -6,6 +8,7 @@ import { export type ApplicationHealthReportDetailEnriched = ApplicationHealthReportDetail & { isMarkedAsCritical: boolean; + ciphers: CipherView[]; }; export interface RiskInsightsEnrichedData { reportData: ApplicationHealthReportDetailEnriched[]; diff --git a/bitwarden_license/bit-common/src/dirt/reports/risk-insights/services/domain/risk-insights-orchestrator.service.ts b/bitwarden_license/bit-common/src/dirt/reports/risk-insights/services/domain/risk-insights-orchestrator.service.ts index 387d594d4e3..c0fdbb7e022 100644 --- a/bitwarden_license/bit-common/src/dirt/reports/risk-insights/services/domain/risk-insights-orchestrator.service.ts +++ b/bitwarden_license/bit-common/src/dirt/reports/risk-insights/services/domain/risk-insights-orchestrator.service.ts @@ -235,6 +235,7 @@ export class RiskInsightsOrchestratorService { application, updatedApplicationData, ), + ciphers: [], // explicitly ignore ciphers at this stage }), ); @@ -367,6 +368,7 @@ export class RiskInsightsOrchestratorService { application, updatedApplicationData, ), + ciphers: [], // explicitly ignore ciphers at this stage }), ); @@ -502,6 +504,7 @@ export class RiskInsightsOrchestratorService { application, updatedApplicationData, ), + ciphers: [], // explicitly ignore ciphers at this stage }), ); // For now, merge the report with the critical marking flag to make the enriched type @@ -659,6 +662,7 @@ export class RiskInsightsOrchestratorService { application, updatedApplicationData, ), + ciphers: [], // explicitly ignore ciphers at this stage }), ); @@ -952,8 +956,8 @@ export class RiskInsightsOrchestratorService { */ private _setupEnrichedReportData() { // Setup the enriched report data pipeline - const enrichmentSubscription = combineLatest([this.rawReportData$]).pipe( - switchMap(([rawReportData]) => { + const enrichmentSubscription = combineLatest([this.rawReportData$, this._ciphers$]).pipe( + switchMap(([rawReportData, ciphers]) => { this.logService.debug( "[RiskInsightsOrchestratorService] Enriching report data with ciphers and critical app status", ); @@ -964,6 +968,7 @@ export class RiskInsightsOrchestratorService { const enrichedReports: ApplicationHealthReportDetailEnriched[] = rawReports.map((app) => ({ ...app, isMarkedAsCritical: this.reportService.isCriticalApplication(app, criticalAppsData), + ciphers: ciphers?.filter((cipher) => app.cipherIds.includes(cipher.id)) ?? [], })); const enrichedData = { diff --git a/bitwarden_license/bit-web/src/app/dirt/access-intelligence/activity/application-review-dialog/new-applications-dialog.component.ts b/bitwarden_license/bit-web/src/app/dirt/access-intelligence/activity/application-review-dialog/new-applications-dialog.component.ts index ff238e2636a..bf1294a34ce 100644 --- a/bitwarden_license/bit-web/src/app/dirt/access-intelligence/activity/application-review-dialog/new-applications-dialog.component.ts +++ b/bitwarden_license/bit-web/src/app/dirt/access-intelligence/activity/application-review-dialog/new-applications-dialog.component.ts @@ -215,6 +215,7 @@ export class NewApplicationsDialogComponent { isMarkedAsCritical: updatedStateApplicationData.some( (a) => a.applicationName == application.applicationName && a.isCritical, ), + ciphers: [], // explicitly ignore ciphers at this stage }), ) || []; return from( diff --git a/bitwarden_license/bit-web/src/app/dirt/access-intelligence/shared/app-table-row-scrollable.component.html b/bitwarden_license/bit-web/src/app/dirt/access-intelligence/shared/app-table-row-scrollable.component.html index 79af3869d99..760b4d2cc57 100644 --- a/bitwarden_license/bit-web/src/app/dirt/access-intelligence/shared/app-table-row-scrollable.component.html +++ b/bitwarden_license/bit-web/src/app/dirt/access-intelligence/shared/app-table-row-scrollable.component.html @@ -46,10 +46,9 @@ [attr.aria-label]="'viewItem' | i18n" > - + @if (row.ciphers && row.ciphers.length > 0) { + + }