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

Added an event for default rule "Adding ssh keys to authorized_keys" #117

Merged
merged 10 commits into from
Apr 2, 2024

Conversation

GLVSKiriti
Copy link
Contributor

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:
Added an event for default rule "Adding ssh keys to authorized_keys"

Which issue(s) this PR fixes:

Fixes #116

Special notes for your reviewer:

Signed-off-by: GLVS Kiriti <glvskiriti2003369@gmail.com>
Signed-off-by: GLVS Kiriti <glvskiriti2003369@gmail.com>
@GLVSKiriti
Copy link
Contributor Author

GLVSKiriti commented Mar 23, 2024

Its is also working fine and producing warning log on left terminal as expected

addingsshkeystoauthorizedkeys

Signed-off-by: GLVS Kiriti <glvskiriti2003369@gmail.com>
Signed-off-by: GLVS Kiriti <glvskiriti2003369@gmail.com>

func AddingSshKeysToAuthorizedKeys(h events.Helper) error {
// Creates temporary data for testing.
directoryname := "/home/created-by-falco-event-generator/.ssh"
Copy link
Contributor

@FedeDP FedeDP Mar 27, 2024

Choose a reason for hiding this comment

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

Same concerns as #112 applies.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just did the changes! Used the utility function used in #112 PR

Signed-off-by: GLVS Kiriti <glvskiriti2003369@gmail.com>
@GLVSKiriti GLVSKiriti requested a review from FedeDP March 27, 2024 09:04
GLVSKiriti and others added 4 commits March 27, 2024 15:57
…logic

Signed-off-by: GLVS Kiriti <glvskiriti2003369@gmail.com>
…e to remove code redundancy

Signed-off-by: GLVS Kiriti <glvskiriti2003369@gmail.com>
Signed-off-by: GLVSKiriti <116095646+GLVSKiriti@users.noreply.github.com>
Signed-off-by: GLVS Kiriti <glvskiriti2003369@gmail.com>
@GLVSKiriti
Copy link
Contributor Author

@FedeDP Similarly updated this also !

@GLVSKiriti
Copy link
Contributor Author

As #112 is merged. We introduced a helper function in that (createSshDirectoryUnderHome).
So now we can also merge this too! I tested it and it triggers according to this rule

Copy link
Contributor

@FedeDP FedeDP left a comment

Choose a reason for hiding this comment

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

/approve

@poiana
Copy link

poiana commented Apr 2, 2024

LGTM label has been added.

Git tree hash: 63583cb6d564c7f611d7334451eb1a7aefe5b167

Signed-off-by: GLVS Kiriti <glvskiriti2003369@gmail.com>
@GLVSKiriti GLVSKiriti force-pushed the AddingSshKeysToAuthorizedKeys branch from 2b12788 to 8b4feb4 Compare April 2, 2024 14:48
@GLVSKiriti
Copy link
Contributor Author

@FedeDP Kindly add lgtm label again. As previously the build fails bcz createSshDirectoryUnderHome not exists so I merged main branch now it is ok!!

Copy link
Contributor

@FedeDP FedeDP left a comment

Choose a reason for hiding this comment

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

/approve

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

poiana commented Apr 2, 2024

LGTM label has been added.

Git tree hash: 58d3682abf4d8404bc0ec4a014f645d55e49606f

@poiana
Copy link

poiana commented Apr 2, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: FedeDP, GLVSKiriti

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 4c28e17 into falcosecurity:main Apr 2, 2024
4 checks passed
@GLVSKiriti GLVSKiriti deleted the AddingSshKeysToAuthorizedKeys branch April 2, 2024 14:58
@leogr leogr added this to the v0.12.0 milestone Oct 2, 2024
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.

Add event for the default rule "Adding ssh keys to authorized_keys"
4 participants