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 30-day 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 Dependency List.
From here you can see the following information on your dependencies:
Field
Description
Component
The dependency’s name and version.
Packager
The packager used to install the dependency.
Location
For system dependencies, this lists the image that was scanned. For application dependencies, this shows a link to the packager-specific lock file in your project that declared the dependency. It also shows the dependency path to a top-level dependency, if any, and if supported.
License
Links to dependency’s software licenses. A warning badge that includes the number of vulnerabilities detected in the dependency.
Projects
Links to the project with the dependency. If multiple projects have the same dependency, the total number of these projects is shown. To go to a project with this dependency, select the Project’s number, then search for and select its name. The project search feature is supported only on groups that have up to 600 occurrences in their group hierarchy.
See the Dependency List documentation to learn more.
Security and compliance administration
GitHub Advanced Security allows you to view security metrics and insights and assess code security risk. Now let’s examine how to do the same with GitLab Ultimate.
Viewing security metrics and insights
GitLab provides Security dashboards to help assess the security posture of your applications. These dashboards display a collection of metrics, ratings, and charts for the vulnerabilities detected by the security scanners run on your project:
vulnerability trends over a 30-, 60-, or 90-day timeframe for all projects in a group
a letter grade rating for each project based on vulnerability severity
the total number of vulnerabilities detected within the past 365 days, including their severity
To access the Security dashboard:
On the left sidebar, select Search or go to and find your project or group.
From the side tab, select Secure > Security dashboard.
Filter and search for what you need.
The group view displays your security posture for all projects in your group:
The project view displays your security posture for just the project:
Assess code security risk
GitLab Ultimate features a Vulnerability Report, which provides information about vulnerabilities from scans of the default branch. It contains cumulative results of all successful jobs, regardless of whether the pipeline was successful. At all levels, the Vulnerability Report contains:
totals of vulnerabilities per severity level
filters for common vulnerability attributes
details of each vulnerability, presented in tabular layout
Clicking on a vulnerability enables access to its Vulnerability Page, which contains details of the vulnerability including a description, location, identifiers, and more. Below is an example of the Vulnerability Page for an SQL Injection vulnerability detected by our SAST scanner:
From here the security team can collaborate by changing the status of a vulnerability along with a reason and creating issues to better track changes.
From the Vulnerability Page, you can also leverage GitLab Duo, our AI-powered suite of features, to explain the vulnerability and automatically create a merge request that resolves the vulnerability.
GitLab Duo’s Vulnerability Explanation uses a large language model to:
summarize the vulnerability.
help developers and security analysts to understand the vulnerability, how it could be exploited, and how to fix it
provide a suggested mitigation
Additional GitLab Ultimate security features
GitLab Ultimate contains many more security features that cannot be found within GitHub Advanced Security. A few examples of these additional security features are: additional security scanners for the complete software development lifecycle (SDLC), granular security guardrails, and custom permissions.
Security scanners for the entire SDLC
Our portfolio of security scanners extends spans the SDLC.
Scanner Name
Scans
Languages/Files scanned
Static Application Security Testing (SAST)
Static source code
C/C++, Java, Python, Go, JavaScript, C#, and more
Dynamic Application Security Testing (DAST)
Running web application, live API
Language-agnostic
Infrastructure as Code (IaC) Scanning
IaC files
Terraform, AWS Cloud Formation, Ansible, and more
Container Scanning
Static and running container images
Dockerfile
Dependency Scanning and License Scanning
Application dependencies
Requirements.txt, Yarn, Gradle, Npm, and more
Web API Fuzz Testing
Sends random/malformed data to web-api
OpenAPI, GraphQL, HAR, Postman Collection
Coverage-guided Fuzz Testing
Sends random/malformed data to function
C/C++, Go, Swift, Python, Rust, Java, JavaScript, AFL
GitLab also allows you to integrate third-party scanners and custom scanners into the platform. Once integrated, the scanner results are automatically presented in various places in GitLab, such as the Pipeline view, merge request widget, and Security dashboard. See the Security Scanner Integration documentation to learn more.
Granular security and compliance policies
Policies in GitLab provide security and compliance teams with a way to enforce controls globally in their organization. Security teams can ensure:
security scanners are enforced in development team pipelines with proper configuration
all scan jobs execute without any changes or alterations
proper approvals are provided on merge requests based on results from those findings
Compliance teams can centrally enforce multiple approvers on all merge requests and ensure various settings are enabled on projects in scope of organizational requirements, such as enabling or locking merge request and repository settings. To learn more see the GitLab Security Policy documentation.
Custom roles and granular permissions
GitLab Ultimate provides custom roles, which allow an organization to create user roles with the precise privileges and permissions required for that organization’s needs.
For example, a user could create a “Security Auditor” role with permissions to view security vulnerabilities in the system, but not be able to view source code, nor perform any changes within the repository. This granular set of permissions enables well-defined separation of duties.
To learn more see the Custom Roles and available Granular Permissions documentation.
Compliance Center
The Compliance Center is the central location for compliance teams to manage their compliance standards’ adherence reporting, violations reporting, and compliance frameworks for their group. The Compliance Center includes the following:
Compliance standards adherence dashboard lists the adherence status of projects complying to the GitLab standard.
Compliance violations report shows a high-level view of merge request activity for all projects in the group.
Compliance frameworks report shows all the compliance frameworks in a group.
Compliance projects report shows the compliance frameworks that are applied to projects in a group.
These dashboards assist with making sure separation of duties is being followed to optimize compliance within your organization. To learn more see the Compliance Center documentation.
Read more
This article covers only a portion of the wide range of security features GitLab Ultimate offers. Check out these resources to learn more about how GitLab Ultimate can help enhance your organizational security and developer efficiency:
Why GitLab Ultimate
Getting Started with DevSecOps Tutorial
Getting Started with DevSecOps Sample Project
Import your project from GitHub to GitLab documentation
Migrating from GitHub Actions documentation
Tutorial: Create and run your first GitLab CI/CD pipeline
Tutorial: Create a complex pipeline
CI/CD YAML syntax reference