Class SnykCLIStaticCodeAnalyst
java.lang.Object
org.palladiosimulator.retriever.vulnerability.core.SnykCLIStaticCodeAnalyst
- All Implemented Interfaces:
ICodeAnalyst
,IStaticCodeAnalyst
-
Constructor Summary
ConstructorsConstructorDescriptionSnykCLIStaticCodeAnalyst
(Path snykLocation, Path outputLocation, String apiKey, String snykToken) Creates a SnykCLIStaticCodeAnalyst which will use the specified Snyk executable. -
Method Summary
Modifier and TypeMethodDescriptionRequest a analysis result of a repository or docker image from the analysis provider.parseSnykCLIOutput
(String output) Takes Snyk CLI output and parses it.
-
Constructor Details
-
SnykCLIStaticCodeAnalyst
public SnykCLIStaticCodeAnalyst(Path snykLocation, Path outputLocation, String apiKey, String snykToken) Creates a SnykCLIStaticCodeAnalyst which will use the specified Snyk executable.- Parameters:
snykLocation
- a path to a Snyk executableoutputLocation
- a path to the output directoryapiKey
- an API key for the vulnerability databasesnykToken
- a token for using the Snyk executable.
-
-
Method Details
-
analyze
public IStaticCodeAnalysisResult analyze(Map<org.palladiosimulator.pcm.system.System, Path> systemPaths) - Specified by:
analyze
in interfaceIStaticCodeAnalyst
-
analyze
public IStaticCodeAnalysisResult analyze(Map<org.palladiosimulator.pcm.system.System, Path> systemPaths, boolean saveResult) -
parseSnykCLIOutput
Takes Snyk CLI output and parses it. StaticCodeAnalysisResults will be built out of the parsed information.- Parameters:
output
- of a Snyk CLI process- Returns:
- StaticCodeAnalyisResult object containing all parsed data
-
analyze
Description copied from interface:ICodeAnalyst
Request a analysis result of a repository or docker image from the analysis provider.- Specified by:
analyze
in interfaceICodeAnalyst
- Parameters:
path
- String that indicates the path to the repository or docker image to analyze.- Returns:
- A result object that holds all important analysis information.
-