Skip to content

Conversation

@umair9747
Copy link
Contributor

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/ and internal/ packages

    • cmd/bucketloot/ - Main entry point
    • internal/config/ - Configuration management
    • internal/types/ - Type definitions
    • internal/scanner/ - Scanning logic
    • internal/utils/ - Utility functions
  • Embedded Configuration: All config files (blacklist.txt, regexes.json, vulnFiles.json) are now embedded in the binary using Go's embed package

  • Updated Module Path: Changed from bucketloot to github.com/umair9747/bucketloot

  • Removed 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

  • Updated README.md with new installation instructions
  • Updated docs/documentation.md with usage examples
  • Added STRUCTURE.md explaining the new layout
  • Added MIGRATION.md for existing users

Backward Compatibility

All flags and functionality remain the same. Only the installation and execution method has changed.

@umair9747
Copy link
Contributor Author

Before merging kindly replace any mentions of github.com/umair9747/.... with github.com/redhubntlabs/...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant