detectors

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NameNPM           = "npm-detector"
	NameNPMNative     = "npm-native-detector"
	NamePNPM          = "pnpm-detector"
	NamePNPMNative    = "pnpm-native-detector"
	NameYarn          = "yarn-detector"
	NameYarnNative    = "yarn-native-detector"
	NameGradle        = "gradle-detector"
	NameMaven         = "maven-detector"
	NameGoMod         = "go-detector"
	NameComposer      = "composer-detector"
	NameBundler       = "bundler-detector"
	NameGitHubActions = "github-actions-detector"
	NamePip           = "pip-detector"
	NamePipenv        = "pipenv-detector"
	NamePoetry        = "poetry-detector"
	NameUV            = "uv-detector"
	NameNuGet         = "nuget-detector"
	NameCargo         = "cargo-detector"
	NamePub           = "pub-detector"
	NamePubNative     = "pub-native-detector"
	NameCocoaPods     = "cocoapods-detector"
	NameSwiftPM       = "swiftpm-detector"
	NameSwiftPMNative = "swiftpm-native-detector"
	NameMix           = "mix-detector"
	NameConan         = "conan-detector"
	NameSBT           = "sbt-detector"
	NameSBTNative     = "sbt-native-detector"
	NameSBOM          = "sbom-detector"
	NameSyft          = "syft-detector"
)

Variables

This section is empty.

Functions

func AttachPositions

func AttachPositions(g *sdk.Graph, positions map[string]*sdk.SourcePosition, nameKey func(*sdk.Dependency) string)

AttachPositions populates PackageLocation.Position on graph nodes whose normalized key (derived by nameKey) appears in the positions map. Nodes already carrying a Location with the same RealPath are left untouched.

nameKey returns the lookup key for a graph node. Detectors typically derive it from dep.Name, dep.Org+":"+dep.Name, or a language-specific normalization. Returning "" skips the node.

func InferManifestMetadata

func InferManifestMetadata(req sdk.DetectionRequest, evidencePatterns []string) sdk.ManifestMetadata

InferManifestMetadata determines the manifest metadata for detectors that naturally resolve one graph.

func ScanLines

func ScanLines(path string, fn func(line int, text string)) error

ScanLines invokes fn for every line in the file at path. The callback receives the 1-based line number and the raw line text (without the trailing newline). Returns the underlying scanner error if any. Returns nil silently when the file does not exist — detector position wiring is best-effort.

Types

This section is empty.

Jump to

Keyboard shortcuts

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