Function
buildScanId
(accountId: string, scanMode: 'aws' | 'cloud')
Source from the content-addressed store, hash-verified
| 799 | }); |
| 800 | |
| 801 | function buildScanId(accountId: string, scanMode: 'aws' | 'cloud'): string { |
| 802 | const timestamp = new Date() |
| 803 | .toISOString() |
| 804 | .replace(/[^0-9]/g, '') |
| 805 | .slice(0, 14); |
| 806 | const safeAccount = accountId.replace(/[^a-zA-Z0-9-]/g, '-').slice(0, 32); |
| 807 | return `prowler-${scanMode}-${safeAccount}-${timestamp}`; |
| 808 | } |
| 809 | |
| 810 | function normaliseFindings( |
| 811 | rawSegments: string[], |
Tested by
no test coverage detected