1. Creating a runner with the project registration token
1. Converting a shared runner into a specific runner (one-way, admin only)
There are several ways to create a runner instance. The steps below only
concern registering the runner on GitLab CI.
### Registering a Specific Runner with a Project Registration token
To create a specific runner without having admin rights to the GitLab instance,
visit the project you want to make the runner work for in GitLab CI.
Click on the runner tab and use the registration token you find there to
setup a specific runner for this project.
![project runners in GitLab CI](project_specific.png)
To register the runner, run the command below and follow instructions:
```
sudo gitlab-runner register
```
### Making an existing Shared Runner Specific
If you are an admin on your GitLab instance,
you can make any shared runner a specific runner, _but you can not
make a specific runner a shared runner_.
To make a shared runner specific, go to the runner page (`/admin/runners`)
and find your runner. Add any projects on the left to make this runner
run exclusively for these projects, therefore making it a specific runner.
![making a shared runner specific](shared_to_specific_admin.png)
## Using Shared Runners Effectively
If you are planning to use shared runners, there are several things you
should keep in mind.
### Use Tags
You must setup a runner to be able to run all the different types of jobs
that it may encounter on the projects it's shared over. This would be
problematic for large amounts of projects, if it wasn't for tags.
By tagging a Runner for the types of jobs it can handle, you can make sure
shared runners will only run the jobs they are equipped to run.
For instance, at GitLab we have runners tagged with "rails" if they contain
the appropriate dependencies to run Rails test suites.
### Be Careful with Sensitive Information
If you can run a build on a runner, you can get access to any code it runs
and get the token of the runner. With shared runners, this means that anyone
that runs jobs on the runner, can access anyone else's code that runs on the runner.
In addition, because you can get access to the runner token, it is possible
to create a clone of a runner and submit false builds, for example.
The above is easily avoided by restricting the usage of shared runners
on large public GitLab instances and controlling access to your GitLab instance.
### Forks
Whenever a project is forked, it copies the settings of the jobs that relate
to it. This means that if you have shared runners setup for a project and
someone forks that project, the shared runners will also serve jobs of this
project.
# Attack vectors in runners
Mentioned briefly earlier, but the following things of runners can be exploited.
We're always looking for contributions that can mitigate these [Security Considerations](https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/blob/master/docs/security/index.md).