Repository navigation
Refuse network paths for --iocs and --json in the single-file download - #10
Merged
Merged
Conversation
The downloadable single file has its own entry point, generated by build/bundle.py, separate from the source CLI. The local-disk check for --iocs and --json was added only to the source CLI, so the download still accepted UNC and mapped-drive paths. Add the same check to the bundled entry point, before anything is opened, and test it against the built bundle: network paths are refused, and the documented relative "--json report.json" still works.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #9. The downloadable
zero-breach.pyhas its own entry point, generated bybuild/bundle.py, which parses--iocsand--jsonitself instead of going throughcli.py. The local-disk check added in #9 therefore protected source installs only; the download still accepted UNC and mapped-drive paths for both options.Change
build/bundle.py: the bundledmain()now refuses--iocs/--jsonpaths that are not on a local disk, before anything is opened.test_bundle_release.py: tests against a freshly built bundle — network paths are refused with nothing opened, and relative--json report.jsonstill writes the report.Testing
dist/zero-breach.pyexits 1 with a clear error for a UNC path on either option.