Repository navigation
Closed
Description
Problem
Follow-up from the reviewed CodeRabbit deep scan (K6 K15 K16 K22 K44). This ticket tracks one distinct fix; duplicate scan rows are consolidated here.
Reviewed evidence and scope
- K6 (scan ID
bdd818fb-e2ec-4ce0-9b29-fb3484a25f2e, reviewD, Medium): Shared YAML graph expansion; consolidate with K22/K44 and Cloud C12/C28.
Source at current baseline: src/basic_memory/picoschema/parser.py:272. - K15 (scan ID
4c5ec225-956a-4008-af23-505338181fd8, reviewD, Medium): YAML identity metadata revisited as trees; consolidate graph/alias policy with K22/K44.
Source at current baseline: src/basic_memory/okf/render.py:53. - K16 (scan ID
446a563e-2c02-45dd-982a-5776643076cd, reviewD, Medium): YAML merge-flattening expansion; same parser-resource policy, cover OKF import/export adapter.
Source at current baseline: src/basic_memory/okf/validation.py:78. - K22 (scan ID
dad1c54b-aede-4038-8783-15b1e70b35a5, reviewA, Medium): Recursive normalization expands shared YAML containers and lacks cycle/work tracking. Anchor policy at parse/normalization boundary, cover aliases, merges and cycles.
Source at current baseline: src/basic_memory/markdown/entity_parser.py:84. - K44 (scan ID
2faedb82-80cd-45e2-b30b-a02144335f6a, reviewD, Medium): Core YAML safe_load is the same unbounded merge/alias policy family as K22/Cloud C12. safe_load prevents object construction attacks, not expansion cost.
Source at current baseline: src/basic_memory/file_utils.py:454.
Fix and validation
- Bound YAML graph normalization and merge expansion in Core.
- Recheck current callers and supported behavior before choosing the smallest complete fix.
- Add a bounded regression at the affected public or service boundary; demonstrate it fails without the fix.
- Preserve legitimate inputs and tenant/project boundaries. Run focused tests plus repository static/type checks.
The scan/review establishes the code-level concern described above; it does not establish production exploitation. Conditional branches and local/tooling-only exposure must retain that scope.
Activity
claude commentedon Oct 28, 2026
Claude finished @phernandez's task in 17s —— View job
Triage
bug,securitykept)file_utils). It is not Cloud-specific, so no cloud label. Cloud C12/C28 are tracked separately.gh search issuesqueries for YAML alias/merge/safe_load returned nothing.This is a triage-only pass. I haven't made any code changes.
fix(core): reject YAML aliases and merge expansion in notes (#1933)