Class DependencyVulnerabilityCheckBase
java.lang.Object
org.openrewrite.Recipe
org.openrewrite.ScanningRecipe<DependencyVulnerabilityCheckBase.Accumulator>
org.openrewrite.java.dependencies.DependencyVulnerabilityCheckBase
- All Implemented Interfaces:
Cloneable
- Direct Known Subclasses:
DependencyVulnerabilityCheck
public abstract class DependencyVulnerabilityCheckBase
extends org.openrewrite.ScanningRecipe<DependencyVulnerabilityCheckBase.Accumulator>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassstatic classstatic classstatic enumstatic classNested classes/interfaces inherited from class org.openrewrite.Recipe
org.openrewrite.Recipe.Builder, org.openrewrite.Recipe.DelegatingRecipe -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected DependencyGraphprotected DependencyOriginsReportprotected org.openrewrite.maven.table.MavenMetadataFailuresprotected Comparator<org.openrewrite.java.dependencies.internal.Version> protected @Nullable org.openrewrite.semver.VersionComparatorprotected org.openrewrite.java.dependencies.internal.VersionParserprotected VulnerabilityReportFields inherited from class org.openrewrite.Recipe
contributors, examples, PANIC -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbaselineVulnerabilities(org.openrewrite.ExecutionContext ctx) The baseline vulnerabilities are those that are always included in the recipe by default.Collection<org.openrewrite.SourceFile> generate(DependencyVulnerabilityCheckBase.Accumulator acc, org.openrewrite.ExecutionContext ctx) getInitialValue(org.openrewrite.ExecutionContext ctx) abstract @Nullable DependencyVulnerabilityCheckBase.UpgradeDeltaprotected abstract @Nullable Booleanorg.openrewrite.TreeVisitor<?, org.openrewrite.ExecutionContext> protected abstract @Nullable StringgetScope()org.openrewrite.TreeVisitor<?, org.openrewrite.ExecutionContext> abstract List<Vulnerability> supplementalVulnerabilities(org.openrewrite.ExecutionContext ctx) Supplemental vulnerabilities are those that are added to baseline vulnerabilities.org.openrewrite.Validated<Object> validate()Methods inherited from class org.openrewrite.ScanningRecipe
generate, getAccumulator, getVisitorMethods inherited from class org.openrewrite.Recipe
addDataTable, builder, buildRecipeList, causesAnotherCycle, clone, createRecipeDescriptor, equals, getContributors, getDataTableDescriptors, getDescription, getDescriptor, getDisplayName, getEstimatedEffortPerOccurrence, getExamples, getInstanceName, getInstanceNameSuffix, getJacksonPolymorphicTypeTag, getMaintainers, getName, getRecipeList, getTags, hashCode, maxCycles, noop, onComplete, run, run, run, setContributors, setExamples, validate, validateAll, validateAll
-
Field Details
-
metadataFailures
protected transient org.openrewrite.maven.table.MavenMetadataFailures metadataFailures -
versionParser
protected transient org.openrewrite.java.dependencies.internal.VersionParser versionParser -
staticVersionComparator
protected transient Comparator<org.openrewrite.java.dependencies.internal.Version> staticVersionComparator -
vulnerabilityReport
-
dependencyOriginsReport
-
dependencyGraph
-
versionComparator
protected transient @Nullable org.openrewrite.semver.VersionComparator versionComparator
-
-
Constructor Details
-
DependencyVulnerabilityCheckBase
public DependencyVulnerabilityCheckBase()
-
-
Method Details
-
getScope
-
getOverrideTransitive
-
getMaximumUpgradeDelta
-
validate
- Overrides:
validatein classorg.openrewrite.Recipe
-
baselineVulnerabilities
The baseline vulnerabilities are those that are always included in the recipe by default. They are loaded from a CSV resource file.You can override this method to provide a different set of baseline vulnerabilities or add supplemental vulnerabilities via
supplementalVulnerabilities(ExecutionContext).- Parameters:
ctx- the execution context- Returns:
- a list of baseline vulnerabilities
-
supplementalVulnerabilities
public abstract List<Vulnerability> supplementalVulnerabilities(org.openrewrite.ExecutionContext ctx) Supplemental vulnerabilities are those that are added to baseline vulnerabilities.- Parameters:
ctx- the execution context- Returns:
- a list of baseline vulnerabilities
- See Also:
-
getInitialValue
public DependencyVulnerabilityCheckBase.Accumulator getInitialValue(org.openrewrite.ExecutionContext ctx) - Specified by:
getInitialValuein classorg.openrewrite.ScanningRecipe<DependencyVulnerabilityCheckBase.Accumulator>
-
getScanner
public org.openrewrite.TreeVisitor<?,org.openrewrite.ExecutionContext> getScanner(DependencyVulnerabilityCheckBase.Accumulator acc) - Specified by:
getScannerin classorg.openrewrite.ScanningRecipe<DependencyVulnerabilityCheckBase.Accumulator>
-
generate
public Collection<org.openrewrite.SourceFile> generate(DependencyVulnerabilityCheckBase.Accumulator acc, org.openrewrite.ExecutionContext ctx) - Overrides:
generatein classorg.openrewrite.ScanningRecipe<DependencyVulnerabilityCheckBase.Accumulator>
-
getVisitor
public org.openrewrite.TreeVisitor<?,org.openrewrite.ExecutionContext> getVisitor(DependencyVulnerabilityCheckBase.Accumulator acc) - Overrides:
getVisitorin classorg.openrewrite.ScanningRecipe<DependencyVulnerabilityCheckBase.Accumulator>
-