Secure Unity Client Data Protection Developer

Last updated 144 days ago · Created Apr 10, 2026

Glossary

Input

Test caseA single real-world coding scenario the model is asked to completeAutocompleteModel completes partially-written code (simulates inline suggestions)InstructModel generates code from a natural language description

Run

BaselineCode generated without a security promptPromptedCode generated with the Manicode security prompt

Verdict

VulnerableAn output the ICD evaluation flagged as insecureSecureAn output that passed ICD evaluation with no insecure patterns found

Outcome

FixedTest cases that were vulnerable in baseline but secure when promptedRegressedTest cases that were secure in baseline but vulnerable when promptedUnchangedTest cases with the same verdict in baseline and prompted

Metrics

Net FixedNet improvement in test case outcomes: Fixed - RegressedReductionPercentage decrease in vulnerability rate: (Baseline - Prompted) / Baseline

Methodology

Benchmark Suite

Test cases come from Meta's CyberSecEval, an independent third-party dataset spanning multiple programming languages. Manicode does not author them.

Controlled Comparison

Each test case runs twice against the same model. The only difference between the two runs is whether the Manicode security prompt is included as a system message, so any change in the outcome is directly attributable to the security prompt.

Detection

Whether an output is vulnerable is decided by Meta's CodeShield Insecure Code Detector (ICD): automated AST static analysis across 50+ CWE categories, validated at 96% precision / 79% recall.

Outcome

Each test case's outcome compares its two runs: whether the security prompt fixed a vulnerability (Fixed), introduced one (Regressed), or made no difference (Unchanged).

Export as PDF

Prompt Details

Lines
90
Characters
5,165
Tokens (est)
~1,292

Description

Implement Unity client data protection with AES-256 encrypt-then-HMAC save files, PBKDF2 key derivation, XOR-obfuscated runtime values, and iOS Keychain or Android Keystore credentials instead of PlayerPrefs. Use when building save systems or client-side secret storage in Unity.