GitLab is a web-based source control management (SCM) system that allows teams to cohesively track and manage applications and code. It’s an ideal solution for teams who require a centralized location to store and manage their code. GitLab has a large and active community backing it, and it’s one of the most popular choices for any company looking to scale their code. As such, it’s not uncommon to see third-party packages being used to power various aspects of an application. In some cases, these packages can be updated. Unfortunately, when this happens, it’s not uncommon for the updated code to be released to the public in some way.

CVE-2021-2930

Despite the fact that GitLab has a large and active community, it does have some security risks. One of these vulnerabilities is CVE-2021-2930. This vulnerability allows an attacker to access certain user information, such as email address, from public resources via the dashboard’s private groups feature.
It’s important to be aware of the risks associated with your code, and you can use both the first and second vulnerabilities as examples. As a result, you should take precautions to protect your code when updating or releasing packages in this manner.

Summary:

How to Properly Update Third-Party Packages
One of the most common mistakes organizations make when it comes to updating third-party packages is making a public release of the updated code. While this may seem like a good idea in the short-term, there are many reasons why it’s not beneficial for your company and can be damaging in the long term. To avoid this, you should first determine how you would like to handle the update. Would you like to have an automated deployment process that deploys your changes? Or would you prefer to have a manual process where only certain people have access to the updated package?
If you decide on having an automated deployment process, then it’s important that these changes are properly tested before they are pushed live. Testing ensures that everything went according to plan and helps reduce any potential risks associated with deploying updated code live. If your organization decides on a manual process, then it’s still important that updates are tested before being released. However, because these changes will be manually deployed by one person or group of people, it’s crucial that they understand what they are releasing and how they can mitigate any risks associated with those changes.

How do I handle updating third-party packages?

CVE-2022-2933

In GitLab’s GitHub repository, the package in question (CVE-2022-2933) was updated. It was updated on March 17th, 2019, and the code was changed to include a URL that pointed to a malicious web page. The change included an update to the README file, which caused the user of this package to be redirected to a malicious web page when they visited their website.

GitLab is a great tool for companies who need centralized code management or teams who want a centralized location for their SCM system. However, one of its downsides is that it's not uncommon for third-party packages to be updated without keeping up with all of the changes that are being implemented. When this happens, it's easy for new vulnerabilities to be introduced which can potentially lead your company into trouble.

GitLab has an active community and is one of the most popular choices for any company looking to scale their code -- but it comes with risks. In some cases, these updates can introduce vulnerabilities which could compromise an application or even compromise your company's information stored on GitLab servers.

How to install package on GitLab

When it comes to updating third-party packages on your GitLab installation, you can use the following commands:

$ cd $GITLAB_ROOT/packages
$ git checkout origin/master
$ git pull origin master
$ sudo ./gitlab-runner update --checkout-all $GITLAB_ROOT/config/packages.yml
$ sudo ./gitlab-runner update --checkout-all appname

Timeline

Published on: 10/17/2022 16:15:00 UTC
Last modified on: 10/19/2022 17:30:00 UTC

References