Skip to content

Commit

Permalink
remove defusedxml in favor of lxml (#9840)
Browse files Browse the repository at this point in the history
* update to docs

* fix
  • Loading branch information
manuel-sommer authored Jul 29, 2024
1 parent afa58cf commit 19bab59
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/content/en/contributing/how-to-write-a-parser.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,12 @@ Very bad example:
finding.unsaved_endpoints = [endpoint]
```

### Use the right libraries to parse information
Various file formats are handled through libraries. In order to keep DefectDojo slim and also don't extend the attack surface, keep the number of libraries used minimal and take other parsers as an example.

#### defusedXML in favour of lxml
As xml is by default an unsecure format, the information parsed from various xml output has to be parsed in a secure way. Within an evaluation, we determined that defusedXML is the library which we will use in the future to parse xml files in parsers as this library is rated more secure. Thus, we will only accept PRs with the defusedxml library.

### Not all attributes are mandatory

Parsers may have many fields, out of which many of them may be optional.
Expand Down

0 comments on commit 19bab59

Please sign in to comment.