B EN Hirundo·Practitioner post·

Qwen3-Coder writes less secure code when told it's for a US persona

B · Useful, limited Hirundo runs a reproducible persona test on open weights with significance tests, but it covers one benchmark task chosen after screening eleven, the p-values are marginal, and the vendor sells the remedy it tests.

Summary based on the full text·Original: about 15 minutes to read

In short

A 21 October 2026 case study by Ben Luria, CEO of Hirundo, testing whether Alibaba's Qwen3-Coder-30B-A3B-Instruct writes less secure code depending on who the system prompt says the code is for. On one BaxBench task (a Flask service storing users' private secrets), apps for a US defense contractor were more often exploitable than apps for a Chinese one, and apps for a Hong Kong democracy group more often leaked secrets. Hirundo's own "Westernized" version of the model, edited to remove political alignment, showed no significant gap.

Key numbers

  • +19% (p = 0.03)higher rate of hackable apps for a US versus a Chinese defense contractor persona (70% vs 59%)
  • +28% (p = 0.024)higher rate of apps leaking other users' secrets for a Hong Kong democracy group versus a neutral customer
  • 190apps generated per persona per model on the BaxBench SecretStorage task
  • 2 vs 1,144apps flagged by Semgrep with PurpleLlama rules versus apps BaxBench exploits broke into, out of 1,840

As reported by the source.

Read the original on hirundo.io

English·Web page·opens hirundo.io

What it reports

  • US versus Chinese defense contractor: 70% versus 59% of apps hackable, +19%, p = 0.03. Westernized model: 56% versus 55%.
  • Hong Kong democracy group versus neutral: nearly half versus about a third of apps let any logged-in user read every other user's secrets, +28%, p = 0.024. Westernized: 26% versus 30%.
  • Adding BaxBench's "follow best practices for security" instruction did not close the gap: US contractor 74% versus neutral 59% hackable, +27%, p = 0.03.
  • The typical flaw is a missing ownership check (broken access control). Semgrep with Meta's PurpleLlama rules flagged 2 of 1,840 apps; BaxBench's exploits broke into 1,144.
  • On ten other BaxBench tasks the Westernized and original models built working apps at similar rates (51% versus 50%), with 25% hackable for both.
  • Context cited: CrowdStrike and Booz Allen earlier reported similar persona effects in Chinese coding models, without published significance tests.

How they got it

Both models served on dedicated endpoints at temperature 0.6 with identical prompts and settings. 190 apps per persona per model (380 for the combined neutral group; 70 per security-instruction prompt; 300 per model on the ten-task check). An app counted as hackable only if a BaxBench exploit worked against the running service. Two-sided Fisher exact tests; every comparison is published in an appendix.

Limits

  • One task, selected after a smaller screen of eleven; results may not generalise, and selection raises the risk of a chance finding.
  • Headline p-values sit near 0.03 across many comparisons with no multiple-comparison correction reported.
  • Base insecurity is high for everyone (about a third of neutral apps leak), so the persona effect sits on top of a weak baseline.
  • Hirundo sells the Westernization remedy and model hardening; the post's framing ("Beijing's adversaries", "sleeper agent") goes beyond what one task shows.

Why it matters for companies

The transferable lesson is about evaluation, not geopolitics: model behaviour can shift with context in the prompt, and public leaderboards use neutral prompts. Companies using any open-weight coding model should test it with prompts that look like their own work and identity, and keep authentication and access-control code under human review and dynamic testing. The Semgrep result is a warning on its own: static rules caught almost none of the exploitable access-control bugs.

Summary based on the full text. Read the original for the full argument and data.Read the original on hirundo.io

Tags

Same week

All of Week 43