Inspiration

Banks are starting to put AI assistants into their apps. These assistants read text written by strangers, like the note on a payment, and a weak one can mistake that text for an order and move money. I wanted a safe way to test that before it happens with real money.

What it does

BankGuard Red Team is a testbed for AI banking assistants. It has:

  • a mock bank with synthetic data only
  • 20 attacks: 12 development attacks and 8 frozen test attacks, in four categories
  • 15 benign tasks, to check the defenses don't block normal use
  • a deterministic scorer that compares the bank state before and after, plus a canary-string check, with no AI judge
  • three defenses measured before and after: a policy layer (real confirmation, untrusted data wrapped as data), risk scoring with a cooling-off period, and an output filter
  • a live local demo and a hosted replay page of recorded runs

How I built it

The assistant runs NVIDIA Nemotron 3 Nano (nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B) on Nebius Token Factory, with tool calling for balances, transactions, recipients and transfers. The demo is a FastAPI app with a rate limit and a daily cap. The hosted page is a static replay of real recorded runs on a Hugging Face Static Space.

Results (frozen test set, 3 runs per attack)

  • Without defenses: 11 of 24 attacks succeeded
  • Policy layer: 1 of 24
  • Policy plus risk scoring: 2 of 24
  • Policy, risk scoring and output filter: 0 of 24
  • Benign tasks: 0 of 45 falsely blocked without defenses and with the policy layer; 3 of 45 with the risk layer on

Challenges

  • Nemotron is a reasoning model, and it sometimes returns an empty reply (the answer arrives in a reasoning field). The server retries once, but it can still fail.
  • Latency varied from about 3 to 20 seconds per call.
  • Keeping the test set frozen, so the defenses weren't tuned against it.

What I learned

Clear confirmation steps and treating payment notes as data stop most of these attacks in this setup. Honest measurement mattered more than a perfect number.

Limits

The sample is small. The defenses were developed on the development set. Nano largely ignored hidden-note (memo) injection, so I make no claim about that defense. The risk layer showed no measurable benefit. The results apply to this mock assistant, not to real banks.

What's next

More attacks, other models, and a larger benign suite.

Built With

  • claude
  • fastapi
  • html
  • hugging-face-spaces
  • nebius-token-factory
  • nvidia-nemotron-3-nano
  • pytest
  • python
Share this project:

Updates

Submission history