Skip to content

Commit 6cb530d

Browse files
authored
Merge pull request #55 from NextronSystems/fix/rename-finding
feat: rename finding
2 parents c74f794 + a721a13 commit 6cb530d

61 files changed

Lines changed: 187 additions & 187 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

thorlog/common/event.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ type LogEventMetadata struct {
2828
Mod string `json:"module" textlog:"module"`
2929
// The ID of the scan where this event was created.
3030
ScanID string `json:"scan_id" textlog:"scanid,omitempty"`
31-
// A unique ID for this finding.
31+
// A unique ID for this event.
3232
// The ID is transient and the same element may have different IDs across multiple scans.
3333
GenID string `json:"event_id,omitempty" textlog:"uid,omitempty"`
3434
// The hostname of the machine where this event was generated.

thorlog/jsonschema/generateschema.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ func main() {
9797
Title: "ThorEvent",
9898
OneOf: []*jsonschema.Schema{
9999
{
100-
Ref: "#/$defs/Finding",
100+
Ref: "#/$defs/Assessment",
101101
},
102102
{
103103
Ref: "#/$defs/Message",

thorlog/parser/parser_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -129,11 +129,11 @@ func TestParseEvent(t *testing.T) {
129129
},
130130
},
131131
{
132-
"JsonV3Finding",
133-
`{"type":"THOR finding","meta":{"time":"2024-09-24T14:18:46.190394329+02:00","level":"Alert","module":"Test","scan_id":"abdc","event_id":"abdas","hostname":"aserarsd"},"message":"This is a test finding","subject":{"type":"file","path":"path/to/file"},"score":70,"reasons":[{"type":"reason","summary":"Reason 1","signature":{"score":70,"ref":null,"origin":"internal","kind":""},"matched":null}],"reason_count":0,"context":[{"object":{"type":"at job"},"relation":"","unique":false}],"log_version":"v3"}`,
134-
&thorlog.Finding{
132+
"JsonV3Assessment",
133+
`{"type":"THOR assessment","meta":{"time":"2024-09-24T14:18:46.190394329+02:00","level":"Alert","module":"Test","scan_id":"abdc","event_id":"abdas","hostname":"aserarsd"},"message":"This is a test assessment","subject":{"type":"file","path":"path/to/file"},"score":70,"reasons":[{"type":"reason","summary":"Reason 1","signature":{"score":70,"ref":null,"origin":"internal","kind":""},"matched":null}],"reason_count":0,"context":[{"object":{"type":"at job"},"relation":"","unique":false}],"log_version":"v3"}`,
134+
&thorlog.Assessment{
135135
ObjectHeader: jsonlog.ObjectHeader{
136-
Type: "THOR finding",
136+
Type: "THOR assessment",
137137
},
138138
Meta: thorlog.LogEventMetadata{
139139
Time: mustTime("2024-09-24T14:18:46.190394329+02:00"),
@@ -143,7 +143,7 @@ func TestParseEvent(t *testing.T) {
143143
GenID: "abdas",
144144
Source: "aserarsd",
145145
},
146-
Text: "This is a test finding",
146+
Text: "This is a test assessment",
147147
Subject: &thorlog.File{
148148
ObjectHeader: jsonlog.ObjectHeader{
149149
Type: "file",

thorlog/v3/amcache.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@ func NewAmcacheEntry() *AmcacheEntry {
3131
}
3232
}
3333

34-
func (AmcacheEntry) reportable() {}
34+
func (AmcacheEntry) observed() {}

thorlog/v3/antivirus.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ type AntiVirusProduct struct {
1313
Path string `json:"path" textlog:"path"`
1414
}
1515

16-
func (AntiVirusProduct) reportable() {}
16+
func (AntiVirusProduct) observed() {}
1717

1818
const typeAntiVirusProduct = "antivirus product"
1919

@@ -35,7 +35,7 @@ type AntiVirusExclude struct {
3535
Exclusion string `json:"exclusion" textlog:"exclusion"`
3636
}
3737

38-
func (AntiVirusExclude) reportable() {}
38+
func (AntiVirusExclude) observed() {}
3939

4040
const typeAntiVirusExclude = "antivirus exclusion"
4141

thorlog/v3/atjob.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ func NewAtJob() *AtJob {
2222
}
2323
}
2424

25-
func (AtJob) reportable() {}
25+
func (AtJob) observed() {}

thorlog/v3/auditlog.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ func NewAuditLogEntry() *AuditLogEntry {
2222
}
2323
}
2424

25-
func (AuditLogEntry) reportable() {}
25+
func (AuditLogEntry) observed() {}

thorlog/v3/authorizedkeys.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ func NewAuthorizedKeysEntry() *AuthorizedKeysEntry {
2525
}
2626
}
2727

28-
func (AuthorizedKeysEntry) reportable() {}
28+
func (AuthorizedKeysEntry) observed() {}

thorlog/v3/autorun.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ type AutorunEntry struct {
1717
OldMd5 string `json:"old_md5,omitempty" textlog:"md5_before,omitempty"`
1818
}
1919

20-
func (AutorunEntry) reportable() {}
20+
func (AutorunEntry) observed() {}
2121

2222
const typeAutorunEntry = "autorun entry"
2323

thorlog/v3/beaconwatcher.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ type NetworkConnectingThread struct {
2020
Connections NetworkConnections `json:"connections" textlog:"connections"`
2121
}
2222

23-
func (NetworkConnectingThread) reportable() {}
23+
func (NetworkConnectingThread) observed() {}
2424

2525
func NewNetworkConnectingThread(threadId uint32, process *Process) *NetworkConnectingThread {
2626
return &NetworkConnectingThread{

0 commit comments

Comments
 (0)