Closed austinbyers closed 7 years ago
@ryandeivert PTAL
I've squashed the commits to simplify things and addressed all of the feedback. Be sure to look at the downloader code again because your last review was an an older commit for some reason
@austinbyers your'e right - I had been stepping through commits since this PR was so large :)
@ryandeivert Thanks for your review! I should have done a better job of keeping track of and squashing the commits. I did another deploy just to test everything one last time and once the Travis tests pass I'll go ahead and merge
Overview
Size: Extra Large
CarbonBlack automatically uploads new binaries that it finds on endpoints; users who have CarbonBlack can now optionally enable a CarbonBlack downloader Lambda function to copy binaries from CarbonBlack into BinaryAlert.
The downloader can be enabled by running the new
python3 manage.py configure
command to allow the user to set the CarbonBlack URL and encrypt its API key.Additionally,
python3 manage.py cb_copy_all
allows users to copy the entire CarbonBlack binary corpus into BinaryAlert in one go.Full documentation will be added in the next PR.
Change Summary
lambda_functions/downloader
enable_carbon_black_downloader
Terraform variable. All downloader resources are created only if the downloader is explicitly enabled.manage.py
:configure
andcb_copy_all
commandstest
command tounit_test
(to distinguish it fromlive_test
)Resolves: #29 (add downloader) Resolves: #48 (additional name prefix validation) Contributes to: #34 (type annotations)
Tested
CI
Added unit tests for downloader code as well as most of
manage.py
. As you can see from the commit history, mocking everything correctly was a huge pain. In the future, I think we should removemoto
entirely (we already have to do our own Dynamo and S3 mocks due to 2 separate moto issues)Test Deploy: Downloader Disabled (Default)
Test Deploy: Enable Downloader
After the previous deploy, we can easily re-configure and re-deploy:
Reviewers
to: @ryandeivert cc: @mime-frame @airbnb/binaryalert-maintainers