
TL;DR
- Legacy Goat is a small bank app with security flaws planted on purpose. It's written in COBOL, Fortran, Object Pascal, SAS and ABAP. It's open source, and its answer key is public.
- The name follows the "Goat" tradition of deliberately vulnerable apps such as OWASP WebGoat, with "Legacy" for the languages it uses.
- Few code scanners read these languages well, and none that we found documents following data from one language into the next. That's where these bugs hide.
- Octane Core beat the frontier models we tested in Claude Code and Codex: its selected run found all 15 planted flaws with zero false positives in our benchmark, compared with 9 for Mythos 5.2 and 12 for GPT-5.6-Cyber.
- Octane's support for these languages is in early access. Legacy Goat is now a community project, and we want your flaws, exploits and new languages.
Old code still moves the money
Banks, governments, labs and drug makers still run on code older than most of their staff.
| Language | Where it still runs |
|---|---|
| COBOL | 8 of the 11 most critical US federal legacy systems use COBOL or assembly. Some are 60 years old, and they cost about $754 million a year to run (GAO, 2025). A survey paid for by Micro Focus counts 775 to 850 billion lines of COBOL in production (2022). |
| Fortran | About 60% of the programs on ARCHER2, the UK's national supercomputer, are Fortran (EPCC, 2024). The European weather center's OpenIFS forecast model is 94% Fortran (GitHub). |
| Object Pascal (Delphi) | 2.5% of developers in Stack Overflow's 2025 survey use Delphi. That's more than Fortran or COBOL (Stack Overflow, 2025). |
| SAS | The FDA still requires SAS's file format for every electronic study dataset in a drug submission (FDA, 2026). SAS says more than 5,100 banks use its software (SAS). |
| ABAP | Gartner expects about 17,000 of SAP's 35,000 ECC customers to still be on ECC when its standard support ends in 2027 (CIO.com, 2025). |
This code pays benefits, prices loans, forecasts storms and closes the books. Most security tools were built for the web apps that sit in front of it.
Most scanners skip these languages
We read the public docs for 16 code analysis tools to see what they really check in these five languages. Most list one or two of them, and few go deep.
- No security scanner we checked covers SAS.
- Few tools list Fortran or Delphi at all. Those that do mostly offer code-quality rules, simple text matching, or an AI add-on from one vendor.
- COBOL shows up on many lists, but with few security checks. One well-known scanner ships 15 COBOL checks, compared with 321 for Java. Another has four COBOL vulnerability rules, and none of them looks for injection.
- ABAP gets the most attention. Even so, SAP's own checker follows data only inside a single program.
None of their technical docs describe tracking data from one language into another. Real legacy systems work that way. A web screen calls a gateway, the gateway calls COBOL, and COBOL asks a Fortran engine for a price.
A scanner that reads each language alone can't see a bug that starts in one language and lands in another.
Meet Legacy Goat
Legacy Goat is a small core bank. It has 3,412 lines of code in five languages, and each language does the job it would do in a real bank.
The name follows a familiar convention in security: deliberately vulnerable apps often go by "SomethingGoat", such as OWASP WebGoat. We chose Legacy Goat so security practitioners would know what to expect: flaws planted on purpose, this time in legacy languages.
COBOL keeps the ledger. It handles sign-on, transfers, cash and account holds, and it stores data in SQL, indexed VSAM files and an IMS database. Fortran prices fees and interest. Object Pascal runs the teller console in the browser. SAS builds the posting report, and ABAP books each transfer in the general ledger. Page through the app and its code:










We planted 16 security flaws. The answer key lists each one: where it is, which settings expose it, how to exploit it and how to fix it. Scanners get "blind" copies of the code, which contain no hint of where the flaws are.
The project lives in two repositories. legacy-goat holds the bank's code and the answer key. legacy-goat-runtimes runs it on your laptop. It builds a container for each language and puts each module behind a small REST adapter. It adds a gateway and the databases, and it carries the tests plus a working exploit for each of the 15 runtime flaws.
The same code ships with two sets of settings. The default settings close off 13 of the flaws. The permissive settings expose 15. A good scanner finds the reachable flaws and stays quiet about the rest.
Watch money flow backwards
One of the planted flaws, LG-BIZ-001, works in the default configuration. A teller sends a negative amount, and the COBOL core moves the money the wrong way.
Narrated, under a minute. Turn on captions with the CC button.
Step through it at your own pace:

Step 1 of 5
The teller types minus $500
A teller signs on and fills in the transfer form: minus $500 from ACME Widgets to Globex.

Step 2 of 5
The console lets it through
The Object Pascal console checks deposits with IsPositiveMoney. Transfers get only IsMoney, whose pattern allows a leading minus sign.

Step 3 of 5
COBOL subtracts it anyway
The gateway hands the amount to the COBOL core. It subtracts the amount from ACME and adds it to Globex, and nothing checks the sign.

Step 4 of 5
The money moves backwards
The transfer posts. ACME goes up from $10,000 to $10,500, Globex drops to $4,500, and the general ledger books it like any other.

Step 5 of 5
The fix
Four lines of COBOL reject any amount at or below zero, before the ledger is touched.
This bug crosses three languages. Object Pascal lets the amount in, a C++ gateway carries it, and COBOL does the math. Each piece looks fine on its own.
How Octane finds them
We pointed Octane at Legacy Goat the way a customer points it at their own code. It got two things. One was the bank's source code. The other was a written description of the system: which service calls which, on what port, with which settings, and who can reach what. It's the kind of document most teams already have.
Octane never saw legacy-goat-runtimes, so it had none of the adapters, gateway code, tests or exploits.
From those two inputs, Octane models how a request moves at runtime. A transfer goes from the console, through the gateway, into COBOL, Fortran, SAS and ABAP. Octane then checks each path against who can reach it and which settings are on.
The scan results:
- Under the permissive settings, Octane found all 15 exploitable flaws.
- Under the default settings, it found both reachable flaws. It didn't report the 13 that those settings close off.
- It also found two real bugs that we never planted. One let a self-transfer create money. The other let a control character break the general ledger's replies. We fixed both.
Octane needs your code and a description of how it runs. It doesn't need a running copy of your system.
Benchmark: how much did each review find?
We scored the reports against the 15 runtime flaws exposed by the permissive settings. Each review received the application source and deployment context. We matched findings to the answer key by the flaw they described.
We scored Claude Code security reports with the reporting threshold set to 0, counting confirmed findings regardless of confidence. Unverified findings and those rejected as false positives, out of scope or not reachable stayed out. The other columns use accepted findings.
Open the scorecard for the full-size image. Claude Code used /security-review, Codex used native /review.
Octane Core's selected run reported all 15. Mythos 5.2 in Claude Code was precise: all nine accepted findings matched planted flaws, with no false positives under our scoring rules. But that clean report still missed six exploitable bugs. GPT-5.6-Cyber (Daybreak Red) in Codex found 12 of the 15, but returned 25 reports, 13 outside the benchmark’s vulnerability set. For a security team, that means more work deciding which reports represent vulnerabilities that need fixing. Octane combined broader coverage with a focused review queue: all 15 planted flaws, with no extra findings to triage in this benchmark.
The FP, precision and F1 numbers use the following convention: reports outside the answer key count as false positives. Not all of those reports have been ruled out; some may be acceptable code-quality issues but were not part of our core vulnerability set.
Run it, break it, extend it
Legacy Goat is open source under the GPL, and it's now a community project. You can run it with Docker or Podman:
git clone https://github.com/Octane-Security/legacy-goat.git
git clone https://github.com/Octane-Security/legacy-goat-runtimes.git
cd legacy-goat-runtimes
make up-build APP_PROFILE=permissive
make verify APP_PROFILE=permissive
Then open http://localhost:8085 and sign on as teller TLR001 with the password teller-pw.
We'd love your help. You can plant a new flaw in a module that's already there, or add a module in a language we don't cover yet, like PL/I, RPG or Natural. You can write a sharper exploit, or report a bug we didn't plant. Most changes touch both repositories, so CONTRIBUTING.md covers both in one place. Open an issue first, and we'll help you plan it.
Point your own scanner at it, too. The answer key is public. When we review a contribution, we don't require any scanner to find its flaw, ours included.
Want to know what's hiding in your COBOL, Fortran, Delphi, SAS or ABAP? Ask us about early access.
Subscribe to our newsletter













