Class: OllamaAgent::Security::OwnershipCompileValidators

Inherits:
Object
  • Object
show all
Defined in:
lib/ollama_agent/security/ownership_compile_validators.rb

Overview

Validates flattened ownership rule rows produced during compile.

Constant Summary collapse

CRITICALITIES =
%w[routine sensitive critical].freeze

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.validate!(flat) ⇒ Object



14
15
16
# File 'lib/ollama_agent/security/ownership_compile_validators.rb', line 14

def self.validate!(flat)
  new.validate!(flat)
end

Instance Method Details

#validate!(flat) ⇒ Object



18
19
20
21
22
# File 'lib/ollama_agent/security/ownership_compile_validators.rb', line 18

def validate!(flat)
  validate_duplicate_prefixes!(flat)
  validate_modes_and_criticality!(flat)
  validate_privilege_restriction!(flat)
end