checks

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Check

type Check func(ctx context.Context, client *asc.Client, appID string, findings *[]Finding) error

Check is an individual compliance check function.

type Finding

type Finding struct {
	Tier      Tier     `json:"tier"`
	Severity  Severity `json:"severity"`
	Guideline string   `json:"guideline"` // e.g. "2.1", "5.1.1"
	Title     string   `json:"title"`
	Detail    string   `json:"detail"`
	Fix       string   `json:"fix,omitempty"`
}

Finding is a single issue found during scanning.

type Results

type Results struct {
	AppID    string    `json:"app_id"`
	AppName  string    `json:"app_name"`
	Findings []Finding `json:"findings"`
	Summary  Summary   `json:"summary"`
}

Results holds the complete scan output.

func (*Results) ComputeSummary

func (r *Results) ComputeSummary()

type Runner

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

Runner orchestrates all checks across tiers.

func NewRunner

func NewRunner(client *asc.Client, verbose bool) *Runner

func (*Runner) Run

func (r *Runner) Run(ctx context.Context, appID, buildNum string, maxTier int) (*Results, error)

Run executes all checks up to the specified max tier.

type Severity

type Severity int

Severity indicates how likely a finding is to cause rejection.

const (
	SeverityInfo  Severity = iota // Best practice recommendation
	SeverityWarn                  // High risk of rejection
	SeverityBlock                 // Will almost certainly be rejected
)

func (Severity) String

func (s Severity) String() string

type Summary

type Summary struct {
	Total  int  `json:"total"`
	Blocks int  `json:"blocks"`
	Warns  int  `json:"warns"`
	Infos  int  `json:"infos"`
	Passed bool `json:"passed"` // true if zero BLOCKs
}

Summary provides aggregate counts.

type Tier

type Tier int

Tier represents the check tier level.

const (
	TierMetadata Tier = 1 // API-based metadata & completeness
	TierContent  Tier = 2 // AI-powered content analysis
	TierBinary   Tier = 3 // IPA binary inspection
	TierPattern  Tier = 4 // Historical pattern matching
)

Jump to

Keyboard shortcuts

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