Gap Register — Docs vs Implemented
GAP-G / GAP-S / GAP-I — controls and product claims vs be/services
A. Document controlA. Kiểm soát tài liệu
| Doc ID | CPG-GAP-IMPL |
|---|---|
| VersionPhiên bản | 1.0 |
| StatusTrạng thái | Living document |
| Owner | Platform / Security |
| AudienceĐối tượng | BA, Architecture, FlyPay Business, Engineering |
| ClassificationPhân loại | Internal — Engineering / Security |
| Effective dateNgày hiệu lực | 01/12/2026 |
| Related docs | 09_GAP Index · Doc03 Security · Module Map · BR/NFR Catalog · Account RTM · Docs Gaps (FlyPay Qs) |
B. Version historyB. Lịch sử phiên bản
| Version | Date | Author | ChangesThay đổi |
|---|---|---|---|
| 1.0 | 01/12/2026 | Khoa Trinh | Version 1.0 |
C. Table of contentsC. Mục lục
D. ContentD. Nội dung
CPG Gap Register — Docs vs Implemented
Doc ID: CPG-GAP-IMPL
Version: 1.0
Status: Living document
Owner: Platform / Security / Service owners
Cross-cutting register of documentation claims vs running code under be/services/.
Structural security controls remain in Doc03 Application Security Part B.
Doc↔doc / FlyPay decisions: CPG_GAP_Docs.
1. Purpose
Declare gaps where FSDs, plans, or Doc03 control objectives are not yet Implemented (or only Partial).
This is an inventory from documented status — not a live penetration test.
2. Status vocabulary
| Status | Meaning |
|---|---|
| Open | Gap accepted; remediation not done |
| Partial | Some mitigating control exists; acceptance criteria not met |
| Candidate | Machine-found / needs curation |
| Closed | Acceptance criteria met (keep row for history) |
3. General (all services) — from Doc03 B-Gaps
| Gap ID | Priority | Finding | Impacts | Target control | Acceptance criteria for Implemented | Owner | Status |
|---|---|---|---|---|---|---|---|
| GAP-G01 | High | Shared HS256 JWT + hardcoded "supersecretkey" fallback; no rotation/JWKS |
APPSEC-ID-14, 27, 28; CC6, C1; Art. 32 | Remove fallback in non-dev; asymmetric keys + rotation | Staging/prod refuse start if secret unset; documented rotation; no default string on prod path | Identity + Platform | Open |
| GAP-G02 | Medium | Error envelope not universal | APPSEC-ID-15; PI1; Art. 5/32 | All non-2xx use pkg/apierror |
Contract tests across services | API owners | Open |
| GAP-G03 | Medium | No shared request-ID / log redaction | APPSEC-ID-18, 20; CC7; Art. 5/32/33 | Shared pkg/middleware |
Every request gets ID; ID in logs; redaction for token/password fields | Platform | Open |
| GAP-G04 | Medium | No app rate limit; permissive CORS | APPSEC-ID-23, 24; CC6 | Kong +/or middleware limits; allowlists | Non-dev CORS ≠ *; 429 + RATE_LIMITED |
Platform / Edge | Open |
| GAP-G05 | Medium | CRM write idempotency missing | APPSEC-ID-22; PI1; Art. 32 | Idempotency-Key on retryable mutations | Critical CRM APIs honor keys with tests | API owners | Open |
| GAP-G06 | Medium | Mesh mTLS / Kong config not in tree | APPSEC-ID-29/30; CC6 | STRICT mTLS; Kong limits as code | Manifests in repo; staging checklist | Platform / Infra | Open |
| GAP-G07 | Medium | DB/Redis transit encryption weak | C1; Art. 32 | TLS in non-dev | Helm/TF + DSN verify modes | Platform / Infra | Open |
| GAP-G08 | Medium | Inconsistent permission middleware | APPSEC-ID-06; CC6; Art. 5/32 | Flat/grant checks on mutating routes | Route inventory + negative tests | Service owners | Open |
4. Specific services — from Doc03 B-Gaps
| Gap ID | Priority | Service | Finding | Impacts | Target control | Acceptance criteria | Owner | Status |
|---|---|---|---|---|---|---|---|---|
| GAP-S01 | High | file-service | No JWT on file routes | APPSEC-ID-01, 17; CO-ID-01; P1; CC6; Art. 32 | Authenticate/authorize all file APIs; bind ownership | 401/403 tests; owner or RBAC on upload/list/delete | File + Platform | Open |
| GAP-S02 | High | notification-service | INTERNAL_SECRET optional when unset |
APPSEC-ID-08; P4; CC6; Art. 32 | Fail closed in staging/prod | Empty secret → refuse /internal/* or fail startup; 401 tests |
Notification + Platform | Open |
| GAP-S03 | Medium | common-service | Divergent error shape | APPSEC-ID-15; Art. 5/32 | Use pkg/apierror |
Nested error envelope + tests |
common-service | Open |
| GAP-S04 | Medium | ledger* / money path | gosec CI exclusions | APPSEC-ID-25; CC8 | Extend SAST or compensating review | Documented compensating controls or inclusion in gate | Platform / Ledger | Open |
| GAP-S05 | Medium | services without field cipher | Encryption coverage delta | APPSEC-ID-12; Art. 32 | Encrypt or justify PII stores | Inventory of PII columns vs cipher usage | Data / service owners | Open |
5. Suggested remediation order (Doc03)
- GAP-S01, GAP-S02, GAP-G01 (close authentication fail-open paths)
- GAP-G02, GAP-G03, GAP-S03 (consistent security telemetry and client contracts)
- GAP-G04, GAP-G08 (abuse resistance and least privilege)
- GAP-G05 (processing integrity for CRM)
- GAP-S04, GAP-S05, GAP-G06, GAP-G07 (SDLC coverage, encryption breadth, edge/transit)
6. Additional docs↔impl gaps (FSD / plan / AGENTS)
| Gap ID | Priority | Area | Finding | Doc ref | Evidence / notes | Owner | Status |
|---|---|---|---|---|---|---|---|
| GAP-I01 | Medium | account-service | Watched-address API / local registry not fully as FSD | Core/MP Account FSD; FSD-Account Known gaps | Registry / CREATE2 Cloud Run URL pending FlyPay | Account | Open |
| GAP-I02 | Medium | account / API | UI-first Account rules; backend may still return Active BW until deploy | API_Account Planned vs as-implemented | Portal shipped; API lag | Account / API | Open |
| GAP-I03 | Medium | Hot Wallet | HW Active only after FlyPay ticket — ensure API matches FSD v2.2 | MP Account FSD; API_Account | Planned inactive-after-issue | Account | Open |
| GAP-I04 | Medium | ledger | Permissive CORS / FR8 / local NoAuth residuals | FSD-Ledger Known gaps | Align with GAP-S04 / GAP-G04 | Ledger | Open |
| GAP-I05 | High | webhooks | Outbound merchant payment webhooks specified in Transaction FSDs; not a separate service; only Sumsub inbound implemented | AGENTS; Transaction FSD; Release Plan | Webhooks “Not started” in release plan | Transaction / Platform | Open |
| GAP-I06 | Medium | VA / portal | Catalog live; merchant may not see real balances / issued VAs; portal local store | Release Plan | No public VA HTTP API as claimed | Account / Portal | Open |
| GAP-I07 | Medium | transaction-service | Transaction service described as stub / incomplete vs FSD | Release Plan; Core Transaction FSD | be/services/transaction |
Transaction | Open |
7. Related suite pages
- Doc03 Application Security (Part A + structural Part B)
- 09_GAP Docs (Questions for FlyPay)
- BR/NFR Catalog · Module Map · Account RTM
Scan candidates (build-time)
Candidate Auto-discovered signals — curate into Q-DOC / GAP-* rows before treating as baseline. Tín hiệu quét tự động — cần curate thành Q-DOC / GAP-* trước khi coi là baseline.
Unmapped BR/NFR by product
| Product | Unmapped count |
|---|---|
| CORE | 24 |
| CO | 19 |
| MP | 11 |
| OVW | 7 |
| CRM | 3 |
Inventory TBD entries
07_OPS— Operations (TBD) (07_OPS/index.html)
FSD without TC/RTM/UC depth
24 FSD HTML pages without dedicated TC/RTM/UC siblings (Account covered).
Round A SPECs with §12 Questions for FlyPay
- CPG-SPEC-CRM-ACC-HW-ACTIVATE
- CPG-SPEC-CRM-ACC-HW-REJECT
- CPG-SPEC-ACC-BW-APPROVE
- CPG-SPEC-ACC-BW-CREATE
- CPG-SPEC-ACC-HW-ACTIVATE
- CPG-SPEC-ACC-HW-CREATE
- CPG-SPEC-ACC-HW-LIST
- CPG-SPEC-ACC-SHARED-UI
- CPG-SPEC-ACC-VA-CREATE
- CPG-SPEC-ACC-VA-STATUS
be/services on disk
13 service directories detected for Doc03 B0 comparison.