mirror of
https://github.com/TecharoHQ/anubis.git
synced 2026-04-11 11:08:48 +00:00
Compare commits
3 Commits
Xe/more-do
...
Xe/ensure-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a33a696cba | ||
|
|
5d9760b8a9 | ||
|
|
c7e4cd1032 |
3
.github/actions/spelling/expect.txt
vendored
3
.github/actions/spelling/expect.txt
vendored
@@ -36,6 +36,7 @@ botstopper
|
|||||||
BPort
|
BPort
|
||||||
Brightbot
|
Brightbot
|
||||||
broked
|
broked
|
||||||
|
buildah
|
||||||
byteslice
|
byteslice
|
||||||
Bytespider
|
Bytespider
|
||||||
cachebuster
|
cachebuster
|
||||||
@@ -199,7 +200,6 @@ licstart
|
|||||||
lightpanda
|
lightpanda
|
||||||
limsa
|
limsa
|
||||||
Linting
|
Linting
|
||||||
linuxbrew
|
|
||||||
LLU
|
LLU
|
||||||
loadbalancer
|
loadbalancer
|
||||||
lol
|
lol
|
||||||
@@ -226,6 +226,7 @@ nobots
|
|||||||
NONINFRINGEMENT
|
NONINFRINGEMENT
|
||||||
nosleep
|
nosleep
|
||||||
nullglob
|
nullglob
|
||||||
|
oci
|
||||||
OCOB
|
OCOB
|
||||||
ogtag
|
ogtag
|
||||||
oklch
|
oklch
|
||||||
|
|||||||
@@ -23,3 +23,31 @@
|
|||||||
all:
|
all:
|
||||||
- '"Docker-Distribution-Api-Version" in headers'
|
- '"Docker-Distribution-Api-Version" in headers'
|
||||||
- '!(userAgent.contains("Mozilla"))'
|
- '!(userAgent.contains("Mozilla"))'
|
||||||
|
|
||||||
|
- name: allow-go-containerregistry-client
|
||||||
|
action: ALLOW
|
||||||
|
expression:
|
||||||
|
all:
|
||||||
|
- path.startsWith("/v2/")
|
||||||
|
- userAgent.contains("go-containerregistry/")
|
||||||
|
|
||||||
|
- name: allow-buildah
|
||||||
|
action: ALLOW
|
||||||
|
expression:
|
||||||
|
all:
|
||||||
|
- path.startsWith("/v2/")
|
||||||
|
- userAgent.contains("Buildah/")
|
||||||
|
|
||||||
|
- name: allow-podman
|
||||||
|
action: ALLOW
|
||||||
|
expression:
|
||||||
|
all:
|
||||||
|
- path.startsWith("/v2/")
|
||||||
|
- userAgent.contains("containers/")
|
||||||
|
|
||||||
|
- name: allow-containerd
|
||||||
|
action: ALLOW
|
||||||
|
expression:
|
||||||
|
all:
|
||||||
|
- path.startsWith("/v2/")
|
||||||
|
- userAgent.contains("containerd/")
|
||||||
|
|||||||
@@ -3,6 +3,6 @@ package data
|
|||||||
import "embed"
|
import "embed"
|
||||||
|
|
||||||
var (
|
var (
|
||||||
//go:embed botPolicies.yaml all:apps all:bots all:clients all:common all:crawlers all:meta
|
//go:embed botPolicies.yaml all:apps all:bots all:clients all:common all:crawlers all:meta all:services
|
||||||
BotPolicies embed.FS
|
BotPolicies embed.FS
|
||||||
)
|
)
|
||||||
|
|||||||
38
data/embed_test.go
Normal file
38
data/embed_test.go
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
package data
|
||||||
|
|
||||||
|
import (
|
||||||
|
"path/filepath"
|
||||||
|
"strings"
|
||||||
|
"testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
// TestBotPoliciesEmbed ensures all YAML files in the directory tree
|
||||||
|
// are accessible in the embedded BotPolicies filesystem.
|
||||||
|
func TestBotPoliciesEmbed(t *testing.T) {
|
||||||
|
yamlFiles, err := filepath.Glob("./**/*.yaml")
|
||||||
|
if err != nil {
|
||||||
|
t.Fatalf("Failed to glob YAML files: %v", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(yamlFiles) == 0 {
|
||||||
|
t.Fatal("No YAML files found in directory tree")
|
||||||
|
}
|
||||||
|
|
||||||
|
t.Logf("Found %d YAML files to verify", len(yamlFiles))
|
||||||
|
|
||||||
|
for _, filePath := range yamlFiles {
|
||||||
|
embeddedPath := strings.TrimPrefix(filePath, "./")
|
||||||
|
|
||||||
|
t.Run(embeddedPath, func(t *testing.T) {
|
||||||
|
content, err := BotPolicies.ReadFile(embeddedPath)
|
||||||
|
if err != nil {
|
||||||
|
t.Errorf("Failed to read %s from embedded filesystem: %v", embeddedPath, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(content) == 0 {
|
||||||
|
t.Errorf("File %s exists in embedded filesystem but is empty", embeddedPath)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -13,6 +13,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
<!-- This changes the project to: -->
|
<!-- This changes the project to: -->
|
||||||
|
|
||||||
|
- Allow more OCI registry clients [based on feedback](https://github.com/TecharoHQ/anubis/pull/1253#issuecomment-3506744184).
|
||||||
|
- Expose services directory in the embedded `(data)` filesystem.
|
||||||
|
|
||||||
## v1.23.1: Lyse Hext - Echo 1
|
## v1.23.1: Lyse Hext - Echo 1
|
||||||
|
|
||||||
- Fix `SERVE_ROBOTS_TXT` setting after the double slash fix broke it.
|
- Fix `SERVE_ROBOTS_TXT` setting after the double slash fix broke it.
|
||||||
|
|||||||
Reference in New Issue
Block a user