- Notifications
You must be signed in to change notification settings - Fork225
Enable AES256 encryption for zip files#171
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:2.X
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
coderabbitaibot commentedSep 10, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
WalkthroughAdds per-entry AES-256 encryption in ZIP creation: when a ZipPassword is set, each ZipEntry’s AESKeySize is set to 256. This occurs within existing loops in LoopManager.ZipFiles and OutputWriter.ZipFiles. No control flow or public API changes. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Pre-merge checks (2 passed, 1 warning)❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
Poem
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see thedocumentation for more information. Example: reviews:pre_merge_checks:custom_checks: -name:"Undocumented Breaking Changes"mode:"warning"instructions:| Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal). Please share your feedback with us on thisDiscord post. 📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
🔇 Additional comments (2)
✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
github-actionsbot commentedSep 10, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
nheiniger commentedSep 10, 2025
I have read the CLA Document and I hereby sign the CLA |
Uh oh!
There was an error while loading.Please reload this page.
Description
This PR enables AES256 when the
--zippasswordoption is provided. This replaces the default and less secure ZipCrypto option.The code is taken from the examples of SharpZipLib here:https://github.com/icsharpcode/SharpZipLib/wiki/Zip-Samples/6dc300804f36f981e516fa477219b0e40c192861
Motivation and Context
Just follow best practice after an auditor noted that the zip file uses zipcrypto.
How Has This Been Tested?
Run SharpHound twice, once with
SharpHound.exe --zippassword infectedto confirm that the encryption is working as expected. Then a second time withSharpHound.exeand no password to ensure that it works without a password too.Screenshots
With this change, the encryption method is now AES256

Types of changes
Checklist:
Summary by CodeRabbit