(audit)
| 42 | } |
| 43 | |
| 44 | export function classifyAuditPaths(audit) { |
| 45 | const unreviewed = []; |
| 46 | const legacyDocs = []; |
| 47 | for (const advisory of Object.values(audit.advisories ?? {})) { |
| 48 | for (const finding of advisory.findings ?? []) { |
| 49 | for (const dependencyPath of finding.paths ?? []) { |
| 50 | const record = { id: advisory.github_advisory_id, package: advisory.module_name, version: finding.version, path: dependencyPath }; |
| 51 | (dependencyPath.startsWith('apps__rxjs.dev>') ? legacyDocs : unreviewed).push(record); |
| 52 | } |
| 53 | } |
| 54 | } |
| 55 | return { unreviewed, legacyDocs }; |
| 56 | } |
| 57 | |
| 58 | export function canonicalGithubAdvisoryId(vulnerability) { |
| 59 | const githubIds = [vulnerability.id, ...(vulnerability.aliases ?? [])].filter((id) => /^GHSA-[a-z0-9-]+$/i.test(id)); |
no outgoing calls
no test coverage detected