|
| 1 | +<x-tag-head> |
| 2 | +<x-tag-meta http-equiv="X-UA-Compatible" content="IE=edge"/> |
| 3 | + |
| 4 | +<x-tag-script language="JavaScript"><!-- |
| 5 | +<X-INCLUDE url="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@10.0.0/build/highlight.min.js"/> |
| 6 | +--></x-tag-script> |
| 7 | + |
| 8 | +<x-tag-script language="JavaScript"><!-- |
| 9 | +<X-INCLUDE url="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js" /> |
| 10 | +--></x-tag-script> |
| 11 | + |
| 12 | +<x-tag-script language="JavaScript"><!-- |
| 13 | +<X-INCLUDE url="${gradleHelpersLocation}/spa_readme.js" /> |
| 14 | +--></x-tag-script> |
| 15 | + |
| 16 | +<x-tag-style><!-- |
| 17 | +<X-INCLUDE url="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@10.0.0/build/styles/github.min.css" /> |
| 18 | +--></x-tag-style> |
| 19 | + |
| 20 | +<x-tag-style><!-- |
| 21 | +<X-INCLUDE url="${gradleHelpersLocation}/spa_readme.css" /> |
| 22 | +--></x-tag-style> |
| 23 | +</x-tag-head> |
| 24 | + |
| 25 | +# Fortify SSC Parser Plugin for Symfony Security Checker |
| 26 | + |
| 27 | +## Introduction |
| 28 | + |
| 29 | +This Fortify SSC parser plugin allows for importing scan results from Symfony Security Checker. |
| 30 | + |
| 31 | +### Related Links |
| 32 | + |
| 33 | +* **Downloads**: |
| 34 | + _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._ |
| 35 | + * **Release versions**: https://bintray.com/package/files/fortify-ps/release/fortify-ssc-parser-symfony-security-checker?order=desc&sort=fileLastModified&basePath=&tab=files |
| 36 | + * **Beta versions**: https://bintray.com/package/files/fortify-ps/beta/fortify-ssc-parser-symfony-security-checker?order=desc&sort=fileLastModified&basePath=&tab=files |
| 37 | + * **Sample input files**: [sampleData](sampleData) |
| 38 | +* **GitHub**: https://github.com/fortify-ps/fortify-ssc-parser-symfony-security-checker |
| 39 | +* **Automated builds**: https://travis-ci.com/fortify-ps/fortify-ssc-parser-symfony-security-checker |
| 40 | +* **Symfony Security Checker resources**: |
| 41 | + * Web interface: https://security.symfony.com/ |
| 42 | + * CLI interface: https://github.com/sensiolabs/security-checker |
| 43 | + |
| 44 | + |
| 45 | +## Plugin Installation |
| 46 | + |
| 47 | +These sections describe how to install, upgrade and uninstall the plugin. |
| 48 | + |
| 49 | +### Install & Upgrade |
| 50 | + |
| 51 | +* Obtain the plugin binary jar file |
| 52 | + * Either download from Bintray (see [Related Links](#related-links)) |
| 53 | + * Or by building yourself (see [Developers](#developers)) |
| 54 | +* If you already have another version of the plugin installed, first uninstall the previously |
| 55 | + installed version of the plugin by following the steps under [Uninstall](#uninstall) below |
| 56 | +* In Fortify Software Security Center: |
| 57 | + * Navigate to Administration->Plugins->Parsers |
| 58 | + * Click the `NEW` button |
| 59 | + * Accept the warning |
| 60 | + * Upload the plugin jar file |
| 61 | + * Enable the plugin by clicking the `ENABLE` button |
| 62 | + |
| 63 | +### Uninstall |
| 64 | + |
| 65 | +* In Fortify Software Security Center: |
| 66 | + * Navigate to Administration->Plugins->Parsers |
| 67 | + * Select the parser plugin that you want to uninstall |
| 68 | + * Click the `DISABLE` button |
| 69 | + * Click the `REMOVE` button |
| 70 | + |
| 71 | + |
| 72 | +## Obtain results |
| 73 | + |
| 74 | +Please see the Symfony Security Checker documentation for details on checking applications and |
| 75 | +generating reports. Note that the SSC parser plugin requires the uploaded reports to be in JSON |
| 76 | +format. |
| 77 | + |
| 78 | +## Upload results |
| 79 | + |
| 80 | +SSC web interface (manual upload): |
| 81 | + |
| 82 | +* Navigate to the Artifacts tab of your application version |
| 83 | +* Click the `UPLOAD` button |
| 84 | +* Click the `ADD FILES` button, and select the JSON file to upload |
| 85 | +* Enable the `3rd party results` check box |
| 86 | +* Select the `SYMFONY_SECCHECK` type |
| 87 | + |
| 88 | +SSC clients (FortifyClient, Maven plugin, ...): |
| 89 | + |
| 90 | +* Generate a scan.info file containing a single line as follows: |
| 91 | +`engineType=SYMFONY_SECCHECK` |
| 92 | +* Generate a zip file containing the following: |
| 93 | + * The scan.info file generated in the previous step |
| 94 | + * The JSON file containing scan results |
| 95 | +* Upload the zip file generated in the previous step to SSC |
| 96 | + * Using any SSC client, for example FortifyClient |
| 97 | + * Similar to how you would upload an FPR file |
| 98 | + |
| 99 | + |
| 100 | + |
| 101 | +## Developers |
| 102 | + |
| 103 | +The following sections provide information that may be useful for developers of this |
| 104 | +parser plugin. |
| 105 | + |
| 106 | +### IDE's |
| 107 | + |
| 108 | +This project uses Lombok. In order to have your IDE compile this project without errors, |
| 109 | +you may need to add Lombok support to your IDE. Please see https://projectlombok.org/setup/overview |
| 110 | +for more information. |
| 111 | + |
| 112 | +### Gradle Wrapper |
| 113 | + |
| 114 | +It is strongly recommended to build this project using the included Gradle Wrapper |
| 115 | +scripts; using other Gradle versions may result in build errors and other issues. |
| 116 | + |
| 117 | +The Gradle build uses various helper scripts from https://github.com/fortify-ps/gradle-helpers; |
| 118 | +please refer to the documentation and comments in included scripts for more information. |
| 119 | + |
| 120 | +### Common Commands |
| 121 | + |
| 122 | +All commands listed below use Linux/bash notation; adjust accordingly if you |
| 123 | +are running on a different platform. All commands are to be executed from |
| 124 | +the main project directory. |
| 125 | + |
| 126 | +* `./gradlew tasks --all`: List all available tasks |
| 127 | +* Build: (plugin binary will be stored in `build/libs`) |
| 128 | + * `./gradlew clean build`: Clean and build the project |
| 129 | + * `./gradlew build`: Build the project without cleaning |
| 130 | + * `./gradlew dist`: Build distribution zip |
| 131 | +* Version management: |
| 132 | + * `./gradlew printProjectVersion`: Print the current version |
| 133 | + * `./gradlew startSnapshotBranch -PnextVersion=2.0`: Start a new snapshot branch for an upcoming `2.0` version |
| 134 | + * `./gradlew releaseSnapshot`: Merge the changes from the current branch to the master branch, and create release tag |
| 135 | +* `./fortify-scan.sh`: Run a Fortify scan; requires Fortify SCA to be installed |
| 136 | + |
| 137 | +Note that the version management tasks operate only on the local repository; you will need to manually |
| 138 | +push any changes (including tags and branches) to the remote repository. |
| 139 | + |
| 140 | +### Versioning |
| 141 | + |
| 142 | +The various version-related Gradle tasks assume the following versioning methodology: |
| 143 | + |
| 144 | +* The `master` branch is only used for creating tagged release versions |
| 145 | +* A branch named `<version>-SNAPSHOT` contains the current snapshot state for the upcoming release |
| 146 | +* Optionally, other branches can be used to develop individual features, perform bug fixes, ... |
| 147 | + * However, note that the Gradle build may be unable to identify a correct version number for the project |
| 148 | + * As such, only builds from tagged versions or from a `<version>-SNAPSHOT` branch should be published to a Maven repository |
| 149 | + |
| 150 | +### CI/CD |
| 151 | + |
| 152 | +Travis-CI builds are automatically triggered when there is any change in the project repository, |
| 153 | +for example due to pushing changes, or creating tags or branches. If applicable, binaries and related |
| 154 | +artifacts are automatically published to Bintray using the `bintrayUpload` task: |
| 155 | + |
| 156 | +* Building a tagged version will result in corresponding release version artifacts to be published |
| 157 | +* Building a branch named `<version>-SNAPSHOT` will result in corresponding beta version artifacts to be published |
| 158 | +* No artifacts will be deployed for any other build, for example when Travis-CI builds the `master` branch |
| 159 | + |
| 160 | +See the [Related Links](#related-links) section for the relevant Travis-CI and Bintray links. |
| 161 | + |
| 162 | + |
| 163 | +## License |
| 164 | +<x-insert text="<!--"/> |
| 165 | + |
| 166 | +See [LICENSE.TXT](LICENSE.TXT) |
| 167 | + |
| 168 | +<x-insert text="-->"/> |
| 169 | + |
| 170 | +<x-include url="file:LICENSE.TXT"/> |
0 commit comments