Skip to content

GH-500 · Domain 2: Configure and use Secret Protection (formerly secret scanning) · 19% of the exam

Task 2.3: Manage and respond to Secret Protection alerts

How a secret scanning alert is created, filtered and closed, what to do first when a real credential leaks, and what each close reason says about the secret.

Study it

  • The secret scanning alert lifecycle and remediating a leaked credential

    Lesson coming

Sample questions

Try each one before opening the answer. Every option is explained, with the GitHub documentation page that proves it.

Question 1 · choose 1

Secret scanning finds an active production API key for the company's payment provider in a private repository. The payments team owns the provider account, and a nightly settlement job uses the key. The security lead wants the exposure closed quickly without a surprise outage of the job. What should the team do?

  1. ACreate a new key with the same permissions, move the job to it, then revoke the leaked key
  2. BRevoke the leaked key at once and issue a new one after the nightly job fails
  3. CRewrite the Git history to remove the key, then keep using it
  4. DPlan the rotation with the payments team for next quarter, since the repository is private
Show the answer and why
  • ACreate a new key with the same permissions, move the job to it, then revoke the leaked key

    Correct

    Revoking quickly is the priority; switching the job to a new key first avoids the downtime.

  • BRevoke the leaked key at once and issue a new one after the nightly job fails

    Incorrect

    That closes the exposure but causes the outage the lead wants to avoid.

  • CRewrite the Git history to remove the key, then keep using it

    Incorrect

    Removing a secret from the code or history doesn't stop it being exploited; it must be revoked.

  • DPlan the rotation with the payments team for next quarter, since the repository is private

    Incorrect

    An active production credential is high risk even in a private repository, so it calls for quick revocation.

Treat any committed secret as compromised. An active secret or a production credential is high risk, so revoking it is the priority; to avoid downtime, first generate a new secret with the same permissions, make the application use it, and then revoke the old one. Removing the secret from the code or the history doesn't prevent it from being exploited, and a planned, unhurried rotation fits only lower-risk secrets, such as inactive or test credentials.

Question 2 · choose 1

A security analyst filters a repository's secret scanning alerts with validity:active to work on live credentials first. Only GitHub tokens appear, although the list also holds alerts for several cloud providers' keys. What explains this?

  1. ACloud provider keys are always reported to the provider instead of the repository
  2. BValidity applies only to GitHub tokens unless validity checks are enabled
  3. CThe validity filter works only in the organization's security overview
  4. DCloud provider keys are always marked inactive after 30 days
Show the answer and why
  • ACloud provider keys are always reported to the provider instead of the repository

    Incorrect

    Partner alerts apply to public repositories; these alerts are in the repository list.

  • BValidity applies only to GitHub tokens unless validity checks are enabled

    Correct

    Without validity checks, only GitHub tokens get a validity status.

  • CThe validity filter works only in the organization's security overview

    Incorrect

    The filter is available on the repository alert list.

  • DCloud provider keys are always marked inactive after 30 days

    Incorrect

    There is no such rule; validity comes from checks with the provider.

The validity filter narrows alerts by the validity status of their secrets. By default GitHub checks the validity of GitHub tokens only; to get statuses for partner patterns, validity checks have to be enabled for the repository or through a security configuration.

Question 3 · choose 1

Where does a developer find secret scanning alerts for passwords found by AI-detected secrets?

  1. AOnly in the organization's audit log
  2. BIn the Dependabot alerts list
  3. CIn the code scanning alerts list
  4. DIn the Generic alerts list
Show the answer and why
  • AOnly in the organization's audit log

    Incorrect

    Alerts are shown in the repository.

  • BIn the Dependabot alerts list

    Incorrect

    Dependabot lists vulnerable dependencies.

  • CIn the code scanning alerts list

    Incorrect

    Code scanning lists code findings.

  • DIn the Generic alerts list

    Correct

    Generic patterns and AI-detected secrets have their own list.

GitHub separates secret scanning alerts into a Default list (supported and custom patterns) and a Generic list (generic patterns and AI-detected secrets such as passwords). You toggle to the Generic list from the default view.

Question 4 · choose 1

A security lead wants the secret scanning alert list to show only alerts from repositories whose data_sensitivity custom property is set to high. Which qualifier does this?

  1. Aprops:data_sensitivity:high
  2. Btopic:data_sensitivity-high
  3. Cteam:data_sensitivity-high
  4. Drepo:data_sensitivity:high
Show the answer and why
  • Aprops:data_sensitivity:high

    Correct

    props shows alerts for repositories with a given custom property value.

  • Btopic:data_sensitivity-high

    Incorrect

    topic matches repository topics, not custom properties.

  • Cteam:data_sensitivity-high

    Incorrect

    team shows alerts owned by members of a team.

  • Drepo:data_sensitivity:high

    Incorrect

    repo filters by repository name.

The props qualifier displays alerts for repositories with a specific custom property value, for example props:data_sensitivity:high. Other qualifiers filter by repository topic, team, repository name, provider, secret type, validity or resolution.

Question 5 · choose 1

How can a security lead make one developer responsible for fixing a secret scanning alert?

  1. AMention the developer in the repository's README file
  2. BAdd the developer to the bypass list
  3. CAssign the alert to the developer
  4. DClose the alert as won't fix and reopen it
Show the answer and why
  • AMention the developer in the repository's README file

    Incorrect

    That doesn't assign the alert.

  • BAdd the developer to the bypass list

    Incorrect

    The bypass list is about push protection.

  • CAssign the alert to the developer

    Correct

    Alerts can be assigned to users with write access.

  • DClose the alert as won't fix and reopen it

    Incorrect

    That doesn't assign anyone.

In the alert view, the Assignees control assigns a secret scanning alert to someone with write access to fix.

Question 6 · choose 1

According to GitHub, how should a team regard a secret that was committed to a repository?

  1. AAs safe, if the repository is private
  2. BAs compromised
  3. CAs safe if nobody has cloned the repository
  4. DAs safe once the commit is deleted
Show the answer and why
  • AAs safe, if the repository is private

    Incorrect

    Private repositories don't make a committed secret safe.

  • BAs compromised

    Correct

    Once committed, a secret should be considered compromised.

  • CAs safe if nobody has cloned the repository

    Incorrect

    You can't be sure of that.

  • DAs safe once the commit is deleted

    Incorrect

    Copies may remain in history and clones.

Once a secret has been committed to a repository, you should consider it compromised: verify its validity where possible, revoke or rotate it, update services that use it, and check the provider's logs for unauthorized activity.

Practise domain 2 →Practise all domains →