diff --git a/docs/docs/CHANGELOG.md b/docs/docs/CHANGELOG.md index d72bc943..96793f27 100644 --- a/docs/docs/CHANGELOG.md +++ b/docs/docs/CHANGELOG.md @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Patch [GHSA-6wcg-mqvh-fcvg](https://github.com/TecharoHQ/anubis/security/advisories/GHSA-6wcg-mqvh-fcvg) by containing subrequest logic to Anubis instances in subrequest mode. +- Implement robot9001 style delays on the honeypot feature so that the first hit takes 1 millisecond, the second takes 2, etc. - Move metrics server configuration to [the policy file](./admin/policies.mdx#metrics-server). - Expose [pprof endpoints](https://pkg.go.dev/net/http/pprof) on the metrics listener to enable profiling Anubis in production. - fix: prevent nil pointer panic in challenge validation when threshold rules match during PassChallenge (#1463) diff --git a/internal/honeypot/naive/naive.go b/internal/honeypot/naive/naive.go index e0913aec..0c7083a4 100644 --- a/internal/honeypot/naive/naive.go +++ b/internal/honeypot/naive/naive.go @@ -5,6 +5,7 @@ import ( _ "embed" "fmt" "log/slog" + "math" "math/rand/v2" "net/http" "net/netip" @@ -168,6 +169,9 @@ func (i *Impl) ServeHTTP(w http.ResponseWriter, r *http.Request) { } } + millisecondAmount := math.Pow(float64(networkCount), 2) + time.Sleep(time.Duration(millisecondAmount) * time.Millisecond) + spins := i.makeSpins() affirmations := i.makeAffirmations() title := i.makeTitle()