1 import * as cppPlugin from 'snyk-cpp-plugin'; 2 import * as dockerPlugin from 'snyk-docker-plugin'; 3 import { codePlugin } from '../plugins/sast'; 4 import { Ecosystem, EcosystemPlugin } from './types'; 5 6 const EcosystemPlugins: { 7 readonly [ecosystem in Ecosystem]: EcosystemPlugin; 8 } = { 9 cpp: cppPlugin as EcosystemPlugin, 10 // TODO: not any 11 docker: dockerPlugin as any, 12 code: codePlugin, 13 }; 14 15 export function getPlugin(ecosystem: Ecosystem): EcosystemPlugin { 16 return EcosystemPlugins[ecosystem]; 17 }