podsec

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: May 16, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package podsec analyzes pod specs (and their controlling workloads) for container-runtime security issues like privileged containers, host namespace sharing, sensitive hostPath mounts, and insecure image tags.

Content for pod-security findings. Each rule has a builder that takes runtime context (workload kind/namespace/name, container name, hostPath path) and returns an enriched ruleContent with scope-aware language, an attacker walkthrough, ordered remediation steps, and structured references / MITRE technique citations.

Sources: Kubernetes Pod Security Standards, NSA/CISA Kubernetes Hardening Guide v1.2, MITRE ATT&CK Containers matrix, Microsoft Threat Matrix for Kubernetes, Bishop Fox Bad Pods, KubeHound, Aqua Security writeups, Quarkslab "HostPath: Love-Hate Relationship", The Grey Corner containerd research, Christophe Tafani-Dereeper "Stop worrying about allowPrivilegeEscalation".

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Analyzer

type Analyzer struct{}

Analyzer produces pod-security findings from a snapshot.

func New

func New() *Analyzer

New returns a new pod-security analyzer.

func (*Analyzer) Analyze

func (a *Analyzer) Analyze(_ context.Context, snapshot models.Snapshot) ([]models.Finding, error)

Analyze iterates each pod template in the snapshot and emits findings for dangerous PodSpec-level settings, hostPath mounts, and container SecurityContext gaps.

func (*Analyzer) Name

func (a *Analyzer) Name() string

Name returns the module identifier used by the engine.

Jump to

Keyboard shortcuts

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