File tree Expand file tree Collapse file tree 2 files changed +4
-0
lines changed
Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ type StaticMetadata struct {
4040 Library bool
4141 CloudFormation * scan.EngineMetadata
4242 Terraform * scan.EngineMetadata
43+ Examples string
4344}
4445
4546func NewStaticMetadata (pkgPath string , inputOpt InputOptions ) * StaticMetadata {
@@ -76,6 +77,7 @@ func (sm *StaticMetadata) update(meta map[string]any) error {
7677 upd (& sm .Provider , "provider" )
7778 upd (& sm .RecommendedActions , "recommended_actions" )
7879 upd (& sm .RecommendedActions , "recommended_action" )
80+ upd (& sm .Examples , "examples" )
7981
8082 if raw , ok := meta ["deprecated" ]; ok {
8183 if dep , ok := raw .(bool ); ok {
@@ -270,6 +272,7 @@ func (m StaticMetadata) ToRule() scan.Rule {
270272 Frameworks : m .Frameworks ,
271273 CloudFormation : m .CloudFormation ,
272274 Terraform : m .Terraform ,
275+ Examples : m .Examples ,
273276 }
274277}
275278
Original file line number Diff line number Diff line change @@ -50,6 +50,7 @@ type Rule struct {
5050 Severity severity.Severity `json:"severity"`
5151 Terraform * EngineMetadata `json:"terraform,omitempty"`
5252 CloudFormation * EngineMetadata `json:"cloud_formation,omitempty"`
53+ Examples string `json:"-"`
5354 CustomChecks CustomChecks `json:"-"`
5455 RegoPackage string `json:"-"`
5556 Frameworks map [framework.Framework ][]string `json:"frameworks"`
You can’t perform that action at this time.
0 commit comments