fix: forge browsing, verified crawlers, ban feedback loop, coverage metrics and slow-attacker policy (1.6.0)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Lucas RayanandClaude Opus 5.5 committed 2026-11-15 20:26:56 -03:00
1 parent 393a31cebe
commit 54b9ae65cd
23 files changed
+802 -100

No files matched your search

+10
View File
@@ -148,6 +148,13 @@ func vcsMarker(dec string) string {
return firstSub(dec, vcsRules)
}
func pathOnly(p string) string {
if i := strings.IndexAny(p, "?#"); i >= 0 {
return p[:i]
}
return p
}
func backupMarker(dec string) string {
p := dec
if i := strings.IndexAny(p, "?#"); i >= 0 {
@@ -185,6 +192,9 @@ func matchFamily(raw, dec string) (fam, marker string) {
if m := firstSub(sp, rceRules); m != "" {
return FamRCE, m
}
if core.ForgeBrowse(pathOnly(dec)) { // repository content on a code forge, not a probe
return "", ""
}
if m := webshellMarker(dec); m != "" {
return FamWebshell, m
}
+24
View File
@@ -0,0 +1,24 @@
package intel
import (
"testing"
"git.lucasrguerra.dev.br/ciberfauna/urutau/internal/core"
)
func TestForgeBrowseHasNoFamily(t *testing.T) {
for _, p := range []string{"/ciberfauna/sabia/src/commit/0123abcd/.gitignore", "/lucasrguerra/LambdaMail/src/commit/0123abcd/.env.example",
"/ciberfauna/guara/blame/commit/0123abcd/.gitignore"} {
if f := Family(p, core.OK, 200, false); f != "" {
t.Errorf("%s: %q", p, f)
}
if f := PathFamily(p); f != "" {
t.Errorf("PathFamily %s: %q", p, f)
}
}
for p, want := range map[string]string{"/.env": FamEnvCreds, "/.git/config": FamVCS, "/app/.env": FamEnvCreds} {
if f := PathFamily(p); f != want {
t.Errorf("%s: %q want %q", p, f, want)
}
}
}