Secret Detection Runbooks

Overview

This page lists runbooks used by the Secret Detection team for monitoring, mitigating and responding to an incident.

Runbooks


Secret Detection Service: General FAQs

This page contains answers to the general questions about the Secret Detection Service. This runbook can be used by anyone who want to understand the technical aspects about the service.

General FAQs

  1. Where is the service deployed?

    The service is deployed on Runway which internally uses Google Cloud Run to manage containers.

  2. In how many environments will the service be deployed?

    The service is deployed in Staging (https://secret-detection.staging.runway.gitlab.net) and Production (https://secret-detection.production.runway.gitlab.net).

Secret Detection Service: Monitoring

When to use this runbook?

This runbook is intended to be used when monitoring the Secret Detection Service to identify and mitigate any reliability issues or performance regressions that may occur when it is enabled on Gitlab.com and/or Dedicated.

What to monitor?

We primarily need to monitor system metrics and recurrent errors raised within the service. Here are the narrowed down list of monitoring targets:

  • Resource Saturation: Saturation is a measure of what ratio of a finite resource is currently being utilized.
  • Aggregated Service Level Indicators(SLIs)
    • Apdex Score: Apdex is a measure of requests that complete within a tolerable period of time for the service.
    • Error Ratio: Error rates are a measure of unhandled service exceptions per second. Client errors are excluded when possible.
    • Request Rate: The operation rate is the sum total of all requests being handle for all components within this service. Note that a single user request can lead to requests to multiple components.
  • Recurrent appplication errors raised by the service.

How to monitor the service?

Most of above-mentioned monitoring targets i.e. Resource Saturation and Aggregated SLIs, are available in the Service Overview Dashboard.

Secret Push Protection Monitoring

When to use this runbook?

This runbook is intended to be used when monitoring the secret push protection feature to identify and mitigate any reliability issues or performance regressions that may occur when it is enabled on Gitlab.com. The runbook can also be used to understand more about relevant dashboards below and how to improve them:

What to monitor?

While the feature, in its current form, doesn’t have any external components and is entirely encapsulated within the application server as a dependency, it does interact with a number of components as can be seen in this push event sequence diagram. Those components are:

Secret push protection performance testing

When to use this runbook?

Use this runbook for:

Prerequisites

  • gcloud (official instructions) - for running various commands, and for logging in to the test runner vm
  • The Static Analysis GCP Project (see Resources section) - access required to make changes to the infrastructure

Running GPT tests

Manual testing

Get the url and password for the root user from 1password by searching for Static Analysis in the Engineering Vault. Please don’t delete projects, groups, or users, but feel free to create any of those, or anything else you’d like to test with.

Secret push protection troubleshooting

When to use this runbook?

Use this runbook for troubleshooting Production issues related to the secret push protection feature.

Relevant settings

Setting Type Level Visibility
pre_receive_secret_detection_beta_release Feature Flag Instance Not visible, has to be toggled via ChatOps.
pre_receive_secret_detection_enabled Database Setting Instance Only in a Dedicated instance, or with pre_receive_secret_detection_beta_release enabled and only when the feature is licensed (in Ultimate).
pre_receive_secret_detection_push_check Feature Flag Project Not visible, has to be toggled via ChatOps.
pre_receive_secret_detection_enabled Database Setting Project Only in a Dedicated instance, or with pre_receive_secret_detection_enabled enabled and only when the feature is licensed (in Ultimate).

Monitoring

Secret push protection monitoring is the preferred dashboard for monitoring the feature to help identify and mitigate any reliability issues or performance regressions that may occur when it is enabled on GitLab.com.