streaak / keyhacks

Keyhacks is a repository which shows quick ways in which API keys leaked by a bug bounty program can be checked to see if they're valid.
4.84k stars 1.01k forks source link

Adding GitLab Runner Registration Token #123

Closed evanstucker-hates-2fa closed 2 years ago

evanstucker-hates-2fa commented 2 years ago

Example output for good token:

docker run --rm gitlab/gitlab-runner register \
  --non-interactive \
  --executor "docker" \
  --docker-image alpine:latest \
  --url "https://gitlab.com/" \
  --registration-token "GR13489413dcjcQjtGxUf2jkzQM9j" \
  --description "keyhacks-test" \
  --maintenance-note "Testing token with keyhacks" \
  --tag-list "docker,aws" \
  --run-untagged="true" \
  --locked="false" \
  --access-level="not_protected"
Runtime platform                                    arch=amd64 os=linux pid=7 revision=32fc1585 version=15.2.1
Running in system-mode.                            

Registering runner... succeeded                     runner=GR13489413dcjcQjt
Runner registered successfully. Feel free to start it, but if it's running already the config should be automatically reloaded!

Configuration (with the authentication token) was saved in "/etc/gitlab-runner/config.toml" 

Example output for bad token (I just deleted the runner and reset the token):

docker run --rm gitlab/gitlab-runner register \
  --non-interactive \
  --executor "docker" \
  --docker-image alpine:latest \
  --url "https://gitlab.com/" \
  --registration-token "GR13489413dcjcQjtGxUf2jkzQM9j" \
  --description "keyhacks-test" \
  --maintenance-note "Testing token with keyhacks" \
  --tag-list "docker,aws" \
  --run-untagged="true" \
  --locked="false" \
  --access-level="not_protected"
Runtime platform                                    arch=amd64 os=linux pid=7 revision=32fc1585 version=15.2.1
Running in system-mode.                            

ERROR: Registering runner... forbidden (check registration token)  runner=GR13489413dcjcQjt
PANIC: Failed to register the runner.  
streaak commented 2 years ago

Thanks for the PR