|
| 1 | +# Fortify SSC Parser Plugin for OWASP Dependency Check |
| 2 | + |
| 3 | +This Fortify SSC parser plugin allows for importing scan results from OWASP Dependency Check. |
| 4 | + |
| 5 | +### <a name="related-links">Related Links</a> |
| 6 | + |
| 7 | +* **Downloads**: |
| 8 | + _Beta versions may be unstable or non-functional. The `*-licenseReport.zip` and `*-dependencySources.zip` files are for informational purposes only and do not need to be downloaded._ |
| 9 | + * **Release versions**: https://bintray.com/package/files/fortify-ps/binaries/fortify-ssc-parser-owasp-dependency-check-release?order=desc&sort=fileLastModified&basePath=&tab=files |
| 10 | + * **Beta versions**: https://bintray.com/package/files/fortify-ps/binaries/fortify-ssc-parser-owasp-dependency-check-beta?order=desc&sort=fileLastModified&basePath=&tab=files |
| 11 | + * **Sample input files**: [sampleData](sampleData) |
| 12 | +* **GitHub**: https://github.com/fortify-ps/fortify-ssc-parser-owasp-dependency-check |
| 13 | +* **Automated builds**: https://travis-ci.com/fortify-ps/fortify-ssc-parser-owasp-dependency-check |
| 14 | +* **OWASP Dependency Check website**: https://owasp.org/www-project-dependency-check/ |
| 15 | + |
| 16 | + |
| 17 | +## <a name="usage">Usage</a> |
| 18 | + |
| 19 | +The following sections describe how to install and use the plugin. For generic information |
| 20 | +about how to install and use SSC parser plugins, please see the Fortify SSC documentation. |
| 21 | + |
| 22 | +### <a name="plugin-install--upgrade">Plugin Install & Upgrade</a> |
| 23 | + |
| 24 | +* Obtain the plugin binary jar file |
| 25 | + * Either download from Bintray (see [Related Links](#related-links)) |
| 26 | + * Or by building yourself (see [Information for plugin developers](#information-for-plugin-developers)) |
| 27 | +* If you already have another version of the plugin installed, first uninstall the plugin by following the steps in [Plugin Uninstall](#plugin-uninstall) |
| 28 | +* In Fortify Software Security Center: |
| 29 | + * Navigate to Administration->Plugins->Parsers |
| 30 | + * Click the `NEW` button |
| 31 | + * Accept the warning |
| 32 | + * Upload the plugin jar file |
| 33 | + * Enable the plugin by clicking the `ENABLE` button |
| 34 | + |
| 35 | +### <a name="plugin-uninstall">Plugin Uninstall</a> |
| 36 | + |
| 37 | +* In Fortify Software Security Center: |
| 38 | + * Navigate to Administration->Plugins->Parsers |
| 39 | + * Select the parser plugin that you want to uninstall |
| 40 | + * Click the `DISABLE` button |
| 41 | + * Click the `REMOVE` button |
| 42 | + |
| 43 | +### <a name="obtain-results">Obtain results</a> |
| 44 | + |
| 45 | +Please see the OWASP Dependency Check documentation for details on scanning applications and |
| 46 | +generating reports. Note that the SSC parser plugin requires the uploaded reports to be in JSON |
| 47 | +format. |
| 48 | + |
| 49 | +### <a name="upload-results">Upload results</a> |
| 50 | + |
| 51 | +SSC web interface (manual upload): |
| 52 | + |
| 53 | +* Navigate to the Artifacts tab of your application version |
| 54 | +* Click the `UPLOAD` button |
| 55 | +* Click the `ADD FILES` button, and select the JSON file to upload |
| 56 | +* Enable the `3rd party results` check box |
| 57 | +* Select the `OWASP_DEPCHECK` type |
| 58 | + |
| 59 | +SSC clients (FortifyClient, Maven plugin, ...): |
| 60 | + |
| 61 | +* Generate a scan.info file containing a single line as follows: |
| 62 | + `engineType=OWASP_DEPCHECK` |
| 63 | +* Generate a zip file containing the following: |
| 64 | + * The scan.info file generated in the previous step |
| 65 | + * The JSON file containing scan results |
| 66 | +* Upload the zip file generated in the previous step to SSC |
| 67 | + * Using any SSC client, for example FortifyClient |
| 68 | + * Similar to how you would upload an FPR file |
| 69 | + |
| 70 | + |
| 71 | + |
| 72 | +## <a name="information-for-plugin-developers">Information for plugin developers</a> |
| 73 | + |
| 74 | +The following sections provide information that may be useful for developers of this |
| 75 | +parser plugin. |
| 76 | + |
| 77 | +### <a name="ides">IDE's</a> |
| 78 | + |
| 79 | +This project uses Lombok. In order to have your IDE compile this project without errors, |
| 80 | +you may need to add Lombok support to your IDE. Please see https://projectlombok.org/setup/overview |
| 81 | +for more information. |
| 82 | + |
| 83 | +### <a name="gradle">Gradle</a> |
| 84 | + |
| 85 | +It is strongly recommended to build this project using the included Gradle Wrapper |
| 86 | +scripts; using other Gradle versions may result in build errors and other issues. |
| 87 | + |
| 88 | +The Gradle build uses various helper scripts from https://github.com/fortify-ps/gradle-helpers; |
| 89 | +please refer to the documentation and comments in included scripts for more information. |
| 90 | + |
| 91 | +### <a name="commonly-used-commands">Commonly used commands</a> |
| 92 | + |
| 93 | +All commands listed below use Linux/bash notation; adjust accordingly if you |
| 94 | +are running on a different platform. All commands are to be executed from |
| 95 | +the main project directory. |
| 96 | + |
| 97 | +* `./gradlew tasks --all`: List all available tasks |
| 98 | +* Build: (plugin binary will be stored in `build/libs`) |
| 99 | + * `./gradlew clean build`: Clean and build the project |
| 100 | + * `./gradlew build`: Build the project without cleaning |
| 101 | + * `./gradlew dist`: Build distribution zip |
| 102 | +* Version management: |
| 103 | + * `./gradlew printProjectVersion`: Print the current version |
| 104 | + * `./gradlew startSnapshotBranch -PnextVersion=2.0`: Start a new snapshot branch for an upcoming `2.0` version |
| 105 | + * `./gradlew releaseSnapshot`: Merge the changes from the current branch to the master branch, and create release tag |
| 106 | +* `./fortify-scan.sh`: Run a Fortify scan; requires Fortify SCA to be installed |
| 107 | + |
| 108 | +Note that the version management tasks operate only on the local repository; you will need to manually |
| 109 | +push any changes (including tags and branches) to the remote repository. |
| 110 | + |
| 111 | +### <a name="versioning">Versioning</a> |
| 112 | + |
| 113 | +The various version-related Gradle tasks assume the following versioning methodology: |
| 114 | + |
| 115 | +* The `master` branch is only used for creating tagged release versions |
| 116 | +* A branch named `<version>-SNAPSHOT` contains the current snapshot state for the upcoming release |
| 117 | +* Optionally, other branches can be used to develop individual features, perform bug fixes, ... |
| 118 | + * However, note that the Gradle build may be unable to identify a correct version number for the project |
| 119 | + * As such, only builds from tagged versions or from a `<version>-SNAPSHOT` branch should be published to a Maven repository |
| 120 | + |
| 121 | +### <a name="automated-builds--publishing">Automated Builds & publishing</a> |
| 122 | + |
| 123 | +Travis-CI builds are automatically triggered when there is any change in the project repository, |
| 124 | +for example due to pushing changes, or creating tags or branches. If applicable, binaries and related |
| 125 | +artifacts are automatically published to Bintray using the `bintrayUpload` task: |
| 126 | + |
| 127 | +* Building a tagged version will result in corresponding release version artifacts to be published |
| 128 | +* Building a branch named `<version>-SNAPSHOT` will result in corresponding beta version artifacts to be published |
| 129 | +* No artifacts will be deployed for any other build, for example when Travis-CI builds the `master` branch |
| 130 | + |
| 131 | +See the [Related Links](#related-links) section for the relevant Travis-CI and Bintray links. |
| 132 | + |
| 133 | + |
| 134 | +# <a name="licensing">Licensing</a> |
| 135 | +See [LICENSE.TXT](LICENSE.TXT) |
| 136 | + |
0 commit comments