Modularised Bucketloot #10
Open
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
Restructured BucketLoot to follow Go best practices, enabling global installation via
go install. The tool can now be installed once and run from anywhere without needing to be in the project directory.Key Changes
New Structure: Organized code into
cmd/bucketloot/andinternal/packagescmd/bucketloot/- Main entry pointinternal/config/- Configuration managementinternal/types/- Type definitionsinternal/scanner/- Scanning logicinternal/utils/- Utility functionsEmbedded Configuration: All config files (blacklist.txt, regexes.json, vulnFiles.json) are now embedded in the binary using Go's
embedpackageUpdated Module Path: Changed from
bucketloottogithub.com/umair9747/bucketlootRemoved Old Files: Deleted monolithic files (main.go, const.go, input.go, scanfiles.go, utils.go) in favor of modular structure
Installation
New way - install globally
go install github.com/umair9747/bucketloot/cmd/bucketloot@latest
Run from anywhere
bucketloot https://example-bucket.s3.amazonaws.com/
Benefits
✅ Install once, use anywhere
✅ No need to build in working directory
✅ Config files embedded in binary
✅ Better code organization and maintainability
✅ Follows standard Go project layout
Documentation
Backward Compatibility
All flags and functionality remain the same. Only the installation and execution method has changed.