server

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2026 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ProviderServer

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

ProviderServer implements the provider.Provider interface for the OPA provider.

func New

func New(opts ServerOptions) *ProviderServer

New returns a new ProviderServer with the given options. Zero-value fields in opts are replaced with production defaults.

func (*ProviderServer) Describe

Describe returns the provider metadata and health status.

func (*ProviderServer) Generate

Generate reads the assessment plan's RequirementIDs, resolves the policy directory (preferring ComplypackContentPath from a cached complypack over opa_bundle_ref + conftest pull), loads the required mapping file, matches requirements to Rego namespaces, and writes a scan-config.json for Scan to consume. Returns {Success: false} if the mapping file is missing or invalid.

func (*ProviderServer) Scan

Scan evaluates configuration files against OPA policies using conftest.

type ServerOptions

type ServerOptions struct {
	Loader       loader.DataLoader
	Runner       scan.CommandRunner
	ToolChecker  func() ([]string, error)
	WorkspaceDir string
}

ServerOptions configures the ProviderServer dependencies. Zero-value fields receive sensible production defaults.

Jump to

Keyboard shortcuts

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