8000 Update Java Model for CRD by J12934 · Pull Request #824 · secureCodeBox/secureCodeBox · GitHub
[go: up one dir, main page]

Skip to content

Conversation

@J12934
Copy link
Member
@J12934 J12934 commented Nov 17, 2021

This should resolve issues with the DefectDojo hook not being able to properly update the scan as the status fields didn't match the current ones. These issue were initially caused by the #695 as this has updated the hook status fields in the scan.status.

Done by using the update.sh script. This scripts regenerates all the java types. After the script there unfortunatly is a manual editing step to get rid of unneeded autogenerated code (Mostly the volume and initContainer field from the scan). This is mostly done so that the generated code is not counted towards the programming language distribution of this repo... :(

This should resolve issues with the DefectDojo hook not being able to properly update the scan as the status fields didn't match the current ones

Signed-off-by: Jannik Hollenbach <jannik.hollenbach@iteratec.com>
@J12934 J12934 added the bug Bugs label Nov 17, 2021
@J12934 J12934 self-assigned this Nov 17, 2021
Copy link
Contributor
@EndPositive EndPositive left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works as expected 😄 .

Tested with a deployment of DD, DD persistence provider, two update-field hooks, and nmap.

NAME                                TYPE           PRIORITY   IMAGE
persistence-defectdojo              ReadAndWrite   0          docker.io/securecodebox/hook-persistence-defectdojo:sha-c9dbc16c
update-category-update-field-hook   ReadAndWrite   1          docker.io/securecodebox/hook-update-field:sha-c9dbc16c
update-severity-update-field-hook   ReadAndWrite   -1         docker.io/securecodebox/hook-update-field:sha-c9dbc16c
NAME                                                    READY   STATUS      RESTARTS   AGE
parse-nmap-cf6dr--1-5lmc4                               0/1     Completed   0          2m7s
persistence-defectdojo-nmap-7tlxd--1-9nf9x              0/1     Completed   0          2m2s
scan-nmap-n6jpg--1-gxnhp                                0/2     Completed   0          2m10s
update-category-update-field-hook-nmap-h7gs4--1-kqtsx   0/1     Completed   0          2m4s
update-severity-update-field-hook-nmap-p4r87--1-mgvpj   0/1     Completed   0          111s
Status:
  Finding Download Link:  [...]
  Finding Head Link:      [...]
  Findings:
    Categories:
      DefectDojo Imported Finding:  1
    Count:                          1
    Severities:
      High:  1
  Ordered Hook Statuses:
    [map[hookName:update-category-update-field-hook jobName:update-category-update-field-hook-nmap-h7gs4 priority:1 state:Completed type:ReadAndWrite]]
    [map[hookName:persistence-defectdojo jobName:persistence-defectdojo-nmap-7tlxd priority:0 state:Completed type:ReadAndWrite]]
    [map[hookName:update-severity-update-field-hook jobName:update-severity-update-field-hook-nmap-p4r87 priority:-1 state:Completed type:ReadAndWrite]]
  Raw Result Download Link:  [...]
  Raw Result File:           nmap-results.xml
  Raw Result Head Link:      [...]
  Raw Result Type:           nmap-xml
  State:                     Done

Order is properly preserved. DD hook does not mess up hook status and update-severity still runs after DD hook.

@J12934 J12934 merged commit a27818a into main Nov 18, 2021
@J12934 J12934 deleted the fix/update-java-crd-types branch November 18, 2021 11:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Bugs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

0