60 Practice Questions & Answers
When implementing GitHub Advanced Security for your organization, which feature provides real-time scanning for secrets in public repositories?
-
A
Secret scanning with push protection
✓ Correct
-
B
Code owners enforcement
-
C
Branch protection rules
-
D
Dependabot version updates
Explanation
Secret scanning with push protection is the GitHub Advanced Security feature that scans for secrets and prevents them from being committed to public repositories in real-time.
What is the primary purpose of GitHub's organization-level audit log?
-
A
To track all actions performed by members within the organization
✓ Correct
-
B
To enforce code review requirements
-
C
To automatically backup repository data
-
D
To manage billing and subscription details
Explanation
The organization audit log records all actions taken by organization members, providing visibility into administrative activities, security events, and user actions for compliance and security monitoring purposes.
You need to ensure that all pull requests in a critical repository require approval from at least one member of a designated team. Which GitHub feature should you configure?
-
A
CODEOWNERS file with required reviews
✓ Correct
-
B
Automatic merge settings
-
C
GitHub Apps webhooks
-
D
Issue templates
Explanation
A CODEOWNERS file combined with branch protection rules requiring code owner review ensures that pull requests must be approved by members of the designated team before merging.
When configuring SSO for GitHub Enterprise Cloud, which authentication method allows you to manage user access through your existing identity provider?
-
A
SAML single sign-on
✓ Correct
-
B
Personal access tokens
-
C
GitHub mobile app authentication
-
D
Two-factor authentication via SMS
Explanation
SAML (Security Assertion Markup Language) SSO integrates GitHub with external identity providers, enabling centralized user management and access control through your organization's existing authentication system.
Which of the following best describes the purpose of GitHub's outside collaborator role in an organization?
-
A
Provides full administrative access to organization settings
-
B
Allows members to manage billing and payment methods
-
C
Grants repository-level access without organization membership
✓ Correct
-
D
Enables access to private repositories at the organization level
Explanation
Outside collaborators can be granted access to specific repositories without becoming organization members, providing granular control over who can access particular projects while maintaining organization membership boundaries.
You are configuring a branch protection rule that requires status checks to pass before merging. Which scenario best requires this protection?
-
A
Blocking pull requests from draft status
-
B
Restricting repository access by time of day
-
C
Ensuring all CI/CD pipelines complete successfully before merge
✓ Correct
-
D
Preventing direct pushes to the main branch
Explanation
Status checks in branch protection rules require that continuous integration and other automated checks pass before a pull request can be merged, ensuring code quality and build integrity.
What is the maximum duration for a GitHub personal access token's validity in the classic token type?
-
A
90 days
-
B
1 year
-
C
No expiration limit
✓ Correct
-
D
30 days
Explanation
Classic personal access tokens (PATs) do not have an expiration limit and remain valid indefinitely until manually revoked, whereas fine-grained tokens support optional expiration dates.
When implementing GitHub's dependency management strategy, which tool automatically creates pull requests to update vulnerable dependencies?
-
A
Secret scanning
-
B
GitHub Actions
-
C
CodeQL
-
D
Dependabot
✓ Correct
Explanation
Dependabot automatically detects outdated and vulnerable dependencies in your repositories and creates pull requests to update them, helping maintain security and compatibility.
Your organization needs to enforce that all repositories have specific repository protection rules. Which administrative approach provides the most comprehensive enforcement?
-
A
Using organization-level settings and organization policies
✓ Correct
-
B
Implementing branch protection rules only at the team level
-
C
Creating a GitHub App for enforcement
-
D
Manually configuring each repository
Explanation
Organization-level settings and policies allow administrators to set default rules and enforcement mechanisms that apply across multiple repositories, ensuring consistent security practices organization-wide.
When configuring IP allow lists for your GitHub Enterprise instance, what is the primary security benefit?
-
A
Improves branch merge performance
-
B
Reduces the need for two-factor authentication
-
C
Automatically backs up all repositories
-
D
Restricts repository cloning to specific network ranges
✓ Correct
Explanation
IP allow lists restrict access to GitHub infrastructure from specific IP address ranges, adding a network-level security control that complements authentication mechanisms.
You need to audit which organization members have elevated permissions. Where would you find this information?
-
A
GitHub Marketplace settings
-
B
Organization members and teams management section
✓ Correct
-
C
Repository settings page
-
D
Billing and subscription portal
Explanation
The organization members and teams management section displays member roles, permissions, and team assignments, allowing administrators to audit access levels across the organization.
In GitHub Advanced Security, what does CodeQL analysis primarily focus on detecting?
-
A
Inactive user accounts
-
B
Exposed API keys and passwords
-
C
Outdated dependency versions
-
D
Security vulnerabilities and code quality issues in source code
✓ Correct
Explanation
CodeQL is a semantic analysis engine that performs static application security testing (SAST) to identify security vulnerabilities, bugs, and code quality issues in source code.
Which permission level is required to create and manage GitHub Actions secrets at the organization level?
-
A
Member role
-
B
Team maintainer
-
C
Organization owner
✓ Correct
-
D
Repository collaborator
Explanation
Only organization owners can create and manage organization-level secrets in GitHub Actions, ensuring that sensitive credentials are controlled at the highest administrative level.
You are implementing GitHub for a large enterprise with multiple teams. What is the recommended approach for organizing repositories and teams?
-
A
Store all repositories in a single team within one organization regardless of project scope
-
B
Create separate organizations per team and limit cross-organization collaboration
-
C
Use multiple organizations aligned with business structure and implement team-based access control
✓ Correct
-
D
Create one organization with all repositories
Explanation
A multi-organization structure aligned with business units provides better security boundaries, clearer access control, and improved management of large enterprise implementations while teams manage access within organizations.
When configuring required reviews for pull requests, what does the 'dismiss stale review' setting control?
-
A
Invalidates previous approvals when new commits are pushed to the branch
✓ Correct
-
B
Automatically rejects reviews older than 30 days
-
C
Prevents team members from marking themselves as unavailable
-
D
Deletes review comments that are no longer relevant
Explanation
The 'dismiss stale review' setting ensures that approvals must be renewed after new commits are added to a pull request, maintaining code review integrity and preventing outdated approvals.
What is the primary advantage of using GitHub's enterprise-managed users (EMU) feature?
-
A
Eliminates the need for branch protection rules
-
B
Automatically duplicates repositories across multiple instances
-
C
Increases storage capacity for all users
-
D
Centralizes user identity management through your identity provider with automatic provisioning and deprovisioning
✓ Correct
Explanation
Enterprise-managed users allow organizations to manage user identities centrally through their identity provider (IdP) with automatic provisioning, deprovisioning, and synchronized access control.
You need to prevent accidental deletion of a critical repository. Which GitHub feature provides this protection?
-
A
Setting repository visibility to private
-
B
Restricting repository deletion through access permissions and settings
✓ Correct
-
C
Creating a GitHub backup organization
-
D
Enabling branch protection rules
Explanation
Repository deletion can be restricted by limiting admin access and configuring organization policies that prevent repository deletion or require additional confirmation steps.
When implementing GitHub Actions for continuous integration, which component defines the workflow execution conditions and job definitions?
-
A
The GitHub Actions runner configuration file
-
B
The organization billing preferences
-
C
The repository settings page
-
D
The YAML workflow file in the .github/workflows directory
✓ Correct
Explanation
GitHub Actions workflows are defined in YAML files stored in the .github/workflows directory, specifying triggers, jobs, steps, and execution logic for automated processes.
What is the scope of permissions when using fine-grained personal access tokens compared to classic tokens?
-
A
Fine-grained tokens can only be used within GitHub Actions
-
B
Fine-grained tokens have broader permissions and are less secure
-
C
Fine-grained tokens provide repository-level and resource-specific permissions with more granular control
✓ Correct
-
D
Both token types provide identical permission scopes
Explanation
Fine-grained personal access tokens offer repository-specific and resource-specific permissions, allowing administrators to grant only the minimum necessary access compared to the broader scopes of classic tokens.
Your organization needs to enforce that commits are signed with GPG keys before merging. How should you implement this requirement?
-
A
Manually review all commits for signatures
-
B
Use GitHub Actions to reject unsigned commits in post-merge checks
-
C
Configure branch protection rules to require commit signatures
✓ Correct
-
D
Create a GitHub App that validates signatures
Explanation
Branch protection rules include an option to require commits to be signed with verified signatures (GPG, S/MIME, or SSH), preventing merging of unsigned commits.
When configuring GitHub's webhook functionality, what information is essential to specify for security purposes?
-
A
Only the webhook URL endpoint
-
B
The webhook URL, a secret token for payload verification, and selected events
✓ Correct
-
C
The repository name and webhook description only
-
D
The webhook URL, content type, and events to trigger the webhook
Explanation
Secure webhook configuration requires specifying the URL, a secret token that GitHub uses to sign payloads (enabling verification that webhooks come from GitHub), and selecting which events trigger the webhook.
What does the 'require up-to-date branches' branch protection rule enforce?
-
A
Branches cannot be deleted if they contain recent commits
-
B
Branch names must follow a specific naming convention
-
C
Branches must be rebased on the latest base branch before merging
✓ Correct
-
D
Branches must have no merge conflicts before merging
Explanation
This rule requires pull request branches to be up-to-date with the base branch (containing all latest commits) before merging, preventing merge conflicts and ensuring integration with recent changes.
In GitHub Enterprise, what is the primary purpose of the clustering feature?
-
A
Providing high availability and load balancing across multiple nodes and increasing resilience
✓ Correct
-
B
Automatically managing team memberships
-
C
Organizing repositories into logical groups
-
D
Reducing storage requirements for large repositories
Explanation
GitHub Enterprise clustering distributes the application across multiple nodes, providing high availability, fault tolerance, and load balancing to ensure continuous service availability.
Which scenario best describes when you would use a GitHub organization's 'Base role' setting?
-
A
Setting the default role for new team members and outside collaborators
-
B
Controlling access to GitHub Actions features
-
C
Defining the permission level that applies to all organization members by default
✓ Correct
-
D
Specifying which members can create new repositories
Explanation
The base role setting in organization settings defines the default permission level (member, maintainer, owner) that applies to all members, simplifying permission management across the organization.
What is the primary purpose of GitHub's SAML single sign-on (SSO) configuration at the enterprise level?
-
A
To automatically enforce branch protection rules on all repositories
-
B
To create backup copies of all enterprise data
-
C
To enable automated code scanning across all repositories
-
D
To centralize user authentication and synchronize identity management with your organization's identity provider
✓ Correct
Explanation
SAML SSO at the enterprise level allows administrators to manage user access through a central identity provider, ensuring consistent authentication policies across the entire organization.
When configuring GitHub Enterprise Server (GHES), which component is responsible for handling background jobs and webhooks?
-
A
The job worker or background job server
✓ Correct
-
B
The Git repository server
-
C
The web tier
-
D
The database replication layer
Explanation
The job worker processes background jobs, webhooks, and asynchronous tasks in GitHub Enterprise Server, operating separately from the web tier to ensure performance isolation.
What is the correct method to transfer a repository from one GitHub organization to another while preserving its history and pull requests?
-
A
Recreate the repository in the new organization and use git push with force flag
-
B
Use the repository transfer feature available in Settings > Danger Zone, which transfers all data while preserving history
✓ Correct
-
C
Export the repository as a zip file and import it into the new organization
-
D
Clone the repository and create a new one in the target organization, then manually migrate issues
Explanation
GitHub provides a built-in repository transfer feature that safely moves a repository to a new organization while preserving all commit history, branches, issues, and pull requests.
In GitHub, what does the term 'outside collaborator' refer to?
-
A
Someone who forks your repository and submits pull requests from their personal account
-
B
A user who works remotely and contributes from outside the office network
-
C
A person who is not a member of your organization but has been granted access to specific repositories via invitation
✓ Correct
-
D
An automated bot that performs deployments from external CI/CD systems
Explanation
Outside collaborators are individuals external to an organization who receive direct repository access without being organization members, useful for contractors or open-source contributors.
Which of the following best describes the purpose of GitHub's token expiration policy?
-
A
To limit the number of API requests a user can make per day
-
B
To automatically delete user accounts after a period of inactivity
-
C
To enhance security by requiring personal access tokens to expire after a specified period, reducing the risk of long-lived credential exposure
✓ Correct
-
D
To force users to change their passwords quarterly
Explanation
Token expiration policies require personal access tokens and GitHub App tokens to be refreshed regularly, minimizing security risks associated with token compromise over extended periods.
What is the recommended approach for managing secrets across multiple repositories within a GitHub organization?
-
A
Create secrets individually in each repository to ensure complete isolation and prevent cross-repository access
-
B
Commit encrypted secrets to the repository and decrypt them during runtime
-
C
Store all secrets in a single public configuration file and reference it in each repository
-
D
Use GitHub Organization Secrets combined with appropriate repository access controls and environment variables
✓ Correct
Explanation
Organization secrets allow administrators to create secrets at the organization level and make them available to selected repositories, reducing duplication while maintaining security and access control.
In GitHub Enterprise Server, what is the purpose of the 'Replica' configuration?
-
A
To run multiple independent instances of GitHub for different teams
-
B
To backup user data to an external storage service
-
C
To create a load-balanced copy of the primary instance that handles read-only requests and provides high availability
✓ Correct
-
D
To cache static web assets for faster content delivery
Explanation
A GitHub Enterprise Server replica is a high-availability configuration that maintains a synchronized copy of the primary instance, handling read operations and providing failover capability.
What is the primary benefit of using branch protection rules in GitHub?
-
A
To automatically archive repositories when they reach a certain size
-
B
To restrict repository access to a specific geographic region
-
C
To enforce code quality standards and prevent direct pushes to critical branches by requiring reviews and status checks before merging
✓ Correct
-
D
To automatically delete branches that haven't been updated in 30 days
Explanation
Branch protection rules enforce governance by requiring pull request reviews, status check validations, and other prerequisites before code can be merged into protected branches like main.
When managing GitHub Enterprise Server backups, which utility is recommended for creating consistent snapshots?
-
A
The built-in cloud sync feature that automatically backs up to GitHub.com
-
B
GitHub Enterprise Server Backup Utilities (github-backup) for automated incremental backups
✓ Correct
-
C
Manual tar commands on the filesystem without stopping the instance
-
D
The git archive command from the command line
Explanation
The github-backup utility is the official tool for creating consistent, incremental backups of GHES, managing repositories, user data, and configuration while maintaining data integrity.
What does the 'Require code reviews before merging' branch protection setting specifically enforce?
-
A
All pull requests must be reviewed by the repository owner regardless of other settings
-
B
Code review comments must include specific keywords to be considered valid
-
C
Review approvals automatically expire after 24 hours and must be renewed
-
D
A minimum number of approving reviews must be received before a pull request can be merged, and optionally the reviewer cannot be the pull request author
✓ Correct
Explanation
This setting requires at least one (configurable) approving review before merge, with options to dismiss stale reviews and prevent author self-approval for enhanced code quality.
In the context of GitHub administration, what is a 'runner' in GitHub Actions?
-
A
A machine or service that executes the jobs defined in GitHub Actions workflows, either GitHub-hosted or self-hosted
✓ Correct
-
B
A person who manually executes the steps defined in workflow files
-
C
A feature that continuously tracks the performance of deployed applications
-
D
An automated tool that monitors repositories for security vulnerabilities
Explanation
Runners are execution environments that run GitHub Actions workflows. GitHub-hosted runners are managed by GitHub, while self-hosted runners can be deployed on your own infrastructure.
What is the impact of enabling 'Require status checks to pass before merging' on a protected branch?
-
A
It prevents the branch from being deleted by any user except administrators
-
B
It automatically runs tests on every commit without requiring human approval
-
C
It enforces that all commits must be signed with a GPG key before they can be pushed
-
D
It prevents any pull request from being merged until continuous integration workflows succeed and all required checks pass
✓ Correct
Explanation
This branch protection rule ensures that pull requests can only be merged after specified status checks (like CI/CD pipelines) successfully complete, maintaining code quality standards.
Which permission level in GitHub allows a user to create and manage teams within an organization?
-
A
Member
-
B
Organization Owner
✓ Correct
-
C
Collaborator
-
D
Repository Admin
Explanation
Only organization owners have the authority to create and manage teams, assign members to teams, and manage team permissions across the organization.
What is the primary security consideration when implementing self-hosted runners for GitHub Actions?
-
A
Self-hosted runners are inherently more secure than GitHub-hosted runners because they're under your control
-
B
Self-hosted runners should always run untrusted code with elevated privileges to ensure workflow completion
-
C
Self-hosted runners require careful security configuration including network isolation, credential management, and running on ephemeral or clean machines to prevent credential theft and lateral movement
✓ Correct
-
D
Self-hosted runners should be connected to the public internet without firewalls for optimal performance
Explanation
Self-hosted runners pose security risks if not properly configured; they should be isolated, use short-lived credentials, and potentially run on ephemeral machines to prevent compromise.
In GitHub, what is the purpose of a 'deploy key'?
-
A
A read-only SSH key used for automated deployments and continuous integration systems to access a repository without needing user credentials
✓ Correct
-
B
A temporary access token that expires after a single use for enhanced security
-
C
A key that allows administrators to unlock encrypted repositories during a disaster recovery scenario
-
D
A key that encrypts sensitive data stored in the repository
Explanation
Deploy keys are SSH keys that grant automated systems (like CI/CD pipelines) read-only or read-write access to a repository without requiring personal credentials or organization membership.
What is the difference between GitHub's 'Code owners' feature and branch protection rules?
-
A
They are synonymous terms referring to the same feature with different names in different GitHub versions
-
B
Code owners identify who owns the code while branch protection rules prevent all pushes to a branch
-
C
Code owners automatically assign reviewers based on file path changes; branch protection rules enforce merge requirements like approval counts and status checks
✓ Correct
-
D
Code owners are only available in Enterprise, while branch protection rules work in all plans
Explanation
Code owners (CODEOWNERS file) designates required reviewers for changes in specific paths, automatically requesting reviews; branch protection rules enforce broader merge policies including approval counts and CI requirements.
When configuring GitHub Enterprise Server networking, which port is typically used for Git operations over SSH?
-
A
Port 80 for unencrypted HTTP connections
-
B
Port 443 for encrypted HTTPS connections only
-
C
Port 22 for SSH operations and also ports 80 and 443 for web traffic and Git over HTTPS
✓ Correct
-
D
Port 3306 which is reserved for internal database communication only
Explanation
GitHub Enterprise Server uses port 22 for SSH Git operations, port 80 for HTTP (optionally redirecting to HTTPS), and port 443 for secure HTTPS and Git operations.
What does the 'Require branches to be up to date before merging' branch protection setting accomplish?
-
A
It prevents repository administrators from merging pull requests created by other administrators
-
B
It requires pull request branches to be rebased or merged with the base branch after status checks pass, ensuring the merge commit is based on current code
✓ Correct
-
C
It prevents merging if the branch has not been manually reviewed within the last 24 hours
-
D
It automatically updates all local branches on team members' machines before allowing any merges
Explanation
This rule ensures that pull request branches are synchronized with the base branch after status checks pass, preventing merges on stale code and reducing integration conflicts.
In GitHub organization management, what is the primary purpose of using organization-level webhooks?
-
A
To automatically block users who attempt to delete repositories
-
B
To encrypt all communications between GitHub and your infrastructure
-
C
To schedule automated backups of all organization repositories
-
D
To receive HTTP POST events about organization-level activities (like member additions or team changes) and integrate with external systems
✓ Correct
Explanation
Organization webhooks send notifications about org-level events to a specified URL, enabling integration with external systems for automation and monitoring beyond individual repository events.
What is the recommended approach for managing personal access tokens (PATs) in a GitHub organization?
-
A
Store PATs in a shared spreadsheet accessible to all team members for convenience
-
B
Disable token expiration to prevent workflow disruptions
-
C
Create one master PAT with admin privileges and share it across all CI/CD systems
-
D
Use organization-level secret management with PATs scoped to minimum required permissions, implement token expiration, regularly audit usage, and rotate compromised tokens immediately
✓ Correct
Explanation
Best practices include scoping tokens to least privilege, enabling expiration, storing in secure secret management systems, monitoring usage, and rotating tokens if compromised.
When a GitHub organization requires SAML SSO enforcement, what happens to existing personal access tokens?
-
A
Personal access tokens continue to work without restriction after SAML is enabled
-
B
All personal access tokens are automatically deleted when SAML enforcement is enabled
-
C
Personal access tokens become read-only and cannot be used for write operations
-
D
Personal access tokens created before SAML enforcement continue working, but newly created tokens require SAML authorization and existing tokens must be authorized for SAML
✓ Correct
Explanation
When SAML SSO is enforced, new personal access tokens require authorization against the identity provider, and existing tokens must be individually authorized or will lose API access.
What is the purpose of GitHub's 'Dependabot' security feature?
-
A
To monitor and automatically update project dependencies when vulnerabilities are detected or security patches are released
✓ Correct
-
B
To create automated backups of all third-party dependencies
-
C
To prevent dependencies from being added to any repository without administrator approval
-
D
To encrypt all communications with dependency servers
Explanation
Dependabot automatically monitors dependencies for vulnerabilities and available updates, creating pull requests to keep projects secure and current with minimal manual intervention.
In GitHub Enterprise Server, what is the purpose of configuring a 'GitHub Enterprise Server Cluster'?
-
A
To distribute load across multiple nodes for high availability, fault tolerance, and improved performance with automatic failover capability
✓ Correct
-
B
To create separate backups of the same instance for disaster recovery
-
C
To run multiple isolated instances of GitHub for different departments within an organization
-
D
To restrict different teams to different physical servers for access control
Explanation
A GHES cluster spreads load across multiple nodes, providing high availability through automatic failover, improved performance, and fault tolerance for critical deployments.
What is the correct procedure for revoking a user's access to a GitHub organization?
-
A
Change the user's password and update their email address to prevent re-access
-
B
Create a new organization and migrate all repositories, abandoning the old organization
-
C
Remove the user from the organization through Organization Settings > Members, which revokes their access to all organization repositories and resources
✓ Correct
-
D
Delete the user's account from GitHub.com entirely using the enterprise settings
Explanation
Users are removed from organizations through the Members section in Organization Settings, immediately revoking their access to organization repositories while preserving their GitHub account.
When managing GitHub Actions secrets, what is the scope limitation for organization-level secrets compared to repository-level secrets?
-
A
Organization secrets can only be used in public repositories while repository secrets work in both public and private repositories
-
B
Organization secrets can be accessed by all repositories without restrictions while repository secrets cannot be shared
-
C
Organization secrets can only be accessed if the organization has GitHub Enterprise, while repository secrets are available in all GitHub plans
-
D
Organization secrets can be configured to be accessible only to selected repositories using environment restrictions, providing more controlled access than repository secrets which are only available to their specific repository
✓ Correct
Explanation
Organization secrets can be restricted to specific repositories, environments, or both, providing granular access control beyond repository secrets which are isolated to a single repository.
What is the primary advantage of using GitHub's 'Required status checks' feature in conjunction with branch protection?
-
A
It prevents non-administrators from creating pull requests on protected branches
-
B
It automatically fixes all code quality issues before merging
-
C
It automatically approves pull requests that pass status checks without human review
-
D
It ensures that all pull requests meet predefined quality gates (like passing tests and linting) before they can be merged, maintaining code reliability
✓ Correct
Explanation
Required status checks enforce that specified CI/CD checks (tests, linting, security scans) must pass before merge, ensuring code quality standards are met automatically.
When configuring SAML single sign-on (SSO) for a GitHub Enterprise organization, what is the primary purpose of the Identity Provider (IdP) metadata URL?
-
A
To automatically sync all user accounts from the IdP to GitHub
-
B
To enable GitHub to generate and store backup authentication credentials
-
C
To provide GitHub with the IdP's certificate and endpoints for validating SAML assertions
✓ Correct
-
D
To establish the encrypted connection between GitHub and the IdP for secure authentication
Explanation
The IdP metadata URL contains the IdP's public certificate, single sign-on URL, and other configuration details that GitHub needs to validate SAML responses. This is essential for establishing trust between GitHub and the IdP.
What is the difference between organization-level and team-level permissions in GitHub?
-
A
Organization-level permissions set base access rights for the entire organization, while team-level permissions refine access for specific groups of members within those repositories.
✓ Correct
-
B
Team-level permissions are always more restrictive than organization-level permissions.
-
C
Organization-level permissions only control billing, while team-level permissions control access to code.
-
D
Organization-level permissions apply globally to all repositories, while team-level permissions can only affect private repositories.
Explanation
Organization permissions establish baseline access rules across the organization, while team permissions allow fine-grained control over which team members have specific access levels to particular repositories. Teams enable better security segmentation.
You need to ensure that all commits in your organization's repositories are signed with GPG keys. Which GitHub feature should you configure?
-
A
Personal access token expiration policies
-
B
Repository secret scanning configuration
-
C
Organization-level deployment protection rules
-
D
Branch protection rules with required commit signatures
✓ Correct
Explanation
Branch protection rules can be configured to require all commits to be signed before merging to protected branches. This ensures code provenance and prevents unauthorized commits from being merged.
When using GitHub Actions in an enterprise environment, what is the primary benefit of using self-hosted runners instead of GitHub-hosted runners?
-
A
Self-hosted runners always execute workflows faster regardless of configuration.
-
B
Self-hosted runners eliminate the need for any security or network configuration.
-
C
Self-hosted runners automatically scale without any manual intervention.
-
D
Self-hosted runners allow greater control over the execution environment and can access internal resources without exposing them to the internet.
✓ Correct
Explanation
Self-hosted runners provide control over the compute environment and can access internal systems (databases, artifact repositories) that GitHub-hosted runners cannot reach, making them essential for enterprise workflows with legacy system integration.
How should you handle GitHub Enterprise license management when you need to temporarily increase the number of seats for seasonal projects?
-
A
Delete and recreate user accounts as needed to stay within your current seat limit.
-
B
Manually edit the license file in the GitHub Enterprise Server management console every month.
-
C
Contact GitHub support to increase your license allocation, then manage the additional seats through organization membership controls.
✓ Correct
-
D
Use unlimited seats for all projects and manage costs through workflow optimization.
Explanation
The proper process is to contact GitHub support to adjust your license allocation, which updates your enterprise license. Once updated, you manage the actual seat usage by adding or removing members from organizations.
In a GitHub organization with multiple teams, you want to prevent accidental deletion of critical repositories. What is the most effective administrative control?
-
A
Enable branch protection rules on all branches to prevent any destructive actions.
-
B
Restrict delete permissions through organization base permissions and require admin approval via CODEOWNERS.
-
C
Use repository-level admin role restrictions combined with organization deletion policies that require confirmation.
✓ Correct
-
D
Implement network policies that block delete API calls.
Explanation
Restricting the admin role at the repository level and requiring explicit confirmation for deletions at the organization level provides layered protection against accidental deletion. Branch protection rules protect branches, not repositories.
What should you verify when auditing GitHub Actions security in your organization?
-
A
That workflow permissions are minimized, secrets are used instead of hardcoded credentials, and third-party actions come from trusted sources.
✓ Correct
-
B
That all Actions run sequentially rather than in parallel to reduce computational overhead.
-
C
That all workflows use only GitHub-provided actions with no third-party actions.
-
D
That organization members cannot view any workflow files in the repository.
Explanation
Security audit best practices for Actions include using least-privilege permissions, leveraging secrets management, vetting third-party actions, and reviewing action source code. This prevents credential exposure and unauthorized access.
When configuring IP whitelisting for GitHub Enterprise Server, which type of network traffic does this primarily protect?
-
A
Web-based access (HTTPS) and administrative console access to the management interface.
✓ Correct
-
B
Webhook deliveries from repositories to external services.
-
C
Only outbound traffic from the GitHub Enterprise Server instance.
-
D
Only SSH connections used for git operations.
Explanation
IP whitelisting for GitHub Enterprise Server restricts access to the web interface and management console, protecting administrative and user access. It does not inherently control git protocol traffic or webhook deliveries.
You discover that a GitHub organization member has created a personal access token (PAT) with a very long expiration period (several years). What is the best practice for remediating this security concern?
-
A
Enforce organization-level PAT expiration policies, audit existing tokens, revoke long-lived tokens, and educate members on token management.
✓ Correct
-
B
Allow the token to remain as-is but disable all organization integrations that use PATs.
-
C
Require the member to rotate their password, which will automatically invalidate all their tokens.
-
D
Immediately revoke the token without notification and monitor the member's account for suspicious activity.
Explanation
The proper remediation includes enforcing expiration policies at the organization level, reviewing existing tokens for compliance, revoking non-compliant tokens, and providing member education on secure token practices. Password rotation does not invalidate tokens.
What is the correct order of precedence for GitHub repository access permissions, from most restrictive to least restrictive?
-
A
Admin > Maintain > Write > Triage > Pull
✓ Correct
-
B
Pull > Triage > Write > Admin > Maintain
-
C
Maintain > Admin > Write > Triage > Pull
-
D
Pull > Write > Triage > Maintain > Admin
Explanation
Repository roles follow this hierarchy from most to least restrictive: Admin (full control) > Maintain (admin except delete/settings) > Write (push/merge) > Triage (manage issues/PRs) > Pull (read-only). Understanding this hierarchy is essential for proper access control.