Self-hosted service
sa7mon/S3Scanner avatar
sa7mon/S3Scanner

S3Scanner: the provider flag takes two values while the tool lists seven, and the image you pull is not the image the build makes

Scan for misconfigured S3 buckets across S3-compatible APIs!

3,184 stars415 forksGoMIT

At a glance

What is it?
S3Scanner is a Go tool that takes bucket names and checks their permissions for misconfiguration, across AWS and several other storage providers. Its documentation is clear about inputs and outputs and vague about boundaries: enumeration is flagged as slow, and nothing in the visible documentation offers a dry run, a per-bucket ownership check, or a way to pause a scan once it starts.
Who is it for?
Use it only against buckets you own or have written authorization to test, and treat that as the first constraint rather than the last. The tool will read the contents of any bucket it is pointed at when enumeration is enabled, and nothing visible in it asks whether you are allowed to.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 114 days ago.
What is it written in?
Mainly Go, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 25, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • sa7mon/S3Scanner3,184 ★ · +7
Star history
Repository2026-09-242026-11-25
sa7mon/S3Scanner3.2k3.2k

7 Stars in the last 62 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

The provider option documents two values and the tool lists seven

The tool's own front page names seven providers: AWS, DigitalOcean, DreamHost, GCP, Linode, Scaleway, and Custom.

The option reference says something narrower:

code
  -provider    string  Object storage provider: aws, custom

Two values where the introduction lists seven, and the quick start uses a third:

code
$ s3scanner -provider gcp -db -bucket my-bucket -enumerate

So the flag's documented value set contradicts both the provider list above it and the example immediately below it. Whether the parser accepts gcp and the reference text is simply out of date, or whether it rejects it and the example is aspirational, is not resolved anywhere in the visible documentation.

That matters more than a documentation nit would, because the provider flag decides which endpoint and which signing scheme the tool uses. A user who copies the quick start for a GCP bucket and gets a silent misparse will be looking at a result that says nothing about GCP.

The Custom entry in the provider list is the escape hatch, and it is the one path through this flag that is described without a corresponding option value anywhere.

Three input modes, exactly one required, with duplicates collapsed

The input contract is stated with unusual precision: exactly one type of input is required, and there are three ways to supply it.

A single name goes in with -bucket. A file goes in with -bucket-file, containing one bucket name per line, and the example file holds three names on three lines. Or the tool consumes names from a queue with -mq.

One behavioural detail is documented that most tools leave implicit: bucket names listed multiple times will only be scanned once. So a file assembled from several sources is deduplicated before any request is made, which matters when the file is the output of someone else's enumeration and may well contain the same name twice.

The absence of a fourth input is the notable part. There is no wordlist option and no name generation in the visible documentation. Every name the tool checks is a name a human or an upstream tool put in front of it.

That is the scope boundary of this project in one sentence: the tool does not decide what to scan, it only decides how to scan it. What it does not do is verify that the operator is entitled to any of those names.

Two output paths run at once, and the database schema is created for you

The output flags are two, and using the database one does not silence the other.

The -db flag saves all scan results to a PostgreSQL database and requires the db.uri config file key. The note under it is explicit: if you use -db, results will also be printed to the console when using -json or the default human-readable output mode.

So the database is additive rather than a sink. A long run against a large list writes to Postgres and to stdout simultaneously, which is what you want for a pipeline and what you do not want on a shared terminal.

The second flag, -json, switches the human-readable output to JSON, which is the same logs stream rather than a separate results format.

The database schema is not something you write. The README states that the tool runs Gorm's Auto Migration, so tables are created and altered by the application on startup. For a scanner whose output is likely to outlive any single version, that means the schema follows the binary rather than a migration you can review and pin.

The queue input turns a message broker into a scanning pipeline

The -mq mode is the one that changes the shape of the tool from a command into a service.

Instead of a file, the tool connects to a RabbitMQ server and consumes messages containing bucket names to scan. The message format is specified rather than left open: messages should be JSON-encoded Bucket objects, and the readme points at a mq/ package and a cmd/mqingest program as a Golang publishing example.

It also needs configuration that the other modes do not. The flag requires two config file keys, mq.uri and mq.queue_name, alongside the db.uri key the database output uses.

The feature list describes the intent plainly, calling it a way to connect to RabbitMQ for automated scanning at scale. Combined with multi-threaded scanning and the persistence layer, that is a worker model: producers publish names, this tool consumes them, and results land in Postgres for whatever consumes them next.

Nothing in the visible documentation says what happens to a message when a scan of its bucket fails, or whether a redelivery would rescan a name the deduplication logic has already seen.

Enumeration is the expensive flag, and there is no dry run

One option does the bulk of the work, and the reference text says so.

code
  -enumerate           Enumerate bucket objects (can be time-consuming). Default: "false"

Enumeration is off by default, which is the right default for a tool that walks objects in buckets it has been handed. When it is on, the tool lists the contents of each bucket, and the reference text's own parenthesis is the warning: it can be time-consuming.

What is not in the documentation is as informative as what is. There is no dry-run flag that checks permissions without walking objects. There is no per-bucket confirmation step. There is no documented abort switch, no rate limit, and no concurrency knob, even though the feature list advertises multi-threaded scanning as a headline. The only concurrency control visible is the shape of the input.

Taken together with the input section, the practical rule for anyone using this is the one that the tool does not enforce: the names in that file are the names you are responsible for, and turning on enumeration turns a permission probe into a bulk read of somebody else's bucket if the list was not yours.

Scope discipline is the operator's job here, not the tool's.

The image you can pull and the image the build produces have different names

The installation table gives nine ways in, and one of them does not agree with the build file.

The rows are BlackArch through pacman, Docker, Go through the module path, Kali Linux and Parrot OS through apt, MacOS through Homebrew, Windows through winget, two NixOS rows that both run nix-shell with the package, and a build-from-source row that clones over SSH and builds with the go tool.

The Docker row is the interesting one:

code
docker run ghcr.io/sa7mon/s3scanner

The Makefile builds a different name entirely:

code
DOCKER_IMAGE := hothamandcheese/s3scanner

The published image is under the project's own namespace on the GitHub container registry, while the local build target tags an image under an unrelated personal namespace. Anyone who builds from source to reproduce a published behaviour will not produce the same artefact name, and anyone who pushes what the Makefile builds will publish somewhere other than where the table tells them to pull from.

The same Makefile also computes a short commit hash and a build timestamp at the top, and neither variable appears in any of the visible targets, which only ever use the version taken from the most recent tag.

Two years of commits past the last release, and a linter pinned to 2023

Three release tags are visible: v3.1.1 on 2024-09-17, v3.1.0 eight days earlier, and v3.0.4 in September 2023. The most recent commit is dated 2026-08-03.

So the tree has moved roughly two years past the newest tag. The version variable in the build file is taken from the most recent tag rather than from the tree, which means a locally built binary labels itself v3.1.1 whatever is actually in it. Anyone who wants to know what they are running has to look at the commit, and the Makefile has the commit hash ready but does not print it.

The lint target is pinned harder than anything else in the repository. It runs the linter inside a container image tagged v1.53.3, while the module requires a Go 1.26 toolchain. A linter from that era running against a compiler five years newer is a combination that either works because the rules are syntax-only or produces failures that get ignored.

The test targets are more careful. Both the coverage and integration targets set a pair of environment flags before running the suite, which is how the database and queue backed tests are gated behind those services being present, and the coverage target writes a profile and then opens an HTML report from it.

Development runs through compose files in a .dev directory, with a default profile and a second profile named dev-mitm, so there is a separate environment for the intercepted-traffic case.

Editorial conclusion

Use it only against buckets you own or have written authorization to test, and treat that as the first constraint rather than the last. The tool will read the contents of any bucket it is pointed at when enumeration is enabled, and nothing visible in it asks whether you are allowed to. If your workflow is asset discovery, this is a good fit and a rabbitMQ-fed pipeline suits volume; if you need per-target authorisation checks, a dry run, or an abort switch, none of the three is in the documentation here. Also note the newest release is v3.1.1 from 2024-09-17 while commits continued to 2026-08-03.

Frequently asked questions

how to use s3scanner

It requires exactly one input: a single bucket name with -bucket, a file of names one per line with -bucket-file, or a RabbitMQ connection with -mq, in which case the messages must be JSON-encoded Bucket objects. Two output flags exist, -db to save results to PostgreSQL and -json for machine-readable logs, and -provider selects the object storage provider, documented as aws or custom.

how to install s3scanner

The installation table lists nine routes: pacman on BlackArch, docker run ghcr.io/sa7mon/s3scanner, go install for the module path, apt on Kali and Parrot, brew on MacOS, winget on Windows, nix-shell with the package on NixOS stable and unstable, and building from source with a git clone followed by go build. Docker support is also listed as a feature.

Does the AWS S3 scan for viruses?

No, and the two subjects are unrelated. This repository is a Go tool that checks S3 buckets for misconfigured permissions across AWS and other storage providers, and there is no malware or file scanning anywhere in its description or its feature list.

What is S3 and why is it used?

Nothing here explains S3 as a service. What the repository documents is a tool built on top of it: an input of bucket names, built-in providers for AWS, DigitalOcean, DreamHost, GCP, Linode and Scaleway plus a custom option, permission checks against each bucket, and optional enumeration of the objects inside them.

What is S3FS and what is it used for?

S3FS is not mentioned anywhere in this repository. What is documented is the provider option, whose reference text accepts aws and custom, while the introduction to the tool lists seven providers and the quick start passes gcp to the same flag.

Is the AWS S3 safe?

Nothing in this repository makes a claim about the safety of the service as a whole. What the tool does is probe individual buckets for misconfigured permissions, which the feature list describes as scanning all bucket permissions to find misconfigurations, and results can be sent to a PostgreSQL database or a message queue.

Official sources

  1. License: MIT
  2. Project website
  3. README
  4. Releases
  5. sa7mon/S3Scanner on GitHub
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/sa7mon-s3scanner.svg)](https://hysenlabs.com/projects/sa7mon-s3scanner)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/sa7mon-s3scanner.svg)](https://hysenlabs.com/projects/sa7mon-s3scanner)

Was this useful?