Versions in this module Expand all Collapse all v0 v0.3.0 Aug 14, 2026 Changes in this version + type Candidate struct + FromCVE bool + Module string + Replace bool + ReplaceOld string + Version string + VulnIDs []string + func (c Candidate) OldPath() string + type Cloner interface + CloneAtTag func(ctx context.Context, repoURL, tag, destDir string) error + HeadCommit func(dir string) (string, error) + type DroppedCandidate struct + Module string + Reason string + Version string + type GoToolchain struct + func NewToolchain(commandTimeout time.Duration) (*GoToolchain, error) + func (t *GoToolchain) DepGoVersions(ctx context.Context, dir string) (map[string]string, error) + func (t *GoToolchain) Get(ctx context.Context, dir, moduleAtVersion string) error + func (t *GoToolchain) Linked(ctx context.Context, dir string, patterns []string) (modules, packages map[string]struct{}, err error) + func (t *GoToolchain) LinkedStd(ctx context.Context, dir string, patterns []string) (map[string]struct{}, error) + func (t *GoToolchain) ListModules(ctx context.Context, dir string) (map[string]string, error) + func (t *GoToolchain) ModTidy(ctx context.Context, dir string) error + func (t *GoToolchain) Replace(ctx context.Context, dir, oldPath, newPath, version string) error + func (t *GoToolchain) Replaces(_ context.Context, dir string) (map[string]ReplaceTarget, error) + func (t *GoToolchain) Requirements(_ context.Context, dir string) (map[string]string, error) + type ModrootRequest struct + Baseline map[string]string + BaselineVulnIDs map[string]struct{} + Modroot string + Packages []string + Seeds []Candidate + VulnImports map[string][]string + type ModrootResult struct + CVEBackedModules []string + Converged bool + Dropped []DroppedCandidate + FinalDeps []string + FinalReplaces []string + Iterations int + Linked map[string]struct{} + LinkedPackages map[string]struct{} + MaxDepGoVersion string + Modroot string + RemainingVulnIDs []string + Requires map[string]string + Residuals []Residual + Resolved map[string]string + StdPackages map[string]struct{} + UnrequiredModules map[string]struct{} + func RunLoop(ctx context.Context, tc Toolchain, sc Scanner, dir string, req ModrootRequest, ...) (*ModrootResult, error) + type Options struct + Budget time.Duration + CommandTimeout time.Duration + MaxIterations int + func (o Options) WithDefaults() Options + type ReplaceTarget struct + Path string + Version string + type Residual struct + FixedVersion string + Introduced bool + Module string + Reason string + ResolvedVersion string + VulnIDs []string + type Scanner interface + ScanPackages func(ctx context.Context, pkgs []scan.Package) (*scan.ScanResult, error) + type Simulator struct + func NewSimulator(cloner Cloner, tc Toolchain, sc Scanner, tempDir string, opts Options) *Simulator + func (s *Simulator) Simulate(ctx context.Context, repoURL, tag, expectedCommit string, ...) (map[string]*ModrootResult, error) + type Toolchain interface + DepGoVersions func(ctx context.Context, dir string) (map[string]string, error) + Get func(ctx context.Context, dir, moduleAtVersion string) error + Linked func(ctx context.Context, dir string, patterns []string) (modules, packages map[string]struct{}, err error) + LinkedStd func(ctx context.Context, dir string, patterns []string) (map[string]struct{}, error) + ListModules func(ctx context.Context, dir string) (map[string]string, error) + ModTidy func(ctx context.Context, dir string) error + Replace func(ctx context.Context, dir, oldPath, newPath, version string) error + Replaces func(ctx context.Context, dir string) (map[string]ReplaceTarget, error) + Requirements func(ctx context.Context, dir string) (map[string]string, error)