security

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package security implements multi-layer security checks before commits. Layers: binary detection → folder blacklist → name blacklist → regex → LLM (large models only).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseModelSize

func ParseModelSize(modelName string) domain.ModelSize

ParseModelSize determines the model size category from the model name. Uses the parameter count in the name (e.g. "qwen3.5:14b" → Large).

Types

type Service

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

Service implements ports.SecurityService.

func New

func New(cfg *config.Config) *Service

New creates a new security Service.

func (*Service) CheckFiles

func (s *Service) CheckFiles(files []string, diff string) *ports.SecurityCheckResult

CheckFiles runs all security layers on the given files.

func (*Service) ShouldUseLLMScan

func (s *Service) ShouldUseLLMScan() bool

ShouldUseLLMScan returns true if the model is large enough for LLM-based scanning.

Jump to

Keyboard shortcuts

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