Sign in or sign up before continuing. Don't have an account yet? Register now to get started.
Register now

Track types of secrets blocked and their cardinality

Overview

The aim is to track types of secrets detected and their cardinality when the feature is enabled in a GitLab instance.

Proposal

Use internal event tracking to count the number and type of secrets detected.

Considerations

  • Coordinate with other track count issues:
    • Track count of suppressed secret detections (#443353 - closed) • Ethan Urie • 17.2
    • Track count of detected secrets (#443352 - closed) • Ethan Urie • 17.2
  • Querying this data seems to be done via Snowplow if we do use the internal tracking events. Knowing how we would query this data could help inform what we include in the events we trigger and what events we trigger.
    • E.g., The easy way would be to create an event type per secret type and the event systems should manage the incrementing, but that would make querying all the secret types difficult (though probably the best route).

Implementation

Like in #443353 (closed), https://gitlab.com/gitlab-org/gitlab/blob/master/ee/lib/gitlab/checks/secrets_check.rb looks to be a good place to add the event creation.

Refinement Progress

If a checkbox is not relevant for the issue, please remove it.

  • This issue describes a problem to solve, or a task to complete, and it's confirmed.
  • This issue describes a proposal or an implementation plan that outlines a way to solve the problem or complete the task.
  • This issue requires assistance or support from other groups, and it's indicated in the issue description.
  • This issue could affect application security or performance, and the concern is explained in the issue description.
  • This issue is the smallest iteration possible and doesn't require further break down.
  • This issue has weight set - based on how many tasks or merge requests are required - and needs weight label is removed.
  • This issue is labeled correctly.
  • This issue is reviewed by another team member to confirm strategy and estimate.
  • Finally, add workflowready for development label to this issue.
Edited Apr 11, 2024 by Ahmed Hemdan
Assignee Loading
Time tracking Loading