Labels: bug, migrations, config, dependencies
Severity: S2. (The knowledge Vector(384) vs (1024) ORM drift is already tracked in #37.)
| Finding (path:line) |
Issue |
alembic/versions/051_vr_target_ingestion.py:82-95 |
Upgrade strips JSON keys (audit_mcp_index_id, binary_id, kernel_image_id) via UPDATE; the downgrade drops the new columns but does NOT restore the stripped keys -> permanent data loss on rollback |
alembic/versions/060_vr_target_analysis_stages.py:54-79 |
Backfill selects ALL vr_targets into memory and updates row-by-row -> holds the migration txn open for minutes and risks OOM; no batching |
alembic/versions/010_team_isolation.py:132-144 |
Downgrade REVOKEs from aila_app unconditionally; if the role was dropped independently the REVOKE is fatal and the downgrade half-tears RLS |
runtime/builder.py:184-185 |
Seed loop iterates modules in one session with no per-module try/except -> one module's seed_data() failure aborts all later modules and leaves earlier partial commits |
modules/malware/module.py:156-157 |
seed_data() returns without stamping a SeedVersionRecord despite declaring SEED_VERSION='1.0' -> future re-seed logic can never detect the need |
storage/registry.py:67,206-207 |
ConfigRegistry cache is process-local; a set() on one worker invalidates only that worker -> other workers serve stale config for up to cache_ttl=60s with no cross-process invalidation |
platform/tools/{registry,cache,artifacts}.py + storage/memory.py |
Memory/decision-cache/artifact tools persist with no eviction/TTL/row-cap/size-limit -> unbounded table growth; expired cache entries never pruned |
pyproject.toml:38 + pnpm-workspace.yaml |
slowapi==0.1.9 abandoned (blocks Starlette upgrades); html2canvas@1.4.1 and ogl@0.0.116 unmaintained with no security policy; openpyxl exact-pinned (no future security patches without manual bump) |
Acceptance: destructive migrations archive removed data + restore on downgrade; large backfills batched; conditional REVOKE; per-module seed isolation + version stamping; cross-process config invalidation (or shorter TTL + pub/sub); eviction/TTL/size caps on tool storage; dependency review with a supported rate limiter and maintained frontend libs.
Labels: bug, migrations, config, dependencies
Severity: S2. (The knowledge Vector(384) vs (1024) ORM drift is already tracked in #37.)
alembic/versions/051_vr_target_ingestion.py:82-95audit_mcp_index_id,binary_id,kernel_image_id) via UPDATE; the downgrade drops the new columns but does NOT restore the stripped keys -> permanent data loss on rollbackalembic/versions/060_vr_target_analysis_stages.py:54-79vr_targetsinto memory and updates row-by-row -> holds the migration txn open for minutes and risks OOM; no batchingalembic/versions/010_team_isolation.py:132-144aila_appunconditionally; if the role was dropped independently the REVOKE is fatal and the downgrade half-tears RLSruntime/builder.py:184-185seed_data()failure aborts all later modules and leaves earlier partial commitsmodules/malware/module.py:156-157seed_data()returns without stamping aSeedVersionRecorddespite declaringSEED_VERSION='1.0'-> future re-seed logic can never detect the needstorage/registry.py:67,206-207ConfigRegistrycache is process-local; aset()on one worker invalidates only that worker -> other workers serve stale config for up tocache_ttl=60swith no cross-process invalidationplatform/tools/{registry,cache,artifacts}.py+storage/memory.pypyproject.toml:38+pnpm-workspace.yamlslowapi==0.1.9abandoned (blocks Starlette upgrades);html2canvas@1.4.1andogl@0.0.116unmaintained with no security policy;openpyxlexact-pinned (no future security patches without manual bump)Acceptance: destructive migrations archive removed data + restore on downgrade; large backfills batched; conditional REVOKE; per-module seed isolation + version stamping; cross-process config invalidation (or shorter TTL + pub/sub); eviction/TTL/size caps on tool storage; dependency review with a supported rate limiter and maintained frontend libs.