Documentation
¶
Index ¶
- Constants
- Variables
- func BuildResults(silent bool, hardMode bool, rulesetFlag string, specBytes []byte, ...) (*model.RuleResultSet, *motor.RuleSetExecutionResult, error)
- func BuildResultsWithDocCheckSkip(silent bool, hardMode bool, rulesetFlag string, specBytes []byte, ...) (*model.RuleResultSet, *motor.RuleSetExecutionResult, error)
- func BuildRuleSetFromUserSuppliedLocation(rulesetFlag string, rs rulesets.RuleSets, remote bool, httpClient *http.Client) (*rulesets.RuleSet, error)
- func BuildRuleSetFromUserSuppliedSet(rsBytes []byte, rs rulesets.RuleSets) (*rulesets.RuleSet, error)
- func BuildRuleSetFromUserSuppliedSetWithHTTPClient(rsBytes []byte, rs rulesets.RuleSets, httpClient *http.Client) (*rulesets.RuleSet, error)
- func CheckFailureSeverity(failSeverityFlag string, errors int, warnings int, informs int) error
- func Execute(version, commit, date string)
- func GetBundleCommand() *cobra.Command
- func GetDashboardCommand() *cobra.Command
- func GetGenerateIgnoreFileCommand() *cobra.Command
- func GetGenerateRulesetCommand() *cobra.Command
- func GetGenerateVersionCommand() *cobra.Command
- func GetHTMLReportCommand() *cobra.Command
- func GetLanguageServerCommand() *cobra.Command
- func GetLintCommand() *cobra.Command
- func GetRootCommand() *cobra.Command
- func GetSpectralReportCommand() *cobra.Command
- func GetVacuumReportCommand() *cobra.Command
- func LoadCustomFunctions(functionsFlag string, silence bool) (map[string]model.RuleFunction, error)
- func MergeOWASPRulesToRuleSet(selectedRS *rulesets.RuleSet, hardModeFlag bool) bool
- func PrintBanner()
- func RenderSummary(rso RenderSummaryOptions)
- func RenderTime(timeFlag bool, duration time.Duration, fi int64)
- func RenderTimeAndFiles(timeFlag bool, duration time.Duration, fileSize int64, totalFiles int)
- type RenderSummaryOptions
Constants ¶
const ( HardModeEnabled = "🚨 HARD MODE ENABLED 🚨" HardModeWithCustomRuleset = "🚨 OWASP Rules added to custom ruleset 🚨" )
Hard mode message constants
Variables ¶
var ( Version string Commit string Date string )
TODO: This is a temporary UI, it's to help figure out the best experience, and it is not intended as a final face of vacuum. It's going to change around a good bit, so don't get too comfy with it :)
Functions ¶
func BuildResults ¶ added in v0.0.4
func BuildResults( silent bool, hardMode bool, rulesetFlag string, specBytes []byte, customFunctions map[string]model.RuleFunction, base string, remote bool, timeout time.Duration, httpClientConfig utils.HTTPClientConfig, ignoredItems model.IgnoredItems) (*model.RuleResultSet, *motor.RuleSetExecutionResult, error)
func BuildResultsWithDocCheckSkip ¶ added in v0.2.7
func BuildResultsWithDocCheckSkip( silent bool, hardMode bool, rulesetFlag string, specBytes []byte, customFunctions map[string]model.RuleFunction, base string, remote bool, skipCheck bool, timeout time.Duration, httpClientConfig utils.HTTPClientConfig, ignoredItems model.IgnoredItems) (*model.RuleResultSet, *motor.RuleSetExecutionResult, error)
func BuildRuleSetFromUserSuppliedLocation ¶ added in v0.17.8
func BuildRuleSetFromUserSuppliedLocation(rulesetFlag string, rs rulesets.RuleSets, remote bool, httpClient *http.Client) (*rulesets.RuleSet, error)
BuildRuleSetFromUserSuppliedLocation creates a ready to run ruleset from a location (file path or URL)
func BuildRuleSetFromUserSuppliedSet ¶ added in v0.0.5
func BuildRuleSetFromUserSuppliedSet(rsBytes []byte, rs rulesets.RuleSets) (*rulesets.RuleSet, error)
BuildRuleSetFromUserSuppliedSet creates a ready to run ruleset, augmented or provided by a user configured ruleset. This ruleset could be lifted directly from a Spectral configuration.
func BuildRuleSetFromUserSuppliedSetWithHTTPClient ¶ added in v0.17.8
func BuildRuleSetFromUserSuppliedSetWithHTTPClient(rsBytes []byte, rs rulesets.RuleSets, httpClient *http.Client) (*rulesets.RuleSet, error)
BuildRuleSetFromUserSuppliedSetWithHTTPClient creates a ready to run ruleset, augmented or provided by a user configured ruleset with HTTP client support for certificate authentication.
func CheckFailureSeverity ¶ added in v0.0.16
func GetBundleCommand ¶ added in v0.8.0
func GetDashboardCommand ¶
func GetGenerateIgnoreFileCommand ¶ added in v0.15.0
func GetGenerateRulesetCommand ¶ added in v0.0.5
func GetGenerateVersionCommand ¶ added in v0.6.0
func GetHTMLReportCommand ¶ added in v0.0.2
GetHTMLReportCommand returns a cobra command for generating an HTML Report.
func GetLanguageServerCommand ¶ added in v0.9.0
func GetLintCommand ¶ added in v0.0.5
func GetRootCommand ¶ added in v0.3.5
func GetVacuumReportCommand ¶ added in v0.0.4
func LoadCustomFunctions ¶ added in v0.0.11
LoadCustomFunctions will scan for (and load) custom functions defined as vacuum plugins.
func MergeOWASPRulesToRuleSet ¶ added in v0.17.11
MergeOWASPRulesToRuleSet merges OWASP rules into the provided ruleset when hard mode is enabled. This fixes issue #552 where -z flag was ignored when using -r flag. Returns true if OWASP rules were merged, false otherwise.
func PrintBanner ¶ added in v0.0.5
func PrintBanner()
func RenderSummary ¶ added in v0.0.5
func RenderSummary(rso RenderSummaryOptions)
func RenderTime ¶ added in v0.0.5
RenderTime will render out the time taken to process a specification, and the size of the file in kb.
func RenderTimeAndFiles ¶ added in v0.5.1
RenderTimeAndFiles will render out the time taken to process a specification, and the size of the file in kb. it will also render out how many files were processed.
Types ¶
type RenderSummaryOptions ¶ added in v0.16.15
type RenderSummaryOptions struct {
RuleResultSet *model.RuleResultSet
RuleSet *rulesets.RuleSet
RuleCategories []*model.RuleCategory
TotalFiles int
Severity string
Filename string
Silent bool
PipelineOutput bool
ReportStats *reports.ReportStatistics
RenderRules bool
}