-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
File_integrety module shows inconsistent convention when the file path is the root. #24430
Comments
Pinging @elastic/security-external-integrations (Team:Security-External Integrations) |
This is due to an incorrect assumption about file path structures in the backing fsnotify package which is also present in upstream. The code currently assumes that all paths have a not path separator character to precede the suffix and so adds a path separator. This is obviously not true for root.
Making this conditional on name being "/" does not alter the behaviour of file paths with a leading dot. The two approaches to that would be to use |
@travisestill Can you provide more detail for the "./test5.txt" case? I would like to understand the configuration that generates that? Can I confirm that this happens when an empty paths array element is provided — i.e. your first case, OK. I've figured out that case. The empty path config resolves to |
Regarding the empty paths element, I tend to agree with you. That configuration isn't particularly clear as to what it does so we should try steer users toward |
Please include configurations and logs if available.
For confirmed bugs, please report:
Version: 7.11.1 and earlier (7.8.x)
Operating System: Verified on RHEL7.9 3.10.0-1160.11.1.el7.x86_64 and Ubuntu 20.04.2 LTS
Steps to Reproduce:
- /
or-
eg:
or
Expected:
The file.path field reflects the root in a consistent fashion that other directories are listed.
eg
Actual:
The file.path shows the name of the file with a ./ or double-slash
eg:
or
The text was updated successfully, but these errors were encountered: