Package io.jenkins.plugins
Class CodeThreatBuilder
- java.lang.Object
-
- hudson.tasks.BuildStepCompatibilityLayer
-
- hudson.tasks.Builder
-
- io.jenkins.plugins.CodeThreatBuilder
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<Builder>
,BuildStep
,SimpleBuildStep
public class CodeThreatBuilder extends Builder implements SimpleBuildStep
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CodeThreatBuilder.DescriptorImpl
-
Nested classes/interfaces inherited from interface hudson.tasks.BuildStep
BuildStep.PublisherList
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Nested classes/interfaces inherited from interface jenkins.tasks.SimpleBuildStep
SimpleBuildStep.LastBuildAction, SimpleBuildStep.LastBuildActionFactory
-
-
Field Summary
-
Fields inherited from interface hudson.tasks.BuildStep
BUILDERS, PUBLISHERS
-
-
Method Summary
-
Methods inherited from class hudson.tasks.Builder
all, getDescriptor, getRequiredMonitorService, prebuild
-
Methods inherited from class hudson.tasks.BuildStepCompatibilityLayer
getProjectAction, getProjectAction, getProjectActions, perform, perform, prebuild
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface hudson.tasks.BuildStep
getProjectAction, getProjectActions, getRequiredMonitorService, perform, prebuild
-
Methods inherited from interface jenkins.tasks.SimpleBuildStep
perform, perform, requiresWorkspace
-
-
-
-
Constructor Detail
-
CodeThreatBuilder
@DataBoundConstructor public CodeThreatBuilder(String ctServer, String project_name, String fileName, String credentialsId, String organization_name) throws IOException
- Throws:
IOException
-
-
Method Detail
-
setMaxNumberOfCritical
@DataBoundSetter public void setMaxNumberOfCritical(Integer max_number_of_critical)
-
setMaxNumberOfHigh
@DataBoundSetter public void setMaxNumberOfHigh(Integer max_number_of_high)
-
setWeaknessIs
@DataBoundSetter public void setWeaknessIs(String weakness_is)
-
setCondition
@DataBoundSetter public void setCondition(String condition)
-
getCtServer
public String getCtServer()
-
getScanId
public String getScanId()
-
getScanStatus
public String getScanStatus()
-
getMaxNumberOfCritical
public Integer getMaxNumberOfCritical()
-
getMaxNumberOfHigh
public Integer getMaxNumberOfHigh()
-
getWeaknessIs
public String getWeaknessIs()
-
getCondition
public String getCondition()
-
getProjectName
public String getProjectName()
-
getTitle
public String getTitle()
-
getSeverity
public String getSeverity()
-
getToken
public Secret getToken(String username, Secret password) throws IOException
- Throws:
IOException
-
uploadFile
public String uploadFile(Secret accessTokenSecret, File fullFile) throws IOException
- Throws:
IOException
-
awaitScan
public String awaitScan(String scanId, Secret accessTokenSecret) throws IOException
- Throws:
IOException
-
newIssue
public String[] newIssue(Secret accessTokenSecret) throws IOException
- Throws:
IOException
-
allIssue
public String[] allIssue(Secret accessTokenSecret) throws IOException
- Throws:
IOException
-
findWeaknessTitles
public static ArrayList<String> findWeaknessTitles(String[] arr, String[] keywords)
-
perform
public void perform(Run<?,?> run, FilePath workspace, EnvVars env, Launcher launcher, TaskListener listener) throws InterruptedException, IOException, AbortException
- Specified by:
perform
in interfaceSimpleBuildStep
- Throws:
InterruptedException
IOException
AbortException
-
-