-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Security Solution][Exceptions] Rule exceptions TTL - Expiration #145180
Conversation
f45ba09
to
6aa07f7
Compare
f2eddb2
to
7c778d2
Compare
4b27d54
to
43d0e4f
Compare
…-ref HEAD~1..HEAD --fix'
@elasticmachine merge upstream |
b96d875
to
740be6e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dplumlee it is minor, just some UI points, I just noticed.
- Can we adjust the alignment of the items
align-items: center; }
so they can on the same line
- I am not sure why we have many spaces here, if we can reduce them that will be great
packages/kbn-securitysolution-exception-list-components/src/list_header/menu_items/index.tsx
Outdated
Show resolved
Hide resolved
packages/kbn-securitysolution-io-ts-list-types/src/common/expire_time/index.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
threat hunting changes lgtm 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM just some small changes and ++ to what @WafaaNasr has commented on. Otherwise this looks great!
packages/kbn-securitysolution-io-ts-list-types/src/common/expire_time/index.ts
Outdated
Show resolved
Hide resolved
const isExpired = useMemo( | ||
() => (item.expire_time ? new Date(item.expire_time) <= new Date() : false), | ||
[item] | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we import this function from your changes here?
packages/kbn-securitysolution-exception-list-components/src/exception_item_card/meta/index.tsx
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add rule execution tests to verify that exceptions with an expiration date affect the created alerts as expected. I.e. unexpired exceptions are applied and expired exceptions are not applied at rule execution time. This can be done with rule preview instead of real executions to make the tests faster.
x-pack/plugins/lists/server/services/exception_lists/build_exception_filter.test.ts
Outdated
Show resolved
Hide resolved
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Module Count
Public APIs missing comments
Async chunks
Saved Objects .kibana field count
Unknown metric groupsAPI count
ESLint disabled in files
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: cc @dplumlee |
* main: (187 commits) [APM] Removing the icon for tech preview and fixing some of the alert badges (elastic#150528) [Cloud Posture][Bug]added fix for resource tab + small css fix on CSPM onboarding (elastic#149997) Making maxTransactionGroupsExceeded false by default (elastic#150458) [Fleet] refactor install registry and upload to extract common logic (elastic#150444) [ftr tests] split x-pack functional_with_es_ssl config (elastic#150416) [APM] switch get environment function to use terms_enum api (elastic#150175) [Unified search] Fixes ally issues (elastic#150411) [Synthetics] Fix overview status query (elastic#150285) [api-docs] 2023-02-08 Daily api_docs build (elastic#150518) [canvas] Run tests against @kbn/handlebars compileAST function (elastic#150439) [RAM] Bring flapping status and settings in o11y (elastic#150483) [data view mgmt] fix field refresh when index pattern is changed. (elastic#150403) [RAM] Allow alert table to show new alert status on apm (elastic#150500) [Synthetics] errors - adjust empty state content (elastic#150455) Uncomment tests (elastic#150481) [TIP] fix broken cypress tests after change made in cases plugin (elastic#150479) [enterprise search]: disallow removing last index from engine (elastic#150464) [Security Solution][Exceptions] Rule exceptions TTL - Expiration (elastic#145180) Adds link to Jan 2023 contributors newsletter. (elastic#150259) [Security Solution][Alerts] Fix bug when suppression has both created and updated alerts (elastic#150236) ...
Summary
Overview
Adds rule exception expiration component and related fields to Exceptions feature. Allows a user to set/edit an exception to run until a specific datetime is reached. It also updates certain orthogonal features/api's such as exporting exceptions to utilize the new expiration functionality.
Exceptions List Export
Users are able to select if they want to include expired exceptions when exporting their exception lists via a confirm modal on the lists and list details pages
Screenshots
Exceptions List
Exporting Exceptions
Checklist
Delete any items that are not applicable to this PR.
For maintainers