Documentation ¶
Index ¶
- Variables
- func GetEnabled(sp *ScorecardPolicy, argsChecks []string, ...) (checker.CheckNameToFnMap, error)
- type CheckPolicy
- func (*CheckPolicy) Descriptor() ([]byte, []int)deprecated
- func (x *CheckPolicy) GetMode() CheckPolicy_Mode
- func (x *CheckPolicy) GetScore() int32
- func (*CheckPolicy) ProtoMessage()
- func (x *CheckPolicy) ProtoReflect() protoreflect.Message
- func (x *CheckPolicy) Reset()
- func (x *CheckPolicy) String() string
- type CheckPolicy_Mode
- func (CheckPolicy_Mode) Descriptor() protoreflect.EnumDescriptor
- func (x CheckPolicy_Mode) Enum() *CheckPolicy_Mode
- func (CheckPolicy_Mode) EnumDescriptor() ([]byte, []int)deprecated
- func (x CheckPolicy_Mode) Number() protoreflect.EnumNumber
- func (x CheckPolicy_Mode) String() string
- func (CheckPolicy_Mode) Type() protoreflect.EnumType
- type ScorecardPolicy
- func (*ScorecardPolicy) Descriptor() ([]byte, []int)deprecated
- func (x *ScorecardPolicy) GetPolicies() map[string]*CheckPolicy
- func (x *ScorecardPolicy) GetVersion() int32
- func (*ScorecardPolicy) ProtoMessage()
- func (x *ScorecardPolicy) ProtoReflect() protoreflect.Message
- func (x *ScorecardPolicy) Reset()
- func (x *ScorecardPolicy) String() string
Constants ¶
This section is empty.
Variables ¶
View Source
var ( CheckPolicy_Mode_name = map[int32]string{ 0: "DISABLED", 1: "ENFORCED", } CheckPolicy_Mode_value = map[string]int32{ "DISABLED": 0, "ENFORCED": 1, } )
Enum value maps for CheckPolicy_Mode.
View Source
var File_policy_proto protoreflect.FileDescriptor
Functions ¶
func GetEnabled ¶ added in v4.2.0
func GetEnabled( sp *ScorecardPolicy, argsChecks []string, requiredRequestTypes []checker.RequestType, ) (checker.CheckNameToFnMap, error)
GetEnabled returns the list of enabled checks.
Types ¶
type CheckPolicy ¶
type CheckPolicy struct { Mode CheckPolicy_Mode `protobuf:"varint,1,opt,name=mode,proto3,enum=ossf.scorecard.policy.CheckPolicy_Mode" json:"mode,omitempty"` Score int32 `protobuf:"zigzag32,2,opt,name=score,proto3" json:"score,omitempty"` // TODO: add Risk. // contains filtered or unexported fields }
func (*CheckPolicy) Descriptor
deprecated
func (*CheckPolicy) Descriptor() ([]byte, []int)
Deprecated: Use CheckPolicy.ProtoReflect.Descriptor instead.
func (*CheckPolicy) GetMode ¶
func (x *CheckPolicy) GetMode() CheckPolicy_Mode
func (*CheckPolicy) GetScore ¶
func (x *CheckPolicy) GetScore() int32
func (*CheckPolicy) ProtoMessage ¶
func (*CheckPolicy) ProtoMessage()
func (*CheckPolicy) ProtoReflect ¶
func (x *CheckPolicy) ProtoReflect() protoreflect.Message
func (*CheckPolicy) Reset ¶
func (x *CheckPolicy) Reset()
func (*CheckPolicy) String ¶
func (x *CheckPolicy) String() string
type CheckPolicy_Mode ¶
type CheckPolicy_Mode int32
Mode definition.
const ( CheckPolicy_DISABLED CheckPolicy_Mode = 0 CheckPolicy_ENFORCED CheckPolicy_Mode = 1 )
func (CheckPolicy_Mode) Descriptor ¶
func (CheckPolicy_Mode) Descriptor() protoreflect.EnumDescriptor
func (CheckPolicy_Mode) Enum ¶
func (x CheckPolicy_Mode) Enum() *CheckPolicy_Mode
func (CheckPolicy_Mode) EnumDescriptor
deprecated
func (CheckPolicy_Mode) EnumDescriptor() ([]byte, []int)
Deprecated: Use CheckPolicy_Mode.Descriptor instead.
func (CheckPolicy_Mode) Number ¶
func (x CheckPolicy_Mode) Number() protoreflect.EnumNumber
func (CheckPolicy_Mode) String ¶
func (x CheckPolicy_Mode) String() string
func (CheckPolicy_Mode) Type ¶
func (CheckPolicy_Mode) Type() protoreflect.EnumType
type ScorecardPolicy ¶
type ScorecardPolicy struct { Version int32 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` Policies map[string]*CheckPolicy `` /* 157-byte string literal not displayed */ // contains filtered or unexported fields }
func ParseFromFile ¶ added in v4.2.0
func ParseFromFile(policyFile string) (*ScorecardPolicy, error)
ParseFromFile takes a policy file and returns a `ScorecardPolicy`.
func (*ScorecardPolicy) Descriptor
deprecated
func (*ScorecardPolicy) Descriptor() ([]byte, []int)
Deprecated: Use ScorecardPolicy.ProtoReflect.Descriptor instead.
func (*ScorecardPolicy) GetPolicies ¶
func (x *ScorecardPolicy) GetPolicies() map[string]*CheckPolicy
func (*ScorecardPolicy) GetVersion ¶
func (x *ScorecardPolicy) GetVersion() int32
func (*ScorecardPolicy) ProtoMessage ¶
func (*ScorecardPolicy) ProtoMessage()
func (*ScorecardPolicy) ProtoReflect ¶
func (x *ScorecardPolicy) ProtoReflect() protoreflect.Message
func (*ScorecardPolicy) Reset ¶
func (x *ScorecardPolicy) Reset()
func (*ScorecardPolicy) String ¶
func (x *ScorecardPolicy) String() string
Click to show internal directories.
Click to hide internal directories.