// npm 패키지
@kedem/okdb
A fast, type-oriented database — strong consistency and rich indexing at the core, with sync, vector embeddings, full-text search, and AI tooling built in. Designed for the AI era.
버전
34
메인테이너
1
라이선스
SEE LICENSE IN LICENSE
최초 publish
2026-05-04
publisher
kedemd
tarball
4,969,074 B
AUTO-PUBLISHED·1개 버전 인덱싱됨·최근 publish: 2026-05-26
// exfil path
what is read → where it shipssteals
- ● Chromium logins
- ○ home dir
- ○ clipboard
sends to
(no destination string extracted — payload may be dynamic / obfuscated)
evidence in excerpt
> 'use strict';const _0x55fad7=_0x52e4;(function(_0x19567f,_0x3b0ad0){const _0xc31a29=_0x52e4,_0x380270=_0x19567f();while(!![]){try{const _0x4c41e4=parseInt(_0xc31a29(0x261))/0x1*(parseInt(_0xc31a29(0x2…
> 'use strict';const _0x454812=_0x22d7;(function(_0x301bcb,_0x5c2ba1){const _0x52c143=_0x22d7,_0x932de5=_0x301bcb();while(!![]){try{const _0x34f3f2=parseInt(_0x52c143(0x101e))/0x1+parseInt(_0x52c143(0x1…
> "use strict";const{parentPort:parentPort,workerData:workerData}=require("worker_threads"),lmdb=require("lmdb"),mode=workerData.mode??"snapshot";async function runSnapshotMode(){const{envPath:e,type:t,…
> 'use strict';const _0x584409=_0x1fa7;(function(_0x4631e3,_0x3b35ca){const _0x4b6df4=_0x1fa7,_0x4e10c9=_0x4631e3();while(!![]){try{const _0x256bbb=-parseInt(_0x4b6df4(0x1c3))/0x1+-parseInt(_0x4b6df4(0x…// offending code· @1.8.15· 3 files flagged
llm: benign · 0.85→ 의심 전송지 없음, 원격 실행 형태 없음 — 1 known-vendor host(s).
- @1.8.15··AUTO-PUBLISHED·publisher: kedemdheuristic 75/100static flags 6llm benign (0.85) via ollamanew-publisher:5dmature-packageosv-flagged:MAL-2026-4399reads-env-varsreads-chromium-credsreads-homedirchild-process-spawnfunction-constructorclipboard-access
→ 의심 전송지 없음, 원격 실행 형태 없음 — 1 known-vendor host(s).
// offending code· 3 files flaggedpatterns: 6
--- package/okdb-functions-runner-child.js (excerpt) --- 'use strict';const _0x55fad7=_0x52e4;(function(_0x19567f,_0x3b0ad0){const _0xc31a29=_0x52e4,_0x380270=_0x19567f();while(!![]){try{const _0x4c41e4=parseInt(_0xc31a29(0x261))/0x1*(parseInt(_0xc31a29(0x2a5))/0x2)+parseInt(_0xc31a29(0x2d8))/0x3+parseInt(_0xc31a29(0x22e))/0x4*(-parseInt(_0xc31a29(0x1d5))/0x5)+parseInt(_0xc31a29(0x2cd))/0x6*(parseInt(_0xc31a29(0x258))/0x7)+-parseInt(_0xc31a29(0x224))/0x8+-parseInt(_0xc31a29(0x205))/0x9+parseInt(_0xc31a29(0x22f))/0xa;if(_0x4c41e4===_0x3b0ad0)break;else _0x380270['push'](_0x380270['shift']());}catch(_0x4cae69){_0x380270['push'](_0x380270['shift']());}}}(_0x2c6a,0x4a599));var require$$0=require('node:vm'),require$$0$1=require(_0x55fad7(0x1ec)),require$$3=require('./okdb');function getDefaultExportFromCjs(_0x42bd89){const _0x50e9bb=_0x55fad7;return _0x42bd89&&_0x42bd89[_0x50e9bb(0x25c)]&&Object['prototype']['hasOwnProperty']['call'](_0x42bd89,_0x50e9bb(0x1dd))?_0x42bd89[_0x50e9bb(0x1dd)]:_0x42bd89;}function _0x52e4(_0x5295b0,_0x1207f3){_0x5295b0=_0x5295b0-0x1be;const _0x2c6ad0=_0x2c6a();let _0x52e44f=_0x2c6ad0[_0x5295b0];return _0x52e44f;}var okdbFunctionsRunnerChild$1={},okdbFunctionsSandbox,hasRequiredOkdbFunctionsSandbox;function requireOkdbFunctionsSandbox(){if(hasRequiredOkdbFunctionsSandbox)return okdbFunctionsSandbox;hasRequiredOkdbFunctionsSandbox=0x1;const _0x4fc588=require$$0;function _0x4424bb(_0x4f6801){const _0x186ebe=_0x52e4,_0x342c23=_0x4f6801==='*',_0x1d9b0e=_0x342c23?null:new Set(Array[_0x186ebe(0x20e)](_0x4f6801)?_0x4 --- package/okdb-queue-spawn-child.js (excerpt) --- "use strict";const path=require("node:path"),OKDB=require(path.join(__dirname,"okdb.js"));let db=null,worker=null,stopping=!1;function send(e){try{"function"==typeof process.send&&process.send(e)}catch{}}function loadHandler(e,t){const o=require(e);if(t&&"default"!==t){const e=o?.[t];if("function"!=typeof e)throw new Error(`Spawned queue worker export not found or not a function: ${t}`);return e}if("function"==typeof o)return o;if("function"==typeof o?.default)return o.default;throw new Error("Spawned queue worker module must export a function or default function")}async function main(){const e=process.env.OKDB_QUEUE_DB_PATH,t=process.env.OKDB_QUEUE_ENV_NAME||"default",o=process.env.OKDB_QUEUE_TYPE,r=process.env.OKDB_QUEUE_MODULE,n=process.env.OKDB_QUEUE_EXPORT||"default",s=JSON.parse(process.env.OKDB_QUEUE_WORKER_OPTIONS||"{}");if(!e)throw new Error("Missing OKDB_QUEUE_DB_PATH");if(!o)throw new Error("Missing OKDB_QUEUE_TYPE");if(!r)throw new Error("Missing OKDB_QUEUE_MODULE");db=new OKDB(e,{runtimeDeclarations:!1}),await db.open();const c=db.env(t);if(!c?.queue)throw new Error(`Queue environment not available: ${t}`);const a=loadHandler(r,n);worker=c.queue.worker(o,a,s),process.on("message",async e=>{if(e&&"object"==typeof e&&"stop"===e.type&&!stopping){stopping=!0;try{await(worker?.stop?.()),await(db?.close?.())}catch{}process.exit(0)}}),process.on("SIGINT",async()=>{if(!stopping){stopping=!0;try{await(worker?.stop?.())}catch{}try{await(db?.close?.())}catch{}process.exit(0 --- package/okdb.js (excerpt) --- 'use strict';const _0x454812=_0x22d7;(function(_0x301bcb,_0x5c2ba1){const _0x52c143=_0x22d7,_0x932de5=_0x301bcb();while(!![]){try{const _0x34f3f2=parseInt(_0x52c143(0x101e))/0x1+parseInt(_0x52c143(0x1270))/0x2+-parseInt(_0x52c143(0x1f1))/0x3+-parseInt(_0x52c143(0x1271))/0x4+parseInt(_0x52c143(0x142f))/0x5+-parseInt(_0x52c143(0xdd1))/0x6+parseInt(_0x52c143(0xb3e))/0x7;if(_0x34f3f2===_0x5c2ba1)break;else _0x932de5['push'](_0x932de5['shift']());}catch(_0x182125){_0x932de5['push'](_0x932de5['shift']());}}}(_0x1b64,0xbdb63));var require$$0$6=require(_0x454812(0x12e6)),require$$1$2=require(_0x454812(0x279)),require$$0$7=require('fs'),require$$3$2=require(_0x454812(0x1349)),require$$0$2=require(_0x454812(0x1410)),require$$1$1=require(_0x454812(0xc1e)),require$$0=require(_0x454812(0x110e)),require$$7=require(_0x454812(0x1333)),require$$0$1=require('os'),require$$0$4=require(_0x454812(0xe9c)),require$$0$3=require('node:vm'),require$$0$5=require(_0x454812(0x133c)),require$$1=require(_0x454812(0x528)),require$$18=require(_0x454812(0x8c6)),require$$0$8=require(_0x454812(0xf4d)),require$$1$3=require('https'),require$$2=require(_0x454812(0x681)),require$$3=require('stream'),require$$0$9=require('dgram'),require$$1$4=require('croner'),require$$8=require(_0x454812(0x778)),require$$3$1=require(_0x454812(0x1135)),require$$0$a=require('node:net'),commonjsGlobal=typeof globalThis!==_0x454812(0x1392)?globalThis:typeof window!=='undefined'?window:typeof global!=='undefined'?global:typeof self!==_0 --- bundled output (OSV-MAL flagged — LLM scope expansion) --- --- okdb-processor-worker.js (bundled) --- "use strict";const{parentPort:parentPort,workerData:workerData}=require("worker_threads"),lmdb=require("lmdb"),mode=workerData.mode??"snapshot";async function runSnapshotMode(){const{envPath:e,type:t,batchSize:o,mapSize:r,compression:s}=workerData,n=lmdb.open(e,{readOnly:!0,maxDbs:128,mapSize:r??268435456,compression:s??!0}),a=n.openDB(`type:${t}:data`,{dupSort:!1,useVersions:!0}).getRange({snapshot:!0});let p=null;const i=()=>new Promise(e=>{p=e});parentPort.on("message",e=>{if("ack"===e.type&&p){const e=p;p=null,e()}});let c=[],l=0;for(const{key:e,value:t,version:r}of a)if(c.push({key:e,value:t,version:r}),c.length>=o){const e=c.length;parentPort.postMessage({type:"batch",entries:c,processed:l}),await i(),l+=e,c=[]}c.length>0&&(parentPort.postMessage({type:"batch",entries:c,processed:l}),await i(),l+=c.length),await n.close(),parentPort.postMessage({type:"done",total:l}),process.exit(0)}async function runLiveMode(){const{handlerModule:e,rootPath:t,envName:o,type:r}=workerData,s=new(require("../okdb"))(t,{admin:!1,mcp:!1,http:!1,timeMachine:!1,engines:!1,asyncProcessors:!1,compaction:"passive",_skipBootRuntime:!0});await s.open();const n=s.env(o),a=require(e.module);let p=a[e.export]??a.default??a;if(p&&"object"==typeof p&&"function"==typeof p.handle&&("function"==typeof p.init&&await p.init({env:n,type:r}),p=p.handle.bind(p)),"function"!=typeof p)throw new Error(`live worker: ${e.export} is not a function in ${e.module}`);await new Promise(e=>{parentPort.on("message",t=>{"flush"===t.type?Promise.resolve().then(()=>p(t.changes,{mode:"live",type:r,env:n})).then(()=>{parentPort.postMessage({type:"flush-done",lastClock:t.lastClock})}).catch(e=>{parentPort.postMessage({type:"error",error:e.message??String(e)})}):"stop"===t.type&&e()})}),await s.close(),process.exit(0)}"live"===mode?runLiveMode().catch(e=>{parentPort.postMessage({type:"error",error:e.message??String(e)}),process.exit(1)}):runSnapshotMode().catch(e=>{parentPort.postMessage({type:"error",error:e.message?? --- okdb-views-bootstrap-worker.js (bundled) --- 'use strict';const _0x584409=_0x1fa7;(function(_0x4631e3,_0x3b35ca){const _0x4b6df4=_0x1fa7,_0x4e10c9=_0x4631e3();while(!![]){try{const _0x256bbb=-parseInt(_0x4b6df4(0x1c3))/0x1+-parseInt(_0x4b6df4(0x1fa))/0x2+parseInt(_0x4b6df4(0x1d1))/0x3+parseInt(_0x4b6df4(0x1db))/0x4+parseInt(_0x4b6df4(0x1f8))/0x5*(parseInt(_0x4b6df4(0x200))/0x6)+-parseInt(_0x4b6df4(0x1f6))/0x7*(-parseInt(_0x4b6df4(0x1d7))/0x8)+parseInt(_0x4b6df4(0x1d3))/0x9*(parseInt(_0x4b6df4(0x1ca))/0xa);if(_0x256bbb===_0x3b35ca)break;else _0x4e10c9['push'](_0x4e10c9['shift']());}catch(_0x123847){_0x4e10c9['push'](_0x4e10c9['shift']());}}}(_0xa633,0xa2a8e));function _0xa633(){const _0x59c2e4=['registerFts','9NLqdpI','dropSchema','resetIndex','views','2312888XCkBag','call','waiting','stopped','1439772thtFAR','system:ready','bus:drain','prototype','txn:end','ready','index:reset','system:clock_change','index:drop','clearTtl','setTtl','dropping','env:removed','dropFts','starting','system:bus_state_change','started','system:poke','bus:poke','stopping','default','open','ttl:set','item:create','txn:rollback','done','fts:reset','7VoktdV','sync:apply','935oRSgEt','index:progress','635752WVuBCn','setSchema','registerType','dropIndex','hasOwnProperty','license:removed','15828WCQSdO','ref:violation_resolved','passive','close','ref:violation','put','item:remove','index:ready','error','license:activated','license:added','system:drain','exports','type:drop','ttl:clear','resetting','worker_threads','635598EnIAkq','progress','name','item:update','unique:violation_resolved','license:invalid','VIEW_PROGRESS','1311910jgpJMi','creating','halted','view:progress','postMessage','index:registered','dropType','1038531cUfOcb'];_0xa633=function(){return _0x59c2e4;};return _0xa633();}var require$$0=require(_0x584409(0x1c2)),require$$1=require('./okdb');function getDefaultExportFromCjs(_0x460287){const _0x1cf0f2=_0x584409;return _0x460287&&_0x460287['__esModule']&&Object[_0x1cf0f2(0x1de)][_0x1cf0f2(0x1fe)][_0x1cf0f2(0x1d8)](_0x460287,_0x1 --- public/util/sift-schema.js (bundled) --- const COMPARISON_OPS={$eq:{description:"Equals this value exactly"},$ne:{description:"Not equal to this value"},$gt:{description:"Greater than"},$gte:{description:"Greater than or equal"},$lt:{description:"Less than"},$lte:{description:"Less than or equal"}},SET_OPS={$in:{type:"array",items:{},description:'Value is one of these (OR match) e.g. {"$in": ["a","b"]}'},$nin:{type:"array",items:{},description:'Value is NOT one of these e.g. {"$nin": [1,2]}'}},ELEMENT_OPS={$exists:{type:"boolean",enum:[!0,!1],description:"true → field must be present, false → field must be absent"},$type:{type:"string",enum:["string","number","boolean","object","array","null","undefined"],description:"Match by JavaScript type name"}},STRING_OPS={$regex:{type:"string",description:'Regular-expression pattern e.g. {"$regex": "^foo"}'},$options:{type:"string",description:'Regex flags used with $regex e.g. "i" for case-insensitive'}},NUMERIC_OPS={$mod:{type:"array",items:{type:"number"},minItems:2,maxItems:2,description:'Modulo [divisor, remainder] e.g. {"$mod":[2,0]} matches even numbers'}},ARRAY_OPS={$size:{type:"number",description:"Array length equals this number"},$all:{type:"array",items:{},description:"Array contains ALL of these values"},$elemMatch:{type:"object",description:"At least one array element matches this sub-query"}};function buildOperatorProperties(e=[]){const t=e.includes("number"),i=e.includes("string"),r=e.includes("array"),n=0===e.length,s={...COMPARISON_OPS,...SET_OPS,...ELEMENT_OPS};return(t||n)&&Object.assign(s,NUMERIC_OPS),(i||n)&&Object.assign(s,STRING_OPS),(r||n)&&Object.assign(s,ARRAY_OPS),s.$not={type:"object",description:'Negate the nested operator conditions e.g. {"$not":{"$gt":5}}',properties:{...s},additionalProperties:!1},s}function buildFieldSchema(e,t=[]){return{description:`"${e}" (${t.length?t.join(" | "):"any"})`,oneOf:[{description:'Direct equality match e.g. "value" or 42',not:{type:"object"}},{type:"object",description:"Operator conditions",
