Documentation
¶
Overview ¶
codesig.go
Index ¶
- Variables
- func CheckForCodePksInDir(dir string) (string, bool)
- func DisableSeccompForDebug()
- func InitCodeSig(config CodeSigConfig) error
- func InitLandlock(config LandlockConfig) error
- func InitSeccomp(config SeccompConfig) error
- func LoadTrustedPublicKeys(filePath string) error
- func SetupSeccompTrapHandler()
- func VerifySignature(content []byte, signature []byte) bool
- type CodeSigConfig
- type LandlockConfig
- type SeccompConfig
Constants ¶
This section is empty.
Variables ¶
var CurrentCodeSigEnabled bool
CurrentCodeSigEnabled indicates whether code signature verification is currently enabled
var CurrentLandlockProfile string
CurrentLandlockProfile stores the active landlock profile
var CurrentSeccompProfile string
CurrentSeccompProfile stores the active seccomp profile
var TrustedPublicKeys []ed25519.PublicKey
TrustedPublicKeys stores the list of trusted public keys loaded from .codepks file
Functions ¶
func CheckForCodePksInDir ¶
CheckForCodePksInDir checks if a .codepks file exists in the specified directory
func DisableSeccompForDebug ¶
func DisableSeccompForDebug()
DisableSeccompForDebug is a stub implementation for systems where seccomp is not available
func InitCodeSig ¶
func InitCodeSig(config CodeSigConfig) error
InitCodeSig initializes code signature verification with the given configuration
func InitLandlock ¶
func InitLandlock(config LandlockConfig) error
InitLandlock initializes the landlock filesystem access control for Rye This is a stub implementation for non-Linux systems
func InitSeccomp ¶
func InitSeccomp(config SeccompConfig) error
InitSeccomp is a stub implementation for systems where seccomp is not available or when the seccomp build tag is not enabled
func LoadTrustedPublicKeys ¶
LoadTrustedPublicKeys loads trusted public keys from the specified file
func SetupSeccompTrapHandler ¶
func SetupSeccompTrapHandler()
SetupSeccompTrapHandler is a stub implementation for systems where seccomp is not available
func VerifySignature ¶
VerifySignature verifies a signature against the content using trusted public keys
Types ¶
type CodeSigConfig ¶
type CodeSigConfig struct {
Enforced bool // Whether code signature verification is enabled by flag
PubKeys string // Path to the file containing trusted public keys
ScriptDir string // Directory of the script being executed
AutoEnforced bool // Whether code signing is auto-enforced due to .codepks in script dir
}
CodeSigConfig holds configuration for code signature verification
type LandlockConfig ¶
LandlockConfig holds the configuration for landlock filesystem access control This is a stub implementation for non-Linux systems
type SeccompConfig ¶
SeccompConfig holds the configuration for seccomp filtering