httpclienttimeout

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package httpclienttimeout requires explicit timeout ownership for HTTP clients.

Index

Constants

This section is empty.

Variables

View Source
var Analyzer, _ = New(Options{})

Analyzer applies timeout policy with no package exceptions.

View Source
var Rule = shared.Rule{
	ID:                ruleID,
	Category:          shared.CategoryHTTP,
	Severity:          shared.SeverityError,
	DefaultStatus:     shared.StatusAdvisory,
	Rationale:         "HTTP clients without explicit positive timeouts can retain blocked operations and resources indefinitely.",
	Remediation:       "Set Client.Timeout to a positive reviewed duration, or isolate an intentional streaming client in an approved package.",
	IntroducedVersion: "0.1.0",
	Configuration: shared.ConfigurationSchema{Properties: map[string]shared.ConfigurationProperty{
		"http_timeout_exceptions": {
			Type:        shared.ConfigurationArray,
			Description: "Exact packages allowed to construct clients without a positive timeout.",
		},
	}},
}

Rule is the stable metadata for explicit HTTP client timeout policy.

Functions

func New

func New(options Options) (*analysis.Analyzer, error)

New validates timeout exceptions and constructs an analyzer.

Types

type Options

type Options struct {
	AllowedPackages []string
}

Options configures reviewed packages that intentionally use unbounded clients.

Jump to

Keyboard shortcuts

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