Do you have a minute?
Get your cybersecurity score for your organization.
Book Free Consultation
x
Book A Meeting
January
February
March
April
May
June
July
August
September
October
November
December
Sun
Mon
Tue
Wed
Thu
Fri
Sat
What time works?
30 minutes meeting
Asia/Kolkata Time
Almost there!
IST
Change
How to secure your Github repository? - BriskInfosec
Bint Labs
May 20, 2024
5 min. read
4,967
How to secure your Github repository?
Share:
In this article
GitHub is a hosting platform which helps developers to collaborate in building software’s. It helps the developers to manage source code management. GitHub lets the project owner and others to work on your project. As we all know, GitHub is open source and provides unlimited free private repositories. In this article, we are going to see how to avoid security loopholes and utilize GitHub in a secure way.
CONTENTS:
Never store credentials in GitHub
Validate your GitHub applications
GitHub Enterprise
SSH keys and personal access tokens
Develop projects with security in mind
Audit code on regular intervals
Best practices
Conclusion
Last but not the least
You may be interested on
Never store credentials in GitHub
Storing your credentials locally or remotely has always been a risk of losing your data. Common people and developers, sometimes store their credentials and other configuration stuffs in their Git repository, with or without their knowledge. There are some great tools to avoid these practices, and one such is Git-secret. This tool actually prevents the users from exposing their sensitive information by analyzing it statically. You can get it here https://github.com/awslabs/git-secrets. Pre-commit Git Hook is another tool which uses strong regular expression patterns to prevent the leakage of sensitive data.
Fortunately or unfortunately, if you find out that your credentials are exposed from your Git repository, first invalidate tokens and passwords, and then remove them from the Git repository. Finally, clear your history.
Validate your GitHub Applications
Application that’s present in the GitHub platform is not always trustworthy because it is written by third party developers, or by some organizations. So, always be cautious before installing an application from Git repository as it may contain a backdoor. Some best practices to follow are:
Before installing an application, always question yourself about what level of user access should be given to the application, and what could go wrong if it is a rouge application.
Always validate the author of the application and do some back ground checks.
Provide only the required access to the application, not more and not less.
Make sure you monitor or audit your applications and their contributors at regular intervals to ensure that they are legitimate and still trustworthy.
GitHub Enterprise
In some organizations like financial institutions and government departments, it is forbidden to use GitHub as some other organization may have access to the application. For this kind of tightly secured organization, Git Enterprise comes into play. It allows you to fully host GitHub repositories within your organization. This means you can be disconnected from the internet and still have internal access to your projects within your GitHub Enterprise repositories.
SSH keys and Personal Access Tokens
Some applications and services assign default passwords. Not every system can be integrated with active directory. GitHub uses SSH key for SSH connection or user tokens (User name and Password). These Access Tokens should be changed on a regular basis. Sometimes, prevention is better than cure. Change passwords according to your password management policies.
Develop Projects with Security in Mind
When a developer creates a new project, they mostly try to find shortcut or insecure way of running the application. This might lead to the disclosure of sensitive information like passwords which might be hard coded, or stored locally in config like a properties file. The developers must be aware of security issues that may arise because of poor source code knowledge techniques. In addition, if you’re planning to build an open source application, it will be much easier and safer because it would be developed with a security mindset.
Audit code on Regular intervals
Before pushing the code into GitHub, always check whether any sensitive information is present in the code. The source code that you import into GitHub may have existed for months or years, and possibly could’ve been developed in a closed source repository. This can lead to many of the reasonable assumptions made in a closed source environment, now being invalid. Always ensure you do a complete audit before you import anything into GitHub.
Best Practices:
Implement Two-Factor-Authentication (2FA) on every contributor’s GitHub account.
Never let users share GitHub accounts/passwords.
Laptops/Devices with access to your source code must be properly secured.
Repository administrators should manage team access to data. Only give contributor’s access to the data, they need to do their work.
GitHub accounts are often personal ones, and do not naturally disappear when users leave the company. Disable the account after the employee relieves from your organization.
Give proper knowledge to the users about security.
Conclusion:
GitHub has helped many developers and students to build their project and host. But, we all at one point of time, inadvertently forget that technology should be handled in a secured way. Proper implementation of the above best practices are the best methods to maintain GitHub security.
Last but not the least:
Have you ever heard the name Threatsploit Adversary report. If not, read it. It’s our report which contains the global collection of cyberattacks, the impacts caused, the losses faced and much more. It is way better than tiresomely searching for all these, one by one in search engines.
He is an experienced Security Engineer with a demonstrated history of working in the computer and network security industry. He holds EC-Council Certified Ethical Hacker certification V9. He has been recognized by BMW, Pager Duty and other various IT FIRMS.
This Privacy Policy was last revised on June 1st, 2024.
"Briskinfosec", "we", or "us" knows that you care how information about you is used
and shared. This Privacy Policy explains what information of yours will be collected
by Briskinfosec when you use the website and the web application services.
We are committed to process your data in accordance with the General Data Protection
Regulation (GDPR) and other relevant legislation.
We won't spam you or sell your personal information to others.
You control how we send most messages to you.
You control who you share your Applications with.
We will not use or share your information with anyone except as
described in this Privacy Policy.
We will only collect, use, and share your information as we describe in
this Privacy Policy or as you give us express permission to do.
This Privacy Policy does not apply to information we collect by other means
(including offline) or from other sources. Capitalized terms that are not defined in
this Privacy Policy have the meaning given them in our Terms of Service.
Information We Collect
User-Provided Information
You provide us information about yourself, such as your Email address, First Name, Last
Name, Company, and Phone when you register for an account with the Service. You also
provide us information in the Content and Application(s) you post to the Service. When
you engage in communication with us, we may keep records of your Name, Contact Number,
email address, Company, the content of your email messages, as well as our responses.
How We Use Your Information
We are actively managing data retention. Data is carefully managed and stored in
accordance with our policies and procedures.
We use the personal information you submit to operate, maintain, and provide to you the
features and functionality of the Service.
By submitting our web form with your email address, you agree to receive service-related
notices, including any notices required by law, in lieu of communication by postal mail.
We may use your email address to send you other messages, such as newsletters, changes
to features of the Service, or special offers. If you do not want to receive such email
messages, you may opt out or change your preferences in by contacting
support@briskinfosec.com
By submitting our web form with your contact number, you agree to receive promotional
calls on the number shared, and such calls and SMS would be coming from a third-party
platform.
Following termination or deactivation of your account, may retain your profile
information, Content for a commercially reasonable time for backup, archival, or audit
purposes. Furthermore, may retain and continue to use indefinitely all Content contained
in your communications to other users or posted to public or semi-public areas of the
Service after termination or deactivation of your account.
Briskinfosec reserves the right, but has no obligation, to monitor or remove the Content
you post on the Service if in our sole opinion such Content violates, or may violate,
any applicable law or our Terms of Service, or to protect or defend our rights or
property or those of any third party. Briskinfosec also reserves the right to remove
Content upon the request of any third party.
We use cookies and log file information to: (a) remember information so that you will not
have to re-enter it during your visit or the next time you visit the Service; (b)
provide custom, personalized content and information; (c) monitor the effectiveness of
our Service; (d) monitor aggregate metrics such as activity, traffic, and demographic
patterns; (e) diagnose or fix technology problems reported by our users or engineers
that are associated with certain IP addresses; and (f) help you efficiently access your
information after you sign in.
How We Share Your Information
Personally Identifiable Information
Briskinfosec will not rent or sell your personally identifiable information to
others. Briskinfosec may share your personally identifiable information with third
parties solely for the purpose of providing the Service to you (for instance, to
process your credit card transactions). If we do this, such third parties’ use of
your information will be bound by this Privacy Policy. We may store personal
information in locations outside the direct control of Briskinfosec (for instance,
on servers in the cloud).
As described in this Privacy Policy, Briskinfosec will not disclose personal
information to any third party unless required to do so by law or subpoena or if we
believe that such action is necessary to (a) conform to the law, comply with legal
process served on us or our affiliates, or investigate, prevent, or take action
regarding suspected or actual illegal activities; (b) to enforce our Terms of
Service, take precautions against liability, to investigate and defend ourselves
against any third-party claims or allegations, to assist government enforcement
agencies, or to protect the security or integrity of our site; and (c) to exercise
or protect the rights, property, or personal safety of Briskinfosec, our users or
others.
How We Protect Your Information
Briskinfosec uses commercially reasonable physical, managerial, and technical
safeguards to preserve the integrity and security of your personal information.
However, we guarantee for the security of any information you transmit to
Briskinfosec.
To protect your privacy and security, we take reasonable steps (such as requesting a
unique password) to verify your identity before granting you access to your account.
You are responsible for maintaining the secrecy of your unique password and account
information at all times.
Compromise of Personal Information
In the event that personal information is compromised as a result of a breach of
security, Briskinfosec will promptly notify those persons whose personal information
has been compromised, in accordance with the notification procedures set forth in
this Privacy Policy, or as otherwise required by applicable law.
Data Subject Rights
Your GDPR Rights
Right to Access: You can request details of your personal data we hold.
Right to Rectification: You can correct inaccurate or incomplete data.
Right to Erasure: You can ask us to delete your personal data.
Right to Restrict Processing: You can request to limit how we use your data.
Right to Data Portability: You can receive your data in a machine-readable
format.
Right to Object: You can oppose certain types of processing.
Rights in Relation to Automated Decision Making and Profiling: You can request
human intervention or challenge a decision based solely on automated processing.
You have the right to access, correct, delete, or transfer your data. Contact us at
contact@briskinfosec.com to exercise these rights.
Data Transfers
Data may be transferred outside the EEA under strict safeguards to protect your privacy.
Data Protection Officer
The responsibilities of the Data Protection Officer are managed by the MSSC
committee. If you have any additional questions, please feel free to contact us
at contact@briskinfosec.com
Regular Review and Updates
This policy is reviewed regularly and updated as necessary.
Purpose and Lawfulness of Processing
We collect data to operate, maintain, and improve the Service. This includes
user support, personalized content, service management, and legal obligations.
Links to Other Web Sites
We are not responsible for the practices employed by websites linked to or from
the Service, nor the information or content contained therein. Please remember
that when you use a link to go from the Service to another website, our Privacy
Policy is no longer in effect. Your browsing and interaction on any other
website, including those that have a link on our website, is subject to that
website's own rules and policies. Please read over those rules and policies
before proceeding.
Notification Procedures
It is our policy to provide notifications, whether such notifications are
required by law or are for marketing or other business-related purposes, to you
via email notice, written or hard copy notice, or through conspicuous posting of
such notice on the Service, as determined by Briskinfosec in its sole
discretion. We reserve the right to determine the form and means of providing
notifications to you, provided that you may opt out of certain means of
notification as described in this Privacy Policy.
Changes to Our Privacy Policy
If we change our privacy policies and procedures, we will post those changes on
the Service to keep you aware of what information we collect, how we use it and
under what circumstances we may disclose it. Changes to this Privacy Policy are
effective when they are posted on this page.
If you have any questions about this Privacy Policy, the practices of this site,
or your dealings with this website, please contact us at
contact@briskinfosec.com
Cookies Information
Cookies essential for website functionality respond to your actions, such as
modifying privacy settings, logging in, or completing forms.
Data retention and Disposal mechanism
Our data retention and disposal mechanism operate in strict accordance with the
terms and conditions outlined in our policies. We have implemented a systematic
approach to both storing and disposing of data to ensure that it aligns with our
established policies. This commitment underscores our dedication to maintaining
the privacy and security of your information throughout its lifecycle, in full
compliance with the agreed-upon terms and conditions.
Data is retained as long as necessary for the purposes stated, and in accordance
with legal requirements.
This website uses cookies to ensure you get the best experience. Check our Privacy Policy
Discover the Latest Cyber Threats - Stay Ahead of the Curve
Get exclusive access to our latest Threatsploit Report detailing the most
recent and sophisticated cyber attacks. Stay informed and protect your
business from emerging threats.