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

Always catch json type errors when extracting #928

Merged
merged 1 commit into from
Nov 19, 2019

Conversation

mstemm
Copy link
Contributor

@mstemm mstemm commented Nov 18, 2019

In all extraction functions, always catch json type errors alongside
json out of range errors. Both cases result in not extracting any value
from the event.

What type of PR is this?

Uncomment one (or more) /kind <> lines:

/kind bug

/kind cleanup

/kind design

/kind documentation

/kind failing-test

/kind feature

/kind flaky-test

If contributing rules or changes to rules, please make sure to also uncomment one of the following line:

/kind rule-update

/kind rule-create

Any specific area of the project related to this PR?

Uncomment one (or more) /area <> lines:

/area build

/area engine

/area examples

/area rules

/area integrations

/area tests

/area proposals

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

fix: prevent throwing json type error c++ exceptions outside of the falco engine when procesing k8s audit events.

In all extraction functions, always catch json type errors alongside
json out of range errors. Both cases result in not extracting any value
from the event.

Signed-off-by: Mark Stemm <mark.stemm@gmail.com>
Copy link
Contributor

@lorenzo-david lorenzo-david left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@poiana
Copy link

poiana commented Nov 18, 2019

LGTM label has been added.

Git tree hash: 47a0e0e94181eacd99348a1c7429f13e38d57477

@poiana poiana added the lgtm label Nov 18, 2019
@leodido leodido self-requested a review November 19, 2019 00:16
@poiana
Copy link

poiana commented Nov 19, 2019

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: fntlnz, leodido, lorenzo-david

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@leodido leodido merged commit 4e39fee into dev Nov 19, 2019
@poiana poiana deleted the always-catch-json-type-errors branch November 19, 2019 00:20
@fntlnz fntlnz added this to the 0.19.0 milestone Dec 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants