An AI code reviewer identified a real CSV formula-injection risk in a small pricing calculator. But its first suggested fix could have turned legitimate negative numbers into text, and a second attempt missed a value written in exponent notation. The episode is a useful reminder: assess the finding and the patch separately, then test the patch against the application’s actual data.
What the reviewer found in the CSV export
In a September 5, 2026 account, author 健太 橘 (Kenta Tachibana) describes a browser-based pricing calculator that exported rows as CSV. The author’s usual checks included a static-site audit and a headless-browser run with 14 of 14 checks passing. CodeRabbit’s default CHILL review profile had no actionable comments. After the repository configuration was changed to profile: assertive, the review flagged formula injection in the CSV output. Read the author’s account.
As an Amazon Associate I earn from qualifying purchases.
The concern was that spreadsheet software might interpret a cell beginning with a formula character as a formula rather than ordinary text. The article identifies =, +, -, and @ as relevant prefixes and calls the issue CSV formula injection (CWE-1236). For example, a cell containing =1+1 could be interpreted as a formula when opened in a spreadsheet. This is the behavior as described in the author’s account, not a claim that every spreadsheet or CSV importer handles such cells identically.
Why the first suggested fix risked changing the data
The reviewer’s suggested patch checked whether a value was a string before adding a protective prefix. That check did not fit this code path: values had already passed through toFixed(), so negative numbers such as -1.50 were strings by the time they reached the CSV function. Prefixing them would have made legitimate numeric values text in the exported spreadsheet, interfering with later numeric operations.
#1 Best Overall
That distinction is easy to miss if a patch is judged only by whether it addresses the security finding. The relevant question is also what the value means at the point where the patch runs. Here, “string” described the value’s JavaScript type at the exporter boundary; it did not tell the code whether the contents were intended as text or as a number.
How exponent notation exposed another edge case
The author then tried a hand-written numeric pattern. A later review pointed out that a raw amount could stringify in exponent notation, such as -1e-7, which the pattern did not recognize. A check based on a narrow list of familiar decimal forms can therefore misclassify a number even when common examples appear to work.
The final approach reported in the article used a formula-prefix test together with isNaN(Number(text)) to decide whether to prefix a value. In the examples given, formula-like text such as =1+1, @sum, and +5x was distinguished from numeric strings such as -1.50 and -1e-7. That was the author’s solution for this particular code path, not a universal CSV-sanitization recipe. Spreadsheet behavior can vary with the application, locale, and import process, so the exact handling still needs validation for the software and workflow involved.
Windows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallOutdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchWhat to test before accepting a review patch
A finding and its proposed change should be reviewed as separate claims: is the reported risk real, and does this specific change preserve the application’s intended behavior? For a CSV exporter like the one described, tests should cover both sides of that question.
Rank #3
- Formula-like text: Check values beginning with the prefixes the application is concerned about, including examples such as
=1+1,@sum, and+5x. - Legitimate numeric values: Verify that negative values such as
-1.50remain usable as numbers after export and spreadsheet import. - Unusual numeric representations: Include exponent notation such as
-1e-7if the application can produce it. - The real consumer: Test the exported file in the spreadsheet or importer your users actually rely on; a unit test of a string transformation alone cannot establish how that consumer interprets the result.
These checks follow from the failure modes in the account. They are practical guidance for this sort of exporter, not a guarantee that one test set covers every CSV security edge case.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.What this incident does—and does not—show about AI review
In this one account, changing from CHILL to assertive led to an actionable finding that the default profile had not produced. That does not establish that assertive settings are generally more accurate, or that a particular review profile will find more bugs across repositories. The 14-of-14 browser result is likewise a detail of the author’s own run, not a measure of code-review accuracy.
Rank #4
The author’s concise conclusion captures the separation between diagnosis and implementation: “But both patches I was handed here were correct about the problem and wrong about this codebase.” The story is a firsthand example, not a controlled comparison of AI reviewers or evidence of a general defect-detection rate. It supports a narrower engineering habit: treat an AI review comment as a proposal to investigate, and evaluate its patch in the context of the code and data it touches.
Free tools Windows power users keep installed
One-click scans. No signup required.
If you are choosing an AI pull-request reviewer
This incident does not establish that one review tool is better than another. When evaluating options, compare the controls available for tuning reviews, how findings are grounded in repository context, whether suggestions can be applied directly, supported integrations and languages, privacy and data-handling terms, and total cost for your expected usage.
For example, GitHub’s official guidance says Copilot code-review usage consumes GitHub AI Credits and, beginning June 1, 2026, code-review workflows also consume GitHub Actions minutes. Access and billing depend on the plan and organization settings. Check the current GitHub documentation for the terms that apply to your account. The author’s account provides no controlled basis for comparing Copilot with CodeRabbit or any other reviewer.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




