■ ■ ■ ■ ■ ■
pkg/report/output/dataflow/types/risks.go
| skipped 3 lines |
4 | 4 | | |
5 | 5 | | type RiskDetector struct { |
6 | 6 | | DetectorID string `json:"detector_id" yaml:"detector_id"` |
7 | | - | DataTypes []RiskDatatype `json:"data_types" yaml:"data_types"` |
8 | | - | } |
9 | | - | |
10 | | - | type RiskDatatype struct { |
11 | | - | Name string `json:"name" yaml:"name"` |
12 | | - | UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"` |
13 | | - | CategoryUUID string `json:"category_uuid,omitempty" yaml:"category_uuid,omitempty"` |
14 | | - | Stored bool `json:"stored" yaml:"stored"` |
15 | | - | Locations []RiskLocation `json:"locations" yaml:"locations"` |
| 7 | + | Locations []RiskLocation `json:"locations" yaml:"locations"` |
16 | 8 | | } |
17 | 9 | | |
18 | 10 | | type RiskLocation struct { |
19 | | - | Filename string `json:"filename" yaml:"filename"` |
20 | | - | LineNumber int `json:"line_number" yaml:"line_number"` |
21 | | - | Parent *schema.Parent `json:"parent,omitempty" yaml:"parent,omitempty"` |
22 | | - | FieldName string `json:"field_name,omitempty" yaml:"field_name,omitempty"` |
23 | | - | ObjectName string `json:"object_name,omitempty" yaml:"object_name,omitempty"` |
24 | | - | SubjectName *string `json:"subject_name,omitempty" yaml:"subject_name,omitempty"` |
| 11 | + | Filename string `json:"filename" yaml:"filename"` |
| 12 | + | LineNumber int `json:"line_number" yaml:"line_number"` |
| 13 | + | Parent *schema.Parent `json:"parent,omitempty" yaml:"parent,omitempty"` |
| 14 | + | Datatypes []RiskDatatype `json:"data_types,omitempty" yaml:"data_types,omitempty"` |
25 | 15 | | } |
26 | 16 | | |
27 | | - | type RiskDetectionLocation struct { |
28 | | - | *RiskLocation `json:",inline" yaml:",inline"` |
29 | | - | Content string `json:"content" yaml:"content"` |
30 | | - | } |
31 | | - | |
32 | | - | type RiskDetection struct { |
33 | | - | DetectorID string `json:"detector_id" yaml:"detector_id"` |
34 | | - | Locations []RiskDetectionLocation `json:"locations" yaml:"locations"` |
| 17 | + | type RiskDatatype struct { |
| 18 | + | Content string `json:"content,omitempty" yaml:"content,omitempty"` |
| 19 | + | FieldName string `json:"field_name,omitempty" yaml:"field_name,omitempty"` |
| 20 | + | ObjectName string `json:"object_name,omitempty" yaml:"object_name,omitempty"` |
| 21 | + | SubjectName *string `json:"subject_name,omitempty" yaml:"subject_name,omitempty"` |
| 22 | + | Name string `json:"name,omitempty" yaml:"name,omitempty"` |
| 23 | + | UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"` |
| 24 | + | CategoryUUID string `json:"category_uuid,omitempty" yaml:"category_uuid,omitempty"` |
| 25 | + | Stored bool `json:"stored" yaml:"stored"` |
35 | 26 | | } |
36 | 27 | | |