Documentation ¶
Index ¶
- type DynamicMetadata
- type Input
- type InputOptions
- type MetadataRetriever
- type Scanner
- func (s *Scanner) LoadEmbeddedLibraries() error
- func (s *Scanner) LoadPolicies(loadEmbedded bool, srcFS fs.FS, paths []string, readers []io.Reader) error
- func (s *Scanner) ScanInput(ctx context.Context, inputs ...Input) (scan.Results, error)
- func (s *Scanner) SetDataDirs(dirs ...string)
- func (s *Scanner) SetDebugWriter(writer io.Writer)
- func (s *Scanner) SetFrameworks(frameworks []framework.Framework)
- func (s *Scanner) SetParentDebugLogger(l debug.Logger)
- func (s *Scanner) SetPerResultTracingEnabled(b bool)
- func (s *Scanner) SetPolicyDirs(_ ...string)
- func (s *Scanner) SetPolicyFilesystem(fs fs.FS)
- func (s *Scanner) SetPolicyNamespaces(namespaces ...string)
- func (s *Scanner) SetPolicyReaders(_ []io.Reader)
- func (s *Scanner) SetRegoOnly(bool)
- func (s *Scanner) SetSkipRequiredCheck(_ bool)
- func (s *Scanner) SetTraceWriter(writer io.Writer)
- func (s *Scanner) SetUseEmbeddedPolicies(b bool)
- type Selector
- type StaticMetadata
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DynamicMetadata ¶
type InputOptions ¶
type MetadataRetriever ¶
type MetadataRetriever struct {
// contains filtered or unexported fields
}
func NewMetadataRetriever ¶
func NewMetadataRetriever(compiler *ast.Compiler) *MetadataRetriever
func (*MetadataRetriever) RetrieveMetadata ¶
func (m *MetadataRetriever) RetrieveMetadata(ctx context.Context, module *ast.Module, inputs ...Input) (*StaticMetadata, error)
type Scanner ¶
type Scanner struct {
// contains filtered or unexported fields
}
func NewScanner ¶
func NewScanner(source types.Source, options ...options.ScannerOption) *Scanner
func (*Scanner) LoadEmbeddedLibraries ¶ added in v0.45.0
func (*Scanner) LoadPolicies ¶
func (*Scanner) SetDataDirs ¶ added in v0.39.0
func (*Scanner) SetDebugWriter ¶ added in v0.39.0
func (*Scanner) SetFrameworks ¶ added in v0.69.0
func (*Scanner) SetParentDebugLogger ¶ added in v0.68.0
func (*Scanner) SetPerResultTracingEnabled ¶ added in v0.39.0
func (*Scanner) SetPolicyDirs ¶ added in v0.39.0
func (*Scanner) SetPolicyFilesystem ¶ added in v0.46.0
func (*Scanner) SetPolicyNamespaces ¶ added in v0.39.0
func (*Scanner) SetPolicyReaders ¶ added in v0.39.0
func (*Scanner) SetRegoOnly ¶ added in v0.80.1
func (*Scanner) SetSkipRequiredCheck ¶ added in v0.39.0
func (*Scanner) SetTraceWriter ¶ added in v0.39.0
func (*Scanner) SetUseEmbeddedPolicies ¶ added in v0.54.0
type StaticMetadata ¶
type StaticMetadata struct { ID string AVDID string Title string ShortCode string Description string Severity string RecommendedActions string PrimaryURL string References []string InputOptions InputOptions Package string Frameworks map[framework.Framework][]string Provider string Service string Library bool }
func (StaticMetadata) ToRule ¶
func (m StaticMetadata) ToRule() scan.Rule
Source Files ¶
Click to show internal directories.
Click to hide internal directories.