An in-memory application-driven jailer written in Go, inspired by fail2ban, to deter system probing and attacks.
BadActor is an in-memory, application-driven jailer written in Go, inspired by fail2ban. It acts as middleware to detect and jail malicious actors—like those attempting brute-force logins—by tracking infractions and imposing temporary bans. The goal is to increase the cost for attackers probing or attacking systems.
Go developers building web applications or services that need protection against brute-force attacks, system probing, or other malicious behavior without relying on external security tools.
Developers choose BadActor for its high performance, lack of external dependencies, and ease of integration as a Go library. It offers a lightweight, concurrent, and scalable solution for application-level security that's simpler to deploy than system-wide tools like fail2ban.
BadActor.org An in-memory application driven jailer written in Go
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Benchmarks in the README show sub-millisecond operations (e.g., 121 ns/op for IsJailed) and sub-second responses under load, making it extremely fast for real-time security checks.
It's a self-contained Go library with no reliance on external services or databases, simplifying deployment and reducing operational overhead.
Designed to run concurrently within Go applications with a tiny memory footprint, using sharding and reaping to prevent bottlenecks, as noted in the scaling section.
Allows custom rules with strike limits, expiration times, and jail sentences, plus action interfaces (WhenJailed/WhenTimeServed) for executing logic on events.
All jail data is stored in-memory and lost on application restart, limiting reliability for long-term security tracking without custom persistence solutions.
There's no built-in mechanism for sharing jail states between instances, making it unsuitable for load-balanced or distributed deployments without additional engineering.
It's only available as a Go library, so it cannot be integrated into applications built with other programming languages, restricting its use to Go ecosystems.
BadActor is an open-source alternative to the following products: