toolexec

package
v0.41.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 28, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package toolexec runs the external tools Draugr orchestrates, and reports what it ran.

It exists so that every external invocation — scanners today, SBOM generation and whatever comes next — narrates itself the same way. Without that, a run is a black box: you can see that something failed but not the command, the directory, how long it took, or what the tool itself said about it.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context, dir string, argv []string) ([]byte, error)

Run executes argv and returns its stdout. dir sets the working directory; empty inherits the current one. Some tools resolve their target relative to the working directory rather than from an argument (gosec loads Go packages via `./...`), so for those the checkout has to be the cwd, not just a path passed in.

No shell is involved — exec.CommandContext, not "sh -c" — and argv is built from typed config by the caller, never from user shell input.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL