-
Notifications
You must be signed in to change notification settings - Fork 146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improved Test Structure and Tests in DefectDojo Hook #600
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Johannes Zahn <johannes.zahn@iteratec.com>
JohannesZahn
added
hook
Implement or update a hook
defectdojo
All issues regarding the DefectDojo Integration
labels
Aug 18, 2021
Signed-off-by: Johannes Zahn <johannes.zahn@iteratec.com>
Signed-off-by: Johannes Zahn <johannes.zahn@iteratec.com>
Signed-off-by: Johannes Zahn <johannes.zahn@iteratec.com>
3 tasks
Signed-off-by: Johannes Zahn <johannes.zahn@iteratec.com>
Signed-off-by: Johannes Zahn <johannes.zahn@iteratec.com>
@J12934 this is ready for review, however one check does not complete, I tried re-running all jobs but it didn't seem to help. |
J12934
previously approved these changes
Aug 20, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good 👍
Added some minor suggestions to log lines which might be a bit confusing without punctuation.
...ain/java/io/securecodebox/persistence/service/scanresult/GenericParserScanResultService.java
Outdated
Show resolved
Hide resolved
...in/java/io/securecodebox/persistence/service/scanresult/SpecificParserScanResultService.java
Outdated
Show resolved
Hide resolved
…ox/persistence/service/scanresult/GenericParserScanResultService.java Co-authored-by: Jannik Hollenbach <jannik.hollenbach@iteratec.com> Signed-off-by: Johannes Zahn <johannes.zahn@iteratec.com>
…ox/persistence/service/scanresult/SpecificParserScanResultService.java Co-authored-by: Jannik Hollenbach <jannik.hollenbach@iteratec.com> Signed-off-by: Johannes Zahn <johannes.zahn@iteratec.com>
JohannesZahn
force-pushed
the
maintenance/enhance-dd-hook-tests
branch
from
August 20, 2021 10:35
c8ad75f
to
6921b35
Compare
I commited your suggestions @J12934 :) |
J12934
approved these changes
Aug 20, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
The Mapper converting SecureCodeBox to DefectDojo Findings accepted and returned JSON Strings and could therefore not easily be tested. Now the Mapper only Converts secureCodeBox Findings Objects to defectDojo Findings Objects. There were previously some tests for this mapping but they were enhanced by seperating tests for mapping dates, descriptions and basic fields.
A Test Class for the ScanResultService (which returns the ScanResults that are passed to DefectDojo) was introduced that is now resposible for testing that the assembled scan results that will be uploaded to defectDojo are processed correctly.
Furthermore the PersistenceConfig now features a field to specify a Timezone for parsing dates instead of using the default timezone on a machine. Therefore the timezone can be set in the unit tests to ensure they produce the same results regardles of the location
Checklist
npm test
runs for the whole project.