report

package
v0.0.0-...-79395b0 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2022 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Overview

Package report provides helper functions to extract data from the generated reports

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractFileHierarchy

func ExtractFileHierarchy(m *types.Molly) map[string][]string

ExtractFileHierarchy creates file hierarchy for generated files

func ExtractFileList

func ExtractFileList(m *types.Molly) []string

ExtractFileList creates a list of all scanned files

func ExtractFlatMatch

func ExtractFlatMatch(m *types.Match) []*types.FlatMatch

ExtractFlatMatch flattens one match hierarchy

func ExtractFlatMatches

func ExtractFlatMatches(fr *types.FileData) []*types.FlatMatch

ExtractFlatMatches creates a flat match list for all rules that have no children

func ExtractLogHierarchy

func ExtractLogHierarchy(r *types.Report) map[string][]string

ExtractLogHierarchy creates the hierarchy for logs generated for files

func ExtractMatchNames

func ExtractMatchNames(i *types.FileData, flatten bool) []string

ExtractMatchNames return name of all matches

func ExtractReverseTagHierarchy

func ExtractReverseTagHierarchy(mr *types.Report) map[string][]string

ExtractReverseTagHierarchy creates file hierarchy for file -> tags

func ExtractTagHierarchy

func ExtractTagHierarchy(mr *types.Report) map[string][]string

ExtractTagHierarchy creates file hierarchy for tag -> files

func ExtractTags

func ExtractTags(fr *types.FileData) []string

ExtractTags gathers tags from a file match

func ExtractTagsFromRule

func ExtractTagsFromRule(rule *types.Rule) []string

ExtractTagsFromRule extracts tags from a rule

func FindInFileMatch

func FindInFileMatch(f *types.FileData, rulename string) *types.Match

FindInFileMatch find match to a rule in a file, rulename "" means any

func FindInFileVar

func FindInFileVar(f *types.FileData, rulename, varname string) (interface{}, bool)

FindInFileVar finds a variable in a match in a file

func FindInReportFile

func FindInReportFile(r *types.Report, filename string) *types.FileData

FindInReportFile find a file in a report, filename "" means any

func FindInReportMatch

func FindInReportMatch(r *types.Report, filename, rulename string) *types.Match

FindInReportMatch find a file in a report, filename or rulename "" means any

func FindInReportVar

func FindInReportVar(r *types.Report, filename, rulename, varname string) (interface{}, bool)

FindInReportVar returns variable from a match

func FindInReportVarBool

func FindInReportVarBool(r *types.Report, filename, rulename, varname string) (bool, bool)

FindInReportVarBool is a helper for FindInReport when it returns a boolean

func FindInReportVarNumber

func FindInReportVarNumber(r *types.Report, filename, rulename, varname string) (int64, bool)

FindInReportVarNumber is a helper for FindInReport when it returns a number

func FindInReportVarString

func FindInReportVarString(r *types.Report, filename, rulename, varname string) (string, bool)

FindInReportVarString is a helper for FindInReport when it returns a string

Types

This section is empty.

Jump to

Keyboard shortcuts

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