Tools & TutorialsMEDIUM

Tools - New Dimensional Analysis Plugin for Claude Released

TOTrail of Bits Blog
Claudedimensional analysiscode auditingLLMTrail of Bits
🎯

Basically, there's a new tool that helps check code for mistakes using a special method called dimensional analysis.

Quick Summary

A new plugin for Claude enhances code auditing through dimensional analysis. It achieves impressive results, helping developers identify code mismatches effectively. This innovative tool is a game-changer for arithmetic-heavy projects.

What It Does

The newly released dimensional analysis plugin for Claude is designed for developers and auditors looking to enhance their code quality. Unlike traditional methods that rely on Large Language Models (LLMs) to find bugs, this plugin takes a unique approach. It uses LLMs to annotate code with dimensional types, which helps identify mismatches mechanically. This innovative method has shown impressive results, achieving a 93% recall rate in tests, significantly outperforming previous baseline prompts that only managed 50% recall.

This plugin is particularly useful for projects that involve complex arithmetic, such as smart contracts or blockchain nodes. By implementing dimensional analysis, developers can gain a deeper understanding of their code, improving both human and LLM comprehension of arithmetic expressions.

How It Works

The plugin operates through four main phases: dimension discovery, dimension annotation, dimension propagation, and dimension validation. In the first phase, a subagent identifies a vocabulary of fundamental base units for numerical terms in the code. This vocabulary is stored in a file called DIMENSIONAL_UNITS.md, which can be referenced later.

Next, multiple subagents annotate the codebase using the dimensional vocabulary. They focus on key areas such as state variables and function arguments, creating what are known as anchor annotations. The third phase involves propagating these dimensions across files to ensure consistency. If mismatches are detected, they are flagged for further review in the final phase, where the system checks for dimensional mismatches during various operations.

Benchmarking

In benchmarking tests, the dimensional analysis plugin was evaluated against a set of dimensional mismatch issues found in unpublished audits. The results were striking: the plugin achieved a 93% recall rate with a standard deviation of 12%, showcasing both better performance and consistency compared to the baseline prompt's 50% recall with a 20% standard deviation. This indicates that the plugin not only identifies more issues but does so reliably.

The significant improvement in performance is attributed to the plugin's methodology, which focuses on annotating code rather than relying solely on LLM judgment. This shift in approach allows for a more accurate identification of potential issues, making it a valuable tool for developers.

For developers working on arithmetic-heavy projects, it is highly recommended to integrate this plugin into your workflow. After running the plugin, consider committing the DIMENSIONAL_UNITS.md file along with the generated annotations. This practice not only helps in identifying bugs but also enhances the understanding of the codebase.

While the plugin is a powerful tool, it is essential to remember that LLMs are probabilistic and may not catch every dimensional error. Continuous improvement is a priority, and users are encouraged to report any missed errors on GitHub. By leveraging this plugin, developers can significantly improve their code quality and efficiency in identifying dimensional mismatches.

🔒 Pro insight: This plugin represents a significant advancement in code auditing, leveraging dimensional analysis to enhance LLM capabilities in identifying mismatches.

Original article from

Trail of Bits Blog

Read Full Article

Related Pings

LOWTools & Tutorials

Reach Security - Awarded Best Continuous Threat Exposure Solution

Reach Security has been awarded for its AI-driven platform that enhances threat exposure management. This recognition highlights the importance of continuous assessment in cybersecurity. Organizations can now better identify and remediate vulnerabilities with automated solutions.

SC Media·
MEDIUMTools & Tutorials

Nucleus Security - Awarded Best Vulnerability Management Solution

Nucleus Security has been awarded the Best Vulnerability Management Solution in the 2026 SC Awards. This recognition highlights its innovative AI-driven platform that helps organizations manage vulnerabilities effectively. With impressive customer success stories, Nucleus is making waves in the cybersecurity landscape.

SC Media·
LOWTools & Tutorials

Securonix UEBA - Awarded Best Insider Threat Solution

Securonix UEBA has been recognized as the Best Insider Threat Solution at the 2026 SC Awards. This platform uses advanced analytics to detect insider threats effectively. Its capabilities are crucial for organizations across various industries to safeguard against unauthorized access and data breaches.

SC Media·
MEDIUMTools & Tutorials

Kali Linux 2026.1 - New Tools and BackTrack Mode Released

Kali Linux 2026.1 has been released with 8 new tools and a refreshed theme. This update enhances ethical hacking capabilities and introduces a nostalgic BackTrack mode. Users can easily upgrade or download the latest version.

BleepingComputer·
MEDIUMTools & Tutorials

Microsoft Entra ID - New External MFA Option Available

Microsoft has rolled out external MFA for Entra ID, allowing third-party authentication solutions. This flexibility helps organizations meet compliance needs and enhances security. It's a significant step towards better identity management in the digital landscape.

Help Net Security·
MEDIUMTools & Tutorials

Tools - Spur Intelligence Enhances IP Intelligence Platform

Spur Intelligence has enhanced its IP intelligence platform. New features improve visibility into anonymized infrastructure, helping security teams make informed decisions. This is crucial as fraudsters increasingly use these technologies to obscure their activities.

Help Net Security·