Migration guide: GitHub Advanced Security to GitLab Ultimate
To search repositories and projects, login to gitlab.com . Suggestions GitLab Duo Agent Platform Code Suggestions (AI) CI/CD GitLab on AWS GitLab on Google Cloud Why GitLab? Published on: May 1, 2024 17 min read Migration guide: GitHub Advanced Security to GitLab Ultimate Understand the similarities and differences between GitLab Ultimate and GitHub Advanced Security. Then follow this in-depth tutorial to make the move to the GitLab DevSecOps platform.
Fernando Diaz tutorial zero trust security DevSecOps platform testing GitLab is the most comprehensive AI-powered DevSecOps platform, enabling organizations to deliver more secure software faster with one platform for your entire software delivery lifecycle. GitHub provides an Advanced Security add-on, which enables additional security features within GitHub. However, it lacks the depth and breadth of security features provided natively by GitLab.
Organizations looking to migrate to GitLab Ultimate to enhance their security across all areas of the SDLC can use this guide to compare the two offerings and as a tutorial to move to the GitLab platform. This article includes: A comparison between GitLab Ultimate and GitHub Advanced Security How to migrate a GitHub repository to GitLab How to migrate from GitHub Advanced Security to GitLab Ultimate feature-by-feature An introduction to additional GitLab Ultimate's security features A comparison between GitLab Ultimate and GitHub Advanced Security GitLab Ultimate is GitLab's top subscription tier for enterprises looking to deliver secure software faster.
GitHub Advanced Security is an add-on to GitHub Enterprise, which enables additional security features. Similarities between GitLab Ultimate and GitHub Advanced Security GitLab Ultimate and GitHub Advanced Security both provide: Static Application Security Testing ( SAST ), secret scanning, and dependency scanning contextual vulnerability intelligence and resolution advice a list of dependencies or software bill of materials ( SBOM ) security metrics and insights Differences between GitLab Ultimate and GitHub Advanced Security GitLab Ultimate differs from GitHub Advanced Security in the following ways: GitLab natively provides additional code scanners such as container scanning, Dynamic Application Security Testing ( DAST ), Web API fuzz testing, and more.
These scanners are a mix of optimized proprietary and open source technologies with custom rulesets. For a full list, see the GitLab AppSec documentation . GitLab provides granular security guardrails to prevent insecure code from being merged without approval. GitLab security scanners can be run in air-gapped or limited-connectivity environments . GitLab provides the Compliance Center , which enables oversight of compliance violations across an entire organization.
GitLab Ultimate also provides additional security and compliance capabilities, portfolio and value stream management, live upgrade assistance, and more. See the GitLab Ultimate documentation to learn more about these additional features. How to migrate a GitHub repository to GitLab GitLab provides a built-in importer, which allows you to import your GitHub projects from either GitHub.com or GitHub Enterprise to GitLab.
The importer allows you to migrate not only the GitHub Repository to GitLab, but several other objects, including issues, collaborators (members), and pull requests. For a complete list of what can be migrated, see the GitHub imported data documentation . You can perform the migration as follows: On the left sidebar, at the top, select Create new (+) . Select New project/repository under the In GitLab section. Select Import project .
Press the GitHub button. If using GitLab self-managed, then you must enable the GitHub importer . Note that other importers can be initiated in the same way. Now, you can do one of the following: Authorize with GitHub Oauth by selecting Authorize with GitHub . Use a GitHub personal access token: Go to https://github.com/settings/tokens/new . In the Note field, enter a token description. Select the repo scope. Optionally, to import Collaborators, select the read:org scope.
Press the Generate token button. On the GitLab import page, in the Personal Access Token field, paste the GitHub personal access token. Press the Authenticate button. Select the items you wish to migrate. Select the projects you wish to migrate and to where. Press the Import button. Your imported project should now be in your workspace. For additional guidance on migrating from GitHub to GitLab, watch this video: You can also perform the migration using a GitHub personal access token or the GitLab REST API .
The importer also allows importing from other sources such as Bitbucket or Gitea. To learn more, read the importer documentation . How to migrate feature-by-feature Let’s go over how to leverage each feature provided by GitHub Advanced Security in GitLab Ultimate. You must have a GitLab Ultimate license to continue. GitLab provides a free trial to get you started. Code scanning GitHub provides code scanning to provide contextual vulnerability intelligence and advice for static source code.
The same can be done within GitLab by enabling SAST . GitLab SAST scanners cover a wider set of programming languages and frameworks than GitHub’s CodeQL . To enable code scanning in GitLab, you can simply add the SAST template to your .gitlab-ci.yml : include : - template : Jobs/SAST.gitlab-ci.yml Once the template has been added, any time new code is checked in, SAST will auto-detect the programming languages used in your project.
It will then scan the source code for known vulnerabilities. Note: Security scanners can also be added to your project using GitLab's security configuration, which can automatically create a merge request to update your pipeline. To learn more, see the Configure SAST by using the UI documentation . SAST results of the diff between the feature-branch and the target-branch display in the merge request widget. The merge request widget displays SAST results and resolutions that were introduced by the changes made in the merge request.
Each vulnerability displays data to assist with remediation, including detailed description, severity, location, and resolution information: You can take action on these vulnerabilities: Dismiss vulnerability : Allows a developer to dismiss the vulnerability with a comment. This assists the security team performing a review. Create issue : Allows an issue to be created to keep track of a vulnerability that requires additional oversight.
These changes can also be seen inline when changing to the Changes view within the merge request. Customizing SAST scanners GitLab allows you to override a SAST job definition so you can change properties like variables, dependencies, or rules. You can do this by declaring a job with the same name as the SAST job to override. Then, place this new job after the template inclusion and specify any additional keys under it.
For example, the following configuration: overwrites the version the semgrep-sast scanner uses runs a script to fetch modules from private projects before running gosec-sast configures all scanners to search at a maximum depth of 10 include : - template : Jobs/SAST.gitlab-ci.yml variables : SEARCH_MAX_DEPTH : 10 semgrep-sast : variables : SAST_ANALYZER_IMAGE_TAG : "3.7" gosec-sast : before_script : - | cat <<EOF > ~/.netrc machine gitlab.com login $CI_DEPLOY_USER password $CI_DEPLOY_PASSWORD EOF Note: The available SAST jobs can be found in the SAST.gitlab-ci.yml template .
Configurations can be found in the Available SAST CI/CD variables documentation . Customizing SAST rulesets For each SAST analyzer, GitLab processes the code then uses rules to find possible weaknesses in source code. These rules determine what types of weaknesses the scanner reports. For Semgrep-based SAST scanners, GitLab creates, maintains, and supports the rules that are used. It combines the Semgrep open source
The rest of this page is on the live site.