Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BannedFilePath ¶
BannedFilePath returns ~/.config/autoscan/banned.yaml.
func LoadGlobalBanned ¶
Types ¶
type CompileConfig ¶
type MultiProcessConfig ¶
type MultiProcessConfig struct {
Enabled bool `yaml:"enabled"`
Executables []ProcessConfig `yaml:"executables"`
TestScenarios []MultiProcessScenario `yaml:"test_scenarios,omitempty"`
}
type MultiProcessScenario ¶
type MultiProcessScenario struct {
Name string `yaml:"name"`
ProcessArgs map[string][]string `yaml:"process_args,omitempty"`
ProcessInputs map[string]string `yaml:"process_inputs,omitempty"`
ExpectedExits map[string]int `yaml:"expected_exits,omitempty"`
ExpectedOutputs map[string]string `yaml:"expected_outputs,omitempty"`
}
type Policy ¶
type Policy struct {
Name string `yaml:"name"`
Compile CompileConfig `yaml:"compile"`
Run RunConfig `yaml:"run"`
LibraryFiles []string `yaml:"library_files"` // .c/.o/.h files from ~/.config/autoscan/libraries/
TestFiles []string `yaml:"test_files,omitempty"`
FilePath string `yaml:"-"` // Set after loading
BannedFunctions []string `yaml:"-"` // Loaded from global banned.yaml
}
func Discover ¶
Discover finds all .yaml/.yml policy files in dir and attaches global banned functions.
func LoadWithGlobals ¶
type ProcessConfig ¶
type RunConfig ¶
type RunConfig struct {
TestCases []TestCase `yaml:"test_cases"`
MultiProcess *MultiProcessConfig `yaml:"multi_process,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.