File tree Expand file tree Collapse file tree 6 files changed +61
-10
lines changed
resources/io/jenkins/plugins/SecurityCheckBuilder Expand file tree Collapse file tree 6 files changed +61
-10
lines changed Original file line number Diff line number Diff line change 1010 </parent >
1111
1212 <groupId >io.jenkins.plugins</groupId >
13- <artifactId >. </artifactId >
13+ <artifactId >vigilnz-security </artifactId >
1414 <version >${revision}${changelist} </version >
1515 <packaging >hpi</packaging >
1616
5959 <version >${jenkins.version} </version >
6060 </dependency >
6161
62+ <dependency >
63+ <groupId >org.jenkins-ci.plugins</groupId >
64+ <artifactId >credentials</artifactId >
65+ <version >1337.v60b_d7b_c7b_c9f</version >
66+ </dependency >
67+
6268 </dependencies >
6369 </dependencyManagement >
6470
Original file line number Diff line number Diff line change 99import hudson .util .FormValidation ;
1010import hudson .util .Secret ;
1111import org .kohsuke .stapler .DataBoundConstructor ;
12+ import org .kohsuke .stapler .ForwardToView ;
13+ import org .kohsuke .stapler .HttpResponse ;
1214import org .kohsuke .stapler .QueryParameter ;
1315
1416import java .io .IOException ;
@@ -33,6 +35,11 @@ public String getTargetFile() {
3335 return targetFile ;
3436 }
3537
38+ public HttpResponse doAddToken () {
39+ return new ForwardToView (this , "addToken.jelly" );
40+ }
41+
42+
3643 // this function trigger when user click the build button
3744 @ Override
3845 public boolean perform (AbstractBuild build , Launcher launcher , BuildListener listener )
Original file line number Diff line number Diff line change 1+ <j : jelly xmlns : j =" jelly:core" xmlns : f =" /lib/form" >
2+ <f : section title =" Add Vigilnz Token" >
3+ <f : entry title =" API Token" >
4+ <f : textbox name =" apiToken" />
5+ </f : entry >
6+
7+ <f : entry title =" Organization" >
8+ <f : textbox name =" org" />
9+ </f : entry >
10+
11+ <f : entry title =" Organization ID" >
12+ <f : textbox name =" orgId" />
13+ </f : entry >
14+
15+ <f : submit value =" Save Token" />
16+ </f : section >
17+ </j : jelly >
Original file line number Diff line number Diff line change 11<?jelly escape-by-default =' true' ?>
22<j : jelly xmlns : j =" jelly:core" xmlns : f =" /lib/form" >
33
4- <f : entry title =" Token" field =" token" >
5- <f : password />
6- </f : entry >
4+ <f : entry title =" Token" field =" token" >
5+ <div style =" display:flex;gap:8px;" >
6+ <div style =" flex:1 1 0;" >
7+ <f : password />
8+ </div >
9+ <!-- NORMAL BUTTON (does NOT submit the job form) -->
10+ <button type =" button" class =" jenkins-button" onclick =" showTokenOptions()" >
11+ + Add
12+ </button >
13+ </div >
14+ </f : entry >
715
8- <f : entry title =" Target File" field =" targetFile" >
9- <f : textbox />
10- </f : entry >
16+ <!-- Hidden area -->
17+ <div id =" tokenOptions" style =" display:none; margin-top:10px;" >
18+ <f : entry title =" Organisation" >
19+ <f : textbox name =" organisation" />
20+ </f : entry >
21+ </div >
22+
23+ <f : entry title =" Target File" field =" targetFile" >
24+ <f : textbox />
25+ </f : entry >
26+
27+ <script >
28+ function showTokenOptions() {
29+ document.getElementById("tokenOptions").style.display = "block";
30+ }
31+ </script >
1132
1233</j : jelly >
Original file line number Diff line number Diff line change 11< div >
2- This Target file is used to locate of the scan file of the project.
2+ This target file is used to locate the file that will be scanned for security vulnerabilities in the project.
33</ div >
Original file line number Diff line number Diff line change 11< div >
2- This token is used to authenticate with the external service.
3- Please generate it from your dashboard and paste it here.
2+ This token is used to authenticate with the external Vigilnz Security service.
3+ Please generate it from your Vigilnz dashboard and paste it here.
44</ div >
You can’t perform that action at this time.
0 commit comments