Appearance
Bank Statement Fixture Policy
Plane: MHPAY-65 / MHPAY-BANK-005
Rule
Real bank files are forbidden in the repository. Only sanitized fixtures may be committed.
This applies to CSV, XLSX, XLS, PDF, TXT, STA, and MT940-like exports from any bank or payment provider.
What counts as real data
Do not commit files that contain (even partially):
- real customer or counterparty names;
- real account numbers (especially long digit sequences not in the demo allow-list);
- real payment references, invoice numbers, or SO numbers from production;
- real balances tied to a live account;
- raw bank transaction lines copied from a portal export;
- production emails or Indonesian mobile numbers;
- secrets, tokens, or API credentials.
Sanitized fixtures only
Approved committed fixtures live under:
backend/tests/MyHoreca.Pay.UnitTests/Fixtures/BankStatements/
Naming convention:
text
{bank-or-format}.{scenario}.sanitized.{csv|txt}Replace sensitive values with deterministic demo placeholders:
| Field | Replace with |
|---|---|
| Account numbers | 800000000001, 7700000001, etc. (see fixture README) |
| Company / account name | DEMO HOSPITALITY GROUP, DEMO OPERATING ACCOUNT |
| Counterparties | PT DEMO SUPPLIER, PT SAMPLE CUSTOMER, PT TEST DISTRIBUTOR |
| References | REF-DEMO-0001, BANK-DEMO-0001, INV-DEMO-0001 |
| Descriptions | fictional text preserving format keywords (TRF, BI-FAST, MT940 tags) |
Every sanitized fixture must include DEMO, SAMPLE, or TEST somewhere in the content.
Legacy filenames without .sanitized. remain for backward-compatible tests; they use the same placeholder values.
Local raw samples (not in git)
Store real exports only:
- in
scripts/samples/local/orfrontend/scripts/samples/local/(gitignored), or - outside the repository entirely.
Only .gitkeep may be committed inside those local folders.
Optional local-only tests may read from scripts/samples/local/; never add those files to git.
AI agents
AI agents must not:
- commit real bank files;
- paste raw bank lines into code, docs, tests, or Plane comments;
- add production account numbers or customer names to the repo.
When unsure whether a file is sanitized:
- block the file;
- ask for a sanitized copy;
- run the guard script before handoff.
Verification
From repository root:
bash
python tools/security/guard-bank-files.py --help
python tools/security/guard-bank-files.py --self-test
python tools/security/guard-bank-files.py .
dotnet test backend/tests/MyHoreca.Pay.UnitTests/MyHoreca.Pay.UnitTests.csproj --filter FullyQualifiedName~BankStatementFixtureSanitizationRelated:
- Bank Adapter Development Checklist
- Fixture README:
backend/tests/MyHoreca.Pay.UnitTests/Fixtures/BankStatements/README.md - Unit test:
BankStatementFixtureSanitizationTests