GH-100 · Domain 3: Implement secure software development and compliance · 30% of the exam
Task 3.1: Configure security policies and rulesets
Enterprise and organization policies and what they override, hardening an enterprise with IP allow lists and related controls, and audit logging with retention, export and streaming.
Study it
Enterprise and organization policies, and hardening an enterprise
Lesson coming
Audit log search, retention, export and streaming
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's security standard says that deploy keys must not be used in any of its 30 organizations. Three repositories still run release automation that authenticates with deploy keys, and those releases must not be interrupted. What should the enterprise owner do?
AMove the three automations to a GitHub App first, then set the enterprise's deploy keys policy to disabled
BSet the enterprise's deploy keys policy to disabled now; existing keys keep working and only new keys are blocked
CLet organization owners administer the setting, and have each owner disable deploy keys in their organization
DDisable the policy, then have the three repository administrators add new read-only deploy keys
Show the answer and why
AMove the three automations to a GitHub App first, then set the enterprise's deploy keys policy to disabled
Correct
Disabling the policy disables existing deploy keys everywhere, so the automation has to move before the change.
BSet the enterprise's deploy keys policy to disabled now; existing keys keep working and only new keys are blocked
Incorrect
Disabling the policy disables the existing deploy keys in all repositories, which would stop the releases.
CLet organization owners administer the setting, and have each owner disable deploy keys in their organization
Incorrect
Disabling deploy keys in an organization also disables the existing keys in its repositories.
DDisable the policy, then have the three repository administrators add new read-only deploy keys
Incorrect
Once the setting is disabled, deploy keys are disabled in all of the enterprise's repositories.
The enterprise deploy keys policy can allow deploy keys, restrict their creation, or let organization owners decide. Changing the setting to disabled, at the enterprise or in an organization, disables existing deploy keys, and scripts, apps or workflows that use them stop working. GitHub suggests a GitHub App when fine-grained control over permissions is needed, so the automation should move to an app before the policy changes.
An enterprise turns on its IP allow list with the office ranges. A vendor's GitHub App, installed on the enterprise's organizations and running on the vendor's servers, starts getting its API calls refused. The vendor lists the app's server addresses in the app's own IP allow list settings and changes them from time to time; the security team doesn't want to track those changes. What should an enterprise owner do?
ANothing on GitHub, because IP allow lists don't apply to GitHub App installation tokens
BGet the vendor's current addresses and have each organization owner add them to their organization's list
CAdd an entry for 0.0.0.0/0 described as the vendor's app
DEnable IP allow list configuration for installed GitHub Apps
Show the answer and why
ANothing on GitHub, because IP allow lists don't apply to GitHub App installation tokens
Incorrect
The list does restrict installation tokens of apps installed on organizations.
BGet the vendor's current addresses and have each organization owner add them to their organization's list
Incorrect
Entries added by hand aren't updated when the vendor changes the app's addresses.
CAdd an entry for 0.0.0.0/0 described as the vendor's app
Incorrect
A range that covers the entire address space can't be added to the list.
DEnable IP allow list configuration for installed GitHub Apps
Correct
The app's own allow list is added to the enterprise's and updated automatically when the vendor changes it.
An IP allow list controls web, API and Git access, including GitHub App installation tokens. Enterprise owners can choose to add the IP addresses that the creators of installed GitHub Apps configure for their apps; those entries are updated automatically when an app's addresses change and can't be edited by hand.
An enterprise streams its audit log to Amazon S3. The stream was paused for maintenance on 4 November and resumed today, 14 November. The compliance team needs every audit event and every Git event from the whole pause in the bucket. What should the enterprise owner do?
ANothing, because a paused stream buffers every event and sends them all when it resumes
BExport the audit events and the Git events for 4 to 7 November from the audit log and add them to the bucket
CExport the audit events for 4 to 7 November from the audit log; the Git events from those days can't be recovered
DDelete the stream and set up a new one, which first sends the past 180 days of events
Show the answer and why
ANothing, because a paused stream buffers every event and sends them all when it resumes
Incorrect
The buffer covers seven days; after a longer pause the stream resumes from one week before the current time.
BExport the audit events and the Git events for 4 to 7 November from the audit log and add them to the bucket
Incorrect
The audit log keeps Git events for only seven days, so those from 4 to 7 November are no longer there.
CExport the audit events for 4 to 7 November from the audit log; the Git events from those days can't be recovered
Correct
Audit events stay for 180 days but Git events for seven, and the stream restarted from one week back.
DDelete the stream and set up a new one, which first sends the past 180 days of events
Incorrect
A stream exports events from the time it is enabled onwards.
A paused stream keeps a seven-day buffer; if it stays paused longer, it resumes from a point one week before the current time, so events from the start of a ten-day pause are not streamed. The enterprise audit log lists events from the last 180 days, which can be exported, but it retains Git events for only seven days.
An enterprise with managed users enforces a repository forking policy that lets people fork private and internal repositories to user accounts and to organizations. Its repository creation policy also has "Block the creation of user namespace repositories" selected. Developers report that they can't fork an internal repository into their own account. What explains this?
AManaged user accounts can never fork repositories, whatever the enterprise's policies allow
BEach organization owner must also turn forking on, because the enterprise policy only sets a ceiling
CInternal repositories can only be forked into organizations, never into user accounts
DBlocking user namespace repositories also blocks forks into user accounts
Show the answer and why
AManaged user accounts can never fork repositories, whatever the enterprise's policies allow
Incorrect
Managed users can fork private or internal repositories in the enterprise, as the enterprise's policy allows.
BEach organization owner must also turn forking on, because the enterprise policy only sets a ceiling
Incorrect
An enforced enterprise forking policy applies across all organizations owned by the enterprise.
CInternal repositories can only be forked into organizations, never into user accounts
Incorrect
The forking policy can allow forks of private and internal repositories into user accounts.
DBlocking user namespace repositories also blocks forks into user accounts
Correct
With user namespace repositories blocked, members can't fork into their user accounts.
Enterprise owners can allow forking of private and internal repositories, never allow it, or let organization owners decide, and can choose where forks may go. With Enterprise Managed Users, if the repository creation policy prevents members from creating repositories owned by their user accounts, members can't fork into their user accounts regardless of the forking policy.
An enterprise owner is setting up audit log streaming to a company Amazon S3 bucket. Which two statements about the stream are true? (Choose TWO.)
AIf the daily health check finds the stream misconfigured, it must be fixed within six days
BThe stream carries audit events only, so Git events still need a manual export
CEvents arrive in the bucket as uncompressed CSV files, one file per hour
DIt can use OpenID Connect, so no long-lived AWS keys are stored on GitHub
EOnly the organizations whose owners opt in are included in the stream
Show the answer and why
AIf the daily health check finds the stream misconfigured, it must be fixed within six days
Correct
A misconfigured stream must be fixed within six days to avoid audit log events being dropped.
BThe stream carries audit events only, so Git events still need a manual export
Incorrect
The stream contains both audit events and Git events across the enterprise.
CEvents arrive in the bucket as uncompressed CSV files, one file per hour
Incorrect
Streamed audit logs are sent as compressed JSON files.
DIt can use OpenID Connect, so no long-lived AWS keys are stored on GitHub
Correct
Streaming to S3 can use OIDC instead of access keys, to avoid storing long-lived secrets on GitHub.
EOnly the organizations whose owners opt in are included in the stream
Incorrect
The stream exports data for all of the organizations in the enterprise.
Audit log streaming exports audit and Git events for every organization in the enterprise as compressed JSON files. Streaming to S3 can authenticate with access keys or, to avoid storing long-lived secrets on GitHub, with OpenID Connect. A health check runs every 24 hours, and a misconfigured stream must be fixed within six days to avoid dropped events.
A new enterprise account has not changed any of its policies. Who decides the base permission for members of each of its organizations?
AGitHub sets Read as the base permission everywhere until an enterprise owner changes it
BEnterprise owners alone, because enterprise policies apply from the start
CBilling managers of the enterprise
DEach organization's owners, because no enterprise policy is enforced by default
Show the answer and why
AGitHub sets Read as the base permission everywhere until an enterprise owner changes it
Incorrect
No enterprise policy is enforced by default, so nothing is set for the organizations.
BEnterprise owners alone, because enterprise policies apply from the start
Incorrect
By default no enterprise policies are enforced.
CBilling managers of the enterprise
Incorrect
Billing managers manage billing, not organization permissions.
DEach organization's owners, because no enterprise policy is enforced by default
Correct
A policy that isn't enforced lets organization owners configure it for their organization.
Each enterprise policy controls the options available at the organization level. You can leave a policy unenforced, which lets organization owners configure it, or enforce an option for every organization. By default, no enterprise policies are enforced.
To keep company information out of personal mailboxes, an enterprise owner wants members to receive email notifications about the enterprise's organizations only at company addresses. What must she do before she can turn on the restriction?
AVerify at least one company domain for the enterprise
BRequire two-factor authentication for every member
CAsk each organization owner to enable the restriction first
DRemove all personal email addresses from members' accounts
Show the answer and why
AVerify at least one company domain for the enterprise
Correct
Email notifications can only be restricted after at least one domain is verified or approved.
BRequire two-factor authentication for every member
Incorrect
2FA doesn't decide which addresses receive notifications.
CAsk each organization owner to enable the restriction first
Incorrect
Enterprise owners restrict notifications for the enterprise; organization owners then can't disable it.
DRemove all personal email addresses from members' accounts
Incorrect
Members add and verify an address in an approved domain; owners don't edit their accounts.
Enterprise owners can restrict email notifications so that members can only use an address in a verified or approved domain to receive notifications about the enterprise's organizations. At least one domain must be verified or approved first, and organization owners can't disable the restriction for their organization.
During an access review, an enterprise owner wants the audit log to show the source IP address of the actor behind each event, in the enterprise and in its organizations. What should she do?
ANothing; IP addresses are always shown in audit log events
BExport the audit log, which adds IP addresses to the file
CTurn on an IP allow list for the enterprise, so that each event records the address it came from
DTurn on the display of IP addresses in the enterprise's audit log settings
Show the answer and why
ANothing; IP addresses are always shown in audit log events
Incorrect
Source IP addresses are shown only after the setting is turned on.
BExport the audit log, which adds IP addresses to the file
Incorrect
Exporting doesn't add IP addresses that the log doesn't display.
CTurn on an IP allow list for the enterprise, so that each event records the address it came from
Incorrect
An IP allow list restricts which addresses can reach the enterprise; it doesn't make the audit log display source IP addresses.
DTurn on the display of IP addresses in the enterprise's audit log settings
Correct
IP addresses then appear for new and existing events, for the enterprise and its organizations.
Enterprise owners can display IP addresses in the audit log. When they do, IP addresses for new and existing events appear in the enterprise's audit log and in the audit log of every organization the enterprise owns, with some exceptions such as certain API request events.