GH-100 · Domain 3: Implement secure software development and compliance · 30% of the exam
Task 3.2: Enable repository security features
Turning on Secret Protection, push protection, code scanning and Dependabot at scale with security configurations, security advisories, and a plan for responding to a security incident.
Study it
Secret Protection, push protection, code scanning and Dependabot with security configurations
Lesson coming
Security advisories and a security incident response plan
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
An enterprise pays for GitHub Secret Protection with volume licenses, and none are left for the people who commit to one organization's private repositories. An organization owner applies a custom security configuration that enables secret scanning, push protection and Dependabot alerts to all of the organization's 120 private repositories and 15 public repositories. What is the result?
AAll three features are enabled on every repository, and the configuration is attached to all 135
BThe configuration is attached only to the public repositories, and the private ones get Dependabot alerts alone
CThe configuration is attached to the public repositories and to as many private ones as licenses can be found for
DThe configuration is attached to the public repositories, and the private ones get none of its features
Show the answer and why
AAll three features are enabled on every repository, and the configuration is attached to all 135
Incorrect
Without available licenses, Secret Protection features aren't enabled on private repositories and the configuration isn't attached to them.
BThe configuration is attached only to the public repositories, and the private ones get Dependabot alerts alone
Correct
Only the free features reach the private repositories, and a partly applied configuration isn't attached to them.
CThe configuration is attached to the public repositories and to as many private ones as licenses can be found for
Incorrect
Short of licenses, the configuration is applied successfully only to public repositories.
DThe configuration is attached to the public repositories, and the private ones get none of its features
Incorrect
Dependabot alerts don't need Secret Protection, so they are still enabled on the private repositories.
With volume licenses, applying a configuration that includes Advanced Security features without enough licenses succeeds only on public repositories. On private and internal repositories, the free features in the configuration are enabled, the paid features aren't, and the configuration isn't attached because only some of its features took effect. Dependabot alerts are available on every plan without a Secret Protection purchase, while secret scanning and push protection on private repositories come with GitHub Secret Protection.
A company's enterprise has GitHub Secret Protection. Security wants alerts when employees leak credentials in public repositories anywhere on GitHub, including personal projects outside the enterprise, with each leak attributed to the person who committed it. Which setup gives this?
AAn organization owner turns on public monitoring in each organization's security overview
BPush protection enabled for every repository in the enterprise
CVerifying the company's domain, which raises the alerts with no further setup
DPublic monitoring enabled by an enterprise owner, with the company domain verified
Show the answer and why
AAn organization owner turns on public monitoring in each organization's security overview
Incorrect
Public monitoring is enabled and viewed at the enterprise level only.
BPush protection enabled for every repository in the enterprise
Incorrect
Push protection blocks secrets pushed to the repositories where it's enabled; it doesn't watch other public repositories.
CVerifying the company's domain, which raises the alerts with no further setup
Incorrect
A verified domain improves attribution, but public monitoring itself must be enabled.
DPublic monitoring enabled by an enterprise owner, with the company domain verified
Correct
Public monitoring detects secrets in public repositories that are attributed to members or to verified-domain emails.
Public monitoring detects secrets that enterprise members leak in public repositories outside the enterprise. An enterprise owner enables it, with Secret Protection or Advanced Security in place, and reviews alerts on the enterprise-level Public monitoring page. Alerts are attributed to enterprise members or to users whose email matches a verified domain, so a verified domain gives fuller attribution.
A platform team finds a vulnerability in acme-auth, an internal library that repositories in the enterprise's 15 organizations depend on. It wants Dependabot alerts raised in every affected repository in the enterprise, without disclosing the vulnerability publicly. The enterprise has GitHub Code Security. What should the team use?
AA repository security advisory drafted and published in the library's internal repository
BA new advisory submitted to the GitHub Advisory Database
CAn innersource advisory for the library, which is scoped to the enterprise
DDependabot version updates in each affected repository that bump acme-auth
Show the answer and why
AA repository security advisory drafted and published in the library's internal repository
Incorrect
Repository security advisories are for public repositories, and publishing one discloses the vulnerability.
BA new advisory submitted to the GitHub Advisory Database
Incorrect
Advisories in the GitHub Advisory Database are global advisories for the open source world, not private to one enterprise.
CAn innersource advisory for the library, which is scoped to the enterprise
Correct
Innersource advisories stay private to one enterprise and send Dependabot alerts to its affected repositories.
DDependabot version updates in each affected repository that bump acme-auth
Incorrect
Version updates keep dependencies current; they don't raise alerts about a vulnerability.
Innersource advisories let an enterprise alert its own repositories to internally discovered vulnerabilities and ship fixes with Dependabot. They aren't publicly visible, they propagate alerts only to repositories inside the enterprise, and they need an active GitHub Code Security or GitHub Advanced Security license. Repository security advisories serve public repositories and are published openly.
An enterprise with personal accounts uses SAML single sign-on. The enterprise and its organizations keep the default settings for approving fine-grained personal access tokens. During an incident, an enterprise owner revokes SSO authorizations for the fine-grained personal access token type, for all members. Lena's fine-grained token had the payments organization as its resource owner. What happens to that token?
AIt loses access; setting the organization as its resource owner again needs an organization owner's approval
BIt is deleted, and she must create a new token and have it approved before it can reach the organization
CIt loses access for good, and like a revoked classic token it can't be used with that organization again
DIt loses access until she sets the organization as resource owner again, which restores its access at once
Show the answer and why
AIt loses access; setting the organization as its resource owner again needs an organization owner's approval
Correct
Revoking removes the organization as resource owner, and by default organizations require approval of fine-grained tokens.
BIt is deleted, and she must create a new token and have it approved before it can reach the organization
Incorrect
Revoking SSO authorizations doesn't delete credentials; deleting them is available only with Enterprise Managed Users.
CIt loses access for good, and like a revoked classic token it can't be used with that organization again
Incorrect
For fine-grained tokens the organization is removed as resource owner, and users can change the resource owner back.
DIt loses access until she sets the organization as resource owner again, which restores its access at once
Incorrect
By default organizations require approval of fine-grained tokens, so the token waits for an organization owner.
Revoking SSO authorizations doesn't delete credentials. For personal access tokens (classic) and SSH keys, a revoked authorization can't be restored, so users create new credentials. Fine-grained tokens work differently: the organization is removed as the token's resource owner, and the user can change the resource owner back, which may require approval. By default, organizations require approval of fine-grained personal access tokens, so the token waits for an organization owner before it reaches the organization's resources again.
During a major incident, an enterprise with personal accounts and enterprise-level SAML single sign-on turns on single sign-on lockdown while it investigates. What does the lockdown do?
AMembers can't sign in to their GitHub accounts at all until the lockdown ends
BExisting SSO sessions stay valid, and only new SSO sign-ins are blocked
CSSO-protected resources and token authorization are blocked for all but enterprise owners
DEnterprise owners are locked out as well, so only GitHub Support can end the lockdown for them
Show the answer and why
AMembers can't sign in to their GitHub accounts at all until the lockdown ends
Incorrect
That is the effect with managed users; personal accounts can still sign in and reach unprotected resources.
BExisting SSO sessions stay valid, and only new SSO sign-ins are blocked
Incorrect
All existing active SSO sessions are terminated when the lockdown starts.
CSSO-protected resources and token authorization are blocked for all but enterprise owners
Correct
The lockdown blocks SSO for everyone except enterprise owners, who can reauthenticate.
DEnterprise owners are locked out as well, so only GitHub Support can end the lockdown for them
Incorrect
Enterprise owners can reauthenticate with SSO during the lockdown and disable it themselves.
Single sign-on lockdown temporarily blocks SSO for all users except enterprise owners. With personal accounts, users can still sign in to their accounts and reach non-protected resources, but they can't access SSO-protected resources or authorize tokens for SSO. All active SSO sessions end, and enterprise owners can reauthenticate.
An enterprise owner sets the Advanced Security policy so that GitHub Code Security isn't available to the research organization. The enterprise's Code Quality policies allow GitHub Code Quality for all organizations and let repository administrators enable it. A repository administrator in research then turns on Code Quality scans. Why is that possible?
ACode Quality is free for every repository, so no enterprise policy covers it
BRepository administrators aren't affected by Advanced Security policies
CCode Quality has its own enterprise policies, separate from the Advanced Security policies
DCode Quality is part of GitHub Secret Protection, which the policy left available
Show the answer and why
ACode Quality is free for every repository, so no enterprise policy covers it
Incorrect
Code Quality is a paid product with its own enterprise policies.
BRepository administrators aren't affected by Advanced Security policies
Incorrect
Advanced Security policies control what repository administrators can enable.
CCode Quality has its own enterprise policies, separate from the Advanced Security policies
Correct
Advanced Security policies don't control access to Code Quality.
DCode Quality is part of GitHub Secret Protection, which the policy left available
Incorrect
Code Quality is purchased separately from the Advanced Security products.
GitHub Code Quality is purchased separately from GitHub Advanced Security and has its own standalone enterprise policies: organization access and a repository admin policy. Policies for Advanced Security don't control access to Code Quality, so restricting Code Security for an organization leaves Code Quality as its own policies set it.
Dependabot must update private npm packages that the organization publishes to GitHub Packages. The administrator doesn't want to create or rotate any personal access token for this. What should be done?
AStore a personal access token as a Dependabot secret for the registry
BMake the packages public so that Dependabot can read them
CAdd the registry and a token to each repository's dependabot.yml
DGrant the repository Read access in each package's settings
Show the answer and why
AStore a personal access token as a Dependabot secret for the registry
Incorrect
That needs a personal access token that someone must create and rotate.
BMake the packages public so that Dependabot can read them
Incorrect
Dependabot can read private packages that grant the repository access.
CAdd the registry and a token to each repository's dependabot.yml
Incorrect
GitHub-hosted registries don't need manual configuration or tokens for this.
DGrant the repository Read access in each package's settings
Correct
Dependabot then uses its GITHUB_TOKEN to pull the private packages.
Dependabot can authenticate to private GitHub Packages and Container registry packages with the same access grants that GitHub Actions workflows use. If a package grants the repository Read access in its settings, Dependabot uses its GITHUB_TOKEN to pull it, with no personal access token to create or rotate.
While preparing its incident response plan, an enterprise that already streams its audit log to a SIEM wants to be able to investigate API calls made by a compromised token. What else should an enterprise owner enable?
ANothing; every API request is part of the stream by default
BAPI request events in the enterprise's audit log settings
CA second stream to another provider for API traffic
DThe Git events export for the enterprise
Show the answer and why
ANothing; every API request is part of the stream by default
Incorrect
The stream doesn't include API request events until they are enabled.
BAPI request events in the enterprise's audit log settings
Correct
Enabling API request events adds security-relevant API requests to the stream.
CA second stream to another provider for API traffic
Incorrect
API requests are added with a setting, not with another stream.
DThe Git events export for the enterprise
Incorrect
Git events cover Git activity, not API requests.
By default the audit log stream doesn't include API request events. GitHub recommends enabling API request streaming, from the enterprise's audit log settings, so that unauthorized API access or data exfiltration by compromised tokens or apps can be investigated. Only security-relevant endpoints are streamed.