Documentation ¶
Index ¶
- Variables
- type CPGroup
- type CPPolicy
- type ChecksByAssetType
- type ChecktypesInformer
- type DefaultGroup
- type DefaultPolicy
- type Entities
- type GlobalPolicyConfig
- type GlobalPolicyConfigEntry
- type Group
- type Policy
- type PolicyGroup
- type Program
- type RedconGroup
- type RedconPolicy
- type Report
- type SensitiveGroup
- func (d *SensitiveGroup) Description() string
- func (g SensitiveGroup) Eval(teamID string) ([]*api.Asset, error)
- func (g SensitiveGroup) Init(store api.VulcanitoStore) error
- func (d *SensitiveGroup) Name() string
- func (d SensitiveGroup) Options() string
- func (g *SensitiveGroup) ShadowTeamGroup() string
- type SensitivePolicy
- type WebScanningGroup
- func (d *WebScanningGroup) Description() string
- func (g *WebScanningGroup) Eval(teamID string) ([]*api.Asset, error)
- func (g WebScanningGroup) Init(store api.VulcanitoStore) error
- func (d *WebScanningGroup) Name() string
- func (d WebScanningGroup) Options() string
- func (g *WebScanningGroup) ShadowTeamGroup() string
- type WebScanningPolicy
Constants ¶
This section is empty.
Variables ¶
var ( // PeriodicFullScan represents the global program used for periodic full scans. PeriodicFullScan = Program{ ID: "periodic-full-scan", Name: "Periodic Scan", Policies: []PolicyGroup{ PolicyGroup{ Group: "default-global", Policy: "default-global", }, PolicyGroup{ Group: "sensitive-global", Policy: "sensitive-global", }, }, DefaultMetadata: api.GlobalProgramsMetadata{ Cron: "0 8 * * 1", Autosend: &vFalse, Disabled: &vFalse, }, } // RedconScan represents the global program used for periodic scans // of the Redcon discovered assets. RedconScan = Program{ ID: "redcon-scan", Name: "Redcon Scan", Policies: []PolicyGroup{ PolicyGroup{ Group: "redcon-global", Policy: "redcon-global", }, }, DefaultMetadata: api.GlobalProgramsMetadata{ Cron: "0 12 * * 2", Autosend: &vFalse, Disabled: &vFalse, }, } // WebScanning represents the global program used for web scans WebScanning = Program{ ID: "web-scanning", Name: "Web Scanning", Policies: []PolicyGroup{ PolicyGroup{ Group: "web-scanning-global", Policy: "web-scanning-global", }, }, DefaultMetadata: api.GlobalProgramsMetadata{ Cron: "0 8 * * 3", Autosend: &vFalse, Disabled: &vFalse, }, } // CPScan represents the global program used for periodic scans // of the Common Platform discovered assets. CPScan = Program{ ID: "cp-scan", Name: "CP Scan", Policies: []PolicyGroup{ PolicyGroup{ Group: "cp-global", Policy: "cp-global", }, }, DefaultMetadata: api.GlobalProgramsMetadata{ Cron: "0 6 * * 3", Autosend: &vFalse, Disabled: &vFalse, }, } )
var ( // PeriodicDigestReport specifies the data for the digest report // to be sent on every Wednesday at 8am UTC. PeriodicDigestReport = Report{ ID: "periodic-digest-report", Name: "Periodic Digest Report", DefaultSchedule: "0 8 * * 3", } )
Functions ¶
This section is empty.
Types ¶
type CPGroup ¶
type CPGroup struct {
// contains filtered or unexported fields
}
CPGroup resolves the assets detected by CP excluding those present in the Default, Sensitive and Redcon groups.
func (*CPGroup) Description ¶
Description returns a meaningful explanation of the group.
func (CPGroup) Init ¶
func (g CPGroup) Init(store api.VulcanitoStore) error
func (CPGroup) ShadowTeamGroup ¶
func (g CPGroup) ShadowTeamGroup() string
type CPPolicy ¶
type CPPolicy struct {
// contains filtered or unexported fields
}
CPPolicy contains all checks associated with the "DefaultPolicy", but excluding "vulcan-nessus"
func (*CPPolicy) Description ¶
Description returns a meaningful explanation of the group.
func (*CPPolicy) Eval ¶
func (r *CPPolicy) Eval(ctx context.Context, gpc GlobalPolicyConfig) ([]*api.ChecktypeSetting, error)
func (*CPPolicy) Init ¶
func (r *CPPolicy) Init(informer ChecktypesInformer) error
type ChecksByAssetType ¶
type ChecktypesInformer ¶
ChecktypesInformer defines the functions that the component providing checktypes info to the global policies must implement.
type DefaultGroup ¶
type DefaultGroup struct {
// contains filtered or unexported fields
}
DefaultGroup resolves all the assets present
func (*DefaultGroup) Description ¶
func (d *DefaultGroup) Description() string
Description returns a meanfull explanation of the group.
func (*DefaultGroup) Eval ¶
func (d *DefaultGroup) Eval(teamID string) ([]*api.Asset, error)
Eval returns the current assets of a team belinging to this group.
func (DefaultGroup) Init ¶
func (g DefaultGroup) Init(store api.VulcanitoStore) error
func (*DefaultGroup) Name ¶
func (d *DefaultGroup) Name() string
Name returns the name of the group.
func (DefaultGroup) ShadowTeamGroup ¶
func (g DefaultGroup) ShadowTeamGroup() string
type DefaultPolicy ¶
type DefaultPolicy struct {
// contains filtered or unexported fields
}
DefaultPolicy contains all checks execpts the ones for docker images.
func (*DefaultPolicy) Description ¶
func (d *DefaultPolicy) Description() string
Description returns a meanfull explanation of the group.
func (*DefaultPolicy) Eval ¶
func (d *DefaultPolicy) Eval(ctx context.Context, gpc GlobalPolicyConfig) ([]*api.ChecktypeSetting, error)
func (*DefaultPolicy) Init ¶
func (d *DefaultPolicy) Init(informer ChecktypesInformer) error
func (*DefaultPolicy) Name ¶
func (d *DefaultPolicy) Name() string
Name returns the name of the policy.
type Entities ¶
type Entities struct {
// contains filtered or unexported fields
}
Entities shapes the interface exposed to other packages to interact with global entities.
func NewEntities ¶
func NewEntities(store api.VulcanitoStore, informer ChecktypesInformer) (*Entities, error)
NewEntities returns a struct that exposes the current defined global entities.
type GlobalPolicyConfig ¶
type GlobalPolicyConfig map[string]GlobalPolicyConfigEntry
GlobalPolicyConfig defines the global policy configuration in terms of checks and assettypes to process.
type GlobalPolicyConfigEntry ¶
type GlobalPolicyConfigEntry struct { AllowedChecks []string `mapstructure:"allowed_checks"` BlockedChecks []string `mapstructure:"blocked_checks"` AllowedAssettypes []string `mapstructure:"allowed_assettypes"` BlockedAssettypes []string `mapstructure:"blocked_assettypes"` ExcludingSuffixes []string `mapstructure:"excluding_suffixes"` }
GlobalPolicyConfigEntry defines for a specific global policy the list of (allowed and blocked) (checks and assettypes) and a list of suffix to exclude if check name matches. Blocking takes precedence. Empty allowed slices means ALL allowed.
type Group ¶
type Group interface { Init(api.VulcanitoStore) error Name() string Options() string Description() string // ShadowTeamGroup must return a group name if the global group is shadowing // a "normal" group of a team. A shadowed group is a global group that can // be referenced by a global program but acts as it is effectively the real // group of the team. ShadowTeamGroup() string Eval(teamID string) ([]*api.Asset, error) }
Group defines the methods all the global groups must implement.
type Policy ¶
type Policy interface { Init(ChecktypesInformer) error Description() string Name() string Eval(context.Context, GlobalPolicyConfig) ([]*api.ChecktypeSetting, error) }
Policy defines the shape of a global policy.
type PolicyGroup ¶
type Program ¶
type Program struct { ID string Name string Policies []PolicyGroup DefaultMetadata api.GlobalProgramsMetadata }
Program defines the information required to define a global program.
type RedconGroup ¶
type RedconGroup struct {
// contains filtered or unexported fields
}
RedconGroup resolves the assets detected by Redcon excluding those present in the Default and Sensitive groups.
func (*RedconGroup) Description ¶
func (g *RedconGroup) Description() string
Description returns a meaningful explanation of the group.
func (*RedconGroup) Eval ¶
func (g *RedconGroup) Eval(teamID string) ([]*api.Asset, error)
Eval returns the current assets of a team belonging to this group.
func (RedconGroup) Init ¶
func (g RedconGroup) Init(store api.VulcanitoStore) error
func (RedconGroup) ShadowTeamGroup ¶
func (g RedconGroup) ShadowTeamGroup() string
type RedconPolicy ¶
type RedconPolicy struct {
// contains filtered or unexported fields
}
RedconPolicy contains all checks associated with the "DefaultPolicy", but excluding "vulcan-nessus"
func (*RedconPolicy) Description ¶
func (r *RedconPolicy) Description() string
Description returns a meaningful explanation of the group.
func (*RedconPolicy) Eval ¶
func (r *RedconPolicy) Eval(ctx context.Context, gpc GlobalPolicyConfig) ([]*api.ChecktypeSetting, error)
func (*RedconPolicy) Init ¶
func (r *RedconPolicy) Init(informer ChecktypesInformer) error
func (*RedconPolicy) Name ¶
func (r *RedconPolicy) Name() string
Name returns the name of the group.
type SensitiveGroup ¶
type SensitiveGroup struct {
// contains filtered or unexported fields
}
SensitiveGroup global group shadows the sensitive concrete group of a team.
func (*SensitiveGroup) Description ¶
func (d *SensitiveGroup) Description() string
func (SensitiveGroup) Init ¶
func (g SensitiveGroup) Init(store api.VulcanitoStore) error
func (*SensitiveGroup) Name ¶
func (d *SensitiveGroup) Name() string
Name returns the name of the group.
func (*SensitiveGroup) ShadowTeamGroup ¶
func (g *SensitiveGroup) ShadowTeamGroup() string
type SensitivePolicy ¶
type SensitivePolicy struct {
// contains filtered or unexported fields
}
func (*SensitivePolicy) Description ¶
func (d *SensitivePolicy) Description() string
Description returns a meanfull explanation of the group.
func (*SensitivePolicy) Eval ¶
func (d *SensitivePolicy) Eval(ctx context.Context, gpc GlobalPolicyConfig) ([]*api.ChecktypeSetting, error)
Eval return same checktypes as default-global policy except vulcan-nessus.
func (*SensitivePolicy) Init ¶
func (d *SensitivePolicy) Init(informer ChecktypesInformer) error
func (*SensitivePolicy) Name ¶
func (d *SensitivePolicy) Name() string
Name returns the name of the group.
type WebScanningGroup ¶
type WebScanningGroup struct {
// contains filtered or unexported fields
}
WebScanning global group contains the assets which will be scanned by web scanners.
func (*WebScanningGroup) Description ¶
func (d *WebScanningGroup) Description() string
func (*WebScanningGroup) Eval ¶
func (g *WebScanningGroup) Eval(teamID string) ([]*api.Asset, error)
Eval returns the current assets of a team belonging to this group.
func (WebScanningGroup) Init ¶
func (g WebScanningGroup) Init(store api.VulcanitoStore) error
func (*WebScanningGroup) Name ¶
func (d *WebScanningGroup) Name() string
Name returns the name of the group.
func (*WebScanningGroup) ShadowTeamGroup ¶
func (g *WebScanningGroup) ShadowTeamGroup() string
type WebScanningPolicy ¶
type WebScanningPolicy struct {
// contains filtered or unexported fields
}
WebScanningPolicy contains all checks related with web scanning.
func (*WebScanningPolicy) Description ¶
func (ws *WebScanningPolicy) Description() string
Description returns a meanfull explanation of the group.
func (*WebScanningPolicy) Eval ¶
func (ws *WebScanningPolicy) Eval(ctx context.Context, gpc GlobalPolicyConfig) ([]*api.ChecktypeSetting, error)
func (*WebScanningPolicy) Init ¶
func (ws *WebScanningPolicy) Init(informer ChecktypesInformer) error
func (*WebScanningPolicy) Name ¶
func (ws *WebScanningPolicy) Name() string
Name returns the name of the group.