{"id":108948,"date":"2026-03-19T00:15:56","date_gmt":"2026-03-19T03:15:56","guid":{"rendered":"https:\/\/mastertrend.info\/?p=108948"},"modified":"2026-03-19T00:58:55","modified_gmt":"2026-03-19T03:58:55","slug":"betterleaks-secrets-scanner","status":"publish","type":"post","link":"https:\/\/mastertrend.info\/en\/escaner-de-secretos-betterleaks\/","title":{"rendered":"Betterleaks secrets scanner vs. Gitleaks"},"content":{"rendered":"<h2>Betterleaks secrets scanner: architecture and keys<\/h2>\n<p>The detection of secrets in repositories has changed considerably in recent years. Previously, it was enough to look for suspicious strings or keys with high entropy in the code. Today, the situation is different: larger repositories, faster CI\/CD pipelines, and, above all, an increasing amount of code generated by automated tools or AI models.<\/p>\n<p>This has a practical consequence: the problem is no longer just finding secrets, but separating what is truly dangerous from what merely appears to be. Many teams are discovering that the real cost of these scanners lies not in running the analysis, but in reviewing hundreds of false positives.<\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" src=\"https:\/\/mastertrend.info\/wp-content\/uploads\/2025\/11\/GreyNoise-lanza-un-escaner-gratuito-para-comprobar-si-formas-parte.jpg\" alt=\"Betterleaks, a new open-source secrets scanner to replace Gitleaks\" width=\"1600\" height=\"900\" title=\"\"><\/p>\n<h2 style=\"margin-top: 0.6em;\">Detection architecture: what changes with Betterleaks<\/h2>\n<p>Betterleaks appears precisely in this context. It doesn't attempt to completely reinvent secret scanning, but it does challenge a widespread assumption: that detecting patterns is enough.<\/p>\n<p>In many modern repositories it is not.<\/p>\n<p>The project, developed by Zach Rice and maintained with support from Aikido, proposes something slightly different. Instead of focusing solely on detecting matches, it attempts to validate whether the finding makes sense before escalating it as an alert.<\/p>\n<p>This might seem like a minor detail, but it significantly changes the dynamics in large teams. When a scanning system generates too many irrelevant alerts, the team's natural reaction is to ignore them. And in security, an ignored alert can be worse than no alert at all.<\/p>\n<p>To address this problem, Betterleaks introduces two interesting technical pieces: validation using CEL (Common Expression Language) and a metric called \u201cToken Efficiency\u201d, based on BPE tokenization.<\/p>\n<p>The idea is that not everything that appears to be a secret actually is. Some high-entropy strings are simply hashes, identifiers, or automatically generated fragments. The system's goal is to reduce that noise.<\/p>\n<p>The project documentation mentions a comparison where BPE tokenization achieves a 98.6% recall rate compared to the 70.4% obtained using entropy in the CredData dataset. As with any benchmark, these numbers are indicative. They serve well as a reference point, but do not replace testing in real repositories.<\/p>\n<div style=\"text-align: center;\">\n<figure class=\"image\" style=\"display: inline-block;\"><img decoding=\"async\" src=\"https:\/\/mastertrend.info\/wp-content\/uploads\/2026\/03\/Betterleaks-un-nuevo-escaner-de-secretos-de-codigo-abierto-para.jpg\" alt=\"Scanning speed comparison\" width=\"900\" height=\"505\" title=\"\"><figcaption><strong>Scanning speed comparison<\/strong><br \/>\n<em>Source: GitHub<\/em><\/figcaption><\/figure>\n<\/div>\n<h3>Components that make the difference<\/h3>\n<p>Reviewing the project's characteristics reveals a clear direction: to facilitate deployment in real-world environments without adding too much technical complexity.<\/p>\n<p>Among the most prominent elements are:<\/p>\n<ul>\n<li>Rule-defined validation using CEL (Common Expression Language)<\/li>\n<li>Token Efficiency Scanning based on BPE tokenization rather than entropy, achieving 98.6% recall vs 70.4% with entropy on the CredData dataset<\/li>\n<li>Pure Go implementation (no CGO or Hyperscan dependency)<\/li>\n<li>Automatic handling of doubly\/triply encoded secrets<\/li>\n<li>Expanded rule set for more providers<\/li>\n<li>Parallelized Git scanning for faster repository analysis<\/li>\n<\/ul>\n<p>Although this list may seem like just a set of technical improvements, what's interesting is how they affect everyday use.<\/p>\n<p>For example, a full Go implementation with no native dependencies greatly simplifies integration into CI\/CD pipelines. In many teams, small details like that determine whether a tool ends up being used or gets forgotten in a repository.<\/p>\n<p>BPE tokenization also introduces a different approach. Instead of simply measuring the randomness of a chain, it analyzes token patterns that more closely reflect how modern credentials are actually structured.<\/p>\n<h3>What happens when the scanner finds something?<\/h3>\n<p>When Betterleaks detects a potential secret, the process doesn't end there.<\/p>\n<p>First, the context is evaluated using rules defined in CEL. This allows for the addition of further conditions: for example, checking if the format matches the expected provider or discarding patterns that frequently appear in examples or fictitious data.<\/p>\n<p>This step may seem trivial, but it has a significant practical impact. False positives not only waste time but also reduce the team's confidence in the alert system.<\/p>\n<p>Another interesting aspect is the automatic handling of secrets encoded multiple times. In some repositories, credentials appear transformed using base64 or other encoding schemes, which complicates their detection.<\/p>\n<p>Even so, it's worth remembering something that's sometimes overlooked: no scanner can completely replace human review. Detecting a secret is just the beginning; deciding what to do with it (revoke, rotate, ignore, or investigate) remains a contextual decision.<\/p>\n<h3>Governance and human-centered approach\/AI<\/h3>\n<p>Betterleaks is published under the MIT license and features external contributions from organizations such as Royal Bank of Canada, Red Hat, and Amazon.<\/p>\n<p>The project also attempts to adapt to a reality that is increasingly visible in modern repositories: the mix of code written by developers and code generated by automated tools.<\/p>\n<p>In this context, the tool aims to function well in both human-operated workflows and automated systems that review entire repositories. This aligns with the growing use of <a title=\"AI tools \ud83e\udd16 for working remotely without wasting time\" href=\"https:\/\/mastertrend.info\/en\/ai-tools\/\" target=\"_blank\" rel=\"noopener\" data-wpil-monitor-id=\"34584\">automation and tools<\/a> that analyze code or generate automatic reviews.<\/p>\n<p>The roadmap also includes interesting ideas: integration with <a title=\"Application security: Discover the #1 in SAST testing that&#039;s revolutionizing \ud83d\udd12\" href=\"https:\/\/mastertrend.info\/en\/application-security\/\" target=\"_blank\" rel=\"noopener\" data-wpil-monitor-id=\"34585\">data sources beyond Git<\/a>Language model assistance for classifying findings and automatic revocation mechanisms via provider APIs.<\/p>\n<p>This opens up an interesting debate. Automating credential revocation can reduce the time it takes to respond to an incident, but it also means relying on the classification system to be accurate.<\/p>\n<p>If an automatic revocation fails or is triggered by mistake, the operational impact can be considerable.<\/p>\n<h3>Practical implications and limitations<\/h3>\n<p>From an operational point of view, Betterleaks is attractive to teams looking to reduce false positives and simplify deployments.<\/p>\n<p>But it's also important to keep some limits in mind:<\/p>\n<ul>\n<li>Recall metrics depend on the dataset used and can vary considerably between repositories.<\/li>\n<li>Automating actions such as key revocation requires additional controls and audit logs.<\/li>\n<li>Secret scanners remain just one layer of defense within a broader strategy.<\/li>\n<\/ul>\n<p>In many cases, the decision to adopt such a tool depends not so much on its theoretical accuracy as on something simpler: whether it integrates well into the team's workflow.<\/p>\n<p>A highly accurate scanner that generates too much friction is usually abandoned. A reasonably accurate one that is easy to integrate is usually retained.<\/p>\n<p>In that sense, Betterleaks attempts to strike a balance. It doesn't promise to eliminate all false positives or replace existing security processes, but it does aim to reduce noise and facilitate integration into modern pipelines.<\/p>\n<p><a href=\"https:\/\/github.com\/betterleaks\/betterleaks\" target=\"_blank\" rel=\"noopener\" data-schema-attribute=\"mentions\">The project is available on GitHub<\/a> and is presented as an evolution of the approach used by Gitleaks, with the intention of adapting to repositories where automation, analysis agents and code generated by language models are a regular part of the development flow.<\/p>","protected":false},"excerpt":{"rendered":"<p>Betterleaks secrets scanner redefines detection in repositories with CEL validation and BPE tokenization, prioritizing accuracy and governance.<\/p>","protected":false},"author":1,"featured_media":108949,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ai_generated_summary":"","iawp_total_views":83,"jnews-multi-image_gallery":[],"jnews_single_post":{"format":"standard","override":[{"template":"1","parallax":"1","fullscreen":"1","layout":"right-sidebar","sidebar":"default-sidebar","second_sidebar":"default-sidebar","sticky_sidebar":"1","share_position":"top","share_float_style":"share-monocrhome","show_share_counter":"1","show_view_counter":"1","show_featured":"1","show_post_meta":"1","show_post_author":"1","show_post_author_image":"1","show_post_date":"1","post_date_format":"default","post_date_format_custom":"Y\/m\/d","show_post_category":"1","show_post_reading_time":"1","post_reading_time_wpm":"300","post_calculate_word_method":"str_word_count","zoom_button_out_step":"2","zoom_button_in_step":"3","show_post_tag":"1","show_prev_next_post":"1","show_popup_post":"1","show_comment_section":"1","number_popup_post":"1","show_author_box":"1","show_post_related":"1","show_inline_post_related":"0"}],"image_override":[{"single_post_thumbnail_size":"crop-500","single_post_gallery_size":"crop-500"}],"trending_post_position":"meta","trending_post_label":"Trending","sponsored_post_label":"Sponsored by","disable_ad":"0","subtitle":""},"jnews_primary_category":[],"jnews_social_meta":[],"jnews_review":[],"enable_review":"","type":"percentage","name":"","summary":"","brand":"","sku":"","good":[],"bad":[],"score_override":"","override_value":"","rating":[],"price":[],"jnews_override_counter":{"view_counter_number":"0","share_counter_number":"0","like_counter_number":"0","dislike_counter_number":"0"},"footnotes":""},"categories":[308],"tags":[1620,1639,1445],"class_list":["post-108948","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-seguridad","tag-automatizacion","tag-ciberseguridad","tag-evergreencontent"],"_links":{"self":[{"href":"https:\/\/mastertrend.info\/en\/wp-json\/wp\/v2\/posts\/108948","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mastertrend.info\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mastertrend.info\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mastertrend.info\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mastertrend.info\/en\/wp-json\/wp\/v2\/comments?post=108948"}],"version-history":[{"count":2,"href":"https:\/\/mastertrend.info\/en\/wp-json\/wp\/v2\/posts\/108948\/revisions"}],"predecessor-version":[{"id":108953,"href":"https:\/\/mastertrend.info\/en\/wp-json\/wp\/v2\/posts\/108948\/revisions\/108953"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/mastertrend.info\/en\/wp-json\/wp\/v2\/media\/108949"}],"wp:attachment":[{"href":"https:\/\/mastertrend.info\/en\/wp-json\/wp\/v2\/media?parent=108948"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mastertrend.info\/en\/wp-json\/wp\/v2\/categories?post=108948"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mastertrend.info\/en\/wp-json\/wp\/v2\/tags?post=108948"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}