← 输入框|github.com|刷新
Skip to content

DefectDojo hook makes findings disappear #746

Closed

Description

@malexmave

The DefectDojo-Hook appears to "eat" some of my results. With the hook active, four findings from git-repo-scanner get truncated into a single finding, and with semgrep support (from the WIP branch over at #744) 9 findings are turned into 5 findings, with some findings that found the same issue in different files being removed. If I import the semgrep results into DefectDojo by hand using either the WebUI or the API, all 9 findings are found, so the issue has to be in our hook, I would assume.

I will investigate this more tomorrow / on thursday, leaving this issue here to document my progress. Did not have the time to reproduce the issue on a fresh setup today, will do so and add instructions for reproducing the issue if I can't debug this myself.

Activity

  1. self-assigned this
    on Oct 19, 2021
  2. malexmave commented on Oct 21, 2021

    @malexmave
    MemberAuthor

    From experiments together with @J12934, it seems like DefectDojo has inconsistent behavior between two different methods of importing findings, and we are currently using the version that is incorrectly de-duplicating findings on import. I was able to reproduce the finding directly inside the DefectDojo UI, so this is not an issue with the defectdojo integration in the sense that the bug is outside our control. However, I will leave this issue open as it may require re-working parts of our hook to work around the bug if it is not fixed in DefectDojo. I have raised this in the DefectDojo slack and, after discussions there, created an issue to track progress on this: DefectDojo/django-DefectDojo#5312

  3. changed the title [-]DefectDojo hook makes findings disappear (?)[/-] [+]DefectDojo hook makes findings disappear[/+] on Oct 21, 2021
  4. damiencarol commented on Oct 21, 2021

    @damiencarol

    @malexmave @J12934 it may come from a lack of configuration of the Generic parser. (see my comment on DefectDojo/django-DefectDojo#5312 )

  5. malexmave commented on Oct 22, 2021

    @malexmave
    MemberAuthor

    Documenting knowledge from the other issue over here:

    • The importer issue with semgrep was a bug and will be fixed. Relevant PR: Deduplication settings for Semgrep and Generic Findings Import DefectDojo/django-DefectDojo#5317
    • The generic importer issue (used for git-repo-scanner) can be fixed by setting DEDUPLICATION_ALGORITHM_PER_PARSER ['Generic Findings Import'] = DEDUPE_ALGO_UNIQUE_ID_FROM_TOOL in the local_settings.py. However, this may have different effects on different inputs, as the solution relies on the unique_id_from_tool being set and consistent over multiple runs in the uploaded findings file, which may not always be the case for secureCodeBox. The DefectDojo devs will discuss if this issue can be resolved somehow, but given that the generic importer accepts more or less arbitrary data, any sort of deduplication will be challenging.

    I think a warning in the documentation of the secureCodeBox DefectDojo hook may be warranted (I will send a pull request with one today), and this is also a good reason to make it possible to disable hooks on a per-scan basis as discussed in #728. I will close this issue as soon as we have updated the docs.

  6. malexmave commented on Oct 22, 2021

    @malexmave
    MemberAuthor

    I have created the PR with the documentation update. I think we should add an option to exclude individual scans from the DefectDojo hook, either as discussed in #728 or using a DefectDojo-specific scan annotation (something like defectdojo.securecodebox.io/exclude: true) - although I think that the first option is preferrable, as it is more general.

  7. added
    hookImplement or update a hook
    defectdojoAll issues regarding the DefectDojo Integration
    on Feb 20, 2022
  8. Weltraumschaf commented on Jul 27, 2023

    @Weltraumschaf
    Member

    Already done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugBugsdefectdojoAll issues regarding the DefectDojo IntegrationhookImplement or update a hook

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions