Skip to content

[cisco_secure_email_gateway] Correct escaping to match both Unix and Windows-style paths#7572

Merged
chrisberkhout merged 3 commits intoelastic:mainfrom
chrisberkhout:cisco_secure_email_gateway-win-paths-real
Aug 30, 2023
Merged

[cisco_secure_email_gateway] Correct escaping to match both Unix and Windows-style paths#7572
chrisberkhout merged 3 commits intoelastic:mainfrom
chrisberkhout:cisco_secure_email_gateway-win-paths-real

Conversation

@chrisberkhout
Copy link
Copy Markdown
Contributor

@chrisberkhout chrisberkhout commented Aug 28, 2023

What does this PR do?

This fixes the change attempted in #7452. The problem was insufficient escaping.

Here's a summary of the various versions:

Original pattern raw:
^%{DATA}/%{WORD:cisco_secure_email_gateway.log.category.name}.@%{GREEDYDATA}.s$

Fixed pattern raw:
^%{DATA}/[\\/]%{WORD:cisco_secure_email_gateway.log.category.name}.@%{GREEDYDATA}.s$

Assumed fixed pattern as the broken string:
"^%{DATA}[\\/]%{WORD:cisco_secure_email_gateway.log.category.name}.@%{GREEDYDATA}.s$"

Assumed fixed pattern, raw from the broken string:
^%{DATA}[\/]%{WORD:cisco_secure_email_gateway.log.category.name}.@%{GREEDYDATA}.s$

Actually fixed pattern as the correct string:
"^%{DATA}[\\\\/]%{WORD:cisco_secure_email_gateway.log.category.name}.@%{GREEDYDATA}.s$"

Actually fixed pattern, raw from the correct string:
^%{DATA}[\\/]%{WORD:cisco_secure_email_gateway.log.category.name}.@%{GREEDYDATA}.s$

Checklist

  • I have reviewed tips for building integrations and this pull request is aligned with them.
  • I have verified that all data streams collect metrics or logs.
  • I have added an entry to my package's changelog.yml file.
  • I have verified that Kibana version constraints are current according to guidelines.

How to test this PR locally

Doesn't break existing tests:

cd packages/cisco_secure_email_gateway
elastic-package test

Related issues

@chrisberkhout chrisberkhout added Team:Security-External Integrations bugfix Pull request that fixes a bug issue labels Aug 28, 2023
@chrisberkhout chrisberkhout requested a review from a team as a code owner August 28, 2023 16:41
@elasticmachine
Copy link
Copy Markdown

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

@chrisberkhout chrisberkhout changed the title Correct escaping to match both Unix and Windows-style paths [cisco_secure_email_gateway] Correct escaping to match both Unix and Windows-style paths Aug 28, 2023
@elasticmachine
Copy link
Copy Markdown

elasticmachine commented Aug 28, 2023

💚 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: 2023-08-29T11:58:30.828+0000

  • Duration: 16 min 26 sec

Test stats 🧪

Test Results
Failed 0
Passed 23
Skipped 0
Total 23

🤖 GitHub comments

Expand to view the GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

@elasticmachine
Copy link
Copy Markdown

elasticmachine commented Aug 28, 2023

🌐 Coverage report

Name Metrics % (covered/total) Diff
Packages 100.0% (1/1) 💚
Files 83.333% (10/12) 👎 -16.667
Classes 83.333% (10/12) 👎 -16.667
Methods 89.286% (50/56) 👍 4.458
Lines 86.667% (598/690) 👎 -9.388
Conditionals 100.0% (0/0) 💚

@efd6 efd6 assigned chrisberkhout and unassigned efd6 Aug 29, 2023
Co-authored-by: Dan Kortschak <90160302+efd6@users.noreply.github.com>
@chrisberkhout chrisberkhout requested a review from efd6 August 29, 2023 11:58
@chrisberkhout chrisberkhout merged commit bcd0bbd into elastic:main Aug 30, 2023
@chrisberkhout chrisberkhout deleted the cisco_secure_email_gateway-win-paths-real branch August 30, 2023 09:44
@elasticmachine
Copy link
Copy Markdown

Package cisco_secure_email_gateway - 1.11.2 containing this change is available at https://epr.elastic.co/search?package=cisco_secure_email_gateway

@andrewkroh andrewkroh added the Integration:cisco_secure_email_gateway Cisco Secure Email Gateway label Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Pull request that fixes a bug issue Integration:cisco_secure_email_gateway Cisco Secure Email Gateway

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants