Package org.eclipse.steady.malice
Class ZipSlipAnalyzer
- java.lang.Object
-
- org.eclipse.steady.malice.ZipSlipAnalyzer
-
- All Implemented Interfaces:
MaliciousnessAnalyzer
public class ZipSlipAnalyzer extends Object implements MaliciousnessAnalyzer
Checks whether archives are subject to the ZipSlip vulnerability. Supports the following archive types: - ZIP and derivates JAR, WAR, EAR, AAR - TAR and TAR.GZ See https://github.com/snyk/zip-slip-vulnerability
-
-
Constructor Summary
Constructors Constructor Description ZipSlipAnalyzer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MaliciousnessAnalysisResultisMalicious(File _file)Checks whether the givenFileis malicious or not.MaliciousnessAnalysisResultisMalicious(InputStream _is, boolean _log)Checks whether the givenFileis malicious or not.
-
-
-
Method Detail
-
isMalicious
public MaliciousnessAnalysisResult isMalicious(File _file)
Checks whether the givenFileis malicious or not. A value of 0 means it is not malicious, a value of 1 means that it is malicious, and every value in between expresses the confidence (or probability) of the file being malicious.- Specified by:
isMaliciousin interfaceMaliciousnessAnalyzer- Parameters:
_file- aFileobject.- Returns:
- a
MaliciousnessAnalysisResultobject.
-
isMalicious
public MaliciousnessAnalysisResult isMalicious(InputStream _is, boolean _log)
Checks whether the givenFileis malicious or not. A value of 0 means it is not malicious, a value of 1 means that it is malicious, and every value in between expresses the confidence (or probability) of the file being malicious.- Specified by:
isMaliciousin interfaceMaliciousnessAnalyzer- Parameters:
_is- aInputStreamobject._log- a boolean.- Returns:
- a
MaliciousnessAnalysisResultobject.
-
-