Skip to content

Commit

Permalink
Updated documentation
Browse files Browse the repository at this point in the history
Added SSC 'Add Existing Bugs' bug tracker implementation
  • Loading branch information
Ruud Senden committed Sep 12, 2017
1 parent f1516d3 commit 3fa6d7c
Show file tree
Hide file tree
Showing 9 changed files with 258 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ lists the currently supported functionalities.
| Microsoft TFS | Yes | Yes | Yes | Yes | Additional state transitions may need to be configured |
| SSC Bug Trackers | No | Yes | Yes | Performed by SSC | Sample configuration for SSC TFS bug tracker included, other SSC bug trackers require corresponding configuration files to be added |

For more information about downloading the release, building from source, configuring and running the utility, please see the Wiki: https://github.com/HPFOD/FoDBugTrackerUtility/wiki
For more information about configuring and running the utility, please see the documentation included with the binary distribution.
1 change: 1 addition & 0 deletions processrunner-bugtracker-root/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
<modules>
<module>../fortify-util</module>
<module>../processrunner</module>
<module>../ssc-bugtracker-add-existing-bug</module>
<module>processrunner-bugtracker-common</module>
<module>processrunner-bugtracker-source-fod</module>
<module>processrunner-bugtracker-ssc-common</module>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ link. Both can be configured through properties on the `com.fortify.processrunne
- `addNativeBugLink`
This property can be set to 'true' if you want to store the issue link as a native SSC bug link, allowing users to click
the 'bug' icon in SSC to navigate to the corresponding issue in the external system. This option requires to have the
'Add Existing Bugs' native SSC bug tracker integration to be installed, and configured on all application versions for which
you want to use FortifyBugTrackerUtility.
'Add Existing Bugs' native SSC bug tracker integration to be installed in SSC (included in the distribution bundle), and
having the 'Add Existing Bugs' bug tracker configured on all application versions for which you want to use FortifyBugTrackerUtility.

Note that SSC only allows one native bug tracker integration for each application version. When using the 'addNativeBugLink'
approach, you will not be able to use any other native SSC bug tracker integration. If you want users to be able to also
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,12 @@
<outputDirectory>/documentation</outputDirectory>
<directory>${project.build.directory}/../../processrunner-bugtracker-doc/target/site</directory>
</fileSet>
<fileSet>
<outputDirectory>/</outputDirectory>
<directory>${project.build.directory}/../../../ssc-bugtracker-add-existing-bug/target</directory>
<includes>
<include>ssc-bugtracker-add-existing-bug-?.?.jar</include>
</includes>
</fileSet>
</fileSets>
</assembly>
1 change: 1 addition & 0 deletions ssc-bugtracker-add-existing-bug/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/target/
23 changes: 23 additions & 0 deletions ssc-bugtracker-add-existing-bug/LICENSE.TXT
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
The MIT License (MIT)
Copyright (c) 2017 Hewlett Packard Enterprise

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to permit
persons to whom the Software is furnished to do so, subject to the
following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
Binary file not shown.
93 changes: 93 additions & 0 deletions ssc-bugtracker-add-existing-bug/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
<!--
(c) Copyright 2017 Hewlett Packard Enterprise Development LP
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.fortify.pub.bugtracker.plugin.add-existing-bug</groupId>
<artifactId>ssc-bugtracker-add-existing-bug</artifactId>
<version>1.0</version>
<description><![CDATA[
This SSC bug tracker plugin allows for adding existing bug links to vulnerabilities.
]]>
</description>
<organization>
<name>HPE Security Fortify</name>
<url>http://www8.hp.com/us/en/software-solutions/application-security/</url>
</organization>
<licenses>
<license>
<name>MIT License</name>
<url>http://www.opensource.org/licenses/mit-license.php</url>
<distribution>repo</distribution>
</license>
</licenses>
<developers>
<developer>
<id>rsenden</id>
<name>Ruud Senden</name>
<organization>HPE Security Fortify</organization>
</developer>
</developers>
<inceptionYear>2017</inceptionYear>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.fortify.ssc</groupId>
<artifactId>fortify-public</artifactId>
<version>17.10.0158</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/fortify-public-17.10.0.0158.jar</systemPath>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>com.fortify.ssc</groupId>
<artifactId>fortify-public</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.2.1</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
/*******************************************************************************
* (c) Copyright 2017 Hewlett Packard Enterprise Development LP
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
* KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
* WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
* PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
******************************************************************************/
package com.fortify.pub.bugtracker.plugin.addexistingbug;

import java.util.Arrays;
import java.util.List;
import java.util.Map;

import com.fortify.pub.bugtracker.plugin.AbstractBatchBugTrackerPlugin;
import com.fortify.pub.bugtracker.plugin.BugTrackerPluginImplementation;
import com.fortify.pub.bugtracker.support.Bug;
import com.fortify.pub.bugtracker.support.BugParam;
import com.fortify.pub.bugtracker.support.BugParamText;
import com.fortify.pub.bugtracker.support.BugSubmission;
import com.fortify.pub.bugtracker.support.BugTrackerConfig;
import com.fortify.pub.bugtracker.support.IssueDetail;
import com.fortify.pub.bugtracker.support.MultiIssueBugSubmission;
import com.fortify.pub.bugtracker.support.UserAuthenticationStore;

@BugTrackerPluginImplementation
public class AddExistingBugBugTrackerPlugin extends AbstractBatchBugTrackerPlugin {

public List<BugParam> getBatchBugParameters(UserAuthenticationStore paramUserAuthenticationStore) {
BugParam bp = new BugParamText();
bp.setIdentifier("existingBugLink");
bp.setDisplayLabel("Existing bug link");
bp.setRequired(true);
return Arrays.asList(bp);
}

public List<BugParam> onBatchBugParameterChange(String paramString, List<BugParam> paramList, UserAuthenticationStore paramUserAuthenticationStore) {
return getBatchBugParameters(paramUserAuthenticationStore);
}

public Bug fileMultiIssueBug(MultiIssueBugSubmission paramMultiIssueBugSubmission, UserAuthenticationStore paramUserAuthenticationStore) {
String existingBugLink = paramMultiIssueBugSubmission.getParams().get("existingBugLink");
return new Bug(existingBugLink, "");
}

public boolean isBugOpen(Bug paramBug, UserAuthenticationStore paramUserAuthenticationStore) {
return true;
}

public boolean isBugClosed(Bug paramBug, UserAuthenticationStore paramUserAuthenticationStore) {
return false;
}

public boolean isBugClosedAndCanReOpen(Bug paramBug, UserAuthenticationStore paramUserAuthenticationStore) {
return false;
}

public void reOpenBug(Bug paramBug, String paramString, UserAuthenticationStore paramUserAuthenticationStore) {
throw new IllegalAccessError("Not implemented");
}

public void addCommentToBug(Bug paramBug, String paramString, UserAuthenticationStore paramUserAuthenticationStore) {
throw new IllegalAccessError("Not implemented");
}

public Bug fetchBugDetails(String existingBugLink, UserAuthenticationStore paramUserAuthenticationStore) {
return new Bug(existingBugLink, "");
}

public Bug fileBug(BugSubmission paramBugSubmission, UserAuthenticationStore paramUserAuthenticationStore) {
String existingBugLink = paramBugSubmission.getParams().get("existingBugLink");
return new Bug(existingBugLink, "");
}

public String getBugDeepLink(String existingBugLink) {
return existingBugLink;
}

public List<BugParam> getBugParameters(IssueDetail paramIssueDetail, UserAuthenticationStore paramUserAuthenticationStore) {
return getBatchBugParameters(paramUserAuthenticationStore);
}

public List<BugTrackerConfig> getConfiguration() {
return Arrays.asList(new BugTrackerConfig[]{});
}

public String getLongDisplayName() {
return getShortDisplayName();
}

public String getShortDisplayName() {
return "Add Existing Bugs";
}

public List<BugParam> onParameterChange(IssueDetail paramIssueDetail, String paramString, List<BugParam> paramList, UserAuthenticationStore paramUserAuthenticationStore) {
return getBatchBugParameters(paramUserAuthenticationStore);
}

public boolean requiresAuthentication() {
return false;
}

public void setConfiguration(Map<String, String> paramMap) {
// Nothing to do
}

public void testConfiguration(UserAuthenticationStore paramUserAuthenticationStore) {
// Nothing to do
}

public void validateCredentials(UserAuthenticationStore paramUserAuthenticationStore) {
// Nothing to do
}

}

0 comments on commit 3fa6d7c

Please sign in to comment.