Sign in

Search issue titles and bodies, change requests and comments. Private repositories you cannot read are not included.

vole
Site
Clone

Read only, no credentials:

https://rodent.software/vole.git

Write over SSH with a registered key:

git clone ssh://git@rodent.software/vole.git

Self-hosted forge that lives in your Git repo.

Code

527 commit(s) on main

Put job execution behind an interface Keenan Nemetz · 2h ago de3eec16
history blame raw 846 B
1//go:build windows
2
3package audit
4
5import (
6 "fmt"
7 "io/fs"
8
9 "rodent.software/vole/internal/secure"
10)
11
12// verifySecretFile holds the log to the same rule as every other secret: owned by
13// an account that may hold one, and its access list names only the accounts that
14// may hold one. The check is the secret store's own, so the log cannot drift to a
15// weaker rule than the files beside it.
16//
17// The DACL is read from the path rather than the open handle because that is what
18// GetNamedSecurityInfo takes; the owner and the entries are what the promise rests
19// on, and a swap between the stat and this read leaves an audit log that would
20// fail the same check on the next start.
21func verifySecretFile(path string, _ fs.FileInfo) error {
22 if err := secure.VerifyACL(path); err != nil {
23 return fmt.Errorf("audit: %w", err)
24 }
25 return nil
26}
27