FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fix Crash in DefectDojo Hook for Scans without Parameters by Weltraumschaf · Pull Request #2275 · secureCodeBox/secureCodeBox · GitHub

Fix Crash in DefectDojo Hook for Scans without Parameters - #2275

Merged
J12934 merged 17 commits into
secureCodeBox:mainfrom
Weltraumschaf:2272_npe_dd_import
Feb 14, 2024
Merged

Fix Crash in DefectDojo Hook for Scans without Parameters#2275
J12934 merged 17 commits into
secureCodeBox:mainfrom
Weltraumschaf:2272_npe_dd_import

Conversation

Copy link
Copy Markdown
Member

No description provided.

netlify Bot commented Feb 9, 2024
edited
Loading

Copy link
Copy Markdown

Deploy Preview for docs-securecodebox canceled.

Name Link
🔨 Latest commit fc574ec
🔍 Latest deploy log https://app.netlify.com/sites/docs-securecodebox/deploys/65cbd7d74719c80008bdc1da

Weltraumschaf self-assigned this Feb 9, 2024
Weltraumschaf added the bug Bugs label Feb 9, 2024
Weltraumschaf marked this pull request as draft February 9, 2024 18:16
So we can split the method better in further refactorings.

Signed-off-by: Sven Strittmatter <sven.strittmatter@iteratec.com>
Get them out of the way, since they are used at various places.

Signed-off-by: Sven Strittmatter <sven.strittmatter@iteratec.com>
Signed-off-by: Sven Strittmatter <sven.strittmatter@iteratec.com>
Signed-off-by: Sven Strittmatter <sven.strittmatter@iteratec.com>
Signed-off-by: Sven Strittmatter <sven.strittmatter@iteratec.com>
Signed-off-by: Sven Strittmatter <sven.strittmatter@iteratec.com>
In Java getters are by convention methods which only returns a field.
Java developers do not expect that getters operate on something else
than "this" to retrieve an value.

Signed-off-by: Sven Strittmatter <sven.strittmatter@iteratec.com>
Signed-off-by: Sven Strittmatter <sven.strittmatter@iteratec.com>
Weltraumschaf marked this pull request as ready for review February 13, 2024 20:52
Weltraumschaf requested a review from J12934 February 13, 2024 20:52
Found the test in the wrong package, after wondering why there are
so much public API...

Signed-off-by: Sven Strittmatter <sven.strittmatter@iteratec.com>
Signed-off-by: Sven Strittmatter <sven.strittmatter@iteratec.com>
…rdcoded Newline

Signed-off-by: Sven Strittmatter <sven.strittmatter@iteratec.com>
In Java getters are by convention methods which only returns a field.
Java developers do not expect that getters operate on something else
than "this" to retrieve an value.

Signed-off-by: Sven Strittmatter <sven.strittmatter@iteratec.com>
Null should be avoid whenever possible because it leads to endless
drama with NullPointerExceptions at runtime.

In this particular case it is formatted as a string which will
(maybe) convert to the string "null". Since this is an implementation
detail of the Java SDK we can rely on that.

Introduce the explicit string "n/a"" to indicate that there is no
starting time.

Signed-off-by: Sven Strittmatter <sven.strittmatter@iteratec.com>
Signed-off-by: Sven Strittmatter <sven.strittmatter@iteratec.com>
Signed-off-by: Sven Strittmatter <sven.strittmatter@iteratec.com>
Since generate is the important API the test cases should be before
the ones for utility methods.

Signed-off-by: Sven Strittmatter <sven.strittmatter@iteratec.com>
This value may be null, but the join method requirres non-null.

The fix is to check for null and defult to an empty list. This
object creation should not be a performace problem. If to many
descritions wil be generated this can be circumvented by default
to a hardcoded string literal for empty/null parameters.

Signed-off-by: Sven Strittmatter <sven.strittmatter@iteratec.com>

Copy link
Copy Markdown

Quality Gate passed

Issues
0 New issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

J12934 changed the title NPE When Importing Scan to DefecDojo on ScanSpec Properties is Null Fix Crash in DefectDojo Hook for Scans without Parameters Feb 14, 2024
J12934 merged commit 03888f7 into secureCodeBox:main Feb 14, 2024
Weltraumschaf deleted the 2272_npe_dd_import branch February 14, 2024 12:34
This file contains hidden or 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Bugs

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

"NullPointerException" error when sending kubeaudit scan results to DefectDojo

2 participants


Back | FazBrowse Home | New Git URL