Catalogue / zomato-2023-vinifera

Zomato's Vinifera leak monitor throttles jobs by error type, caches GitHub responses and scans commit patches on a dedicated Docker daemon

Zomato, 2023. Vinifera (monitoring of developers' public code and chat platforms for leaked secrets).

Organisation
Zomato
Evidence
Reported from production
System
Vinifera (monitoring of developers' public code and chat platforms for leaked secrets)
As of
2023
Source
Introducing Vinifera: A guide on how it prevents and mitigates accidental data leaks at scale

Zomato Blog, published 2023-09-13 (Read from an archive copy captured in April 2025.)

Architecture

Vinifera is a standard Rails app. Sidekiq manages its jobs, Postgres is the persistent store and Redis the application cache. Employees added to the GitHub organisation are registered as targets and their public repositories and gists are scanned as assets, with revisions stored so that changes are found quickly. Scans run the Gitleaks Docker image through the Docker API in isolated containers. There is a Slack integration for monitoring, and pager events notify the on-call team.

Section: Vinifera’s Development Journey | Section: Vinifera’s Operations

Components

ComponentRoleWhere
SidekiqManages the job lifecycle, including scheduling and retries; scans are triggered through it, and a target monitor job is re-enqueued for the next scan after it succeeds.Near: Sidekiq is used for efficient job lifecycle | Near: Scanning is triggered via Sidekiq | Near: it is re-enqueued for the subsequent scan
Gitleaks integrationThe scanner: its Docker image is run through the Docker API, each scan in an isolated container.Near: Docker image is used for scanning with | Near: all scans are performed within isolated Docker
PostgresThe persistent data store; it also holds the enqueue information that controls when a target's next scan runs.Near: Postgres was chosen as the persistent data | Near: with the enqueue information stored in the
RedisThe application cache, also used to cache GitHub API responses.Near: Redis served as the application cache | Near: to cache the responses in Redis
Slack integration and pager eventsGive real-time monitoring and event checking in Slack, and page the on-call team for security incidents.Near: real-time monitoring and event checking through Slack | Near: Pager events are triggered to notify the
DatadogMonitors relevant statistics and the health of the service.Near: Vinifera further leverages Datadog to monitor relevant
DiSeAl (Distributed Security Alerting)An alerting and acknowledgment system: when a new resource is registered, an internal lookup finds its owner in the organisation and an alert is sent to them.Section: Distributed Security Alerting

Figures, as the source states them

FigureAs statedNoteWhere
Maximum memory used by a scan of a large fork, in some cases1 GBAlmost; before patch-only scanningNear: the maximum memory used for scanning reached
Share of total CPU used by a scan of a large fork, in some cases99 percentApproximately; before patch-only scanningNear: the maximum memory used for scanning reached

Records

Failure#f1

Cloning and scanning developers' huge open-source forks spiked the Docker daemon and at times choked the cluster

zomato-2023-vinifera#f1 at corpus version 26a1b3a7e3dd
Trigger

Recurring, with no dates given. A developer forked a large open-source project in order to contribute to it; the post names the Linux kernel repository, odoo and the Android AOSP source as examples.

Near: This arose when a developer forked a

How it failed

Vinifera scanned the entire forked repository for violations. Scanning big forks was one of the main causes of resource usage spikes on the Docker daemon; in some cases a scan's maximum memory reached almost 1GB and about 99% of the total CPU.

Near: One of the main causes that spiked | Near: the maximum memory used for scanning reached

Impact

The enormous forks sometimes caused the cluster to choke. The post reports no missed leak or outage figure.

Near: sometimes caused the cluster to choke

Fix

Vinifera now works out the commit patch and scans that directly, without cloning the whole fork: the GitHub user activity API identifies commits a developer pushed to collaborative projects or forks, and the relevant patch is extracted for scanning.

Near: scanned the commit patch instead of cloning | Near: By leveraging the user activity GitHub API

Decision#d1

Throttle jobs automatically by error type so retries do not pile onto a struggling dependency

zomato-2023-vinifera#d1 at corpus version 26a1b3a7e3dd
Chosen

Vinifera analyses the type of error when a job fails. When the failure comes from GitHub or from the Docker box, jobs are throttled automatically, with limits adjusted dynamically for specific periods, to give the system a window in which to avoid further errors.

Near: If the failures are attributed to issues | Near: dynamically adjusting limits for specific periods

Reasoning

A system that relies on third-party services, or on internal services with limited capacity, needs checks so that it does not overwhelm them. The post says the approach helps avoid the disruption caused by exponential retries.

Near: When relying on third-party services or internal

Reviewer's notes

The post lists this among measures taken for stability and scalability without describing an incident that prompted it or giving the limits used.

The reviewer's reading, not the source's claim

Decision#d2

Cache GitHub API responses in Redis, using HTTP caching response headers, to stay under the rate limit

zomato-2023-vinifera#d2 at corpus version 26a1b3a7e3dd
Chosen

GitHub API responses are cached in Redis through the faraday-http-cache library, which uses response headers such as Etag, Last-Modified and Age. Caching is selective: heavy responses and resources not needed again are deliberately left out.

Near: We employed the faraday-http-cache library | Near: Vinifera employs a selective caching approach

Reasoning

The purpose given is to mitigate rate-limiting issues with the GitHub API.

Near: To mitigate rate-limiting issues, we leveraged caching

Cost

A small impact on storage, as the post puts it, because responses now sit in Redis memory; the selective caching is how that is kept in check.

Near: comes with a small impact on storage

Decision#d3

Run scans on a dedicated Docker daemon with capped CPU so scan trouble cannot stop discovery

zomato-2023-vinifera#d3 at corpus version 26a1b3a7e3dd
Chosen

Scanning was moved to a dedicated machine with its own Docker daemon, and each scan is restricted to a single CPU core and a fraction of CPU weight.

Near: Separating scanning operations to a dedicated machine | Near: restricting scans to a single CPU core

Reasoning

Isolating scans limits the blast radius of any issue, and the CPU restriction is meant to prevent resource exhaustion.

Near: we were able to limit the blast | Near: restricting scans to a single CPU core

Outcome

By the team's account the separation greatly improved performance and prevented resource congestion, and discovery kept running without interruption even while the dedicated Docker machine was experiencing errors. No figures are given.

Near: Separating scanning operations to a dedicated machine | Near: continuity of discovery operations in an uninterrupted

Reviewer's notes

The post does not say where scans ran before the move, and does not present the big-fork spikes in f1 as the reason for this change.

The reviewer's reading, not the source's claim

Decision#d4

Re-enqueue each target's monitor job after a successful run and keep the schedule in the database

zomato-2023-vinifera#d4 at corpus version 26a1b3a7e3dd
Chosen

After the target monitor Sidekiq job runs successfully it is put back on the queue for the next scan, and the enqueue information is stored in the database.

Near: it is re-enqueued for the subsequent scan

Reasoning

Keeping the enqueue information in the database allows fine-tuning and control over when the next scan happens.

Near: This enables fine-tuning and control over the

Review

Extracted by
Claude (feed 38)
Human review
Not started. Status recorded on 2026-12-02.