Files
relicario/tests/fixtures/lastpass/expected.json
adlee-was-taken 80dabac414 test(import): LastPass CSV fixture set + generator + hardening spec
Synthetic, deterministic fixtures (BOM, legacy 7-col, CRLF, latin-1, hostile,
NoteType notes, ragged rows) with an expected.json oracle, plus the
handoff spec for the hardening work. Large/huge stress files are gitignored.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SpjhsvZuNPDw84Hc1J72X6
2026-11-06 20:48:13 -05:00

122 lines
3.8 KiB
JSON

{
"01-basic.csv": {
"description": "Happy path: quoting, newlines in fields, unicode/emoji, nested group, favorite, TOTP, duplicate titles, padded title, long password.",
"expect": {
"fatal": null,
"logins": 9,
"notes": 2,
"warning_rows": []
},
"status": "baseline"
},
"02-warnings.csv": {
"description": "Mixed per-row problems incl. a ragged row; import must continue past each.",
"expect": {
"fatal": null,
"logins": 5,
"notes": 1,
"warning_rows": [
1,
2,
3,
4,
5,
8
]
},
"status": "baseline"
},
"03-bom.csv": {
"description": "UTF-8 BOM before the header, as written by Excel/Notepad re-saves.",
"expect": {
"fatal": null,
"logins": 2,
"notes": 1,
"warning_rows": []
},
"status": "suspect",
"suspects": "csv crate does not strip a BOM -> header[0] == '\\ufefful' -> ImportCsvHeader error"
},
"04-legacy-7col.csv": {
"decision": "Accept the legacy 7-col header (map columns by name) or reject with a message that says so? Recommend accept.",
"description": "Pre-TOTP LastPass export: url,username,password,extra,name,grouping,fav.",
"expect": {
"fatal": null,
"logins": 1,
"notes": 1,
"warning_rows": []
},
"status": "needs_decision",
"suspects": "EXPECTED_HEADER is exact 8-col/order -> whole import rejected"
},
"05-wrong-format.csv": {
"description": "A different manager's export. Must fail with a clear, actionable message; nothing written.",
"expect": {
"fatal": "header",
"logins": 0,
"notes": 0,
"warning_rows": []
},
"status": "baseline"
},
"06-header-only.csv": {
"description": "Valid header, zero rows. UI must say there is nothing to import and keep Import disabled.",
"expect": {
"fatal": null,
"logins": 0,
"notes": 0,
"warning_rows": []
},
"status": "baseline"
},
"07-crlf.csv": {
"description": "Windows line endings, including CRLF inside quoted fields.",
"expect": {
"fatal": null,
"logins": 2,
"notes": 1,
"warning_rows": []
},
"status": "baseline"
},
"08-latin1.csv": {
"decision": "Warn-and-skip the non-UTF-8 row, or attempt a Windows-1252 fallback decode of the whole file? Recommend warn-and-skip, with the message naming the row.",
"description": "One row is Latin-1, not UTF-8. Must not abort the whole import; the bad row warns (or decodes), the others import.",
"expect": {
"fatal": null,
"logins": 2,
"notes": 0,
"warning_rows": [
2
]
},
"status": "needs_decision"
},
"09-notetypes.csv": {
"decision": "Keep as raw secure notes (lossless, current) or map NoteType:Credit Card -> Card and SSH Key -> Key item types? Mapping is a feature, not a bug fix. Recommend: keep raw, log as roadmap item, but assert no data is dropped.",
"description": "LastPass structured note types. Today they import as raw secure notes.",
"expect": {
"fatal": null,
"logins": 0,
"notes": 4,
"warning_rows": []
},
"status": "needs_decision"
},
"10-hostile.csv": {
"decision": "javascript:/data: URLs: reject with a warning (import login WITHOUT url), same as an invalid URL. Recommend yes — url::Url accepts any scheme today.",
"description": "XSS-shaped titles/groups/notes, javascript:/data: URLs, path-ish titles, bidi override, 5000-char title.",
"expect": {
"fatal": null,
"logins": 6,
"notes": 1,
"warning_rows": [
2,
3
]
},
"status": "needs_decision",
"suspects": "Url::parse accepts javascript:/data: so they are stored as the login URL; popup/vault render or open them"
}
}