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

adding an event on reading environment variable from /proc files #113

Merged
merged 1 commit into from
Apr 23, 2024

Conversation

h4l0gen
Copy link
Contributor

@h4l0gen h4l0gen commented Mar 15, 2024

What type of PR is this?

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

/kind bug

/kind cleanup

/kind documentation

/kind tests

/kind feature

Any specific area of the project related to this PR?

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

/area commands

/area pkg

/area events

What this PR does / why we need it:
this event trigger rule read environment variable from /proc file
Which issue(s) this PR fixes:

Fixes #111

Special notes for your reviewer:

@poiana poiana requested review from FedeDP and leogr March 15, 2024 09:26
@h4l0gen h4l0gen changed the title adding an event on reading environment variable from /proc files wip: adding an event on reading environment variable from /proc files Mar 16, 2024
@h4l0gen
Copy link
Contributor Author

h4l0gen commented Apr 4, 2024

Hii @FedeDP @leogr this event triggered rule, PTAL. Thank You!!
image

@h4l0gen h4l0gen changed the title wip: adding an event on reading environment variable from /proc files adding an event on reading environment variable from /proc files Apr 8, 2024

func ReadEnvironmentVariableFromProcFiles(h events.Helper) error {
if h.InContainer() {
cmd := exec.Command("cat", "/proc/*/environ")
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we use just /proc/self/environ instead?

Copy link
Contributor Author

@h4l0gen h4l0gen Apr 9, 2024

Choose a reason for hiding this comment

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

Yes, @FedeDP, I have changed it, and the rule was triggered as well. After this change, the event generated less noise than the previous one :)

leogr
leogr previously approved these changes Apr 9, 2024
@poiana poiana added the lgtm label Apr 9, 2024
@poiana
Copy link

poiana commented Apr 9, 2024

LGTM label has been added.

Git tree hash: a0a4f8c832553bb2d20a8d6decb2ea61faf8ee49

@poiana poiana added the approved label Apr 9, 2024
@h4l0gen
Copy link
Contributor Author

h4l0gen commented Apr 22, 2024

@leogr @FedeDP please add LGTM label again. I squashed commits again.

@poiana poiana added the lgtm label Apr 23, 2024
@poiana
Copy link

poiana commented Apr 23, 2024

LGTM label has been added.

Git tree hash: 5d970b39ab615d28cb5b60d4fcb2aa1c90ff08a6

@poiana
Copy link

poiana commented Apr 23, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: h4l0gen, leogr

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

@poiana poiana merged commit c2b6f3c into falcosecurity:main Apr 23, 2024
4 checks passed
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.

event on rule read environment variable from proc files
4 participants