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

Correct the target and actor in Slack Audit log UserPrivilegeEscalation plus clean up #1288

Merged
merged 3 commits into from
Jul 23, 2024

Conversation

bmbeverst
Copy link
Contributor

Background

Updating the Slack Audit log UserPrivilegeEscalation to correctly user target instead of actor. We got alerts for our IT team promoted to Admin or Owner. Realized it was an error in the alert and corrected it.

Changes

  • Updated the Slack UserPrivilegeEscalation alert to correctly differentiate between the actor and target. Actor being the user making the change and target being the user, the chances are occurring on.
  • Used the already definded dict USER_PRIV_ESC_ACTIONS for alert Titles
  • Updated alert Titles to correctly reference the target instead of the actor.
  • Add local variable action to improve readability.
  • Updated tests to test the new behavior
  • Updated tests to be YAML
  • Formatted YAML file with Prettier

Testing

  • pipenv run panther_analysis_tool test --skip-disabled-tests --sort-test-results

…sing defined dict. Also, to YAML and prettier format.
@bmbeverst bmbeverst requested a review from a team as a code owner July 12, 2024 23:32
@ben-githubs
Copy link
Contributor

@bmbeverst thanks for the PR! Since you've provided logic for identifying the actor and the entity, we figured we could update the titles to be even more descriptive of the event. However, I'm concerned that some of our unit test events are missing information - in particular, I'm curious if a permission_assigned event indicates what permissions were granted. Do you have access to one of the events, and could you share the structure so we can add update the unit test and title?

@bmbeverst
Copy link
Contributor Author

@ben-githubs That would be great! I am back from vacation.

Unluckily, I do not have any permission_assigned events, search for the last 3 months. And I don't have a test slack workspace to create a test event with. There appears to be a few sets of permissions as well, roles and account types.

@ben-githubs
Copy link
Contributor

Understood Brooks! I'll make a note to followup on those tests at a later date, but otherwise we'll merge this to avoid holding the logic changes up!

Copy link
Contributor

@ben-githubs ben-githubs left a comment

Choose a reason for hiding this comment

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

Looks good. Thanks for your contribution!

@ben-githubs ben-githubs merged commit e894362 into panther-labs:release Jul 23, 2024
5 of 6 checks passed
@arielkr256 arielkr256 added the bug Something isn't working label Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants