Class OssIndexAuditTask

java.lang.Object
org.gradle.api.internal.AbstractTask
org.gradle.api.DefaultTask
org.sonatype.gradle.plugins.scan.ossindex.OssIndexAuditTask
All Implemented Interfaces:
Comparable<org.gradle.api.Task>, org.gradle.api.internal.DynamicObjectAware, org.gradle.api.internal.TaskInternal, org.gradle.api.Named, org.gradle.api.plugins.ExtensionAware, org.gradle.api.Task, org.gradle.util.Configurable<org.gradle.api.Task>

@DisableCachingByDefault(because="Auditing queries a remote vulnerability service whose data changes as new vulnerabilities are published, so the same dependencies can legitimately produce a different result on a later run") public class OssIndexAuditTask extends org.gradle.api.DefaultTask
Gradle task for auditing dependencies using OSS Index.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.gradle.api.Named

    org.gradle.api.Named.Namer
  • Field Summary

    Fields inherited from interface org.gradle.api.Task

    TASK_ACTION, TASK_CONSTRUCTOR_ARGS, TASK_DEPENDS_ON, TASK_DESCRIPTION, TASK_GROUP, TASK_NAME, TASK_OVERWRITE, TASK_TYPE
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructs a new OssIndexAuditTask.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Executes the dependency audit.
    Returns the cache directory path.
    Returns the cache expiration time.
    org.cyclonedx.model.Component.Type
    Returns the CycloneDX component type.
    Returns the set of excluded modules.
    Returns the set of included modules.
    Returns the output format.
    Returns the password for authentication.
    Returns the username for authentication.
    boolean
    Returns whether all configurations should be audited.
    boolean
    Returns whether color output is enabled.
    boolean
    Returns whether the banner should be printed.
    boolean
    Returns whether all dependencies should be shown.
    boolean
    Returns whether caching is enabled.

    Methods inherited from class org.gradle.api.DefaultTask

    compareTo, configure, dependsOn, doFirst, doFirst, doFirst, doLast, doLast, doLast, finalizedBy, getActions, getAnt, getDependsOn, getDescription, getDestroyables, getDidWork, getEnabled, getExtensions, getFinalizedBy, getGroup, getInputs, getLocalState, getLogger, getLogging, getMustRunAfter, getName, getOutputs, getPath, getProject, getShouldRunAfter, getState, getTaskDependencies, getTemporaryDir, getTimeout, hasProperty, mustRunAfter, onlyIf, onlyIf, onlyIf, property, setActions, setDependsOn, setDescription, setDidWork, setEnabled, setFinalizedBy, setGroup, setMustRunAfter, setOnlyIf, setOnlyIf, setOnlyIf, setProperty, setShouldRunAfter, shouldRunAfter, usesService

    Methods inherited from class org.gradle.api.internal.AbstractTask

    acceptServiceReferences, appendParallelSafeAction, doNotTrackState, doNotTrackStateIf, getAsDynamicObject, getIdentityPath, getImpliesSubProjects, getLifecycleDependencies, getOnlyIf, getReasonNotToTrackState, getReasonsNotToTrackState, getReasonTaskIsIncompatibleWithConfigurationCache, getRequiredServices, getServices, getSharedResources, getStandardOutputCapture, getTaskActions, getTaskIdentity, getTemporaryDirFactory, hasTaskActions, injectIntoNewInstance, isCompatibleWithConfigurationCache, isEnabled, isHasCustomActions, notCompatibleWithConfigurationCache, prependParallelSafeAction, restoreOnlyIf, restoreTaskActions, setImpliesSubProjects

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.gradle.api.Task

    doNotTrackState, notCompatibleWithConfigurationCache
  • Constructor Details

    • OssIndexAuditTask

      public OssIndexAuditTask()
      Constructs a new OssIndexAuditTask.
  • Method Details

    • audit

      public void audit()
      Executes the dependency audit.
    • getUsername

      @Input public String getUsername()
      Returns the username for authentication.
    • getPassword

      @Input public String getPassword()
      Returns the password for authentication.
    • isUseCache

      @Input public boolean isUseCache()
      Returns whether caching is enabled.
    • getCacheDirectory

      @Input public String getCacheDirectory()
      Returns the cache directory path.
    • getCacheExpiration

      @Input public String getCacheExpiration()
      Returns the cache expiration time.
    • isAllConfigurations

      @Input public boolean isAllConfigurations()
      Returns whether all configurations should be audited.
    • isColorEnabled

      @Input public boolean isColorEnabled()
      Returns whether color output is enabled.
    • isShowAll

      @Input public boolean isShowAll()
      Returns whether all dependencies should be shown.
    • isPrintBanner

      @Input public boolean isPrintBanner()
      Returns whether the banner should be printed.
    • getModulesIncluded

      @Input @Optional public Set<String> getModulesIncluded()
      Returns the set of included modules.
    • getModulesExcluded

      @Input @Optional public Set<String> getModulesExcluded()
      Returns the set of excluded modules.
    • getOutputFormat

      @Input @Optional public OutputFormat getOutputFormat()
      Returns the output format.
    • getCycloneDxComponentType

      @Input @Optional public org.cyclonedx.model.Component.Type getCycloneDxComponentType()
      Returns the CycloneDX component type.