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

Audit Logging #10

Draft
wants to merge 8 commits into
base: develop
Choose a base branch
from
Draft

Audit Logging #10

wants to merge 8 commits into from

Conversation

khakers
Copy link
Collaborator

@khakers khakers commented Jul 6, 2023

Adds audit logging to modmail

Still needs:

  • more helper methods
  • Add audit logging to all code that should push it
  • finalize audit event schema
  • the permissions method is not complete
  • add config to disable audit logging

Events that should generate an audit log:

Modmail:

  • snippet_add
  • snippet_remove
  • snippet_edit
  • move
  • close
  • nsfw
  • sfw
  • title
  • adduser
  • removeuser
  • annonadduser
  • anonremoveuser
  • block
  • blocked_whitelist
  • unblock
  • delete
  • enable
  • disable_new
  • disable_all

utility:

  • cog_load
  • cog_unload
  • debug
  • debug_hastebin
  • debug_clear
  • activity
  • status
  • mention
  • prefix
  • config set
  • config remove
  • alias_add
  • alias_remove
  • alias_edit
  • permission_override
  • permissions_add
  • permissions_remove
  • oauth_whitelist
  • autotrigger_add
  • autotrigger_edit
  • github
  • update
  • eval_

Draft until I finalize everything on my end with modmail-viewer and finish adding log events to the bot

@netlify
Copy link

netlify bot commented Jul 6, 2023

Deploy Preview for modmail-docs canceled.

Name Link
🔨 Latest commit 98a3dd4
🔍 Latest deploy log https://app.netlify.com/sites/modmail-docs/deploys/64ae58d269d7f30008886c55

@khakers
Copy link
Collaborator Author

khakers commented Jul 6, 2023

updated list of evens to add audit event generation for (based on their function name)

…ld help in debugging why roles are what they are
[p]audit [id]
view information about a single audit event
[p]permissions list [user]
view the permission level of a user (apparently the normal modmail command for this is broken)
-- name not final
[p]permissions explain [user]
explains why a user has their current permissions and all permissions levels that apply to them
@khakers
Copy link
Collaborator Author

khakers commented Jul 12, 2023

That should be the last of the audit events and major code additions

@raidensakura raidensakura added the enhancement New feature or request label Jul 12, 2023
@khakers
Copy link
Collaborator Author

khakers commented Jul 18, 2023

I think I missed an event for whitelisting/un-whitelisting users

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants