# GitLab System Security Baseline

![GitLab platform baseline](/files/JOj1V5TFmyU3pPn65oWT)

> **Intro:** GitLab is simultaneously a source platform, CI engine, artifact hub, and release-control plane. Hardening it means hardening both the platform and the runner boundary.

## Platform baseline

```ruby
external_url 'https://gitlab.example.com'
nginx['redirect_http_to_https'] = true
gitlab_rails['gitlab_default_can_create_group'] = false
gitlab_rails['gitlab_signup_enabled'] = false
gitlab_rails['gitlab_restricted_visibility_levels'] = ['public']
```

## Runner baseline

```toml
[[runners]]
  name = "isolated-docker-runner"
  executor = "docker"
  environment = ["FF_ENABLE_JOB_CLEANUP=1"]
  [runners.docker]
    privileged = false
    pull_policy = "always"
    disable_cache = true
    cap_drop = ["ALL"]
```

## Control goals

* isolate runners from the GitLab application plane
* avoid privileged runners except in isolated special cases
* protect variables, branches, tags, and environments
* use pinned CI/CD components
* retain evidence, backups, and auditability

## Cross-links

* [Runner Isolation and Trust Boundaries](/devsecops-cicd-and-supply-chain/index-1/runner-isolation-and-trust-boundaries.md)
* [Protected Environments and Deployment Approvals](/devsecops-cicd-and-supply-chain/index-1/protected-environments-and-deployment-approvals.md)
* [🚨 GitLab Top 10 Misconfigurations](/devsecops-cicd-and-supply-chain/index-1/gitlab-top-10-misconfigurations.md)

![Footer](/files/fQNzMAKOWjRP989toSYF)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.product-security.expert/devsecops-cicd-and-supply-chain/index-1/gitlab-system-security-baseline.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
