Skip to content

Security log and audit log

Last updated:

Codebahn keeps two separate logs. The security log covers your own account; the audit log covers an organization. Both record events as they happen. Rows cannot be changed once written, and neither log can be disabled.

Both logs are included on every plan, with their export, at no extra cost. Every account has a security log, and every organization has an audit log.

Your personal record of security-relevant activity on your own account. Only you, the account holder, can read it.

Open it under Settings > Security log.

Events recorded, grouped by category:

  • Sign-in and session: user.login, user.failed_login, user.logout, user.resume_session, user.email_code_requested, user.login_rate_limit_exceeded, user.two_factor_challenge_failure, user.two_factor_recover, user.create
  • Two-factor authentication: two_factor_authentication.add_factor, two_factor_authentication.remove_factor, two_factor_authentication.enabled, two_factor_authentication.disabled, two_factor_authentication.recovery_codes_regenerated
  • Security keys: security_key.register, security_key.remove
  • Credentials: personal_access_token.create, personal_access_token.credential_regenerated, personal_access_token.destroy, public_key.create, public_key.delete
  • Email: user.add_email, user.remove_email, user.change_primary_email, user.verify_email, user.unverify_email. A confirmed address can receive sign-in codes, so confirming one is recorded as its own event.
  • OAuth authorisations: oauth_authorization.create, oauth_authorization.destroy
  • Export: user.audit_log_export

The security log also shows three kinds of event that are not about your account itself.

  • Your personal space: the repository and configuration events listed under Audit log, for repositories you own yourself. Actions secrets and variables on your account appear as user.create_actions_secret, user.update_actions_secret, user.remove_actions_secret and the _variable equivalents.
  • Organization events that affect you: for example being added to or removed from an organization or a team. The same row is in that organization’s audit log.
  • Deleting an organization: org.delete is recorded in the security log of the owner who deleted it, because the organization’s own audit log is deleted with it.

Rows are removed automatically 90 days after they are written. There is no way to extend this. Organization events that affect you belong to the organization’s audit log and stay for its one year.

An organization-wide record of changes made by its members. Only organization owners can read it.

Open it under the organization’s Settings > Audit log.

Events recorded, grouped by category:

  • Membership: org.add_member, org.remove_member, org.invite_member, org.cancel_invitation, org.update_member, team.add_member, team.remove_member
  • Teams: team.create, team.destroy, team.rename, team.update_permission, team.add_repository, team.remove_repository
  • Repositories: repo.create, repo.rename, repo.destroy, repo.transfer_start, repo.transfer, repo.transfer_outgoing, repo.actions_enabled, repo.actions_disabled
  • Configuration: deploy keys (public_key.create, public_key.delete with a repository), hook.create, hook.config_changed, hook.destroy, protected_branch.create, protected_branch.update, protected_branch.destroy, Actions secrets and variables (org.create_actions_secret, org.update_actions_secret, org.remove_actions_secret and the _variable equivalents; also repo. prefixed variants for a single repository)
  • Organisation: org.create, org.rename, org.enable_two_factor_requirement, org.disable_two_factor_requirement, org.create_export, org.download_export, org.delete_export, org.audit_log_export

Deleting an organization is not in this list: its audit log is deleted with it. See Security log.

The audit log records who made each change, what changed, and when.

Rows are removed automatically one year after they are written. There is no way to extend this.

The logs record sign-ins, credentials, and changes to who can do what. They do not record reads or everyday work: viewing, cloning, fetching, or pushing a repository, issues, pull requests, releases, packages, and CI runs. Opening either log is not recorded either; exporting it is. Git history records every push.

Each row in both logs records the country the request came from, not the IP address. Neither log stores an IP address or user agent, so neither the pages nor the exports can show one. Rows for actions taken by Codebahn staff carry no country.

The country is looked up inside Codebahn when the row is written, using the DB-IP IP to Country Lite database (CC BY 4.0). No address is sent to anyone to look it up.

Our server logs do hold IP addresses and user agents, for 30 days. If you need them for an incident, ask us.

Both logs can be exported from their respective pages, as CSV or JSON, covering the retention window currently stored. Codebahn does not offer audit log streaming; export a snapshot when you need one.

The export uses GitHub’s field names. The country is actor_location.country_code: a column in CSV, a nested object in JSON.