Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

Keep credential inventory outside tolerant empty-list guardrails

pulse-triage[bot]bd82018429b3
diff --git a/frontend-modern/src/api/__tests__/apiErrorStatus.guardrails.test.ts b/frontend-modern/src/api/__tests__/apiErrorStatus.guardrails.test.ts
index 098fee8f70..621f30c669 100644
--- a/frontend-modern/src/api/__tests__/apiErrorStatus.guardrails.test.ts
+++ b/frontend-modern/src/api/__tests__/apiErrorStatus.guardrails.test.ts
@@ -176,7 +176,7 @@ describe('API error-status guardrails', () => {
);
});
- it('routes canonical collection normalization through responseUtils', () => {
+ it('shares tolerant collection normalization without inventing credential absence', () => {
expect(aiSource).toContain('arrayOrEmpty<UnifiedFindingRecord>(response.findings)');
expect(aiSource).toContain("objectArrayFieldOrEmpty<ApprovalRequest>(response, 'approvals')");
expect(aiSource).not.toContain('response.approvals || []');
@@ -190,7 +190,10 @@ describe('API error-status guardrails', () => {
expect(alertsSource).not.toContain('normalizeIncident(');
expect(alertsSource).not.toContain('normalizeIncidents(');
- expect(securitySource).toContain("objectArrayFieldOrEmpty<APITokenRecord>(response, 'tokens')");
+ // Credential absence can drive access posture and local revocation state.
+ // It must not use the tolerant empty-on-malformed collection helper.
+ // security.test.ts exercises complete admission and rejection at runtime.
+ expect(securitySource).not.toContain('objectArrayFieldOrEmpty');
expect(securitySource).not.toContain('response.tokens ?? []');
expect(notificationsSource).toContain('arrayOrEmpty<Webhook>(data)');