tenseleyflow/shithub / 73d0735

Browse files

S33: thread SecretBox into repo handler deps

Authored by espadonne
SHA
73d07357e9d596be044dc85da56c006f011223b0
Parents
bf76678
Tree
8c9cca5

1 changed file

StatusFile+-
M internal/web/handlers/repo/repo.go 4 0
internal/web/handlers/repo/repo.gomodified
@@ -21,6 +21,7 @@ import (
2121
 
2222
 	"github.com/tenseleyFlow/shithub/internal/auth/audit"
2323
 	"github.com/tenseleyFlow/shithub/internal/auth/policy"
24
+	"github.com/tenseleyFlow/shithub/internal/auth/secretbox"
2425
 	"github.com/tenseleyFlow/shithub/internal/auth/throttle"
2526
 	"github.com/tenseleyFlow/shithub/internal/infra/storage"
2627
 	checksdb "github.com/tenseleyFlow/shithub/internal/checks/sqlc"
@@ -66,6 +67,9 @@ type Deps struct {
6667
 	Audit     *audit.Recorder
6768
 	Limiter   *throttle.Limiter
6869
 	CloneURLs CloneURLs
70
+	// SecretBox AEAD-wraps webhook secrets at rest (S33). nil disables
71
+	// the webhook surface (the handler renders a placeholder page).
72
+	SecretBox *secretbox.Box
6973
 	// ShithubdPath is forwarded to repos.Create so newly-init'd repos
7074
 	// have hook shims pointing at the right binary. Empty in test fixtures
7175
 	// that don't exercise hooks.