mirror of
https://github.com/safedep/pmg.git
synced 2026-08-03 07:24:09 +02:00
feat: Add Sandbox Inspection and Debugging Commands (#261)
* feat: add sandbox DX commands * fix: Linter errors * fix: Sandbox deny log parsing * fix: Sandbox docs * refactor: Maintain SSOT across pkg dependencies * fix: Linter errors
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
//go:build darwin
|
||||
// +build darwin
|
||||
|
||||
package platform
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/safedep/pmg/sandbox"
|
||||
)
|
||||
|
||||
type seatbeltCanaryProbe struct {
|
||||
factory canarySandboxFactory
|
||||
cmdFactory canaryCommandFactory
|
||||
}
|
||||
|
||||
// NewSeatbeltCanaryProbe runs the per-driver Seatbelt smoke test.
|
||||
func NewSeatbeltCanaryProbe() sandbox.Probe {
|
||||
return &seatbeltCanaryProbe{
|
||||
factory: func() (sandbox.Sandbox, error) { return NewSeatbeltSandbox() },
|
||||
cmdFactory: defaultCanaryCommand,
|
||||
}
|
||||
}
|
||||
|
||||
func (p *seatbeltCanaryProbe) Name() string { return sandbox.ProbeSeatbeltCanary }
|
||||
|
||||
func (p *seatbeltCanaryProbe) Run(ctx context.Context) sandbox.ProbeResult {
|
||||
return runCanary(ctx, sandbox.ProbeSeatbeltCanary, sandbox.DriverSeatbelt, p.factory, p.cmdFactory)
|
||||
}
|
||||
Reference in New Issue
Block a user