René's URL Explorer Experiment


Title: Improved Test Structure and Tests in DefectDojo Hook by JohannesZahn · Pull Request #600 · secureCodeBox/secureCodeBox · GitHub

Open Graph Title: Improved Test Structure and Tests in DefectDojo Hook by JohannesZahn · Pull Request #600 · secureCodeBox/secureCodeBox

X Title: Improved Test Structure and Tests in DefectDojo Hook by JohannesZahn · Pull Request #600 · secureCodeBox/secureCodeBox

Description: 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 Test your changes as thoroughly as possible before you commit them. Preferably, automate your test by unit/integration tests. Make sure npm test runs for the whole project. Make codeclimate checks happy

Open Graph Description: 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 Findi...

X Description: 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 Findi...

Opengraph URL: https://github.com/secureCodeBox/secureCodeBox/pull/600

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:12dcfcb3-fab4-351b-e759-8770a0ada27c
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idE996:12A7AE:E08466:12E56F7:6977F53C
html-safe-nonce9d79ccaf8bc2968302ee8641ab4abd99e947055c75f488e9dac7675b0bc0c3be
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFOTk2OjEyQTdBRTpFMDg0NjY6MTJFNTZGNzo2OTc3RjUzQyIsInZpc2l0b3JfaWQiOiI3NjgyNzY4MTA3MDY3NjY3NzcyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac2f1e6694593da6c7f40fdec0914c7d188d9c570f11a08a5dfd464e5c520fb6f5
hovercard-subject-tagpull_request:715018798
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/secureCodeBox/secureCodeBox/pull/600/files
twitter:imagehttps://avatars.githubusercontent.com/u/28805778?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/28805778?s=400&v=4
og:image:altDescription 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 Findi...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None8f1e678146f1d73cbdfdaa349dc174ab7af81d2a7f47a4b5b3ada9eb6e3f9e69
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/secureCodeBox/secureCodeBox git https://github.com/secureCodeBox/secureCodeBox.git
octolytics-dimension-user_id34573705
octolytics-dimension-user_loginsecureCodeBox
octolytics-dimension-repository_id80711933
octolytics-dimension-repository_nwosecureCodeBox/secureCodeBox
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id80711933
octolytics-dimension-repository_network_root_nwosecureCodeBox/secureCodeBox
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasebff6b33928f6bf084f3501ebc5705de0492b7e35
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/secureCodeBox/secureCodeBox/pull/600/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FsecureCodeBox%2FsecureCodeBox%2Fpull%2F600%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FsecureCodeBox%2FsecureCodeBox%2Fpull%2F600%2Ffiles
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=secureCodeBox%2FsecureCodeBox
Reloadhttps://github.com/secureCodeBox/secureCodeBox/pull/600/files
Reloadhttps://github.com/secureCodeBox/secureCodeBox/pull/600/files
Reloadhttps://github.com/secureCodeBox/secureCodeBox/pull/600/files
secureCodeBox https://github.com/secureCodeBox
secureCodeBoxhttps://github.com/secureCodeBox/secureCodeBox
Notifications https://github.com/login?return_to=%2FsecureCodeBox%2FsecureCodeBox
Fork 176 https://github.com/login?return_to=%2FsecureCodeBox%2FsecureCodeBox
Star 948 https://github.com/login?return_to=%2FsecureCodeBox%2FsecureCodeBox
Code https://github.com/secureCodeBox/secureCodeBox
Issues 72 https://github.com/secureCodeBox/secureCodeBox/issues
Pull requests 3 https://github.com/secureCodeBox/secureCodeBox/pulls
Discussions https://github.com/secureCodeBox/secureCodeBox/discussions
Actions https://github.com/secureCodeBox/secureCodeBox/actions
Projects 1 https://github.com/secureCodeBox/secureCodeBox/projects
Security 1 https://github.com/secureCodeBox/secureCodeBox/security
Insights https://github.com/secureCodeBox/secureCodeBox/pulse
Code https://github.com/secureCodeBox/secureCodeBox
Issues https://github.com/secureCodeBox/secureCodeBox/issues
Pull requests https://github.com/secureCodeBox/secureCodeBox/pulls
Discussions https://github.com/secureCodeBox/secureCodeBox/discussions
Actions https://github.com/secureCodeBox/secureCodeBox/actions
Projects https://github.com/secureCodeBox/secureCodeBox/projects
Security https://github.com/secureCodeBox/secureCodeBox/security
Insights https://github.com/secureCodeBox/secureCodeBox/pulse
Sign up for GitHub https://github.com/signup?return_to=%2FsecureCodeBox%2FsecureCodeBox%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2FsecureCodeBox%2FsecureCodeBox%2Fissues%2Fnew%2Fchoose
J12934https://github.com/J12934
mainhttps://github.com/secureCodeBox/secureCodeBox/tree/main
maintenance/enhance-dd-hook-testshttps://github.com/secureCodeBox/secureCodeBox/tree/maintenance/enhance-dd-hook-tests
Conversation 5 https://github.com/secureCodeBox/secureCodeBox/pull/600
Commits 8 https://github.com/secureCodeBox/secureCodeBox/pull/600/commits
Checks 0 https://github.com/secureCodeBox/secureCodeBox/pull/600/checks
Files changed https://github.com/secureCodeBox/secureCodeBox/pull/600/files
Please reload this pagehttps://github.com/secureCodeBox/secureCodeBox/pull/600/files
Improved Test Structure and Tests in DefectDojo Hook https://github.com/secureCodeBox/secureCodeBox/pull/600/files#top
Show all changes 8 commits https://github.com/secureCodeBox/secureCodeBox/pull/600/files
a6caad2 improve test structure and tests JohannesZahn Aug 18, 2021 https://github.com/secureCodeBox/secureCodeBox/pull/600/commits/a6caad237301e303236c289629390551000c7908
e918d3d add timezone independece, introduce ScanResult factory JohannesZahn Aug 18, 2021 https://github.com/secureCodeBox/secureCodeBox/pull/600/commits/e918d3d2ebc847b3ccb14f9cef518181b68d71b3
5a3c9aa rename package, refactor some methods JohannesZahn Aug 19, 2021 https://github.com/secureCodeBox/secureCodeBox/pull/600/commits/5a3c9aa38612ecf73cb83ad46a5ceb21b0aa2ac4
5b5cdcd add comments JohannesZahn Aug 19, 2021 https://github.com/secureCodeBox/secureCodeBox/pull/600/commits/5b5cdcdf4f334c1ba3cb9d66d43de82c200aa33d
9e2eefe fix windows tests by adding uniform linefeed to jackson printer JohannesZahn Aug 19, 2021 https://github.com/secureCodeBox/secureCodeBox/pull/600/commits/9e2eefe025d31930e669b3be0b8df62ac9e19a9b
7e6783b replace jsonassert with jackson json node comparison JohannesZahn Aug 19, 2021 https://github.com/secureCodeBox/secureCodeBox/pull/600/commits/7e6783bcd12593191af5807b918e58e2cebf5972
ba55ae3 Update hooks/persistence-defectdojo/hook/src/main/java/io/securecodeb… JohannesZahn Aug 20, 2021 https://github.com/secureCodeBox/secureCodeBox/pull/600/commits/ba55ae35d866efa49156f818c6b2a18db4243138
6921b35 Update hooks/persistence-defectdojo/hook/src/main/java/io/securecodeb… JohannesZahn Aug 20, 2021 https://github.com/secureCodeBox/secureCodeBox/pull/600/commits/6921b3569aa48c738f0f87e6bb39be9b8900a95a
Clear filters https://github.com/secureCodeBox/secureCodeBox/pull/600/files
Please reload this pagehttps://github.com/secureCodeBox/secureCodeBox/pull/600/files
Please reload this pagehttps://github.com/secureCodeBox/secureCodeBox/pull/600/files
DefectDojoPersistenceProvider.java https://github.com/secureCodeBox/secureCodeBox/pull/600/files#diff-22bb46c9b5a6ac8e75bd6e4742078422fbdacddd1fe864bbbddf50f587ef149d
PersistenceProviderConfig.java https://github.com/secureCodeBox/secureCodeBox/pull/600/files#diff-52ac3efb3c1b8033298ecabd1e206a39044f73e061bad44ca4304f34942c1777
SecureCodeBoxFindingsToDefectDojoMapper.java https://github.com/secureCodeBox/secureCodeBox/pull/600/files#diff-3ff326190f7898f934367f117d7fe44ad00ed22f585adf00b9b6f3969948ad03
ScanService.java https://github.com/secureCodeBox/secureCodeBox/pull/600/files#diff-b709eef36b7fc767fb9b6cd298bb3025d6e65967571a04281280bef34b910b0b
GenericParserScanResultService.java https://github.com/secureCodeBox/secureCodeBox/pull/600/files#diff-e198284dc101ab237c4ba75c4481a5e60dbb2aaedea8275a11673cca23ee8294
ScanResultService.java https://github.com/secureCodeBox/secureCodeBox/pull/600/files#diff-816f235045cd4976fc147988a4b5374e773c3f658fef92d2d11f5744a020d9fc
SpecificParserScanResultService.java https://github.com/secureCodeBox/secureCodeBox/pull/600/files#diff-64c33d82aed8bc94a1f19afaadaa0d77c49b4b7ab0d7a1f975935435055b15fa
SecureCodeBoxFindingsToDefectDojoMapperTest.java https://github.com/secureCodeBox/secureCodeBox/pull/600/files#diff-419f2df18f1d123b105f878dfb7bdaa24ef6db9765be8c6fd05db6e5e3d09fb8
ScanServiceTest.java https://github.com/secureCodeBox/secureCodeBox/pull/600/files#diff-2603b1b5b2202aab31594e2afa1c10fc15382ff314d41182bb8f99c6977aa60a
nikto-raw-result.json https://github.com/secureCodeBox/secureCodeBox/pull/600/files#diff-a15a4b4a5d95dd749fba4ee45a54ae1d6019bf8dc8707c9e3b0b38277b791f32
...ctdojo/hook/src/main/java/io/securecodebox/persistence/DefectDojoPersistenceProvider.javahttps://github.com/secureCodeBox/secureCodeBox/pull/600/files#diff-22bb46c9b5a6ac8e75bd6e4742078422fbdacddd1fe864bbbddf50f587ef149d
View file https://github.com/secureCodeBox/secureCodeBox/blob/6921b3569aa48c738f0f87e6bb39be9b8900a95a/hooks/persistence-defectdojo/hook/src/main/java/io/securecodebox/persistence/DefectDojoPersistenceProvider.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/secureCodeBox/secureCodeBox/pull/600/{{ revealButtonHref }}
https://github.com/secureCodeBox/secureCodeBox/pull/600/files#diff-22bb46c9b5a6ac8e75bd6e4742078422fbdacddd1fe864bbbddf50f587ef149d
https://github.com/secureCodeBox/secureCodeBox/pull/600/files#diff-22bb46c9b5a6ac8e75bd6e4742078422fbdacddd1fe864bbbddf50f587ef149d
https://github.com/secureCodeBox/secureCodeBox/pull/600/files#diff-22bb46c9b5a6ac8e75bd6e4742078422fbdacddd1fe864bbbddf50f587ef149d
...ojo/hook/src/main/java/io/securecodebox/persistence/config/PersistenceProviderConfig.javahttps://github.com/secureCodeBox/secureCodeBox/pull/600/files#diff-52ac3efb3c1b8033298ecabd1e206a39044f73e061bad44ca4304f34942c1777
View file https://github.com/secureCodeBox/secureCodeBox/blob/6921b3569aa48c738f0f87e6bb39be9b8900a95a/hooks/persistence-defectdojo/hook/src/main/java/io/securecodebox/persistence/config/PersistenceProviderConfig.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/secureCodeBox/secureCodeBox/pull/600/{{ revealButtonHref }}
https://github.com/secureCodeBox/secureCodeBox/pull/600/files#diff-52ac3efb3c1b8033298ecabd1e206a39044f73e061bad44ca4304f34942c1777
https://github.com/secureCodeBox/secureCodeBox/pull/600/files#diff-52ac3efb3c1b8033298ecabd1e206a39044f73e061bad44ca4304f34942c1777
https://github.com/secureCodeBox/secureCodeBox/pull/600/files#diff-52ac3efb3c1b8033298ecabd1e206a39044f73e061bad44ca4304f34942c1777
...in/java/io/securecodebox/persistence/mapping/SecureCodeBoxFindingsToDefectDojoMapper.javahttps://github.com/secureCodeBox/secureCodeBox/pull/600/files#diff-3ff326190f7898f934367f117d7fe44ad00ed22f585adf00b9b6f3969948ad03
View file https://github.com/secureCodeBox/secureCodeBox/blob/6921b3569aa48c738f0f87e6bb39be9b8900a95a/hooks/persistence-defectdojo/hook/src/main/java/io/securecodebox/persistence/mapping/SecureCodeBoxFindingsToDefectDojoMapper.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/secureCodeBox/secureCodeBox/pull/600/{{ revealButtonHref }}
https://github.com/secureCodeBox/secureCodeBox/pull/600/files#diff-3ff326190f7898f934367f117d7fe44ad00ed22f585adf00b9b6f3969948ad03
https://github.com/secureCodeBox/secureCodeBox/pull/600/files#diff-3ff326190f7898f934367f117d7fe44ad00ed22f585adf00b9b6f3969948ad03
https://github.com/secureCodeBox/secureCodeBox/pull/600/files#diff-3ff326190f7898f934367f117d7fe44ad00ed22f585adf00b9b6f3969948ad03
https://github.com/secureCodeBox/secureCodeBox/pull/600/files#diff-3ff326190f7898f934367f117d7fe44ad00ed22f585adf00b9b6f3969948ad03
https://github.com/secureCodeBox/secureCodeBox/pull/600/files#diff-3ff326190f7898f934367f117d7fe44ad00ed22f585adf00b9b6f3969948ad03
https://github.com/secureCodeBox/secureCodeBox/pull/600/files#diff-3ff326190f7898f934367f117d7fe44ad00ed22f585adf00b9b6f3969948ad03
...tence-defectdojo/hook/src/main/java/io/securecodebox/persistence/service/ScanService.javahttps://github.com/secureCodeBox/secureCodeBox/pull/600/files#diff-b709eef36b7fc767fb9b6cd298bb3025d6e65967571a04281280bef34b910b0b
View file https://github.com/secureCodeBox/secureCodeBox/blob/d50c3c34af4eeb674cee0c028bb560d86ca0a973/hooks/persistence-defectdojo/hook/src/main/java/io/securecodebox/persistence/service/ScanService.java
Open in desktop https://desktop.github.com
Please reload this pagehttps://github.com/secureCodeBox/secureCodeBox/pull/600/files
.../java/io/securecodebox/persistence/service/scanresult/GenericParserScanResultService.javahttps://github.com/secureCodeBox/secureCodeBox/pull/600/files#diff-e198284dc101ab237c4ba75c4481a5e60dbb2aaedea8275a11673cca23ee8294
View file https://github.com/secureCodeBox/secureCodeBox/blob/6921b3569aa48c738f0f87e6bb39be9b8900a95a/hooks/persistence-defectdojo/hook/src/main/java/io/securecodebox/persistence/service/scanresult/GenericParserScanResultService.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/secureCodeBox/secureCodeBox/pull/600/{{ revealButtonHref }}
...hook/src/main/java/io/securecodebox/persistence/service/scanresult/ScanResultService.javahttps://github.com/secureCodeBox/secureCodeBox/pull/600/files#diff-816f235045cd4976fc147988a4b5374e773c3f658fef92d2d11f5744a020d9fc
View file https://github.com/secureCodeBox/secureCodeBox/blob/6921b3569aa48c738f0f87e6bb39be9b8900a95a/hooks/persistence-defectdojo/hook/src/main/java/io/securecodebox/persistence/service/scanresult/ScanResultService.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/secureCodeBox/secureCodeBox/pull/600/{{ revealButtonHref }}
...java/io/securecodebox/persistence/service/scanresult/SpecificParserScanResultService.javahttps://github.com/secureCodeBox/secureCodeBox/pull/600/files#diff-64c33d82aed8bc94a1f19afaadaa0d77c49b4b7ab0d7a1f975935435055b15fa
View file https://github.com/secureCodeBox/secureCodeBox/blob/6921b3569aa48c738f0f87e6bb39be9b8900a95a/hooks/persistence-defectdojo/hook/src/main/java/io/securecodebox/persistence/service/scanresult/SpecificParserScanResultService.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/secureCodeBox/secureCodeBox/pull/600/{{ revealButtonHref }}
Please reload this pagehttps://github.com/secureCodeBox/secureCodeBox/pull/600/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.