headers

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package headers checks HTTP security-hardening headers. Every check here is passive: it reads one ordinary GET response, shared across all checks in the scan via httpx.Get's per-scan memoization, and sends no attack traffic.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CSP

type CSP struct{}

CSP flags a missing Content-Security-Policy header.

func (CSP) ASVS

func (CSP) ASVS() []string

func (CSP) Category

func (CSP) Category() core.Category

func (CSP) Description

func (CSP) Description() string

func (CSP) ID

func (CSP) ID() string

func (CSP) Mode

func (CSP) Mode() core.Mode

func (CSP) OWASP

func (CSP) OWASP() []string

func (CSP) Run

func (CSP) Run(ctx context.Context, t core.Target) ([]core.Finding, error)

type Clickjacking

type Clickjacking struct{}

Clickjacking flags a page that can be framed: no X-Frame-Options and no CSP frame-ancestors directive.

func (Clickjacking) ASVS

func (Clickjacking) ASVS() []string

func (Clickjacking) Category

func (Clickjacking) Category() core.Category

func (Clickjacking) Description

func (Clickjacking) Description() string

func (Clickjacking) ID

func (Clickjacking) ID() string

func (Clickjacking) Mode

func (Clickjacking) Mode() core.Mode

func (Clickjacking) OWASP

func (Clickjacking) OWASP() []string

func (Clickjacking) Run

type CookieFlags

type CookieFlags struct{}

CookieFlags flags Set-Cookie headers that lack hardening flags. It emits one finding per weak cookie, keyed by cookie name in Location, so each can be tracked and fixed independently across scans.

func (CookieFlags) ASVS

func (CookieFlags) ASVS() []string

func (CookieFlags) Category

func (CookieFlags) Category() core.Category

func (CookieFlags) Description

func (CookieFlags) Description() string

func (CookieFlags) ID

func (CookieFlags) ID() string

func (CookieFlags) Mode

func (CookieFlags) Mode() core.Mode

func (CookieFlags) OWASP

func (CookieFlags) OWASP() []string

func (CookieFlags) Run

type HSTS

type HSTS struct{}

HSTS flags a missing Strict-Transport-Security header on an HTTPS target.

func (HSTS) ASVS

func (HSTS) ASVS() []string

func (HSTS) Category

func (HSTS) Category() core.Category

func (HSTS) Description

func (HSTS) Description() string

func (HSTS) ID

func (HSTS) ID() string

func (HSTS) Mode

func (HSTS) Mode() core.Mode

func (HSTS) OWASP

func (HSTS) OWASP() []string

func (HSTS) Run

func (HSTS) Run(ctx context.Context, t core.Target) ([]core.Finding, error)

type NoSniff

type NoSniff struct{}

NoSniff flags a missing X-Content-Type-Options: nosniff header.

func (NoSniff) ASVS

func (NoSniff) ASVS() []string

func (NoSniff) Category

func (NoSniff) Category() core.Category

func (NoSniff) Description

func (NoSniff) Description() string

func (NoSniff) ID

func (NoSniff) ID() string

func (NoSniff) Mode

func (NoSniff) Mode() core.Mode

func (NoSniff) OWASP

func (NoSniff) OWASP() []string

func (NoSniff) Run

func (NoSniff) Run(ctx context.Context, t core.Target) ([]core.Finding, error)

type PermissionsPolicy

type PermissionsPolicy struct{}

PermissionsPolicy flags a missing Permissions-Policy header.

func (PermissionsPolicy) ASVS

func (PermissionsPolicy) ASVS() []string

func (PermissionsPolicy) Category

func (PermissionsPolicy) Category() core.Category

func (PermissionsPolicy) Description

func (PermissionsPolicy) Description() string

func (PermissionsPolicy) ID

func (PermissionsPolicy) Mode

func (PermissionsPolicy) Mode() core.Mode

func (PermissionsPolicy) OWASP

func (PermissionsPolicy) OWASP() []string

func (PermissionsPolicy) Run

type ReferrerPolicy

type ReferrerPolicy struct{}

ReferrerPolicy flags a missing Referrer-Policy header.

func (ReferrerPolicy) ASVS

func (ReferrerPolicy) ASVS() []string

func (ReferrerPolicy) Category

func (ReferrerPolicy) Category() core.Category

func (ReferrerPolicy) Description

func (ReferrerPolicy) Description() string

func (ReferrerPolicy) ID

func (ReferrerPolicy) ID() string

func (ReferrerPolicy) Mode

func (ReferrerPolicy) Mode() core.Mode

func (ReferrerPolicy) OWASP

func (ReferrerPolicy) OWASP() []string

func (ReferrerPolicy) Run

type ServerDisclosure

type ServerDisclosure struct{}

ServerDisclosure flags a Server or X-Powered-By header that leaks a product and version. One finding per leaking header, distinguished by Location.

func (ServerDisclosure) ASVS

func (ServerDisclosure) ASVS() []string

func (ServerDisclosure) Category

func (ServerDisclosure) Category() core.Category

func (ServerDisclosure) Description

func (ServerDisclosure) Description() string

func (ServerDisclosure) ID

func (ServerDisclosure) ID() string

func (ServerDisclosure) Mode

func (ServerDisclosure) Mode() core.Mode

func (ServerDisclosure) OWASP

func (ServerDisclosure) OWASP() []string

func (ServerDisclosure) Run

Jump to

Keyboard shortcuts

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