我们经常发布文档更新,此页面的翻译可能仍在进行中。有关最新信息,请访问英文文档。如果此页面上的翻译有问题,请告诉我们

Reviewing your security log

You can review the security log for your user account to better understand actions you've performed and actions others have performed that involve you.

本文内容

此文档对您有帮助吗?

帮助我们创建出色的文档!

所有 GitHub 文档都是开源的。看到错误或不清楚的内容了吗?提交拉取请求。

做出贡献

或, 了解如何参与。

Accessing your security log

The security log lists all actions performed within the last 90 days.

  1. 在任何页面的右上角,单击您的个人资料照片,然后单击 Settings(设置)

    用户栏中的 Settings 图标

  2. In the user settings sidebar, click Security log.

    Security log tab

Searching your security log

日志列出每个操作的以下信息:

  • 执行操作的仓库
  • 执行操作的用户
  • 执行的操作内容
  • 发生操作的国家/地区
  • 操作发生的日期和时间

请注意,无法使用文本搜索条目。 但是,您可以使用各种过滤器构建搜索查询。 查询日志时使用的许多运算符,如 -><,与在 GitHub 上搜索时的格式相同。 更多信息请参阅“在 GitHub 上搜索”。

基于操作搜索

使用操作限定符将操作限于特定类型的操作。 例如:

  • operation:access 查找其中资源被访问过的所有事件。
  • operation:authentication 查找其中执行了身份验证事件的所有事件。
  • operation:create 查找在其中创建了资源的所有事件。
  • operation:modify 查找在其中修改了现有资源的所有事件。
  • operation:remove 查找在其中删除的现有资源的所有事件。
  • operation:restore 查找在其中恢复了现有资源的所有事件。
  • operation:transfer 查找在其中转移了现有资源的所有事件。

基于仓库搜索

使用 repo 限定符将操作限于特定仓库。 例如:

  • repo:my-org/our-repo 会找到在 my-org 组织的 our-repo 仓库中发生的所有事件。
  • repo:my-org/our-repo repo:my-org/another-repo 会找到在 my-org 组织的 our-repoanother-repo 仓库中发生的所有事件。
  • -repo:my-org/not-this-repo 会排除在 my-org 组织的 not-this-repo 仓库中发生的所有事件。

请注意,您必须在 repo 限定符中包含帐户名称;仅搜索 repo:our-repo 将不起作用。

基于用户搜索

actor 限定符可将事件范围限于执行操作的人员。 例如:

  • actor:octocat 会找到 octocat 执行的所有事件。
  • actor:octocat actor:hubot 会找到 octocathubot 执行的所有事件。
  • -actor:hubot 会排除 hubot 执行的所有事件。

请注意,只能使用 GitHub 用户名,而不是个人的真实姓名。

Search based on the action performed

Category NameDescription
account_recovery_tokenContains all activities related to adding a recovery token.
billingContains all activities related to your billing information.
marketplace_agreement_signatureContains all activities related to signing the GitHub Marketplace Developer Agreement.
marketplace_listingContains all activities related to listing apps in GitHub Marketplace.
oauth_accessContains all activities related to OAuth 应用程序s you've connected with.
payment_methodContains all activities related to paying for your GitHub subscription.
profile_pictureContains all activities related to your profile picture.
projectContains all activities related to project boards.
public_keyContains all activities related to your public SSH keys.
repoContains all activities related to the repositories you own.
sponsorsContains all events related to GitHub 赞助者 and sponsor buttons (see "About GitHub 赞助者" and "Displaying a sponsor button in your repository")
two_factor_authenticationContains all activities related to two-factor authentication.
userContains all activities related to your account.

A description of the events within these categories is listed below.

The account_recovery_token category

ActionDescription
confirmTriggered when you successfully store a new token with a recovery provider.
recoverTriggered when you successfully redeem an account recovery token.
recover_errorTriggered when a token is used but GitHub is not able to validate it.

The billing category

ActionDescription
change_billing_typeTriggered when you change how you pay for GitHub.
change_emailTriggered when you change your email address.

The marketplace_agreement_signature category

ActionDescription
createTriggered when you sign the GitHub Marketplace Developer Agreement.

The marketplace_listing category

ActionDescription
approveTriggered when your listing is approved for inclusion in GitHub Marketplace.
createTriggered when you create a listing for your app in GitHub Marketplace.
delistTriggered when your listing is removed from GitHub Marketplace.
redraftTriggered when your listing is sent back to draft state.
rejectTriggered when your listing is not accepted for inclusion in GitHub Marketplace.

The oauth_access category

ActionDescription
createTriggered when you grant access to an OAuth 应用程序.
destroyTriggered when you revoke an OAuth 应用程序's access to your account.

The payment_method category

ActionDescription
clearTriggered when a payment method on file is removed.
createTriggered when a new payment method is added, such as a new credit card or PayPal account.
updateTriggered when an existing payment method is updated.

The profile_picture category

ActionDescription
updateTriggered when you set or update your profile picture.

The project category

ActionDescription
createTriggered when a project board is created.
renameTriggered when a project board is renamed.
updateTriggered when a project board is updated.
deleteTriggered when a project board is deleted.
linkTriggered when a repository is linked to a project board.
unlinkTriggered when a repository is unlinked from a project board.
project.accessTriggered when a project board's visibility is changed.
update_user_permissionTriggered when an outside collaborator is added to or removed from a project board or has their permission level changed.

The public_key category

ActionDescription
createTriggered when you add a new public SSH key to your GitHub account.
deleteTriggered when you remove a public SSH key to your GitHub account.

The repo category

ActionDescription
accessTriggered when you a repository you own is switched from "private" to "public" (or vice versa).
add_memberTriggered when a GitHub user is invited to have collaboration access to a repository.
add_topicTriggered when a repository owner adds a topic to a repository.
archivedTriggered when a repository owner archives a repository.
createTriggered when a new repository is created.
destroyTriggered when a repository is deleted.
disableTriggered when a repository is disabled (e.g., for insufficient funds).
enableTriggered when a repository is re-enabled.
remove_memberTriggered when a GitHub user is removed from a repository as a collaborator.
remove_topicTriggered when a repository owner removes a topic from a repository.
renameTriggered when a repository is renamed.
transferTriggered when a repository is transferred.
transfer_startTriggered when a repository transfer is about to occur.
unarchivedTriggered when a repository owner unarchives a repository.

The sponsors category

ActionDescription
repo_funding_link_button_toggleTriggered when you enable or disable a sponsor button in your repository (see "Displaying a sponsor button in your repository")
repo_funding_links_file_actionTriggered when you change the FUNDING file in your repository (see "Displaying a sponsor button in your repository")
sponsor_sponsorship_cancelTriggered when you cancel a sponsorship (see "Downgrading a sponsorship")
sponsor_sponsorship_createTriggered when you sponsor a developer (see "Sponsoring an open source contributor")
sponsor_sponsorship_preference_changeTriggered when you change whether you receive email updates from a sponsored developer (see "Managing your sponsorship")
sponsor_sponsorship_tier_changeTriggered when you upgrade or downgrade your sponsorship (see "Upgrading a sponsorship" and "Downgrading a sponsorship")
sponsored_developer_approveTriggered when your GitHub 赞助者 account is approved (see "Setting up GitHub 赞助者 for your user account")
sponsored_developer_createTriggered when your GitHub 赞助者 account is created (see "Setting up GitHub 赞助者 for your user account")
sponsored_developer_profile_updateTriggered when you edit your sponsored developer profile (see "Editing your profile details for GitHub 赞助者")
sponsored_developer_request_approvalTriggered when you submit your application for GitHub 赞助者 for approval (see "Setting up GitHub 赞助者 for your user account")
sponsored_developer_tier_description_updateTriggered when you change the description for a sponsorship tier (see "Changing your sponsorship tiers")
sponsored_developer_update_newsletter_sendTriggered when you send an email update to your sponsors (see "Contacting your sponsors")
waitlist_invite_sponsored_developerTriggered when you are invited to join GitHub 赞助者 from the waitlist (see "Setting up GitHub 赞助者 for your user account")
waitlist_joinTriggered when you join the waitlist to become a sponsored developer (see "Setting up GitHub 赞助者 for your user account")

The successor_invitation category

ActionDescription
acceptTriggered when you accept a succession invitation (see "Maintaining ownership continuity of your user account's repositories")
cancelTriggered when you cancel a succession invitation (see "Maintaining ownership continuity of your user account's repositories")
createTriggered when you create a succession invitation (see "Maintaining ownership continuity of your user account's repositories")
declineTriggered when you decline a succession invitation (see "Maintaining ownership continuity of your user account's repositories")
revokeTriggered when you revoke a succession invitation (see "Maintaining ownership continuity of your user account's repositories")

The two_factor_authentication category

ActionDescription
enabledTriggered when two-factor authentication is enabled.
disabledTriggered when two-factor authentication is disabled.

The user category

ActionDescription
add_emailTriggered when you add a new email address.
createTriggered when you create a new user account.
remove_emailTriggered when you remove an email address.
renameTriggered when you rename your account.
change_passwordTriggered when you change your password.
forgot_passwordTriggered when you ask for a password reset.
loginTriggered when you log in to GitHub.
failed_loginTriggered when you failed to log in successfully.
two_factor_requestedTriggered when GitHub asks you for your two-factor authentication code.
show_private_contributions_countTriggered when you publicize private contributions on your profile.
hide_private_contributions_countTriggered when you hide private contributions on your profile.
report_contentTriggered when you report an issue or pull request, or a comment on an issue, pull request, or commit.

The user_status category

ActionDescription
updateTriggered when you set or change the status on your profile. For more information, see "Setting a status."
destroyTriggered when you clear the status on your profile.

Exporting your security log

您可以将日志导出为 JSON 数据或逗号分隔值 (CSV) 文件。

导出按钮

若要过滤导出结果,请在使用 Export(导出)下拉菜单之前通过一个或多个支持的限定符进行搜索。

限定符示例值
actionteam.create
actoroctocat
用户codertocat
orgocto-org
repoocto-org/documentation
created2019-06-01

将日志导出为 JSON 或 CSV 后,您将在生成的文件中看到以下键和值。

示例值
actionteam.create
actoroctocat
用户codertocat
orgocto-org
repoocto-org/documentation
created_at1429548104000 (Timestamp shows the time since Epoch with milliseconds.)
data.hook_id245
data.events["issues", "issue_comment", "pull_request", "pull_request_review_comment"]
data.events_were["push", "pull_request", "issues"]
data.target_loginoctocat
data.old_userhubot
data.teamocto-org/engineering

此文档对您有帮助吗?

帮助我们创建出色的文档!

所有 GitHub 文档都是开源的。看到错误或不清楚的内容了吗?提交拉取请求。

做出贡献

或, 了解如何参与。