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

Add process.thread.capabilities #2245

Merged
merged 9 commits into from
Aug 9, 2023
2 changes: 2 additions & 0 deletions CHANGELOG.next.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ Thanks, you're awesome :-) -->

#### Added
* Added `container.security_context.privileged` to indicated whether a container was started in privileged mode. #2219, #2225
* Added `process.thread.capabilities.permitted` to contain the current thread's possible capabilities. #2245
* Added `process.thread.capabilities.effective` to contain the current thread's effective capabilities. #2245

#### Improvements

Expand Down
22 changes: 22 additions & 0 deletions schemas/process.yml
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,28 @@
description: >
Thread name.

- name: thread.capabilities.permitted
level: extended
type: keyword
short: Array of capabilities a thread could assume.
description: >
This is a limiting superset for the effective capabilities that the
thread may assume.
example: "[\"CAP_BPF\", \"CAP_SYS_ADMIN\"]"
Copy link
Member

Choose a reason for hiding this comment

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

If this is the format we expect to use then I recommend adding a pattern so that automated validation can yield warnings when the format is not followed. I am thinking ^(CAP_[A-Z_]+|\d+)$ which allows software to insert the capability number if it is unaware the associated name.

example:

pattern: ^[A-F0-9]{2}(-[A-F0-9]{2}){5,}$

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

super cool! @andrewkroh thanks for the suggestion

normalize:
- array

- name: thread.capabilities.effective
level: extended
type: keyword
short: Array of capabilities used for permission checks.
description: >
This is the set of capabilities used by the kernel to perform permission
checks for the thread.
example: "[\"CAP_BPF\", \"CAP_SYS_ADMIN\"]"
normalize:
- array

- name: start
level: extended
type: date
Expand Down