@ThreadSafe public class RubyBundlerAnalyzer extends RubyGemspecAnalyzer
AnalysisPhase.PRE_FINDING_ANALYSIS
DependencyMergingAnalyzer will merge two .gemspec dependencies
together if Dependency.getPackagePath() are the same.
Ruby bundler creates new .gemspec files under a folder called
"specifications" at deploy time, in addition to the original .gemspec files
from source. The bundler generated .gemspec files always contain fully
resolved attributes thus provide more accurate evidences, whereas the
original .gemspec from source often contain variables for attributes that
can't be used for evidences.
Note this analyzer share the same
Settings.KEYS.ANALYZER_RUBY_GEMSPEC_ENABLED
as RubyGemspecAnalyzer, so it will enabled/disabled with
RubyGemspecAnalyzer.| Modifier and Type | Field and Description |
|---|---|
static String |
DEPENDENCY_ECOSYSTEM
A descriptor for the type of dependencies processed or added by this
analyzer.
|
| Constructor and Description |
|---|
RubyBundlerAnalyzer() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
accept(File pathname)
Only accept *.gemspec files generated by "bundle install --deployment"
under "specifications" folder.
|
protected void |
analyzeDependency(Dependency dependency,
Engine engine)
Analyzes a given dependency.
|
String |
getName()
Returns the name of the analyzer.
|
getAnalysisPhase, getAnalyzerEnabledSettingKey, getFileFilter, prepareFileTypeAnalyzergetFilesMatched, newHashSet, prepareAnalyzer, setFilesMatchedanalyze, close, closeAnalyzer, getSettings, initialize, isEnabled, prepare, setEnabled, supportsParallelProcessingclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitanalyze, close, initialize, isEnabled, prepare, supportsParallelProcessingpublic static final String DEPENDENCY_ECOSYSTEM
public String getName()
getName in interface AnalyzergetName in class RubyGemspecAnalyzerpublic boolean accept(File pathname)
accept in interface FileFilteraccept in class AbstractFileTypeAnalyzerpathname - the path name to testprotected void analyzeDependency(Dependency dependency, Engine engine) throws AnalysisException
AbstractAnalyzeranalyzeDependency in class RubyGemspecAnalyzerdependency - the dependency to analyzeengine - the engine scanningAnalysisException - thrown if there is an analysis exceptionCopyright © 2012–2020 OWASP. All rights reserved.