remediation

package
v0.4.7 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package remediation renders deterministic, stack-specific fix guidance for findings.

Index

Constants

View Source
const (
	Gin     = "gin"
	Nginx   = "nginx"
	Caddy   = "caddy"
	NextJS  = "nextjs"
	Generic = "generic"
)

Stack names used in core.Fix.Stack.

Variables

This section is empty.

Functions

func DetectStacks

func DetectStacks(response string, gin bool) []string

DetectStacks guesses the target's stack from a raw HTTP response and whether a Gin route table is available (scout.Mount). It returns stack names most specific first; empty means unknown.

func Refs

func Refs(urls ...string) []string

Refs builds a reference list from URLs.

func Render

func Render(w io.Writer, f core.Finding, stacks []string) error

Render writes a finding's remediation as Markdown, tailored to stacks.

func SelectFixes

func SelectFixes(fixes []core.Fix, stacks []string) []core.Fix

SelectFixes returns the fixes for the detected stacks in stack order. When none match (or stacks is empty) it returns every fix, so the user always sees something actionable.

func SetHeader

func SetHeader(name, value string) []core.Fix

SetHeader returns fixes that add a response header on every response.

Types

This section is empty.

Jump to

Keyboard shortcuts

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