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

new(pkg/runner/helper): added SpawnAsWithSymlink and modified SpawnAs to make a copy #198

Merged
merged 1 commit into from
Apr 9, 2024

Conversation

loresuso
Copy link
Member

@loresuso loresuso commented Apr 4, 2024

… to copy or symlink the binary

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:

The change introduced by this PR can be used to trigger rules that are based on proc.exepath rather than proc.name for better detection purposes.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Copy link
Member

@leogr leogr left a comment

Choose a reason for hiding this comment

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

I like it, but I'd not change the func signature.

So I suggest the following:

  • copy the binary in SpawnAs by default without changing the SpawnAs signature (also, no need to change the actions, it's basically just a stronger approach, but the end result is the same)
  • add a new SpawnAsWithSymlink func which is the weaker version of the method

wdyt?

@loresuso
Copy link
Member Author

loresuso commented Apr 9, 2024

We should be good now @leogr, mind to take a look? :)

… binary

This can be used to trigger rules that are based on proc.exepath rather than proc.name
for better detection purposes.

Signed-off-by: Lorenzo Susini <[email protected]>
@leogr leogr changed the title update(pkg/runner/helper): add parameter to SpawnAs to decide whether… new(pkg/runner/helper): added SpawnAsWithSymlink and modified SpawnAs to make a copy Apr 9, 2024
Copy link
Member

@leogr leogr left a comment

Choose a reason for hiding this comment

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

Nice!

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

poiana commented Apr 9, 2024

[APPROVALNOTIFIER] This PR is APPROVED

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

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
Copy link

poiana commented Apr 9, 2024

LGTM label has been added.

Git tree hash: d5d5a67388982394ddc7aeb0b96c09a57122a831

@poiana poiana added the approved label Apr 9, 2024
@poiana poiana merged commit 939b3e0 into falcosecurity:main Apr 9, 2024
3 of 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.

3 participants