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

feat: add BFF tests and updated detection #34

Merged
merged 2 commits into from
Oct 25, 2024
Merged

Conversation

Patterbear
Copy link
Member

I have added tests for the supported BFF file types (.xls and .doc - sadly .ppt is still an open issue).

I updated the macro detection function to check that macro streams have been successfully been wiped (by replacing their contents with empty bytes), if the file is a supported BFF file type.

I updated the BFF removal to use 'with' as 'ole.close()' was causing permission errors.

I left a few comments to explain the BFF bleach and detect processes, but these can be removed if they don't meet clean code standards.

@Patterbear Patterbear added the testing Features need testing label Oct 20, 2024
@Patterbear Patterbear self-assigned this Oct 20, 2024
@Patterbear Patterbear changed the title add BFF tests and updated detection feat: add BFF tests and updated detection Oct 20, 2024
@Patterbear Patterbear requested a review from rothoma2 October 20, 2024 10:16
@Patterbear
Copy link
Member Author

The user was being notified of a macro being detected and removed despite file being bleached. This is due to the fact that the streams that macros are stored in still exist, although are filled with empty bytes. To resolve this I added a stream content check to determine whether or not to bleach and notify.

@rothoma2
Copy link
Contributor

Looks Great to me.

@Patterbear Patterbear merged commit 6e1aea8 into main Oct 25, 2024
6 checks passed
@Patterbear Patterbear deleted the Test/write-bff-tests branch November 2, 2024 10:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testing Features need testing
Projects
Development

Successfully merging this pull request may close these issues.

2 participants