Class OssIndexPluginExtension

java.lang.Object
org.sonatype.gradle.plugins.scan.ossindex.OssIndexPluginExtension

public class OssIndexPluginExtension extends Object
Extension for configuring the OSS Index audit task.
  • Constructor Details

    • OssIndexPluginExtension

      public OssIndexPluginExtension(org.gradle.api.Project project)
      Creates a new extension instance.
  • Method Details

    • getUsername

      public String getUsername()
      Returns the username.
    • setUsername

      public void setUsername(String username)
      Sets the username.
    • getPassword

      public String getPassword()
      Returns the password.
    • setPassword

      public void setPassword(String password)
      Sets the password.
    • isUseCache

      public boolean isUseCache()
      Returns whether the cache is enabled.
    • setUseCache

      public void setUseCache(boolean useCache)
      Sets whether the cache is enabled.
    • getCacheDirectory

      public String getCacheDirectory()
      Returns the cache directory.
    • setCacheDirectory

      public void setCacheDirectory(String cacheDirectory)
      Sets the cache directory.
    • getCacheExpiration

      public String getCacheExpiration()
      Returns the cache expiration.
    • setCacheExpiration

      public void setCacheExpiration(String cacheExpiration)
      Sets the cache expiration.
    • isAllConfigurations

      public boolean isAllConfigurations()
      Returns whether all configurations are included.
    • setAllConfigurations

      public void setAllConfigurations(boolean allConfigurations)
      Sets whether all configurations are included.
    • getModulesIncluded

      public Set<String> getModulesIncluded()
      Returns the modules included.
    • setModulesIncluded

      public void setModulesIncluded(Set<String> modulesIncluded)
      Sets the modules included.
    • getModulesExcluded

      public Set<String> getModulesExcluded()
      Returns the modules excluded.
    • setModulesExcluded

      public void setModulesExcluded(Set<String> modulesExcluded)
      Sets the modules excluded.
    • isSimulationEnabled

      public boolean isSimulationEnabled()
      Returns whether simulation is enabled.
    • setSimulationEnabled

      public void setSimulationEnabled(boolean simulationEnabled)
      Sets whether simulation is enabled.
    • isSimulatedVulnerabilityFound

      public boolean isSimulatedVulnerabilityFound()
      Returns whether a simulated vulnerability is found.
    • setSimulatedVulnerabilityFound

      public void setSimulatedVulnerabilityFound(boolean simulatedVulnerabilityFound)
      Sets whether a simulated vulnerability is found.
    • isColorEnabled

      public boolean isColorEnabled()
      Returns whether color output is enabled.
    • setColorEnabled

      public void setColorEnabled(boolean colorEnabled)
      Sets whether color output is enabled.
    • getProxyConfiguration

      public org.sonatype.ossindex.service.client.transport.ProxyConfiguration getProxyConfiguration()
      Returns the proxy configuration.
    • setProxyConfiguration

      public void setProxyConfiguration(groovy.lang.Closure<org.sonatype.ossindex.service.client.transport.ProxyConfiguration> closure)
      Sets the proxy configuration.
    • isShowAll

      public boolean isShowAll()
      Returns whether to show all dependencies.
    • setShowAll

      public void setShowAll(boolean showAll)
      Sets whether to show all dependencies.
    • isPrintBanner

      public boolean isPrintBanner()
      Returns whether to print the banner.
    • setPrintBanner

      public void setPrintBanner(boolean printBanner)
      Sets whether to print the banner.
    • isFailOnDetection

      public boolean isFailOnDetection()
      Returns whether to fail on vulnerability detection.
    • setFailOnDetection

      public void setFailOnDetection(boolean failOnDetection)
      Sets whether to fail on vulnerability detection.
    • getExcludeVulnerabilityIds

      public Set<String> getExcludeVulnerabilityIds()
      Returns the vulnerability IDs to exclude.
    • setExcludeVulnerabilityIds

      public void setExcludeVulnerabilityIds(Set<String> excludeVulnerabilityIds)
      Sets the vulnerability IDs to exclude.
    • getExcludeCoordinates

      public Set<String> getExcludeCoordinates()
      Returns the coordinates to exclude.
    • setExcludeCoordinates

      public void setExcludeCoordinates(Set<String> excludeCoordinates)
      Sets the coordinates to exclude.
    • getOutputFormat

      public OutputFormat getOutputFormat()
      Returns the output format.
    • setOutputFormat

      public void setOutputFormat(OutputFormat outputFormat)
      Sets the output format.
    • getCycloneDxComponentType

      public org.cyclonedx.model.Component.Type getCycloneDxComponentType()
      Returns the CycloneDX component type.
    • setCycloneDxComponentType

      public void setCycloneDxComponentType(org.cyclonedx.model.Component.Type cycloneDxComponentType)
      Sets the CycloneDX component type.
    • getVariantAttributes

      public Map<String,String> getVariantAttributes()
      Returns the variant attributes.
    • setVariantAttributes

      public void setVariantAttributes(Map<String,String> variantAttributes)
      Sets the variant attributes.
    • isExcludeCompileOnly

      public boolean isExcludeCompileOnly()
      Returns whether to exclude compile-only dependencies.
    • setExcludeCompileOnly

      public void setExcludeCompileOnly(boolean excludeCompileOnly)
      Sets whether to exclude compile-only dependencies.