analyzer

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package analyzer provides binary security analysis. Use this package to programmatically analyze ELF binaries for security hardening.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Analyzer

type Analyzer struct {
	// contains filtered or unexported fields
}

Analyzer runs rules against parsed binaries. Safe for concurrent use after creation.

func NewAnalyzer

func NewAnalyzer(rules []rule.ELFRule, opts *Options) *Analyzer

NewAnalyzer creates an analyzer with the given rules. Pass nil for opts to use defaults. Pass nil or empty rules for a no-op analyzer.

func (*Analyzer) Analyze

func (a *Analyzer) Analyze(bin *binary.ELFBinary) []rule.Finding

Analyze runs rules against binary and returns findings.

type ApplicabilityResult

type ApplicabilityResult int

ApplicabilityResult indicates whether a rule applies to a binary.

const (
	Applicable ApplicabilityResult = iota
	NotApplicableArchitecture
	NotApplicableCompiler
)

func CheckApplicability

func CheckApplicability(app rule.Applicability, bin *binary.ELFBinary) ApplicabilityResult

CheckApplicability determines whether a rule applies to the binary.

type Options

type Options struct {
	IncludePassed  bool
	IncludeSkipped bool
}

Options configures analyzer behavior.

Jump to

Keyboard shortcuts

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