0sec-cli 0.18.0 → 0.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{0sec.js → 0.js} +90 -82
- package/LICENSE +1 -1
- package/README.md +62 -46
- package/chunks/adapt-loop-7I57LXXR.js +18 -0
- package/chunks/{adgraph-JLGA6RYI.js → adgraph-AUDQTBYA.js} +5 -5
- package/chunks/agent/skills/frameworks/entra-id.yaml +2 -2
- package/chunks/agent/skills/techniques/assumption-mining.yaml +2 -2
- package/chunks/agent/skills/techniques/cve-poc-adaptation.yaml +2 -2
- package/chunks/agent/skills/techniques/entra-attack-paths.yaml +1 -1
- package/chunks/agent/skills/techniques/kernel-weaponization.yaml +1 -1
- package/chunks/agent/skills/techniques/llm-prompt-injection.yaml +2 -2
- package/chunks/agent/skills/techniques/npm-ecosystem.yaml +1 -1
- package/chunks/agent/skills/techniques/poc-verification.yaml +1 -1
- package/chunks/agent/skills/techniques/seedless-depth-review.yaml +20 -38
- package/chunks/{artifact-scraper-HQ7HLP6V.js → artifact-scraper-PYZ3RU3O.js} +6 -6
- package/chunks/{assumption-mining-5SNIVVDN.js → assumption-mining-MFLF43IR.js} +24 -26
- package/chunks/{chunk-7DQEV5QI.js → chunk-23DG5YKS.js} +4 -4
- package/chunks/{chunk-UR4ELX2Y.js → chunk-2GV4HQKE.js} +340 -703
- package/chunks/{chunk-P6WKNFWX.js → chunk-2OQOQ2FZ.js} +8 -8
- package/chunks/{chunk-5G3ZXFBW.js → chunk-2WNCI664.js} +3 -3
- package/chunks/{chunk-DW5UWPFY.js → chunk-4VGLO2YS.js} +6 -5
- package/chunks/{chunk-KLTNTE2Z.js → chunk-5IBCBQEH.js} +13 -14
- package/chunks/{chunk-N7BOUYEV.js → chunk-5MWAG3FT.js} +14 -14
- package/chunks/{chunk-OEFNRYI2.js → chunk-6GHSR47F.js} +3 -6
- package/chunks/chunk-6YNKRUMC.js +4474 -0
- package/chunks/{chunk-6L26OBWI.js → chunk-76KSBWOQ.js} +255 -35
- package/chunks/chunk-7DEHG7YT.js +2143 -0
- package/chunks/{chunk-AD7WXDH6.js → chunk-7UFUALR2.js} +288 -22
- package/chunks/{chunk-53G27VPS.js → chunk-AZ7L3HFD.js} +7 -2
- package/chunks/{chunk-TSK2AG6J.js → chunk-CAYANSH6.js} +173 -1757
- package/chunks/{chunk-SAFFWQW4.js → chunk-DKSCN2AB.js} +7 -7
- package/chunks/{chunk-2JCCA2JL.js → chunk-DM5C5L5D.js} +3 -3
- package/chunks/{chunk-RWONANDA.js → chunk-DQTNI3KY.js} +5 -5
- package/chunks/{chunk-5JI7L7KV.js → chunk-EGZGZFAH.js} +10036 -12938
- package/chunks/{chunk-6LKRLK2R.js → chunk-FHC2B7LN.js} +3 -3
- package/chunks/{chunk-MYVT64FN.js → chunk-GHWODZMR.js} +2 -2
- package/chunks/{chunk-2RMLOJVB.js → chunk-GVD6SJGH.js} +2 -2
- package/chunks/{chunk-SF4KZ4O3.js → chunk-HLFS6WV2.js} +2 -2
- package/chunks/chunk-HR2TU42B.js +1228 -0
- package/chunks/{chunk-BFRB6HB2.js → chunk-HUNAPTKV.js} +3 -3
- package/chunks/chunk-IO7R7WBM.js +114 -0
- package/chunks/{chunk-WEBMRWEG.js → chunk-IXT64DV5.js} +656 -1868
- package/chunks/{chunk-3MOLBTLS.js → chunk-K2PWUPUI.js} +2 -2
- package/chunks/{chunk-WXQ6BJ6A.js → chunk-LCRTAQN2.js} +7 -7
- package/chunks/{chunk-SVJEDVYK.js → chunk-LPTRPRZR.js} +5 -5
- package/chunks/{chunk-CMKXP5RR.js → chunk-LYUAM3TG.js} +3 -3
- package/chunks/{chunk-BVAZO4WA.js → chunk-MICHDTBK.js} +3 -3
- package/chunks/{chunk-UCYRA73C.js → chunk-OAYUPGF6.js} +4 -4
- package/chunks/{chunk-XM5NLHYU.js → chunk-OWLJYJ5O.js} +14 -14
- package/chunks/{chunk-BKZFDZ23.js → chunk-QCUFBVIZ.js} +3 -3
- package/chunks/chunk-RE5EZDG2.js +5523 -0
- package/chunks/{chunk-ASUR522M.js → chunk-RRD4XXPU.js} +9 -9
- package/chunks/{chunk-AHTBZC3E.js → chunk-RSIUX3RW.js} +4 -4
- package/chunks/{chunk-BZNEY2ZS.js → chunk-SJBCK2EI.js} +15268 -16053
- package/chunks/{chunk-IOL7D5YV.js → chunk-SQCBHFWN.js} +3 -3
- package/chunks/chunk-TH2LW437.js +7829 -0
- package/chunks/{chunk-WVTBZEQO.js → chunk-TM74SSHC.js} +8 -8
- package/chunks/{chunk-U5FLXGHT.js → chunk-TO35Y326.js} +13 -729
- package/chunks/chunk-TRH2PJSN.js +547 -0
- package/chunks/{chunk-YYRBQVFE.js → chunk-TZFIAMWZ.js} +70 -16
- package/chunks/chunk-UELXHK2Y.js +1950 -0
- package/chunks/{chunk-RJWOYEOG.js → chunk-UEX7PFSE.js} +5 -5
- package/chunks/{chunk-VQG4FT5D.js → chunk-UFHN6RIU.js} +2 -2
- package/chunks/{chunk-JQHOLLTD.js → chunk-UU7PQP6N.js} +9 -9
- package/chunks/{chunk-BFR2CDV5.js → chunk-UV5QWZGE.js} +283 -153
- package/chunks/{chunk-WU6AFRAZ.js → chunk-V36HVTUL.js} +12 -12
- package/chunks/{chunk-IR537GON.js → chunk-VCSFCHAJ.js} +2 -2
- package/chunks/{chunk-YLMN3N25.js → chunk-VIT5ALXF.js} +3 -3
- package/chunks/{chunk-BATRQBOR.js → chunk-VMRRNRMR.js} +41 -41
- package/chunks/{chunk-72CISA2D.js → chunk-VNRY6AWF.js} +89 -41
- package/chunks/chunk-W6UWZFKL.js +298 -0
- package/chunks/{chunk-3KPWWJCI.js → chunk-XFCTUKXR.js} +88 -88
- package/chunks/{chunk-GMT2AZKM.js → chunk-YIQSGNAA.js} +897 -130
- package/chunks/codex-models-7TLJSY3L.js +17 -0
- package/chunks/{commands-TBC2F5CE.js → commands-NEI7L3QA.js} +2836 -1424
- package/chunks/corpus-v1.json +2 -2
- package/chunks/data/appsec-archetypes.json +2 -2
- package/chunks/data/chromium-archetypes.json +1 -1
- package/chunks/data/freebsd-archetypes.json +1 -1
- package/chunks/data/kernel-archetypes.json +2 -2
- package/chunks/db-5AP3JB4W.js +16 -0
- package/chunks/{disclose-EKTWSCGW.js → disclose-LDNKAVRH.js} +13 -11
- package/chunks/{dist-4YICS2J2.js → dist-3FNZIBB4.js} +394 -404
- package/chunks/{dist-4MAW5X6L.js → dist-5YHYNLI3.js} +6 -6
- package/chunks/{dist-FMGSR3DW.js → dist-DD4H6HMQ.js} +13 -5
- package/chunks/dist-KEULE5IQ.js +21914 -0
- package/chunks/dist-XZB53PS5.js +53 -0
- package/chunks/eval-runner-43BO2C4T.js +26 -0
- package/chunks/example-manifest.json +2 -2
- package/chunks/{exploit-agent-45YQOHPJ.js → exploit-agent-N4A5ELBK.js} +4 -4
- package/chunks/{exploit-autoclimb-UZGEMGYT.js → exploit-autoclimb-N7P6KIF5.js} +6 -6
- package/chunks/{exploit-climb-SG23KB2G.js → exploit-climb-WNEJUB5W.js} +12 -12
- package/chunks/fix-Z452M4EC.js +26 -0
- package/chunks/{github-issues-MJ6OYOOU.js → github-issues-IGTTWM7V.js} +7 -7
- package/chunks/harness-QJJJVSG4.js +22 -0
- package/chunks/http-conformance-U5F6GKYG.js +11 -0
- package/chunks/http-sender-I5XFFY35.js +10 -0
- package/chunks/hunt-scan-K6D2V3PX.js +36 -0
- package/chunks/{identity-6ZAIIWOR.js → identity-62SVRW4H.js} +5 -5
- package/chunks/{kernel-primitive-7U6CWHXD.js → kernel-primitive-TKUACPKD.js} +6 -6
- package/chunks/{kernel-vm-runner-3JAU4O6J.js → kernel-vm-runner-RAAO2PGT.js} +6 -6
- package/chunks/memsafety-scan-FCPAXIZE.js +16 -0
- package/chunks/{native-loop-RJCJPOUS.js → native-loop-2ZRJENZ3.js} +17 -18
- package/chunks/{npm-detectors-KB5Y5ZFX.js → npm-detectors-Z2ZIQCN4.js} +6 -6
- package/chunks/npm-dynamic-discovery-5J7FT3XM.js +13 -0
- package/chunks/orchestrate-2GWGNTBF.js +58 -0
- package/chunks/{pre-recon-cve-66EB6G4M.js → pre-recon-cve-X2K2P5YQ.js} +4 -4
- package/chunks/prepare-KYHGFWCJ.js +13 -0
- package/chunks/process-N245QIQG.js +12 -0
- package/chunks/{run-D56MPDKY.js → run-U3XU4CTC.js} +11507 -13632
- package/chunks/{runtime-G7YWIO3B.js → runtime-G75TEWQY.js} +10 -11
- package/chunks/runtime-XFWJTBUO.js +12 -0
- package/chunks/{scan-stream-FHI2FYZE.js → scan-stream-BMOCPKQX.js} +7 -7
- package/chunks/scope-WXI46UHJ.js +21 -0
- package/chunks/{session-store-GZ4A4KYT.js → session-store-27L3ZU73.js} +6 -6
- package/chunks/source-files-REHOM44I.js +12 -0
- package/chunks/{specdrift-WCLH6TTQ.js → specdrift-AFS54WEJ.js} +5 -5
- package/chunks/token-KRWP5JYA.js +72 -0
- package/chunks/token-util-DWTL33S3.js +8 -0
- package/chunks/variant-candidates-YWZORZMK.js +13 -0
- package/chunks/{web-recon-prepass-JJGPEOLE.js → web-recon-prepass-YVMFXCIK.js} +9 -9
- package/cli-path-traversal-fixture.js +352 -0
- package/dashboard/assets/bot-Bg1Tp9_d.js +1 -0
- package/dashboard/assets/dist-B_dDCPbu.js +1 -0
- package/dashboard/assets/findings-page-mayGhNx6.js +5 -0
- package/dashboard/assets/format--susmHX7.js +1 -0
- package/dashboard/assets/input-TuVPR3Zl.js +1 -0
- package/dashboard/assets/jsx-runtime-MGseXjj5.js +3 -0
- package/dashboard/assets/live-page-HWWHX99U.js +1 -0
- package/dashboard/assets/meta-tile-ckHo-w7k.js +1 -0
- package/dashboard/assets/operations-BxZ0OoXO.js +10 -0
- package/dashboard/assets/operations-CMFVrXEe.css +2 -0
- package/dashboard/assets/operations-app-D3d35rgo.js +46 -0
- package/dashboard/assets/overview-page-W_4IteEr.js +1 -0
- package/dashboard/assets/page-header-Bw9AJgBV.js +1 -0
- package/dashboard/assets/scans-page-CgzVXHnn.js +1 -0
- package/dashboard/assets/siren-KQj8QAnJ.js +1 -0
- package/dashboard/assets/table-8EDklulN.js +1 -0
- package/dashboard/assets/tabs-CFHPOwg8.js +1 -0
- package/dashboard/index.html +4 -5
- package/node_modules/node-addon-api/LICENSE.md +9 -0
- package/node_modules/node-addon-api/README.md +95 -0
- package/node_modules/node-addon-api/common.gypi +21 -0
- package/node_modules/node-addon-api/except.gypi +25 -0
- package/node_modules/node-addon-api/index.js +14 -0
- package/node_modules/node-addon-api/napi-inl.deprecated.h +186 -0
- package/node_modules/node-addon-api/napi-inl.h +7250 -0
- package/node_modules/node-addon-api/napi.h +3463 -0
- package/node_modules/node-addon-api/node_addon_api.gyp +42 -0
- package/node_modules/node-addon-api/node_api.gyp +9 -0
- package/node_modules/node-addon-api/noexcept.gypi +26 -0
- package/node_modules/node-addon-api/nothing.c +0 -0
- package/node_modules/node-addon-api/package-support.json +21 -0
- package/node_modules/node-addon-api/package.json +481 -0
- package/node_modules/node-addon-api/tools/README.md +73 -0
- package/node_modules/node-addon-api/tools/check-napi.js +99 -0
- package/node_modules/node-addon-api/tools/clang-format.js +71 -0
- package/node_modules/node-addon-api/tools/conversion.js +301 -0
- package/node_modules/node-gyp-build/LICENSE +21 -0
- package/node_modules/node-gyp-build/README.md +58 -0
- package/node_modules/node-gyp-build/SECURITY.md +5 -0
- package/node_modules/node-gyp-build/bin.js +84 -0
- package/node_modules/node-gyp-build/build-test.js +19 -0
- package/node_modules/node-gyp-build/index.js +6 -0
- package/node_modules/node-gyp-build/node-gyp-build.js +207 -0
- package/node_modules/node-gyp-build/optional.js +7 -0
- package/node_modules/node-gyp-build/package.json +43 -0
- package/node_modules/tree-sitter/LICENSE +21 -0
- package/node_modules/tree-sitter/README.md +90 -0
- package/node_modules/tree-sitter/binding.gyp +76 -0
- package/node_modules/tree-sitter/index.js +895 -0
- package/node_modules/tree-sitter/package.json +62 -0
- package/node_modules/tree-sitter/prebuilds/darwin-arm64/tree-sitter.node +0 -0
- package/node_modules/tree-sitter/prebuilds/darwin-x64/tree-sitter.node +0 -0
- package/node_modules/tree-sitter/prebuilds/linux-x64/tree-sitter.node +0 -0
- package/node_modules/tree-sitter/prebuilds/win32-x64/tree-sitter.node +0 -0
- package/node_modules/tree-sitter/src/addon_data.h +47 -0
- package/node_modules/tree-sitter/src/binding.cc +35 -0
- package/node_modules/tree-sitter/src/conversions.cc +140 -0
- package/node_modules/tree-sitter/src/conversions.h +22 -0
- package/node_modules/tree-sitter/src/language.cc +106 -0
- package/node_modules/tree-sitter/src/language.h +17 -0
- package/node_modules/tree-sitter/src/logger.cc +70 -0
- package/node_modules/tree-sitter/src/logger.h +19 -0
- package/node_modules/tree-sitter/src/lookaheaditerator.cc +122 -0
- package/node_modules/tree-sitter/src/lookaheaditerator.h +33 -0
- package/node_modules/tree-sitter/src/node.cc +1056 -0
- package/node_modules/tree-sitter/src/node.h +30 -0
- package/node_modules/tree-sitter/src/parser.cc +298 -0
- package/node_modules/tree-sitter/src/parser.h +35 -0
- package/node_modules/tree-sitter/src/query.cc +383 -0
- package/node_modules/tree-sitter/src/query.h +39 -0
- package/node_modules/tree-sitter/src/tree.cc +307 -0
- package/node_modules/tree-sitter/src/tree.h +45 -0
- package/node_modules/tree-sitter/src/tree_cursor.cc +213 -0
- package/node_modules/tree-sitter/src/tree_cursor.h +52 -0
- package/node_modules/tree-sitter/tree-sitter.d.ts +211 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/LICENSE +21 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/README.md +21 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/README.md +6 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/include/tree_sitter/api.h +1266 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/alloc.c +48 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/alloc.h +41 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/array.h +290 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/atomic.h +68 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/clock.h +146 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/error_costs.h +11 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/get_changed_ranges.c +501 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/get_changed_ranges.h +36 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/host.h +21 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/language.c +221 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/language.h +299 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/length.h +52 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/lexer.c +419 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/lexer.h +49 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/lib.c +14 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/node.c +774 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/parser.c +2151 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/parser.h +230 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/point.h +62 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/query.c +4134 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/reduce_action.h +34 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/reusable_node.h +95 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/stack.c +899 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/stack.h +133 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/subtree.c +1060 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/subtree.h +382 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/tree.c +165 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/tree.h +31 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/tree_cursor.c +714 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/tree_cursor.h +48 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/ICU_SHA +1 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/LICENSE +414 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/README.md +29 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/ptypes.h +1 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/umachine.h +448 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/urename.h +1 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/utf.h +1 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/utf16.h +733 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/utf8.h +881 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode.h +50 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/wasm/stdlib-symbols.txt +23 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/wasm/stdlib.c +109 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/wasm/wasm-stdlib.h +1294 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/wasm_store.c +1823 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/wasm_store.h +31 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/test/fixtures/grammars/.gitkeep +0 -0
- package/node_modules/tree-sitter-c/LICENSE +21 -0
- package/node_modules/tree-sitter-c/README.md +18 -0
- package/node_modules/tree-sitter-c/binding.gyp +20 -0
- package/node_modules/tree-sitter-c/bindings/node/binding.cc +20 -0
- package/node_modules/tree-sitter-c/bindings/node/index.d.ts +28 -0
- package/node_modules/tree-sitter-c/bindings/node/index.js +7 -0
- package/node_modules/tree-sitter-c/grammar.js +1463 -0
- package/node_modules/tree-sitter-c/package.json +108 -0
- package/node_modules/tree-sitter-c/prebuilds/darwin-arm64/tree-sitter-c.node +0 -0
- package/node_modules/tree-sitter-c/prebuilds/darwin-x64/tree-sitter-c.node +0 -0
- package/node_modules/tree-sitter-c/prebuilds/linux-x64/tree-sitter-c.node +0 -0
- package/node_modules/tree-sitter-c/prebuilds/win32-x64/tree-sitter-c.node +0 -0
- package/node_modules/tree-sitter-c/queries/highlights.scm +81 -0
- package/node_modules/tree-sitter-c/queries/tags.scm +9 -0
- package/node_modules/tree-sitter-c/src/grammar.json +9682 -0
- package/node_modules/tree-sitter-c/src/node-types.json +4556 -0
- package/node_modules/tree-sitter-c/src/parser.c +113852 -0
- package/node_modules/tree-sitter-c/src/tree_sitter/alloc.h +54 -0
- package/node_modules/tree-sitter-c/src/tree_sitter/array.h +290 -0
- package/node_modules/tree-sitter-c/src/tree_sitter/parser.h +265 -0
- package/package.json +20 -13
- package/vendor/tree-sitter-0.21.1-node24.json +16 -0
- package/vendor/tree-sitter-0.21.1-node24.tgz +0 -0
- package/chunks/adapt-loop-SMH6V4PD.js +0 -18
- package/chunks/appsec-catalog-CBWHGTEL.js +0 -24
- package/chunks/chunk-242TMK6G.js +0 -110
- package/chunks/chunk-57ZENEX2.js +0 -169
- package/chunks/chunk-ADOLI6DT.js +0 -102
- package/chunks/chunk-ATATQACO.js +0 -471
- package/chunks/chunk-C2WXWFBB.js +0 -1070
- package/chunks/chunk-F3WBKITT.js +0 -687
- package/chunks/chunk-H2FFLZNK.js +0 -3
- package/chunks/chunk-LP3HHYQU.js +0 -245
- package/chunks/chunk-QI233I24.js +0 -333
- package/chunks/chunk-RRMJC3ZE.js +0 -105
- package/chunks/chunk-Z5FA2XOX.js +0 -2798
- package/chunks/cost-ledger-NU63MYZM.js +0 -13
- package/chunks/db-KFWOAUUB.js +0 -16
- package/chunks/eval-runner-7ZF472KV.js +0 -27
- package/chunks/fix-IG7LYXH3.js +0 -12
- package/chunks/harness-7ODOLOWU.js +0 -22
- package/chunks/http-conformance-DU66MZIU.js +0 -11
- package/chunks/http-sender-GWH2IYEA.js +0 -10
- package/chunks/hunt-scan-MMKUOETU.js +0 -38
- package/chunks/memsafety-scan-J7SECV5W.js +0 -16
- package/chunks/npm-dynamic-discovery-AHROOZDB.js +0 -13
- package/chunks/orchestrate-OC2VZN2X.js +0 -62
- package/chunks/pipeline-BZK5BLJR.js +0 -14
- package/chunks/prepare-MYY743TK.js +0 -13
- package/chunks/process-LQRCS5OY.js +0 -13
- package/chunks/replay-runner-45G3VU7X.js +0 -39
- package/chunks/runtime-J7PLXZNM.js +0 -12
- package/chunks/scope-BI7BF4ZY.js +0 -18
- package/chunks/source-files-PWRQR6LY.js +0 -12
- package/chunks/variant-candidates-YERCYMPD.js +0 -13
- package/dashboard/assets/0sec-icon-66SreztZ.gif +0 -0
- package/dashboard/assets/bot-yILPnRgD.js +0 -1
- package/dashboard/assets/chevron-down-BeDJ-Vka.js +0 -1
- package/dashboard/assets/circle-alert-BEnMBMT-.js +0 -1
- package/dashboard/assets/client-DRYsuOGl.js +0 -9
- package/dashboard/assets/copy-Bi5vzoF9.js +0 -1
- package/dashboard/assets/desktop-CXTQonNm.js +0 -32
- package/dashboard/assets/desktop-NOekk4QS.css +0 -1
- package/dashboard/assets/dist-CmX-h7a4.js +0 -1
- package/dashboard/assets/dist-DAwYQmf_.js +0 -45
- package/dashboard/assets/findings-page-CACW9nw2.js +0 -5
- package/dashboard/assets/format-PoISqsES.js +0 -1
- package/dashboard/assets/jsx-runtime-C7oxC63R.js +0 -1
- package/dashboard/assets/live-page-DrgQqQK5.js +0 -1
- package/dashboard/assets/meta-tile-CcskIV_o.js +0 -1
- package/dashboard/assets/operations-BKE8T-vY.css +0 -2
- package/dashboard/assets/operations-D8nUP5_m.js +0 -4
- package/dashboard/assets/operations-app-CQQhG54n.js +0 -2
- package/dashboard/assets/overview-page-DTGS8dPo.js +0 -1
- package/dashboard/assets/page-header-MFVvEtZW.js +0 -1
- package/dashboard/assets/play-Dwo-9xt6.js +0 -1
- package/dashboard/assets/scans-page-ChVtq8Us.js +0 -1
- package/dashboard/assets/search-CiooTLck.js +0 -1
- package/dashboard/assets/siren-CCBwTSuk.js +0 -1
- package/dashboard/assets/table-BYS-nIVA.js +0 -1
- package/dashboard/assets/tabs-DivxbhQy.js +0 -1
- package/dashboard/desktop.html +0 -21
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
#ifndef NODE_TREE_SITTER_NODE_H_
|
|
2
|
+
#define NODE_TREE_SITTER_NODE_H_
|
|
3
|
+
|
|
4
|
+
#include "./tree.h"
|
|
5
|
+
#include "tree_sitter/api.h"
|
|
6
|
+
|
|
7
|
+
#include <napi.h>
|
|
8
|
+
|
|
9
|
+
namespace node_tree_sitter::node_methods {
|
|
10
|
+
|
|
11
|
+
void Init(Napi::Env env, Napi::Object exports);
|
|
12
|
+
Napi::Value MarshalNode(const Napi::CallbackInfo &info, const Tree *, TSNode);
|
|
13
|
+
Napi::Value GetMarshalNode(const Napi::CallbackInfo &info, const Tree *tree, TSNode node);
|
|
14
|
+
Napi::Value GetMarshalNodes(const Napi::CallbackInfo &info, const Tree *tree, const TSNode *nodes, uint32_t node_count);
|
|
15
|
+
TSNode UnmarshalNode(Napi::Env env, const Tree *tree);
|
|
16
|
+
|
|
17
|
+
static inline const void *UnmarshalNodeId(const uint32_t *buffer) {
|
|
18
|
+
const void *result;
|
|
19
|
+
memcpy(&result, buffer, sizeof(result));
|
|
20
|
+
return result;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
static inline void MarshalNodeId(const void *id, uint32_t *buffer) {
|
|
24
|
+
memset(buffer, 0, sizeof(uint64_t));
|
|
25
|
+
memcpy(buffer, &id, sizeof(id));
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
} // namespace node_tree_sitter::node_methods
|
|
29
|
+
|
|
30
|
+
#endif // NODE_TREE_SITTER_NODE_H_
|
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
#include "./parser.h"
|
|
2
|
+
#include "./conversions.h"
|
|
3
|
+
#include "./language.h"
|
|
4
|
+
#include "./logger.h"
|
|
5
|
+
#include "./tree.h"
|
|
6
|
+
|
|
7
|
+
#include <cstddef>
|
|
8
|
+
#include <napi.h>
|
|
9
|
+
#include <vector>
|
|
10
|
+
|
|
11
|
+
using namespace Napi;
|
|
12
|
+
using std::vector;
|
|
13
|
+
|
|
14
|
+
namespace node_tree_sitter {
|
|
15
|
+
|
|
16
|
+
class CallbackInput final {
|
|
17
|
+
public:
|
|
18
|
+
CallbackInput(Function callback, Napi::Value js_buffer_size) {
|
|
19
|
+
this->callback.Reset(callback, 1);
|
|
20
|
+
if (js_buffer_size.IsNumber()) {
|
|
21
|
+
buffer.resize(js_buffer_size.As<Number>().Uint32Value());
|
|
22
|
+
} else {
|
|
23
|
+
buffer.resize(static_cast<uint64_t>(32 * 1024));
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
TSInput Input() {
|
|
28
|
+
TSInput result;
|
|
29
|
+
result.payload = static_cast<void *>(this);
|
|
30
|
+
result.encoding = TSInputEncodingUTF16;
|
|
31
|
+
result.read = Read;
|
|
32
|
+
return result;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
private:
|
|
36
|
+
static String slice(String s, uint32_t offset) {
|
|
37
|
+
Env env = s.Env();
|
|
38
|
+
auto *data = env.GetInstanceData<AddonData>();
|
|
39
|
+
return data->string_slice.Call(s, {Number::New(s.Env(), offset)}).As<String>();
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
static const char * Read(void *payload, uint32_t byte, TSPoint position, uint32_t *bytes_read) {
|
|
43
|
+
auto *reader = static_cast<CallbackInput *>(payload);
|
|
44
|
+
Napi::Env env = reader->callback.Env();
|
|
45
|
+
|
|
46
|
+
if (byte != reader->byte_offset) {
|
|
47
|
+
reader->byte_offset = byte;
|
|
48
|
+
reader->partial_string.Reset();
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
*bytes_read = 0;
|
|
52
|
+
String result;
|
|
53
|
+
if (!reader->partial_string.IsEmpty()) {
|
|
54
|
+
result = reader->partial_string.Value().As<String>();
|
|
55
|
+
} else {
|
|
56
|
+
Function callback = reader->callback.Value();
|
|
57
|
+
Napi::Value result_value = callback({
|
|
58
|
+
ByteCountToJS(env, byte),
|
|
59
|
+
PointToJS(env, position),
|
|
60
|
+
});
|
|
61
|
+
if (env.IsExceptionPending()) {
|
|
62
|
+
return nullptr;
|
|
63
|
+
}
|
|
64
|
+
if (!result_value.IsString()) {
|
|
65
|
+
return nullptr;
|
|
66
|
+
}
|
|
67
|
+
result = result_value.As<String>();
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
size_t length = 0;
|
|
71
|
+
size_t utf16_units_read = 0;
|
|
72
|
+
napi_status status;
|
|
73
|
+
status = napi_get_value_string_utf16(
|
|
74
|
+
env, result, nullptr, 0, &length
|
|
75
|
+
);
|
|
76
|
+
if (status != napi_ok) {
|
|
77
|
+
return nullptr;
|
|
78
|
+
}
|
|
79
|
+
status = napi_get_value_string_utf16(
|
|
80
|
+
env, result, reinterpret_cast<char16_t *>(reader->buffer.data()), reader->buffer.size(), &utf16_units_read
|
|
81
|
+
);
|
|
82
|
+
if (status != napi_ok) {
|
|
83
|
+
return nullptr;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
*bytes_read = 2 * utf16_units_read;
|
|
87
|
+
reader->byte_offset += *bytes_read;
|
|
88
|
+
|
|
89
|
+
if (utf16_units_read < length) {
|
|
90
|
+
reader->partial_string.Reset(slice(result, utf16_units_read));
|
|
91
|
+
} else {
|
|
92
|
+
reader->partial_string.Reset();
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
return reinterpret_cast<const char *>(reader->buffer.data());
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
FunctionReference callback;
|
|
99
|
+
std::vector<uint16_t> buffer;
|
|
100
|
+
size_t byte_offset {};
|
|
101
|
+
Reference<String> partial_string;
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
void Parser::Init(Napi::Env env, Napi::Object exports) {
|
|
105
|
+
auto *data = env.GetInstanceData<AddonData>();
|
|
106
|
+
|
|
107
|
+
Function ctor = DefineClass(env, "Parser", {
|
|
108
|
+
InstanceMethod("setLanguage", &Parser::SetLanguage, napi_default_method),
|
|
109
|
+
InstanceMethod("parse", &Parser::Parse, napi_default_method),
|
|
110
|
+
InstanceMethod("getIncludedRanges", &Parser::IncludedRanges, napi_default_method),
|
|
111
|
+
InstanceMethod("getTimeoutMicros", &Parser::TimeoutMicros, napi_default_method),
|
|
112
|
+
InstanceMethod("setTimeoutMicros", &Parser::SetTimeoutMicros, napi_default_method),
|
|
113
|
+
InstanceMethod("getLogger", &Parser::GetLogger, napi_default_method),
|
|
114
|
+
InstanceMethod("setLogger", &Parser::SetLogger, napi_default_method),
|
|
115
|
+
InstanceMethod("printDotGraphs", &Parser::PrintDotGraphs, napi_default_method),
|
|
116
|
+
InstanceMethod("reset", &Parser::Reset, napi_default_method),
|
|
117
|
+
});
|
|
118
|
+
|
|
119
|
+
data->parser_constructor = Napi::Persistent(ctor);
|
|
120
|
+
exports["Parser"] = ctor;
|
|
121
|
+
exports["LANGUAGE_VERSION"] = Number::New(env, TREE_SITTER_LANGUAGE_VERSION);
|
|
122
|
+
|
|
123
|
+
String s = String::New(env, "");
|
|
124
|
+
Napi::Value string_slice_value = s.As<Object>()["slice"];
|
|
125
|
+
data->string_slice = Napi::Persistent(string_slice_value.As<Function>());
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
Parser::Parser(const Napi::CallbackInfo &info) : Napi::ObjectWrap<Parser>(info), parser_(ts_parser_new()) {}
|
|
129
|
+
|
|
130
|
+
Parser::~Parser() {
|
|
131
|
+
ts_parser_print_dot_graphs(parser_, -1);
|
|
132
|
+
ts_parser_set_logger(parser_, { nullptr, nullptr });
|
|
133
|
+
ts_parser_delete(parser_);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
namespace {
|
|
137
|
+
|
|
138
|
+
bool handle_included_ranges(Napi::Env env, TSParser *parser, Napi::Value arg) {
|
|
139
|
+
uint32_t last_included_range_end = 0;
|
|
140
|
+
if (arg.IsArray()) {
|
|
141
|
+
auto js_included_ranges = arg.As<Array>();
|
|
142
|
+
vector<TSRange> included_ranges;
|
|
143
|
+
for (unsigned i = 0; i < js_included_ranges.Length(); i++) {
|
|
144
|
+
Value range_value = js_included_ranges[i];
|
|
145
|
+
if (!range_value.IsObject()) {
|
|
146
|
+
return false;
|
|
147
|
+
}
|
|
148
|
+
auto maybe_range = RangeFromJS(range_value);
|
|
149
|
+
if (!maybe_range.IsJust()) {
|
|
150
|
+
return false;
|
|
151
|
+
}
|
|
152
|
+
auto range = maybe_range.Unwrap();
|
|
153
|
+
if (range.start_byte < last_included_range_end) {
|
|
154
|
+
throw RangeError::New(env, "Overlapping ranges");
|
|
155
|
+
}
|
|
156
|
+
last_included_range_end = range.end_byte;
|
|
157
|
+
included_ranges.push_back(range);
|
|
158
|
+
}
|
|
159
|
+
ts_parser_set_included_ranges(parser, included_ranges.data(), included_ranges.size());
|
|
160
|
+
} else {
|
|
161
|
+
ts_parser_set_included_ranges(parser, nullptr, 0);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
return true;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
} // namespace
|
|
168
|
+
|
|
169
|
+
Napi::Value Parser::SetLanguage(const Napi::CallbackInfo &info) {
|
|
170
|
+
const TSLanguage *language = language_methods::UnwrapLanguage(info[0]);
|
|
171
|
+
if (language != nullptr) {
|
|
172
|
+
ts_parser_set_language(parser_, language);
|
|
173
|
+
return info.This();
|
|
174
|
+
}
|
|
175
|
+
return info.Env().Undefined();
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
Napi::Value Parser::Parse(const CallbackInfo &info) {
|
|
179
|
+
Napi::Env env = info.Env();
|
|
180
|
+
|
|
181
|
+
if (!info[0].IsFunction()) {
|
|
182
|
+
throw TypeError::New(env, "Input must be a function");
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
auto callback = info[0].As<Function>();
|
|
186
|
+
|
|
187
|
+
Object js_old_tree;
|
|
188
|
+
const TSTree *old_tree = nullptr;
|
|
189
|
+
if (info.Length() > 1 && !info[1].IsNull() && !info[1].IsUndefined() && info[1].IsObject()) {
|
|
190
|
+
js_old_tree = info[1].As<Object>();
|
|
191
|
+
const Tree *tree = Tree::UnwrapTree(js_old_tree);
|
|
192
|
+
if (tree == nullptr) {
|
|
193
|
+
throw TypeError::New(env, "Second argument must be a tree");
|
|
194
|
+
}
|
|
195
|
+
old_tree = tree->tree_;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
Napi::Value buffer_size = env.Null();
|
|
199
|
+
if (info.Length() > 2) {
|
|
200
|
+
buffer_size = info[2];
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
if (!handle_included_ranges(env, parser_, info[3])) {
|
|
204
|
+
return env.Undefined();
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
CallbackInput callback_input(callback, buffer_size);
|
|
208
|
+
TSTree *tree = ts_parser_parse(parser_, old_tree, callback_input.Input());
|
|
209
|
+
Napi::Value result = Tree::NewInstance(env, tree);
|
|
210
|
+
return result;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
Napi::Value Parser::IncludedRanges(const Napi::CallbackInfo &info) {
|
|
214
|
+
Napi::Env env = info.Env();
|
|
215
|
+
uint32_t count;
|
|
216
|
+
const TSRange *ranges = ts_parser_included_ranges(parser_, &count);
|
|
217
|
+
|
|
218
|
+
Napi::Array result = Napi::Array::New(env, count);
|
|
219
|
+
for (uint32_t i = 0; i < count; i++) {
|
|
220
|
+
result[i] = RangeToJS(env, ranges[i]);
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
return result;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
Napi::Value Parser::TimeoutMicros(const Napi::CallbackInfo &info) {
|
|
227
|
+
uint64_t timeout_micros = ts_parser_timeout_micros(parser_);
|
|
228
|
+
return Number::New(info.Env(), static_cast<double>(timeout_micros));
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
Napi::Value Parser::SetTimeoutMicros(const Napi::CallbackInfo &info) {
|
|
232
|
+
uint64_t timeout_micros;
|
|
233
|
+
if (!info[0].IsNumber()) {
|
|
234
|
+
throw TypeError::New(info.Env(), "First argument must be a number");
|
|
235
|
+
}
|
|
236
|
+
timeout_micros = info[0].As<Number>().Uint32Value();
|
|
237
|
+
ts_parser_set_timeout_micros(parser_, timeout_micros);
|
|
238
|
+
return info.This();
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
Napi::Value Parser::GetLogger(const Napi::CallbackInfo &info) {
|
|
242
|
+
TSLogger current_logger = ts_parser_logger(parser_);
|
|
243
|
+
if ((current_logger.payload != nullptr) && current_logger.log == Logger::Log) {
|
|
244
|
+
auto *logger = static_cast<Logger *>(current_logger.payload);
|
|
245
|
+
return logger->func.Value();
|
|
246
|
+
}
|
|
247
|
+
return info.Env().Null();
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
Napi::Value Parser::SetLogger(const Napi::CallbackInfo &info) {
|
|
251
|
+
TSLogger current_logger = ts_parser_logger(parser_);
|
|
252
|
+
|
|
253
|
+
if (info[0].IsFunction()) {
|
|
254
|
+
if (current_logger.payload != nullptr) {
|
|
255
|
+
delete static_cast<Logger *>(current_logger.payload);
|
|
256
|
+
}
|
|
257
|
+
ts_parser_set_logger(parser_, Logger::Make(info[0].As<Function>()));
|
|
258
|
+
} else if (info[0].IsEmpty() || info[0].IsUndefined() || info[0].IsNull() || (info[0].IsBoolean() && !info[0].As<Boolean>())) {
|
|
259
|
+
if (current_logger.payload != nullptr) {
|
|
260
|
+
delete static_cast<Logger *>(current_logger.payload);
|
|
261
|
+
}
|
|
262
|
+
ts_parser_set_logger(parser_, { nullptr, nullptr });
|
|
263
|
+
} else {
|
|
264
|
+
throw TypeError::New(info.Env(), "Logger callback must either be a function or a falsy value");
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
return info.This();
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
Napi::Value Parser::PrintDotGraphs(const Napi::CallbackInfo &info) {
|
|
271
|
+
bool should_print = true;
|
|
272
|
+
int32_t fd = fileno(stderr);
|
|
273
|
+
|
|
274
|
+
if (info.Length() > 0) {
|
|
275
|
+
if (!info[0].IsBoolean()) {
|
|
276
|
+
throw TypeError::New(info.Env(), "First argument must be a boolean");
|
|
277
|
+
}
|
|
278
|
+
should_print = info[0].As<Boolean>();
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
if (info.Length() > 1) {
|
|
282
|
+
if (!info[1].IsNumber()) {
|
|
283
|
+
throw TypeError::New(info.Env(), "Second argument must be a number");
|
|
284
|
+
}
|
|
285
|
+
fd = info[1].As<Number>().Int32Value();
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
ts_parser_print_dot_graphs(parser_, should_print ? fd : -1);
|
|
289
|
+
|
|
290
|
+
return info.This();
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
Napi::Value Parser::Reset(const Napi::CallbackInfo & info) {
|
|
294
|
+
ts_parser_reset(parser_);
|
|
295
|
+
return info.This();
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
} // namespace node_tree_sitter
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
#ifndef NODE_TREE_SITTER_PARSER_H_
|
|
2
|
+
#define NODE_TREE_SITTER_PARSER_H_
|
|
3
|
+
|
|
4
|
+
#include "tree_sitter/api.h"
|
|
5
|
+
|
|
6
|
+
#include <napi.h>
|
|
7
|
+
#include <node_object_wrap.h>
|
|
8
|
+
|
|
9
|
+
namespace node_tree_sitter {
|
|
10
|
+
|
|
11
|
+
class Parser final : public Napi::ObjectWrap<Parser> {
|
|
12
|
+
public:
|
|
13
|
+
static void Init(Napi::Env env, Napi::Object exports);
|
|
14
|
+
|
|
15
|
+
explicit Parser(const Napi::CallbackInfo &info);
|
|
16
|
+
~Parser() final;
|
|
17
|
+
|
|
18
|
+
private:
|
|
19
|
+
TSParser *parser_;
|
|
20
|
+
|
|
21
|
+
Napi::Value SetLanguage(const Napi::CallbackInfo &);
|
|
22
|
+
Napi::Value Parse(const Napi::CallbackInfo &);
|
|
23
|
+
Napi::Value IncludedRanges(const Napi::CallbackInfo &info);
|
|
24
|
+
Napi::Value SetIncludedRanges(const Napi::CallbackInfo &info);
|
|
25
|
+
Napi::Value TimeoutMicros(const Napi::CallbackInfo &info);
|
|
26
|
+
Napi::Value SetTimeoutMicros(const Napi::CallbackInfo &info);
|
|
27
|
+
Napi::Value GetLogger(const Napi::CallbackInfo &);
|
|
28
|
+
Napi::Value SetLogger(const Napi::CallbackInfo &);
|
|
29
|
+
Napi::Value PrintDotGraphs(const Napi::CallbackInfo &);
|
|
30
|
+
Napi::Value Reset(const Napi::CallbackInfo &info);
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
} // namespace node_tree_sitter
|
|
34
|
+
|
|
35
|
+
#endif // NODE_TREE_SITTER_PARSER_H_
|