GH-100 practice question 10 of 15

Why would a GitHub App be favored over a machine account for automation tasks?

Full set: 65 questions
Answer options
A: Machine accounts are required for webhook delivery.
B: GitHub Apps provide a higher rate limit ceiling than using a personal access token on a machine account, when they use an install token and are owned by a GitHub Enterprise Cloud licensed enterprise. Correct answer
C: GitHub Apps are limited to a single repository.
D: Machine accounts are easier to audit than GitHub Apps.
Correct Answer:
B. GitHub Apps provide a higher rate limit ceiling than using a personal access token on a machine account, when they use an install token and are owned by a GitHub Enterprise Cloud licensed enterprise.
Explanation

GitHub Apps are favored for automation primarily due to their superior scalability, security, and management features. A key advantage, particularly for enterprise-level automation, is the higher API rate limit. For an installation on a GitHub Enterprise Cloud organization, a GitHub App's installation token provides a rate limit of 15,000 requests per hour. This is significantly higher than the 5,000 requests per hour limit applied to a personal access token (PAT) used by a machine account. This higher ceiling allows for more intensive and scalable automation workflows without being throttled. Additionally, GitHub Apps offer granular permissions and short-lived tokens, enhancing security and auditability over the broad permissions and long-lived nature of PATs.

Why Incorrect

A. Webhooks are a core feature for many integrations, including GitHub Apps, and are not a specific requirement for machine accounts.
C. GitHub Apps are designed to be installed across multiple repositories or an entire organization, which is a key advantage over single-repository solutions.
D. GitHub Apps are easier to audit because they have a distinct identity and granular permissions, making their actions clearly attributable in audit logs.

References

1. GitHub Docs

"Rate limits for GitHub Apps." This document explicitly states

"The rate limit for authenticated requests to the REST API from a GitHub App installation is 15

000 requests per hour if the installation is on a GitHub Enterprise Cloud organization."

Source: https://docs.github.com/en/apps/creating-github-apps/registering-a-github-app/rate-limits-for-github-apps (See section: "Rate limits for GitHub App installations on GitHub Enterprise Cloud")

2. GitHub Docs

"Rate limits for the REST API." This document confirms the standard limit for user accounts. "For authenticated requests

the rate limit is 5

000 requests per hour." This applies to personal access tokens used by machine accounts.

Source: https://docs.github.com/en/rest/overview/rate-limits-for-the-rest-api (See section: "Primary rate limit for authenticated users")

3. GitHub Docs

"About creating GitHub Apps." This page details the benefits of GitHub Apps over other methods

including better security through granular permissions and better scalability

which implicitly supports the idea that they are easier to manage and audit.

Source: https://docs.github.com/en/apps/creating-github-apps/about-creating-github-apps/about-creating-github-apps (See section: "Benefits of GitHub Apps")

Scroll to Top