GitHub is a widely used platform that enables collaborative software development and efficient version control using Git. Beyond just managing code, GitHub also supports robust security and access control features, making it a crucial tool for maintaining code integrity, protecting sensitive information, and promoting safe collaboration in both individual and team-based projects.
This activity focuses on leveraging GitHub not only for source code management but also for implementing key cybersecurity practices such as controlled access, protected branches, and account security measures like Two-Factor Authentication (2FA).
Created a Private Repository
Initialized a private GitHub repository to ensure that the codebase remains confidential and is accessible only to authorized users. Keeping the repository private protects against unauthorized viewing and cloning.
Utilized Git Commands for Version Control
Employed essential Git commands to manage the local and remote repository:
git init: Initialized a new Git repository in the local project folder.
git add .: Staged all modified files for the next commit.
git commit -m "Initial commit": Committed the staged changes with a descriptive message.
git push: Uploaded the committed changes to the GitHub repository.
These steps established a secure and traceable version history of the project.
Configured Branch Protection and 2FA
Implemented branch protection rules to prevent unauthorized or unreviewed changes to the main branch. This ensures that all modifications undergo proper code review or automated testing before merging.
Additionally, enabled Two-Factor Authentication (2FA) on the GitHub account to add an extra layer of login security, protecting the account even if the password is compromised.
Collaborator Access with Permissions
Added trusted collaborators to the repository with carefully defined access roles (e.g., read, write, admin). This practice promotes team collaboration while ensuring that only users with appropriate permissions can make sensitive changes.