Parse DAST CWE active check YAML files
Purpose
Parse YAML active check definitions into Browserker active checks so that checks can be added and updated quickly by the vulnerability research team.
Implementation plan
-
Merge the MR https://gitlab.com/gitlab-org/security-products/dast-cwe-checks/-/merge_requests/109 into DAST CWE checks. It will likely need to be updated to reflect changes to the DAST CWE checks schema - https://gitlab.com/gitlab-org/security-products/dast-cwe-checks/-/merge_requests/175 -
Browserker should parse the YAML files, creating an active check for each. Attack types that are not defined by Browserker should result in the attack being "unsupported" -
Follow similar patterns to the way passive checks are defined -
Remove the vulnerability_definitions.FileBaseLoaderhard-coded check22.1. This should not fail integration tests or the end-to-end test (the check should be imported from YAML and parsed) -
Ensure that errors are gracefully handled. Browserker should fail with a sensible message if the vulnerability definitions fail to parse. -
Add type to unsupported error message https://gitlab.com/gitlab-org/security-products/analyzers/browserker/-/merge_requests/858#note_1115195962
-
-
No need to parse attacks of type callback_attack, these will likely change anyway -
Parse timing_attackattacks -
Parse match_response_attackattacks -
Ensure that referenced affixesparse correctly, for example:affixes: &affixes-1 - affix: prefix: "foo" suffix: "bar" injections: - injection: template: "{{prefix}}{{payload}}{{suffix}}" affixes: *affixes-1 -
Rename VulnerabilityDefinitionParsertoPassiveCheckParseror create apassive_checkpackage and move it there.
Edited by Craig Smith