Skip to content

Commit 3cbe0ee

Browse files
committed
chore: consistent casing
1 parent 6253019 commit 3cbe0ee

17 files changed

Lines changed: 23 additions & 23 deletions

thorlog/parser/parser_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ func TestParseEvent(t *testing.T) {
130130
},
131131
{
132132
"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"}`,
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"}`,
134134
&thorlog.Finding{
135135
ObjectHeader: jsonlog.ObjectHeader{
136136
Type: "THOR finding",
@@ -168,7 +168,7 @@ func TestParseEvent(t *testing.T) {
168168
{
169169
Object: &thorlog.AtJob{
170170
ObjectHeader: jsonlog.ObjectHeader{
171-
Type: "At Job",
171+
Type: "at job",
172172
},
173173
},
174174
},

thorlog/v3/amcache.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ type AmcacheEntry struct {
1919
Company string `json:"company" textlog:"company"`
2020
}
2121

22-
const typeAmcacheEntry = "Amcache Entry"
22+
const typeAmcacheEntry = "AmCache entry"
2323

2424
func init() { AddLogObjectType(typeAmcacheEntry, &AmcacheEntry{}) }
2525

thorlog/v3/antivirus.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type AntiVirusProduct struct {
1515

1616
func (AntiVirusProduct) reportable() {}
1717

18-
const typeAntiVirusProduct = "Antivirus product"
18+
const typeAntiVirusProduct = "antivirus product"
1919

2020
func init() { AddLogObjectType(typeAntiVirusProduct, &AntiVirusProduct{}) }
2121

@@ -37,7 +37,7 @@ type AntiVirusExclude struct {
3737

3838
func (AntiVirusExclude) reportable() {}
3939

40-
const typeAntiVirusExclude = "Antivirus exclusion"
40+
const typeAntiVirusExclude = "antivirus exclusion"
4141

4242
func init() { AddLogObjectType(typeAntiVirusExclude, &AntiVirusExclude{}) }
4343

thorlog/v3/atjob.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ type AtJob struct {
1616
Image *File `json:"image" textlog:"image,expand"`
1717
}
1818

19-
const typeAtJob = "At Job"
19+
const typeAtJob = "at job"
2020

2121
func init() { AddLogObjectType(typeAtJob, &AtJob{}) }
2222

thorlog/v3/crontab.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ type Cronjob struct {
1111

1212
func (Cronjob) reportable() {}
1313

14-
const typeCronjob = "cronjob"
14+
const typeCronjob = "cron job"
1515

1616
func init() { AddLogObjectType(typeCronjob, &Cronjob{}) }
1717

thorlog/v3/dnscache.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ type DnsCacheEntry struct {
88

99
func (DnsCacheEntry) reportable() {}
1010

11-
const typeDnsCacheEntry = "DNSCache entry"
11+
const typeDnsCacheEntry = "DNS cache entry"
1212

1313
func init() { AddLogObjectType(typeDnsCacheEntry, &DnsCacheEntry{}) }
1414

thorlog/v3/event_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ func TestFinding_UnmarshalJSON(t *testing.T) {
134134
}
135135

136136
func TestFinding_UnmarshalIssue(t *testing.T) {
137-
finding := `{"type":"THOR finding","meta":{"time":"2025-07-01T12:05:12.993789131+02:00","level":"Info","module":"ProcessCheck","scan_id":"S-pSxgCmyvvfs","event_id":"","hostname":"dummy"},"message":"process found","subject":{"type":"process","pid":502168,"name":"chromium","command":"/usr/lib/chromium/chromium","owner":"owner","image":{"type":"file","path":"/usr/lib/chromium/chromium","exists":"yes","extension":"","magic_header":"ELF","hashes":{"md5":"fc04ee20f064adc18e370c22512e268e","sha1":"2c8b7d05d25e04db9c169ce85e8e8f84321ef0c8","sha256":"0cf1727aa8dc3995d5aa103001f656b8ee8a1b3ffbc6d8664c5ad95cf225771f"},"first_bytes":{"hex":"7f454c4602010100000000000000000003003e00","ascii":"ELF\u003e"},"file_times":{"modified":"2025-06-25T19:45:43+02:00","accessed":"2025-07-01T08:46:56.750309598+02:00","changed":"2025-06-26T08:39:59.980605063+02:00"},"size":252546120,"permissions":{"type":"unix permissions","owner":"root","group":"root","permissions":{"user":{"readable":true,"writable":true,"executable":true},"group":{"readable":true,"writable":false,"executable":true},"world":{"readable":true,"writable":false,"executable":true}}}},"parent_info":{"pid":9011,"exe":"/usr/lib/chromium/chromium","command":"/usr/lib/chromium/chromium"},"tree":["/usr/lib/chromium/chromium","/usr/lib/chromium/chromium"],"created":"2025-07-01T12:00:05+02:00","session":"","listen_ports":null,"connections":[]},"score":0,"reasons":null,"reason_count":0,"context":null,"issues":[{"affected":"/subject/sections","category":"truncated","description":"Removed some sections from process memory (originally 638)"}],"log_version":"v3.0.0"}`
137+
finding := `{"type":"THOR finding","meta":{"time":"2025-07-01T12:05:12.993789131+02:00","level":"Info","module":"ProcessCheck","scan_id":"S-pSxgCmyvvfs","event_id":"","hostname":"dummy"},"message":"process found","subject":{"type":"process","pid":502168,"name":"chromium","command":"/usr/lib/chromium/chromium","owner":"owner","image":{"type":"file","path":"/usr/lib/chromium/chromium","exists":"yes","extension":"","magic_header":"ELF","hashes":{"md5":"fc04ee20f064adc18e370c22512e268e","sha1":"2c8b7d05d25e04db9c169ce85e8e8f84321ef0c8","sha256":"0cf1727aa8dc3995d5aa103001f656b8ee8a1b3ffbc6d8664c5ad95cf225771f"},"first_bytes":{"hex":"7f454c4602010100000000000000000003003e00","ascii":"ELF\u003e"},"file_times":{"modified":"2025-06-25T19:45:43+02:00","accessed":"2025-07-01T08:46:56.750309598+02:00","changed":"2025-06-26T08:39:59.980605063+02:00"},"size":252546120,"permissions":{"type":"Unix permissions","owner":"root","group":"root","permissions":{"user":{"readable":true,"writable":true,"executable":true},"group":{"readable":true,"writable":false,"executable":true},"world":{"readable":true,"writable":false,"executable":true}}}},"parent_info":{"pid":9011,"exe":"/usr/lib/chromium/chromium","command":"/usr/lib/chromium/chromium"},"tree":["/usr/lib/chromium/chromium","/usr/lib/chromium/chromium"],"created":"2025-07-01T12:00:05+02:00","session":"","listen_ports":null,"connections":[]},"score":0,"reasons":null,"reason_count":0,"context":null,"issues":[{"affected":"/subject/sections","category":"truncated","description":"Removed some sections from process memory (originally 638)"}],"log_version":"v3.0.0"}`
138138
var findingObj Finding
139139
if err := json.Unmarshal([]byte(finding), &findingObj); err != nil {
140140
t.Fatalf("Failed to unmarshal finding: %v", err)

thorlog/v3/jumplist.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ type JumplistEntry struct {
2424

2525
func (JumplistEntry) reportable() {}
2626

27-
const typeJumplistEntry = "jumplist entry"
27+
const typeJumplistEntry = "jump list entry"
2828

2929
func init() { AddLogObjectType(typeJumplistEntry, &JumplistEntry{}) }
3030

thorlog/v3/kernelmodule.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ type LinuxKernelModule struct {
2121

2222
func (LinuxKernelModule) reportable() {}
2323

24-
const typeLinuxKernelModule = "Linux Kernel Module"
24+
const typeLinuxKernelModule = "Linux kernel module"
2525

2626
func NewLinuxKernelModule(name string) *LinuxKernelModule {
2727
return &LinuxKernelModule{

thorlog/v3/lsasession.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ type LsaSession struct {
1818

1919
func (LsaSession) reportable() {}
2020

21-
const typeLsaSession = "lsa session"
21+
const typeLsaSession = "LSA session"
2222

2323
func init() { AddLogObjectType(typeLsaSession, &LsaSession{}) }
2424

0 commit comments

Comments
 (0)