Skip to content
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

Add Cyberwatch Galeax Parser #12105

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open

Add Cyberwatch Galeax Parser #12105

wants to merge 2 commits into from

Conversation

AmineHazi
Copy link

As discussed with @valentijnscholten , the default CSV and JSON reports from Cyberwatch do not include all the necessary data. Therefore, to use this parser, please utilize this tool : https://github.com/Galeax/Cyberwatch-API-DefectDojo to generate the required JSON input.

Cyberwatch parser : Fixed CVEs and Security issues handling, added components and mitigated findings

Changed Setting for Dedup algorithm

removed shashum

Fixed parser bug with filters

Added Epss score as %, added CAPEC and ATTACKS

Fix linter and code format

Co-authored-by: Amine <amine@galeax.com>
@github-actions github-actions bot added settings_changes Needs changes to settings.py based on changes in settings.dist.py included in this PR docs unittests parser labels Mar 25, 2025
Copy link

dryrunsecurity bot commented Mar 25, 2025

DryRun Security Summary

A comprehensive patch for Cyberwatch Parser in DefectDojo introduces potential security risks through information exposure, logging vulnerabilities, and inadequate input validation across parser implementation, configuration, and test files.

Expand for full summary

Summary: A comprehensive patch adding Cyberwatch Parser documentation and integration to DefectDojo, including parser implementation, configuration updates, and unit test files for security finding parsing.

Security Findings:

  1. External Reference Exposure

    • GitHub repository URL directly exposed in parser code
    • Potential information leakage about tooling
  2. Logging Considerations

    • Extensive logging that could potentially leak sensitive information
    • Sensitive data like server names and vulnerability details logged
  3. Datetime Parsing Vulnerabilities

    • Fallback mechanisms in datetime parsing could mask data integrity issues
    • Potential for timezone-related problems
  4. Input Validation Concerns

    • Extensive use of .get() method with default values
    • Potential for handling unexpected input structures
  5. Information Disclosure Risks

    • Detailed system information exposure
      • Computer names
      • Product versions
      • Server status
      • Detected and fixed timestamps
  6. Hostname and System Information Exposure

    • Revealed in test JSON files
      • Specific computer names
      • Operating system details
      • Computer IDs
      • IP addresses
  7. Potential Reconnaissance Information

    • Web application framework fingerprinting details
    • Detailed CVE and security issue metadata that could aid attackers

View PR in the DryRun Dashboard.

@valentijnscholten
Copy link
Member

Thank you @AmineHazi . To make it clear that this parser is parsing an "extended" Cyberwatch report, could you look at changing the name of the parser to something like "Cyberwatch Galeax Scan" or "Cyberwatch Scan (Galeax)" or some suggestion from your side?

self.assertEqual("Security Issue - Fingerprint Web Application Framework", finding.title)
self.assertEqual("Info", finding.severity)
# Expect both endpoints to have the same host as per new JSON
endpoint_hosts = [e.host for e in finding.unsaved_endpoints]
Copy link
Member

Choose a reason for hiding this comment

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

Could you add a .clean() for all endpoints? This validates if they are in valid format.


finding = findings[0]
self.assertEqual("Security Issue - Fingerprint Web Application Framework", finding.title)
self.assertEqual("Info", finding.severity)
Copy link
Member

Choose a reason for hiding this comment

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

Could you ad an assert on cwe?

self.assertIn("CVSS Base vector:", finding.description)
self.assertIn("CVE Published At: 2023-11-27T23:15:07.420+01:00", finding.description)
self.assertIn("Exploit Code Maturity: proof_of_concept", finding.description)
self.assertIn("EPSS: 0.00044", finding.description)
Copy link
Member

Choose a reason for hiding this comment

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

Could you assert the actual value of the epss field?

@valentijnscholten valentijnscholten changed the title Add Cyberwatch Parser Add Cyberwatch Galeax Parser Mar 25, 2025
@AmineHazi AmineHazi requested a review from Maffooch as a code owner April 2, 2025 09:42
@AmineHazi
Copy link
Author

Thank you @AmineHazi . To make it clear that this parser is parsing an "extended" Cyberwatch report, could you look at changing the name of the parser to something like "Cyberwatch Galeax Scan" or "Cyberwatch Scan (Galeax)" or some suggestion from your side?

Thank you for your reply, @valentijnscholten. I have just changed the parser name to "Cyberwatch Scan (Galeax)". Would you like me to update the folder and file names as well, or is the new name sufficient? (For example, change the folder 'dojo\tools\cyberwatch' to 'dojo\tools\cyberwatch_galeax'.)

@valentijnscholten
Copy link
Member

Good idea, so yes 😀

@AmineHazi
Copy link
Author

Good idea, so yes 😀

Hi @valentijnscholten, I changed the file and folder names too. I also added assertions on the CWE and EPSS fields and cleaned up the endpoints. Let me know if there's anything else to change!

@@ -0,0 +1,14 @@
---
title: "Cyberwatch"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
title: "Cyberwatch"
title: "Cyberwatch (Galeax)"

title: "Cyberwatch"
toc_hide: true
---
The Cyberwatch Parser is used to import Cyberwatch scan results into DefectDojo. It accepts a JSON input that can be generated by the [Cyberwatch-API-DefectDojo](https://github.com/Galeax/Cyberwatch-API-DefectDojo) tool.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
The Cyberwatch Parser is used to import Cyberwatch scan results into DefectDojo. It accepts a JSON input that can be generated by the [Cyberwatch-API-DefectDojo](https://github.com/Galeax/Cyberwatch-API-DefectDojo) tool.
The Cyberwatch (Galeax) Parser is used to import Cyberwatch scan results into DefectDojo. It accepts a JSON input that can be generated by the [Cyberwatch-API-DefectDojo](https://github.com/Galeax/Cyberwatch-API-DefectDojo) tool created by Galeax.

For each CVE and security issue found in the JSON input, the parser creates a corresponding finding in DefectDojo.

### Sample Scan Data
Sample Cybwerwatch Scan scans can be found [here](https://github.com/DefectDojo/django-DefectDojo/tree/master/unittests/scans/cyberwatch).
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Sample Cybwerwatch Scan scans can be found [here](https://github.com/DefectDojo/django-DefectDojo/tree/master/unittests/scans/cyberwatch).
Sample Cybwerwatch Galeax Scan scans can be found [here](https://github.com/DefectDojo/django-DefectDojo/tree/master/unittests/scans/cyberwatch).

Copy link
Member

@valentijnscholten valentijnscholten left a comment

Choose a reason for hiding this comment

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

found some more references to change

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs parser settings_changes Needs changes to settings.py based on changes in settings.dist.py included in this PR unittests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants