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 mimetype check for XML files #460

Merged
merged 2 commits into from
May 28, 2024
Merged

Conversation

skalupa
Copy link
Collaborator

@skalupa skalupa commented May 24, 2024

Describe the change
Adds in a mimetype check to verify that the given file is in fact an XML file when an error is thrown by the XML scanner in order to verify that the file in question is a XML file. This is done in the error handling section of the scanner instead of the start of the scanner in order to preserve the validity of the existing test cases.

Describe testing procedures
Tested with opensource Strelka in order to see results in the results in the StrelkaUI, which will be shown below. Specifically tested with .zip files in order to emulate cases in which this was seen in other worker instances

Sample output
With the above change, the ScanXML bucket still appears in the UI, though contains only the following flag:
image

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of and tested my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

@phutelmyer phutelmyer merged commit 68199ec into master May 28, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants