MCPcopy Index your code
hub / github.com/simstudioai/sim / normalizeVantaVulnerability

Function normalizeVantaVulnerability

apps/sim/tools/vanta/utils.ts:768–804  ·  view source on GitHub ↗
(resource: JsonRecord)

Source from the content-addressed store, hash-verified

766}
767
768export function normalizeVantaVulnerability(resource: JsonRecord): VantaVulnerability {
769 const deactivateMetadata = isRecordLike(resource.deactivateMetadata)
770 ? {
771 isVulnDeactivatedIndefinitely: getBoolean(
772 resource.deactivateMetadata.isVulnDeactivatedIndefinitely
773 ),
774 deactivatedUntilDate: getString(resource.deactivateMetadata.deactivatedUntilDate),
775 deactivationReason: getString(resource.deactivateMetadata.deactivationReason),
776 deactivatedOnDate: getString(resource.deactivateMetadata.deactivatedOnDate),
777 deactivatedBy: getString(resource.deactivateMetadata.deactivatedBy),
778 }
779 : null
780
781 return {
782 id: getString(resource.id),
783 name: getString(resource.name),
784 description: getString(resource.description),
785 severity: getString(resource.severity),
786 vulnerabilityType: getString(resource.vulnerabilityType),
787 integrationId: getString(resource.integrationId),
788 targetId: getString(resource.targetId),
789 packageIdentifier: getString(resource.packageIdentifier),
790 cvssSeverityScore: getNumber(resource.cvssSeverityScore),
791 scannerScore: getNumber(resource.scannerScore),
792 isFixable: getBoolean(resource.isFixable),
793 fixedVersion: getString(resource.fixedVersion),
794 remediateByDate: getString(resource.remediateByDate),
795 firstDetectedDate: getString(resource.firstDetectedDate),
796 sourceDetectedDate: getString(resource.sourceDetectedDate),
797 lastDetectedDate: getString(resource.lastDetectedDate),
798 scanSource: getString(resource.scanSource),
799 externalURL: getString(resource.externalURL),
800 relatedVulns: getStringArray(resource.relatedVulns),
801 relatedUrls: getStringArray(resource.relatedUrls),
802 deactivateMetadata,
803 }
804}

Callers

nothing calls this directly

Calls 5

isRecordLikeFunction · 0.90
getBooleanFunction · 0.70
getStringFunction · 0.70
getNumberFunction · 0.70
getStringArrayFunction · 0.70

Tested by

no test coverage detected