Skip to main content
Version: 25.4.3

Audit Log

In the modern-day dynamic world, managing data and change-induced implications is crucial. Keeping up with the need for ample data management, we have now introduced the Audit Log feature in the Gitea Enterprise. This comprehensive feature emphasizes providing an in-depth history of activities happening within your Gitea instances. Our latest feature captures a wide range of events like logging in/out, cloning a repository (including through SSH, HTTP), downloading the source code, downloading packages and so on.

Why the Audit Log Feature?

Audit Log feature for Gitea Enterprise offers a comprehensive logging solution that allows system administrators to keep track of various activities and changes. It ensures improved data security, compliance, accountability, and traceability.

User interface for Audit Log

Audit Log feature offers a neatly organized interface where you can easily access all the logs.

Audit Log Interface

Let's talk about the content and organization of these records.

  1. Opeartion Time: This column displays the exact date and time at which an activity occurred. The details recorded can help track the sequence of operations and also aid in pinpointing activities within a specific timeline.
  2. Operation Type: Here you can find tags for different activities, like, 'user:sign_in', 'user:sign_out', 'repo:clone', etc. This column helps to identify the sort of task executed.
  3. Operator: This column records the Gitea username of the individual who performed the operation. This aids in accountability and backtracking of any unauthorized changes done.
  4. Repository: The Repository column indicates the specific repository related to the operation. This is particularly useful in identifying the source/object related to the performed operation.
  5. Owner: The Owner column does not necessarily denote the owner of the repository in question; it refers to the entity that owns the object involved in the operation. Depending on the operation type, the owner could differ. In case of opeartion like 'Download package', where a package does not expressly belong to any repository but has an independent owner, this field will capture that owner's details.
  6. Target: Specifically, this denotes the specific object or individual that an operation was directed at. For example, in a file download situation, the target would be the file name.
  7. IP Address*: The IP address from where the operation was performed is also logged. This can provide extra security measures as it allows the tracing of the geographical location of operation execution.

What operations are logged in the audit log?

Almost every user operations will be recorded. Below is the behaviors we recorded.

Operation types reference

Operation TypeActionDescriptionNotes
user:sign_inUser sign inRecords a successful user sign-in.Watch for unusual time windows or IPs.
user:sign_outUser sign outRecords a user sign-out.Correlate with session management for long-lived sessions.
user:change_passwordChange passwordUser changes their password in settings.High-risk action; watch for frequent changes.
user:reset_passwordReset passwordUser completes a password reset flow.Confirm it matches a reset request.
user:request_reset_passwordRequest password resetUser requests a password reset.Correlate with email/verification activity.
user:enable_2faEnable 2FAUser enables two-factor authentication.Security improvement; note timing.
user:disable_2faDisable 2FAUser disables two-factor authentication.High-risk; verify operator identity.
user:regenerate_recovery_codesRegenerate recovery codesUser regenerates 2FA recovery codes.Old recovery codes are invalidated.
user:add_ssh_keyAdd SSH keyUser adds an SSH public key.Affects Git SSH access.
user:remove_ssh_keyRemove SSH keyUser removes an SSH public key.May break access; verify intent.
user:add_principal_keyAdd principal keyUser adds an SSH principal key.Used for certificate auth; confirm usage.
user:remove_principal_keyRemove principal keyUser removes an SSH principal key.Related certificate auth stops working.
user:add_gpg_keyAdd GPG keyUser adds a GPG public key.Affects commit signature verification.
user:remove_gpg_keyRemove GPG keyUser removes a GPG public key.Existing signatures still verify; new ones cannot be created.
user:createCreate userCreates a new user account.Typically an admin action.
user:renameRename userChanges a username.Impacts repository paths and references.
user:deleteDelete userDeletes a user account.Irreversible; confirm data ownership handling.
user:activateActivate userActivates a user account.Typically used after review/unlock.
user:deactivateDeactivate userDeactivates a user account.Blocks login and access.
user:updateUpdate userUpdates user profile or settings.Audit log should not expose sensitive values.
user:admin_reset_passwordAdmin reset passwordAdmin resets a user's password.High-risk; ensure approval trail.
user:prohibit_loginProhibit loginDisables user login.Useful for incident response.
user:allow_loginAllow loginRe-enables user login.Confirm risk is cleared.
user:add_emailAdd emailUser adds an email address.Email ownership should be verified.
user:delete_emailDelete emailUser removes an email address.May affect notifications and login.
user:change_primary_emailChange primary emailUser changes primary email.Impacts notifications and identity.
user_app:createCreate user appUser creates an application integration.Review scopes and callbacks.
user_app:deleteDelete user appUser deletes an application.Existing grants are revoked.
user_app:updateUpdate user appUser updates an application.Watch for callback or scope changes.
user_app:grant_revokeGrant/revoke appUser grants or revokes app access.High impact on permissions.
user_access_token:createCreate access tokenUser creates an access token.Token shown once; watch for leakage.
user_access_token:deleteDelete access tokenUser deletes an access token.API access stops for the token.
user_actions_secret:createCreate Actions secretUser creates an Actions secret.Secret value is masked.
user_actions_secret:deleteDelete Actions secretUser deletes an Actions secret.Workflows may fail afterward.
user_actions_secret:updateUpdate Actions secretUser updates an Actions secret.Updated value is not shown.
user_actions_variable:createCreate Actions variableUser creates an Actions variable.Variable value is plaintext.
user_actions_variable:deleteDelete Actions variableUser deletes an Actions variable.Workflows may fail afterward.
user_actions_variable:updateUpdate Actions variableUser updates an Actions variable.Track value changes.
user_webhook:createCreate user webhookUser creates a personal webhook.Review callback URL and events.
user_webhook:deleteDelete user webhookUser deletes a personal webhook.Event delivery stops.
user_webhook:updateUpdate user webhookUser updates a personal webhook.Review URL/secret changes.
user_openid_uri:createCreate OpenID URIUser adds an OpenID identifier.Affects third-party identity binding.
user_openid_uri:deleteDelete OpenID URIUser removes an OpenID identifier.Related login method stops working.
repo:createCreate repositoryCreates a new repository.Review owner and visibility.
repo:deleteDelete repositoryDeletes a repository.Irreversible; ensure backups.
repo:archiveArchive repositorySets repository to read-only archive.Disables writes.
repo:unarchiveUnarchive repositoryRestores repository to writable.Confirm process compliance.
repo:cloneClone repositoryUser clones a repository.Logs protocol and IP.
repo:pullPull repositoryUser pulls from a repository.Logs protocol and IP.
repo:pushPush repositoryUser pushes commits.Audit with branch protection policies.
repo:downloadDownload source codeUser downloads a source archive.Watch for bulk downloads.
repo:update_settingsUpdate repository settingsUpdates repository configuration.Monitor visibility or permission changes.
repo:update_avatarUpdate repository avatarUpdates repository avatar.Low risk.
repo:delete_avatarDelete repository avatarDeletes repository avatar.Low risk.
repo:add_push_mirrorAdd push mirrorAdds a push mirror configuration.Review mirror destination.
repo:update_push_mirrorUpdate push mirrorUpdates push mirror configuration.Watch for credential or URL changes.
repo:delete_push_mirrorDelete push mirrorDeletes a push mirror configuration.Mirroring stops afterward.
repo:renameRename repositoryRenames repository or path.Impacts remotes and dependencies.
repo:transferTransfer repositoryTransfers repository ownership.Confirm permissions and asset ownership.
repo:transfer_pendingTransfer pendingRepository transfer pending acceptance.Requires receiver confirmation.
repo:make_publicMake publicSets repository to public.Expands data exposure.
repo:make_privateMake privateSets repository to private.Restricts access.
repo:delete_wikiDelete wikiDeletes repository wiki.Irreversible; consider backups.
repo:add_collaboratorAdd collaboratorAdds repository collaborator.Permission change.
repo:update_collaboratorUpdate collaboratorUpdates collaborator permissions.Watch for privilege escalation.
repo:remove_collaboratorRemove collaboratorRemoves repository collaborator.Access is revoked.
repo:add_webhookAdd repository webhookAdds a repository webhook.Review callback URL and events.
repo:update_webhookUpdate repository webhookUpdates a repository webhook.Review URL/secret changes.
repo:delete_webhookDelete repository webhookDeletes a repository webhook.Event delivery stops.
repo:add_protected_branchAdd protected branchCreates a protected branch rule.Changes push/merge permissions.
repo:update_protected_branchUpdate protected branchUpdates protected branch rule.Monitor permission changes.
repo:delete_protected_branchDelete protected branchDeletes protected branch rule.Access restrictions may be relaxed.
repo:add_protected_tagAdd protected tagCreates a protected tag rule.Controls tag creation/deletion.
repo:update_protected_tagUpdate protected tagUpdates protected tag rule.Monitor permission changes.
repo:delete_protected_tagDelete protected tagDeletes protected tag rule.Access restrictions may be relaxed.
repo:add_deploy_keyAdd deploy keyAdds a repository deploy key.Impacts automation access.
repo:delete_deploy_keyDelete deploy keyDeletes a repository deploy key.Automation access stops.
repo:add_actions_secretAdd Actions secretAdds a repository Actions secret.Secret value is masked.
repo:update_actions_secretUpdate Actions secretUpdates a repository Actions secret.Updated value is not shown.
repo:delete_actions_secretDelete Actions secretDeletes a repository Actions secret.Workflows may fail afterward.
repo:add_actions_variableAdd Actions variableAdds a repository Actions variable.Variable value is plaintext.
repo:update_actions_variableUpdate Actions variableUpdates a repository Actions variable.Track value changes.
repo:delete_actions_variableDelete Actions variableDeletes a repository Actions variable.Workflows may fail afterward.
repo:enable_security_scanEnable security scanEnables repository security scanning.Consider scan scope and load.
repo:disable_security_scanDisable security scanDisables repository security scanning.Reduces vulnerability detection.
repo:update_security_scan_branchUpdate scan branchUpdates the target branch for scanning.Ensure critical branches are covered.
repo:cleanup_security_scanCleanup scan dataCleans up security scan history.History is removed and unrecoverable.
repo_label:createCreate labelCreates a repository label.Affects issue/PR categorization.
repo_label:updateUpdate labelUpdates a repository label.Watch for name/color changes.
repo_label:deleteDelete labelDeletes a repository label.Affects label associations.
repo_milestone:createCreate milestoneCreates a repository milestone.Impacts planning.
repo_milestone:updateUpdate milestoneUpdates a repository milestone.Track due date changes.
repo_milestone:deleteDelete milestoneDeletes a repository milestone.Affects statistics and tracking.
repo_project:createCreate projectCreates a repository project board.Impacts project workflow.
repo_project:updateUpdate projectUpdates a repository project board.Watch column or permission changes.
repo_project:closeClose projectCloses a repository project board.Becomes read-only.
repo_project:reopenReopen projectReopens a repository project board.Restores write access.
repo_project:deleteDelete projectDeletes a repository project board.Irreversible.
reference:createCreate referenceCreates a Git reference (branch/tag).Record target reference name.
reference:deleteDelete referenceDeletes a Git reference (branch/tag).Reference is removed.
release:createCreate releaseCreates a repository release.Tied to tags and assets.
release:updateUpdate releaseUpdates a repository release.Watch asset or description changes.
release:deleteDelete releaseDeletes a repository release.Assets become unavailable.
package:downloadDownload packageDownloads a package artifact.Track package name/version/owner.
package:uploadUpload packageUploads a package artifact.Verify permissions and source.
package:createCreate packageCreates a package record.Usually with upload.
package:deleteDelete packageDeletes a package record.Package becomes unavailable.
issue:createCreate issue/PRCreates an issue or PR.Record repository and author.
issue:updateUpdate issue/PRUpdates an issue or PR.Track state/assignee/label changes.
issue:closeClose issue/PRCloses an issue or PR.Review close reason or automation.
issue:reopenReopen issue/PRReopens an issue or PR.Confirm the issue is still valid.
issue:deleteDelete issue/PRDeletes an issue or PR.Irreversible.
issue:lockLock issue/PRLocks issue or PR comments.Used for moderation.
issue:unlockUnlock issue/PRUnlocks issue or PR comments.Restores commenting.
issue_comment:createCreate commentCreates an issue/PR comment.Comment content is recorded.
issue_comment:updateUpdate commentUpdates an issue/PR comment.Track edit history.
issue_comment:deleteDelete commentDeletes an issue/PR comment.Irreversible.
pull:createCreate PRCreates a pull request.Record source/target branches.
pull:wipMark WIPMarks a PR as WIP.Affects merge readiness.
pull:remove_wipRemove WIPRemoves WIP status from a PR.Restores normal review flow.
pull:change_target_branchChange target branchChanges PR target branch.Impacts review and merge policy.
pull:create_review_requestRequest reviewCreates a review request for a PR.Assigns review responsibility.
pull:remove_review_requestRemove review requestRemoves a review request.Affects review flow.
pull:mergeMerge PRMerges a pull request.High risk; check branch protection.
pull_request_review:submitSubmit reviewSubmits a PR review.Records review outcome and notes.
pull_request_review:dismissDismiss reviewDismisses a PR review.Confirm dismissal reason.
org:createCreate organizationCreates a new organization.Impacts resource ownership.
org:deleteDelete organizationDeletes an organization.Irreversible; confirm ownership handling.
org:renameRename organizationRenames an organization.Impacts repository paths and refs.
org:update_settingsUpdate org settingsUpdates organization configuration.Monitor visibility and permission changes.
org:add_teamAdd teamCreates an organization team.Impacts permissions.
org:remove_teamRemove teamDeletes an organization team.Team permissions are removed.
org:update_teamUpdate teamUpdates an organization team.Watch for permission changes.
org:add_team_memberAdd team memberAdds a member to a team.Changes access rights.
org:remove_team_memberRemove team memberRemoves a member from a team.Access rights are revoked.
org_app:createCreate org appCreates an organization app.Review scopes and callbacks.
org_app:deleteDelete org appDeletes an organization app.Grants are revoked.
org_app:updateUpdate org appUpdates an organization app.Watch for callback changes.
org_app:grant_revokeGrant/revoke org appGrants or revokes org app access.High impact on permissions.
org_webhook:createCreate org webhookCreates an organization webhook.Review callback URL and events.
org_webhook:deleteDelete org webhookDeletes an organization webhook.Event delivery stops.
org_webhook:updateUpdate org webhookUpdates an organization webhook.Review URL/secret changes.
org_actions_secret:createCreate org Actions secretCreates an organization Actions secret.Secret value is masked.
org_actions_secret:deleteDelete org Actions secretDeletes an organization Actions secret.Workflows may fail afterward.
org_actions_secret:updateUpdate org Actions secretUpdates an organization Actions secret.Updated value is not shown.
org_actions_variable:createCreate org Actions variableCreates an organization Actions variable.Variable value is plaintext.
org_actions_variable:deleteDelete org Actions variableDeletes an organization Actions variable.Workflows may fail afterward.
org_actions_variable:updateUpdate org Actions variableUpdates an organization Actions variable.Track value changes.
org_label:createCreate org labelCreates an organization label.Shared across org repositories.
org_label:updateUpdate org labelUpdates an organization label.Watch for name/color changes.
org_label:deleteDelete org labelDeletes an organization label.Affects label associations.
org_protected_branch:createCreate org protected branchCreates an org-level protected branch rule.Impacts organization repository policies.
org_protected_branch:updateUpdate org protected branchUpdates org-level protected branch rule.Monitor permission changes.
org_protected_branch:deleteDelete org protected branchDeletes org-level protected branch rule.Access restrictions may be relaxed.
org_project:createCreate org projectCreates an organization project board.Impacts org-level planning.
org_project:updateUpdate org projectUpdates an organization project board.Watch column or permission changes.
org_project:closeClose org projectCloses an organization project board.Becomes read-only.
org_project:reopenReopen org projectReopens an organization project board.Restores write access.
org_project:deleteDelete org projectDeletes an organization project board.Irreversible.
system:update_settingsUpdate system settingsUpdates system-level configuration.Admin-only action.
system:update_webhookUpdate system webhookUpdates a system webhook.Review URL/secret changes.
system:run_maintenance_taskRun maintenance taskRuns a system maintenance task.May impact performance or data.
system:update_site_announcementUpdate site announcementUpdates the site announcement.Review publish timing and content.
system:cleanup_expired_packagesCleanup expired packagesCleans up expired package records.History is removed.
system:adopt_repositoriesAdopt repositoriesAdopts existing repositories into system management.Impacts ownership and paths.
auth_source:createCreate auth sourceCreates an auth source (LDAP/OAuth).Affects login methods.
auth_source:updateUpdate auth sourceUpdates auth source configuration.Validate configuration changes.
auth_source:deleteDelete auth sourceDeletes an auth source configuration.Related login method stops working.
system_app:createCreate system appCreates a system-level application.Scopes affect the whole instance.
system_app:deleteDelete system appDeletes a system-level application.Grants are revoked.
system_app:updateUpdate system appUpdates a system-level application.Watch for callback changes.
system_webhook:createCreate system webhookCreates a system webhook.Affects global event delivery.
system_webhook:deleteDelete system webhookDeletes a system webhook.Global delivery stops.
system_webhook:updateUpdate system webhookUpdates a system webhook.Review URL/secret changes.
system_default_webhook:createCreate default webhookCreates a system default webhook.Inherited by new repositories.
system_default_webhook:deleteDelete default webhookDeletes a system default webhook.No longer inherited.
system_default_webhook:updateUpdate default webhookUpdates a system default webhook.Affects new repository defaults.
system_actions_variable:createCreate system Actions variableCreates a system Actions variable.Variable value is plaintext.
system_actions_variable:deleteDelete system Actions variableDeletes a system Actions variable.Workflows may fail afterward.
system_actions_variable:updateUpdate system Actions variableUpdates a system Actions variable.Track value changes.
license:activateActivate licenseActivates the system license.Records license changes.
license:updateUpdate licenseUpdates the system license.Review expiry and entitlement changes.
license:deleteDelete licenseDeletes the system license.Features may be limited afterward.

Conclusion

The new Audit Log feature brings enhanced security and operational transparency to the Gitea Enterprise. By offering an exhaustive report of who did what and when within your Gitea environment, it helps preventing unauthorized operations and ensures compliance with the necessary data protection regulations.