-
Notifications
You must be signed in to change notification settings - Fork 39
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
Conversation
|
||
func ReadEnvironmentVariableFromProcFiles(h events.Helper) error { | ||
if h.InContainer() { | ||
cmd := exec.Command("cat", "/proc/*/environ") |
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 use just /proc/self/environ
instead?
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.
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 :)
LGTM label has been added. Git tree hash: a0a4f8c832553bb2d20a8d6decb2ea61faf8ee49
|
Signed-off-by: h4l0gen <[email protected]> final Signed-off-by: h4l0gen <[email protected]>
LGTM label has been added. Git tree hash: 5d970b39ab615d28cb5b60d4fcb2aa1c90ff08a6
|
[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 |
What type of PR is this?
/kind feature
Any specific area of the project related to this PR?
/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: