Documentation ¶
Index ¶
- func CreateFSKey(filesystem fs.FS) string
- type BaseAttribute
- type BoolValue
- type BytesValue
- type ComplianceSpec
- type Control
- type ControlStatus
- type IntValue
- func (b IntValue) EqualTo(i int) bool
- func (b IntValue) GetMetadata() Metadata
- func (b IntValue) GetRawValue() interface{}
- func (b IntValue) GreaterThan(i int) bool
- func (b IntValue) LessThan(i int) bool
- func (b IntValue) MarshalJSON() ([]byte, error)
- func (b IntValue) NotEqualTo(i int) bool
- func (s IntValue) ToRego() interface{}
- func (b *IntValue) UnmarshalJSON(data []byte) error
- func (b IntValue) Value() int
- type MapValue
- type Metadata
- func NewApiMetadata(provider string, parts ...string) Metadata
- func NewExplicitMetadata(r Range, ref string) Metadata
- func NewMetadata(r Range, ref string) Metadata
- func NewRemoteMetadata(id string) Metadata
- func NewTestMetadata() Metadata
- func NewUnmanagedMetadata() Metadata
- func NewUnresolvableMetadata(r Range, ref string) Metadata
- func (m Metadata) GetMetadata() Metadata
- func (m Metadata) GetRawValue() interface{}
- func (m Metadata) Internal() interface{}
- func (m Metadata) IsDefault() bool
- func (m Metadata) IsExplicit() bool
- func (m Metadata) IsManaged() bool
- func (m Metadata) IsMultiLine() bool
- func (m Metadata) IsResolvable() bool
- func (m Metadata) IsUnmanaged() bool
- func (m Metadata) MarshalJSON() ([]byte, error)
- func (m Metadata) Parent() *Metadata
- func (m Metadata) Range() Range
- func (m Metadata) Reference() string
- func (m Metadata) Root() Metadata
- func (m *Metadata) SetParentPtr(p *Metadata)
- func (m *Metadata) SetRange(r Range)
- func (m *Metadata) SetReference(ref string)
- func (m Metadata) String() string
- func (m *Metadata) ToRego() interface{}
- func (m *Metadata) UnmarshalJSON(data []byte) error
- func (m Metadata) WithInternal(internal interface{}) Metadata
- func (m Metadata) WithParent(p Metadata) Metadata
- type Range
- func NewRange(filename string, startLine, endLine int, sourcePrefix string, srcFS fs.FS) Range
- func NewRangeWithFSKey(filename string, startLine, endLine int, sourcePrefix, fsKey string, ...) Range
- func NewRangeWithLogicalSource(filename string, startLine int, endLine int, sourcePrefix string, srcFS fs.FS) Range
- func (r Range) GetEndLine() int
- func (r Range) GetFS() fs.FS
- func (r Range) GetFSKey() string
- func (r Range) GetFilename() string
- func (r Range) GetLocalFilename() string
- func (r Range) GetSourcePrefix() string
- func (r Range) GetStartLine() int
- func (r Range) IsMultiLine() bool
- func (r Range) LineCount() int
- func (r Range) MarshalJSON() ([]byte, error)
- func (r Range) String() string
- func (r *Range) UnmarshalJSON(data []byte) error
- type Severity
- type Source
- type Spec
- type SpecCheck
- type StringEqualityOption
- type StringValue
- func (s StringValue) Contains(value string, equalityOptions ...StringEqualityOption) bool
- func (s StringValue) EndsWith(suffix string, equalityOptions ...StringEqualityOption) bool
- func (s StringValue) EqualTo(value string, equalityOptions ...StringEqualityOption) bool
- func (s StringValue) GetMetadata() Metadata
- func (b StringValue) GetRawValue() interface{}
- func (s StringValue) IsEmpty() bool
- func (s StringValue) IsNotEmpty() bool
- func (s StringValue) IsOneOf(values ...string) bool
- func (b StringValue) MarshalJSON() ([]byte, error)
- func (s StringValue) NotEqualTo(value string, equalityOptions ...StringEqualityOption) bool
- func (s StringValue) StartsWith(prefix string, equalityOptions ...StringEqualityOption) bool
- func (s StringValue) ToRego() interface{}
- func (b *StringValue) UnmarshalJSON(data []byte) error
- func (s StringValue) Value() string
- type StringValueList
- type TimeValue
- func (t TimeValue) After(i time.Time) bool
- func (t TimeValue) Before(i time.Time) bool
- func (t TimeValue) GetRawValue() interface{}
- func (t TimeValue) IsNever() bool
- func (b TimeValue) MarshalJSON() ([]byte, error)
- func (t TimeValue) ToRego() interface{}
- func (b *TimeValue) UnmarshalJSON(data []byte) error
- func (t TimeValue) Value() time.Time
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateFSKey ¶
Types ¶
type BaseAttribute ¶
type BaseAttribute struct {
// contains filtered or unexported fields
}
func (BaseAttribute) GetMetadata ¶
func (b BaseAttribute) GetMetadata() Metadata
type BoolValue ¶
type BoolValue struct { BaseAttribute // contains filtered or unexported fields }
func BoolDefault ¶
func BoolExplicit ¶
func BoolUnresolvable ¶
func (BoolValue) GetRawValue ¶
func (b BoolValue) GetRawValue() interface{}
func (BoolValue) MarshalJSON ¶
func (*BoolValue) UnmarshalJSON ¶
type BytesValue ¶
type BytesValue struct { BaseAttribute // contains filtered or unexported fields }
func Bytes ¶
func Bytes(value []byte, m Metadata) BytesValue
func BytesDefault ¶
func BytesDefault(value []byte, m Metadata) BytesValue
func BytesExplicit ¶
func BytesExplicit(value []byte, m Metadata) BytesValue
func BytesUnresolvable ¶
func BytesUnresolvable(m Metadata) BytesValue
func (BytesValue) GetMetadata ¶
func (b BytesValue) GetMetadata() Metadata
func (BytesValue) GetRawValue ¶
func (b BytesValue) GetRawValue() interface{}
func (BytesValue) Len ¶
func (b BytesValue) Len() int
func (BytesValue) MarshalJSON ¶
func (b BytesValue) MarshalJSON() ([]byte, error)
func (BytesValue) ToRego ¶
func (s BytesValue) ToRego() interface{}
func (*BytesValue) UnmarshalJSON ¶
func (b *BytesValue) UnmarshalJSON(data []byte) error
func (BytesValue) Value ¶
func (b BytesValue) Value() []byte
type ComplianceSpec ¶
type ComplianceSpec struct {
Spec Spec `yaml:"spec"`
}
ComplianceSpec represent the compliance specification
type Control ¶
type Control struct { ID string `yaml:"id"` Name string `yaml:"name"` Description string `yaml:"description,omitempty"` Checks []SpecCheck `yaml:"checks"` Severity Severity `yaml:"severity"` DefaultStatus ControlStatus `yaml:"defaultStatus,omitempty"` }
Control represent the cps controls data and mapping checks
type ControlStatus ¶
type ControlStatus string
type IntValue ¶
type IntValue struct { BaseAttribute // contains filtered or unexported fields }
func IntDefault ¶
func IntExplicit ¶
func IntFromInt32 ¶
func IntUnresolvable ¶
func (IntValue) GetMetadata ¶
func (IntValue) GetRawValue ¶
func (b IntValue) GetRawValue() interface{}
func (IntValue) GreaterThan ¶
func (IntValue) MarshalJSON ¶
func (IntValue) NotEqualTo ¶
func (*IntValue) UnmarshalJSON ¶
type MapValue ¶
type MapValue struct { BaseAttribute // contains filtered or unexported fields }
func (MapValue) GetRawValue ¶
func (b MapValue) GetRawValue() interface{}
func (MapValue) MarshalJSON ¶
func (*MapValue) UnmarshalJSON ¶
type Metadata ¶
type Metadata struct {
// contains filtered or unexported fields
}
func NewApiMetadata ¶
func NewExplicitMetadata ¶
func NewMetadata ¶
func NewRemoteMetadata ¶
func NewTestMetadata ¶
func NewTestMetadata() Metadata
func NewUnmanagedMetadata ¶
func NewUnmanagedMetadata() Metadata
func NewUnresolvableMetadata ¶
func (Metadata) GetMetadata ¶
func (Metadata) GetRawValue ¶
func (m Metadata) GetRawValue() interface{}
func (Metadata) IsExplicit ¶
func (Metadata) IsMultiLine ¶
func (Metadata) IsResolvable ¶
func (Metadata) IsUnmanaged ¶
func (Metadata) MarshalJSON ¶
func (*Metadata) SetParentPtr ¶
func (*Metadata) SetReference ¶
func (*Metadata) UnmarshalJSON ¶
func (Metadata) WithInternal ¶
func (Metadata) WithParent ¶
type Range ¶
type Range struct {
// contains filtered or unexported fields
}
func NewRangeWithFSKey ¶
func (Range) GetEndLine ¶
func (Range) GetFilename ¶
func (Range) GetLocalFilename ¶
func (Range) GetSourcePrefix ¶
func (Range) GetStartLine ¶
func (Range) IsMultiLine ¶
func (Range) MarshalJSON ¶
func (*Range) UnmarshalJSON ¶
type Source ¶
type Source string
const ( SourceDockerfile Source = "dockerfile" SourceKubernetes Source = "kubernetes" SourceRbac Source = "rbac" // deprecated - please use "kubernetes" instead SourceDefsec Source = "defsec" // deprecated - please use "cloud" instead SourceCloud Source = "cloud" SourceYAML Source = "yaml" SourceJSON Source = "json" SourceTOML Source = "toml" )
type SpecCheck ¶
type SpecCheck struct {
ID string `yaml:"id"`
}
SpecCheck represent the scanner who perform the control check
type StringEqualityOption ¶
type StringEqualityOption int
const ( IgnoreCase StringEqualityOption = iota IsPallindrome IgnoreWhitespace )
type StringValue ¶
type StringValue struct { BaseAttribute // contains filtered or unexported fields }
func String ¶
func String(str string, m Metadata) StringValue
func StringDefault ¶
func StringDefault(value string, m Metadata) StringValue
func StringExplicit ¶
func StringExplicit(value string, m Metadata) StringValue
func StringUnresolvable ¶
func StringUnresolvable(m Metadata) StringValue
func (StringValue) Contains ¶
func (s StringValue) Contains(value string, equalityOptions ...StringEqualityOption) bool
func (StringValue) EndsWith ¶
func (s StringValue) EndsWith(suffix string, equalityOptions ...StringEqualityOption) bool
func (StringValue) EqualTo ¶
func (s StringValue) EqualTo(value string, equalityOptions ...StringEqualityOption) bool
func (StringValue) GetMetadata ¶
func (s StringValue) GetMetadata() Metadata
func (StringValue) GetRawValue ¶
func (b StringValue) GetRawValue() interface{}
func (StringValue) IsEmpty ¶
func (s StringValue) IsEmpty() bool
func (StringValue) IsNotEmpty ¶
func (s StringValue) IsNotEmpty() bool
func (StringValue) IsOneOf ¶
func (s StringValue) IsOneOf(values ...string) bool
func (StringValue) MarshalJSON ¶
func (b StringValue) MarshalJSON() ([]byte, error)
func (StringValue) NotEqualTo ¶
func (s StringValue) NotEqualTo(value string, equalityOptions ...StringEqualityOption) bool
func (StringValue) StartsWith ¶
func (s StringValue) StartsWith(prefix string, equalityOptions ...StringEqualityOption) bool
func (StringValue) ToRego ¶
func (s StringValue) ToRego() interface{}
func (*StringValue) UnmarshalJSON ¶
func (b *StringValue) UnmarshalJSON(data []byte) error
func (StringValue) Value ¶
func (s StringValue) Value() string
type StringValueList ¶
type StringValueList []StringValue
func (StringValueList) AsStrings ¶
func (l StringValueList) AsStrings() (output []string)
type TimeValue ¶
type TimeValue struct { BaseAttribute // contains filtered or unexported fields }
func TimeUnresolvable ¶
func (TimeValue) GetRawValue ¶
func (t TimeValue) GetRawValue() interface{}
func (TimeValue) MarshalJSON ¶
func (*TimeValue) UnmarshalJSON ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.