Skip to content

Add mode as dynamic field#5051

Merged
bah07 merged 8 commits into3.13from
4799-fim-mode-field
May 14, 2020
Merged

Add mode as dynamic field#5051
bah07 merged 8 commits into3.13from
4799-fim-mode-field

Conversation

@bah07
Copy link
Copy Markdown
Contributor

@bah07 bah07 commented May 14, 2020

Related issue QA issue Documentation issue
#4799 wazuh/wazuh-qa#673 wazuh/wazuh-documentation#2407

Description

This pull request adds the mode field to the FIM alerts. It also makes alerts more consistent deleting the hyphen from the real-time alerts, leaving three possibilities: scheduled|realtime|whodata.
This pull request closes #4799.

Logs/Alerts example

{
    "id": "1587466043.151965",
    "full_log": "File '/test/file_7' added\nMode: realtime\n",
    "syscheck": {
        "path": "/test/file_7",
        "mode": "realtime",
        "size_after": "0",
        "perm_after": "rw-r--r--",
        "uid_after": "0",
        "gid_after": "0",
        "md5_after": "d41d8cd98f00b204e9800998ecf8427e",
        "sha1_after": "da39a3ee5e6b4b0d3255bfef95601890afd80709",
        "sha256_after": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
        "uname_after": "root",
        "gname_after": "root",
        "mtime_after": "2020-04-21T10:47:23",
        "inode_after": 34033987,
        "event": "added"
    },
    "decoder": {
        "name": "syscheck_new_entry"
    },
    "location": "syscheck"
}

Tests

  • Compilation without warnings in every supported platform
    • Linux
    • Windows
    • MAC OS X
  • Source installation
  • Package installation
  • Source upgrade
  • Package upgrade
  • Review logs syntax and correct language
  • QA templates contemplate the added capabilities
  • Memory tests for Linux
    • Scan-build report
    • Coverity
    • Valgrind (memcheck and descriptor leaks check)
    • Dr. Memory
    • AddressSanitizer
  • Added unit tests (for new features)

@bah07 bah07 changed the base branch from master to 3.13 May 14, 2020 15:10
@bah07 bah07 requested a review from chemamartinez May 14, 2020 15:10
@bah07 bah07 mentioned this pull request May 14, 2020
11 tasks
@bah07 bah07 merged commit 7420370 into 3.13 May 14, 2020
@bah07 bah07 deleted the 4799-fim-mode-field branch May 14, 2020 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FIM alerts miss the mode field

3 participants