Commit 6d84e0c 1 parent 4f77e01 commit 6d84e0c Copy full SHA for 6d84e0c
File tree 2 files changed +4
-0
lines changed
2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ type StaticMetadata struct {
40
40
Library bool
41
41
CloudFormation * scan.EngineMetadata
42
42
Terraform * scan.EngineMetadata
43
+ Examples string
43
44
}
44
45
45
46
func NewStaticMetadata (pkgPath string , inputOpt InputOptions ) * StaticMetadata {
@@ -76,6 +77,7 @@ func (sm *StaticMetadata) update(meta map[string]any) error {
76
77
upd (& sm .Provider , "provider" )
77
78
upd (& sm .RecommendedActions , "recommended_actions" )
78
79
upd (& sm .RecommendedActions , "recommended_action" )
80
+ upd (& sm .Examples , "examples" )
79
81
80
82
if raw , ok := meta ["deprecated" ]; ok {
81
83
if dep , ok := raw .(bool ); ok {
@@ -270,6 +272,7 @@ func (m StaticMetadata) ToRule() scan.Rule {
270
272
Frameworks : m .Frameworks ,
271
273
CloudFormation : m .CloudFormation ,
272
274
Terraform : m .Terraform ,
275
+ Examples : m .Examples ,
273
276
}
274
277
}
275
278
Original file line number Diff line number Diff line change @@ -50,6 +50,7 @@ type Rule struct {
50
50
Severity severity.Severity `json:"severity"`
51
51
Terraform * EngineMetadata `json:"terraform,omitempty"`
52
52
CloudFormation * EngineMetadata `json:"cloud_formation,omitempty"`
53
+ Examples string `json:"-"`
53
54
CustomChecks CustomChecks `json:"-"`
54
55
RegoPackage string `json:"-"`
55
56
Frameworks map [framework.Framework ][]string `json:"frameworks"`
You can’t perform that action at this time.
0 commit comments