Skip to content
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

[Auditbeat] scanner honor include_files #27722

Merged

Conversation

leehinman
Copy link
Contributor

What does this PR do?

In auditbeat scanner:

  • If included_files is set and file name does not match included_files then it is
    skipped
  • directories are included even if they don't match included_files
    because the contents might

Why is it important?

All files were being scanned in first scan unless listed in exclude_files

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
    - [ ] I have made corresponding changes to the documentation
    - [ ] I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

How to test this PR locally

mage goUnitTest

Related issues

@leehinman leehinman requested a review from a team as a code owner September 2, 2021 20:18
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Sep 2, 2021
@leehinman leehinman added Auditbeat backport-v7.15.0 Automated backport with mergify backport-v7.16.0 Automated backport with mergify bug Team:Security-External Integrations labels Sep 2, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/security-external-integrations (Team:Security-External Integrations)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Sep 2, 2021
- If included_path is set and file is not an included path then it is
  skipped
- directories are included even if they don't match included path
  because the contents might

Closes elastic#27273
@leehinman leehinman force-pushed the 27273_scanner_honor_include_files branch from 936d279 to 5ec5811 Compare September 2, 2021 20:20
@elasticmachine
Copy link
Collaborator

elasticmachine commented Sep 2, 2021

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2021-09-03T02:13:50.087+0000

  • Duration: 69 min 51 sec

  • Commit: 90ee7d3

Test stats 🧪

Test Results
Failed 0
Passed 902
Skipped 210
Total 1112

Trends 🧪

Image of Build Times

Image of Tests

💚 Flaky test report

Tests succeeded.

Expand to view the summary

Test stats 🧪

Test Results
Failed 0
Passed 902
Skipped 210
Total 1112

@leehinman leehinman merged commit c0b3d73 into elastic:master Sep 9, 2021
@leehinman leehinman deleted the 27273_scanner_honor_include_files branch September 9, 2021 15:06
mergify bot pushed a commit that referenced this pull request Sep 9, 2021
* [Auditbeat] scanner honor include_files

- If included_path is set and file is not an included path then it is
  skipped
- directories are included even if they don't match included path
  because the contents might
- change test regex to work on linux, mac and windows

Closes #27273

(cherry picked from commit c0b3d73)
mergify bot pushed a commit that referenced this pull request Sep 9, 2021
* [Auditbeat] scanner honor include_files

- If included_path is set and file is not an included path then it is
  skipped
- directories are included even if they don't match included path
  because the contents might
- change test regex to work on linux, mac and windows

Closes #27273

(cherry picked from commit c0b3d73)
mdelapenya added a commit to mdelapenya/beats that referenced this pull request Sep 9, 2021
* master:
  [Auditbeat] scanner honor include_files (elastic#27722)
  chore(ci): remove not used param when triggering e2e tests (elastic#27823)
  LineReader: Reuse temporary buffer to reduce per-line allocation (elastic#27782)
leehinman added a commit that referenced this pull request Sep 9, 2021
* [Auditbeat] scanner honor include_files

- If included_path is set and file is not an included path then it is
  skipped
- directories are included even if they don't match included path
  because the contents might
- change test regex to work on linux, mac and windows

Closes #27273

(cherry picked from commit c0b3d73)

Co-authored-by: Lee E Hinman <57081003+leehinman@users.noreply.github.com>
leehinman added a commit that referenced this pull request Sep 9, 2021
* [Auditbeat] scanner honor include_files

- If included_path is set and file is not an included path then it is
  skipped
- directories are included even if they don't match included path
  because the contents might
- change test regex to work on linux, mac and windows

Closes #27273

(cherry picked from commit c0b3d73)

Co-authored-by: Lee E Hinman <57081003+leehinman@users.noreply.github.com>
Icedroid pushed a commit to Icedroid/beats that referenced this pull request Nov 1, 2021
* [Auditbeat] scanner honor include_files

- If included_path is set and file is not an included path then it is
  skipped
- directories are included even if they don't match included path
  because the contents might
- change test regex to work on linux, mac and windows

Closes elastic#27273
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auditbeat backport-v7.15.0 Automated backport with mergify backport-v7.16.0 Automated backport with mergify bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Using scan_at_start with include_files does not work
3 participants