@hostclubeos/miraos 0.0.5-beta → 0.0.6-beta

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.
Files changed (219) hide show
  1. package/bundled/bug-hunter/references/apk-redteam-pipeline/SKILL.md +407 -0
  2. package/bundled/bug-hunter/references/bb-local-toolkit/SKILL.md +1558 -0
  3. package/bundled/bug-hunter/references/bb-methodology/SKILL.md +513 -0
  4. package/bundled/bug-hunter/references/bug-bounty/SKILL.md +1604 -0
  5. package/bundled/bug-hunter/references/bugcrowd-reporting/SKILL.md +331 -0
  6. package/bundled/bug-hunter/references/cloud-iam-deep/SKILL.md +521 -0
  7. package/bundled/bug-hunter/references/enterprise-vpn-attack/SKILL.md +356 -0
  8. package/bundled/bug-hunter/references/evidence-hygiene/SKILL.md +401 -0
  9. package/bundled/bug-hunter/references/exploit-completion/SKILL.md +155 -0
  10. package/bundled/bug-hunter/references/hunt-api-misconfig/SKILL.md +268 -0
  11. package/bundled/bug-hunter/references/hunt-aspnet/SKILL.md +277 -0
  12. package/bundled/bug-hunter/references/hunt-ato/SKILL.md +140 -0
  13. package/bundled/bug-hunter/references/hunt-auth-bypass/SKILL.md +449 -0
  14. package/bundled/bug-hunter/references/hunt-brute-force/SKILL.md +297 -0
  15. package/bundled/bug-hunter/references/hunt-business-logic/SKILL.md +237 -0
  16. package/bundled/bug-hunter/references/hunt-cache-poison/SKILL.md +338 -0
  17. package/bundled/bug-hunter/references/hunt-captcha-bypass/SKILL.md +92 -0
  18. package/bundled/bug-hunter/references/hunt-cicd/SKILL.md +267 -0
  19. package/bundled/bug-hunter/references/hunt-clickjacking/SKILL.md +66 -0
  20. package/bundled/bug-hunter/references/hunt-cloud-misconfig/SKILL.md +195 -0
  21. package/bundled/bug-hunter/references/hunt-cors/SKILL.md +291 -0
  22. package/bundled/bug-hunter/references/hunt-csrf/SKILL.md +374 -0
  23. package/bundled/bug-hunter/references/hunt-deserialization/SKILL.md +178 -0
  24. package/bundled/bug-hunter/references/hunt-dispatch/SKILL.md +380 -0
  25. package/bundled/bug-hunter/references/hunt-dom/SKILL.md +279 -0
  26. package/bundled/bug-hunter/references/hunt-exceptional-conditions/SKILL.md +67 -0
  27. package/bundled/bug-hunter/references/hunt-file-upload/SKILL.md +158 -0
  28. package/bundled/bug-hunter/references/hunt-fintech-graphql/SKILL.md +245 -0
  29. package/bundled/bug-hunter/references/hunt-forgot-password/SKILL.md +70 -0
  30. package/bundled/bug-hunter/references/hunt-graphql/SKILL.md +368 -0
  31. package/bundled/bug-hunter/references/hunt-grpc/SKILL.md +273 -0
  32. package/bundled/bug-hunter/references/hunt-host-header/SKILL.md +265 -0
  33. package/bundled/bug-hunter/references/hunt-html-injection/SKILL.md +62 -0
  34. package/bundled/bug-hunter/references/hunt-http-smuggling/SKILL.md +87 -0
  35. package/bundled/bug-hunter/references/hunt-idor/SKILL.md +389 -0
  36. package/bundled/bug-hunter/references/hunt-jwt-crypto/SKILL.md +177 -0
  37. package/bundled/bug-hunter/references/hunt-k8s/SKILL.md +293 -0
  38. package/bundled/bug-hunter/references/hunt-laravel/SKILL.md +211 -0
  39. package/bundled/bug-hunter/references/hunt-ldap/SKILL.md +307 -0
  40. package/bundled/bug-hunter/references/hunt-lfi/SKILL.md +266 -0
  41. package/bundled/bug-hunter/references/hunt-llm-ai/SKILL.md +245 -0
  42. package/bundled/bug-hunter/references/hunt-mfa-bypass/SKILL.md +134 -0
  43. package/bundled/bug-hunter/references/hunt-misc/SKILL.md +333 -0
  44. package/bundled/bug-hunter/references/hunt-nextjs/SKILL.md +255 -0
  45. package/bundled/bug-hunter/references/hunt-nodejs/SKILL.md +219 -0
  46. package/bundled/bug-hunter/references/hunt-nosqli/SKILL.md +166 -0
  47. package/bundled/bug-hunter/references/hunt-ntlm-info/SKILL.md +270 -0
  48. package/bundled/bug-hunter/references/hunt-oauth/SKILL.md +414 -0
  49. package/bundled/bug-hunter/references/hunt-open-redirect/SKILL.md +179 -0
  50. package/bundled/bug-hunter/references/hunt-race-condition/SKILL.md +485 -0
  51. package/bundled/bug-hunter/references/hunt-rag-vector/SKILL.md +167 -0
  52. package/bundled/bug-hunter/references/hunt-rce/SKILL.md +494 -0
  53. package/bundled/bug-hunter/references/hunt-saml/SKILL.md +112 -0
  54. package/bundled/bug-hunter/references/hunt-session/SKILL.md +298 -0
  55. package/bundled/bug-hunter/references/hunt-shadow-api/SKILL.md +153 -0
  56. package/bundled/bug-hunter/references/hunt-sharepoint/SKILL.md +437 -0
  57. package/bundled/bug-hunter/references/hunt-source-leak/SKILL.md +301 -0
  58. package/bundled/bug-hunter/references/hunt-spa-api/SKILL.md +123 -0
  59. package/bundled/bug-hunter/references/hunt-springboot/SKILL.md +241 -0
  60. package/bundled/bug-hunter/references/hunt-sqli/SKILL.md +422 -0
  61. package/bundled/bug-hunter/references/hunt-ssrf/SKILL.md +514 -0
  62. package/bundled/bug-hunter/references/hunt-ssti/SKILL.md +117 -0
  63. package/bundled/bug-hunter/references/hunt-subdomain/SKILL.md +335 -0
  64. package/bundled/bug-hunter/references/hunt-tls-network/SKILL.md +355 -0
  65. package/bundled/bug-hunter/references/hunt-websocket/SKILL.md +285 -0
  66. package/bundled/bug-hunter/references/hunt-xss/SKILL.md +450 -0
  67. package/bundled/bug-hunter/references/hunt-xxe/SKILL.md +422 -0
  68. package/bundled/bug-hunter/references/ios-redteam-pipeline/SKILL.md +287 -0
  69. package/bundled/bug-hunter/references/m365-entra-attack/SKILL.md +384 -0
  70. package/bundled/bug-hunter/references/meme-coin-audit/SKILL.md +358 -0
  71. package/bundled/bug-hunter/references/mid-engagement-ir-detection/SKILL.md +353 -0
  72. package/bundled/bug-hunter/references/offensive-osint/README.md +98 -0
  73. package/bundled/bug-hunter/references/offensive-osint/SKILL.md +399 -0
  74. package/bundled/bug-hunter/references/offensive-osint/references/breach-and-credentials.md +128 -0
  75. package/bundled/bug-hunter/references/offensive-osint/references/dork-corpus.md +180 -0
  76. package/bundled/bug-hunter/references/offensive-osint/references/helpers-and-automation.md +231 -0
  77. package/bundled/bug-hunter/references/offensive-osint/references/identity-fabric.md +305 -0
  78. package/bundled/bug-hunter/references/offensive-osint/references/people-osint.md +105 -0
  79. package/bundled/bug-hunter/references/offensive-osint/references/probes-and-wordlists.md +1266 -0
  80. package/bundled/bug-hunter/references/offensive-osint/references/recon-stack.md +282 -0
  81. package/bundled/bug-hunter/references/offensive-osint/references/recon-techniques.md +341 -0
  82. package/bundled/bug-hunter/references/offensive-osint/references/saas-public-surfaces.md +138 -0
  83. package/bundled/bug-hunter/references/offensive-osint/references/secret-patterns.md +67 -0
  84. package/bundled/bug-hunter/references/offensive-osint/references/secret-validators.md +329 -0
  85. package/bundled/bug-hunter/references/offensive-osint/references/sector-notes.md +72 -0
  86. package/bundled/bug-hunter/references/offensive-osint/references/severity-matrix.md +108 -0
  87. package/bundled/bug-hunter/references/offensive-osint/references/specialized-osint.md +199 -0
  88. package/bundled/bug-hunter/references/offensive-osint/references/tooling-install.md +188 -0
  89. package/bundled/bug-hunter/references/offensive-osint/scripts/assets/FONT-LICENSE.txt +13 -0
  90. package/bundled/bug-hunter/references/offensive-osint/scripts/assets/archivo-black.woff2 +0 -0
  91. package/bundled/bug-hunter/references/offensive-osint/scripts/dashboard.py +968 -0
  92. package/bundled/bug-hunter/references/offensive-osint/scripts/h1_reference.py +402 -0
  93. package/bundled/bug-hunter/references/offensive-osint/scripts/secret_scan.py +180 -0
  94. package/bundled/bug-hunter/references/okta-attack/SKILL.md +397 -0
  95. package/bundled/bug-hunter/references/osint-methodology/README.md +66 -0
  96. package/bundled/bug-hunter/references/osint-methodology/SKILL.md +1704 -0
  97. package/bundled/bug-hunter/references/recon-scope-triage/SKILL.md +89 -0
  98. package/bundled/bug-hunter/references/redteam-mindset/SKILL.md +401 -0
  99. package/bundled/bug-hunter/references/redteam-report-template/SKILL.md +347 -0
  100. package/bundled/bug-hunter/references/regression-hunting/SKILL.md +98 -0
  101. package/bundled/bug-hunter/references/report-writing/SKILL.md +568 -0
  102. package/bundled/bug-hunter/references/security-arsenal/SKILL.md +912 -0
  103. package/bundled/bug-hunter/references/supply-chain-attack-recon/SKILL.md +648 -0
  104. package/bundled/bug-hunter/references/triage-validation/SKILL.md +418 -0
  105. package/bundled/bug-hunter/references/vmware-vcenter-attack/SKILL.md +372 -0
  106. package/bundled/bug-hunter/references/web2-recon/SKILL.md +698 -0
  107. package/bundled/bug-hunter/references/web3-audit/SKILL.md +606 -0
  108. package/chunks/{acpAgent-UHWDA3W7.js → acpAgent-OGBFWA5R.js} +2 -2
  109. package/chunks/{chunk-BX3KM7OK.js → chunk-2PB6TEZU.js} +1 -1
  110. package/chunks/{chunk-NYM67KKZ.js → chunk-34YXJ3CX.js} +1 -1
  111. package/chunks/{chunk-FXANOHXI.js → chunk-3GA3NTAV.js} +3 -3
  112. package/chunks/{chunk-MUS4ADP7.js → chunk-5JKJSIIP.js} +1 -1
  113. package/chunks/{chunk-N4RIISOE.js → chunk-7JT2V4AW.js} +1 -1
  114. package/chunks/{chunk-4IVYVCCU.js → chunk-BB2C4HKQ.js} +1 -1
  115. package/chunks/{chunk-SK3QOQR4.js → chunk-F2XELUO3.js} +1 -1
  116. package/chunks/{chunk-RKFNQQNA.js → chunk-GPI53DWB.js} +1 -1
  117. package/chunks/{chunk-744QTJR2.js → chunk-HHSHBOT7.js} +2 -2
  118. package/chunks/{chunk-PXBJPUGN.js → chunk-HMID4D72.js} +1 -1
  119. package/chunks/{chunk-MQWKOOSR.js → chunk-IC2WDA6V.js} +1 -1
  120. package/chunks/{chunk-2TDRP3IX.js → chunk-JRPR5IME.js} +1 -1
  121. package/chunks/{chunk-2GVKPBW5.js → chunk-ORVQPZMQ.js} +1 -1
  122. package/chunks/{chunk-FRADUGRC.js → chunk-RGVXNWZA.js} +1 -1
  123. package/chunks/{chunk-QEIX42MZ.js → chunk-SHLTP6ZB.js} +1 -1
  124. package/chunks/{chunk-D3QZNIFB.js → chunk-SOCXRMZM.js} +4 -4
  125. package/chunks/{chunk-NKWATWMD.js → chunk-TI7J4HX2.js} +1 -1
  126. package/chunks/{chunk-62DMHXLL.js → chunk-VGPV5AVJ.js} +1 -1
  127. package/chunks/{chunk-XZNF4YNN.js → chunk-Y3BCVTFB.js} +1 -1
  128. package/chunks/{chunk-D3YOXHQF.js → chunk-YVORE4W4.js} +1 -1
  129. package/chunks/{daemon-status-provider-F6KB2LNG.js → daemon-status-provider-FCQ4YYAY.js} +1 -1
  130. package/chunks/{fast-path-DWPD5EGQ.js → fast-path-ZBD7IYQM.js} +1 -1
  131. package/chunks/{llm-RBI7KXDE.js → llm-DQNQEAFW.js} +3 -3
  132. package/chunks/{local-HSG47CNJ.js → local-ZRC4XZCJ.js} +1 -1
  133. package/chunks/{managed-local-serve-YE4JDFNP.js → managed-local-serve-B2KOLPB5.js} +1 -1
  134. package/chunks/{managed-runtime-bootstrap-SHEXUEZN.js → managed-runtime-bootstrap-MREL5UC2.js} +1 -1
  135. package/chunks/{managed-runtime-ssh-worker-BZNJV7IB.js → managed-runtime-ssh-worker-GUKAZFAJ.js} +1 -1
  136. package/chunks/{memory-JTDN5AEA.js → memory-ZYPCFYPF.js} +1 -1
  137. package/chunks/{nonInteractiveCli-BXHX6EIU.js → nonInteractiveCli-JG6PKBAD.js} +1 -1
  138. package/chunks/{review-PC4IDLCG.js → review-N3VFZQMI.js} +1 -1
  139. package/chunks/{run-qwen-serve-XRWVWOZK.js → run-qwen-serve-4MZRQFXK.js} +1 -1
  140. package/chunks/{serve-JCUT4WK7.js → serve-EQN6QAXF.js} +1 -1
  141. package/chunks/{server-HMTRZJF7.js → server-CCEHAI25.js} +1 -1
  142. package/chunks/{session-RGLZU6KY.js → session-HNUJSV5A.js} +1 -1
  143. package/chunks/{start-opentui-ui-YNTPK7LX.js → start-opentui-ui-6MCAEWAW.js} +1 -1
  144. package/chunks/{startInteractiveUI-MWA2VYTJ.js → startInteractiveUI-657JWOTK.js} +1 -1
  145. package/chunks/{validateNonInterActiveAuth-3433WFLE.js → validateNonInterActiveAuth-CP5WFNAE.js} +1 -1
  146. package/chunks/{version-XCFKTEY3.js → version-SIM74L5K.js} +1 -1
  147. package/cli.js +1 -1
  148. package/export-transcript-document.js +1 -1
  149. package/package.json +3 -3
  150. package/web-shell/assets/{PierreFilePreview-DEhWK46v.js → PierreFilePreview-Dkt6iPte.js} +1 -1
  151. package/web-shell/assets/SpreadsheetPreview-I4yiL7q3.js +1 -0
  152. package/web-shell/assets/{WorkspaceFileBrowser-64vDYikf.js → WorkspaceFileBrowser-Du9bMpNo.js} +1 -1
  153. package/web-shell/assets/{abnfDiagram-VCTEODGH-C2WWURam.js → abnfDiagram-VCTEODGH-CGY1lCxS.js} +1 -1
  154. package/web-shell/assets/{agents-route-j5ba59xn.js → agents-route-kcQ3YUNc.js} +1 -1
  155. package/web-shell/assets/{arc-Bkr_-GVn.js → arc-BUMNyJDV.js} +1 -1
  156. package/web-shell/assets/{architectureDiagram-5GKGNRK7-D_v_wDDW.js → architectureDiagram-5GKGNRK7-CEfXhEKD.js} +1 -1
  157. package/web-shell/assets/{blockDiagram-NRAW4CY4-Csxc3YNo.js → blockDiagram-NRAW4CY4-BH8hjvlX.js} +1 -1
  158. package/web-shell/assets/{c4Diagram-UCG6FXSJ-PXryoJCB.js → c4Diagram-UCG6FXSJ-Dfl946ex.js} +1 -1
  159. package/web-shell/assets/channel-CoZByzPk.js +1 -0
  160. package/web-shell/assets/{chunk-2Q5K7J3B-DwK5UBHI.js → chunk-2Q5K7J3B-CBvGm-pD.js} +1 -1
  161. package/web-shell/assets/{chunk-5VM5RSS4-BC1hvD6_.js → chunk-5VM5RSS4-k06tGOfl.js} +1 -1
  162. package/web-shell/assets/{chunk-F27PBJKO-iFe0IxfJ.js → chunk-F27PBJKO-Dv4S4vSq.js} +1 -1
  163. package/web-shell/assets/{chunk-G27WJ6UU-ROSuKRxI.js → chunk-G27WJ6UU-7LY0yu3f.js} +1 -1
  164. package/web-shell/assets/{chunk-JWPE2WC7-CYHS6PxA.js → chunk-JWPE2WC7-B-CgVEuJ.js} +1 -1
  165. package/web-shell/assets/{chunk-LCL6LL3I-D5bFMqCy.js → chunk-LCL6LL3I-D0TrWx1f.js} +1 -1
  166. package/web-shell/assets/{chunk-POPQ4Y6H-BJh77MGv.js → chunk-POPQ4Y6H-B97ZANlR.js} +1 -1
  167. package/web-shell/assets/{chunk-SVP7TREG-Cs81aYft.js → chunk-SVP7TREG-2CO_3G76.js} +1 -1
  168. package/web-shell/assets/{chunk-XXDRQBXY-DqDbN44E.js → chunk-XXDRQBXY-CFbSHjzz.js} +1 -1
  169. package/web-shell/assets/classDiagram-DTDB5LWJ-BgKRvG5r.js +1 -0
  170. package/web-shell/assets/classDiagram-v2-JRS7N3AN-BgKRvG5r.js +1 -0
  171. package/web-shell/assets/{cose-bilkent-JH36ORCC-DhjrwADJ.js → cose-bilkent-JH36ORCC-K-uc8eFw.js} +1 -1
  172. package/web-shell/assets/{cynefin-OW5HDTMX-Dh7t-_3M.js → cynefin-OW5HDTMX-Cb0lt2G3.js} +1 -1
  173. package/web-shell/assets/{cynefinDiagram-5FMLGOSQ-5J4kto0C.js → cynefinDiagram-5FMLGOSQ-DWkqpFuH.js} +1 -1
  174. package/web-shell/assets/{dagre-3AP2YEHR-28AdbIcl.js → dagre-3AP2YEHR-Cs8gu3Q4.js} +1 -1
  175. package/web-shell/assets/{diagram-S7CK7UJ4-DmksuoIf.js → diagram-S7CK7UJ4-DlMLXUgK.js} +1 -1
  176. package/web-shell/assets/{diagram-UQ7AKVKN-DUjgQ8Fg.js → diagram-UQ7AKVKN-68PPYL92.js} +1 -1
  177. package/web-shell/assets/{diagram-VSXAHHWV-DUe_FpG-.js → diagram-VSXAHHWV-CxIdRSbx.js} +1 -1
  178. package/web-shell/assets/{diagram-VX7I27RA-CJJ70teK.js → diagram-VX7I27RA-G3C0kWVW.js} +1 -1
  179. package/web-shell/assets/{diagram-Z3DM3KII-BgABlJO4.js → diagram-Z3DM3KII-CwEuAgyS.js} +1 -1
  180. package/web-shell/assets/{docx-preview-BMBWboRx.js → docx-preview-3XzkP9iR.js} +1 -1
  181. package/web-shell/assets/{ebnfDiagram-PWID7BFC-B3nK_Lh7.js → ebnfDiagram-PWID7BFC-DLeMX1Ka.js} +1 -1
  182. package/web-shell/assets/{erDiagram-SSCWMZ5O-DCTdCWlu.js → erDiagram-SSCWMZ5O-CoQLSOGk.js} +1 -1
  183. package/web-shell/assets/{flowDiagram-A5DVABFB-CPxk2UUl.js → flowDiagram-A5DVABFB-BXUV-Qml.js} +1 -1
  184. package/web-shell/assets/{ganttDiagram-EL5Y4UJY-WZzMAKht.js → ganttDiagram-EL5Y4UJY-sWi6Lowi.js} +1 -1
  185. package/web-shell/assets/{gitGraphDiagram-WWUBYQGX-DKcO5ugU.js → gitGraphDiagram-WWUBYQGX-Dsh4-kB4.js} +1 -1
  186. package/web-shell/assets/{index-CkRLMu1y.js → index-CrSq-SfJ.js} +6 -6
  187. package/web-shell/assets/{index-Dbm3-Fps.js → index-DjwWlZt0.js} +1 -1
  188. package/web-shell/assets/{infoDiagram-RXCK75RN-CJX5DzdL.js → infoDiagram-RXCK75RN-JZ6nFIgB.js} +1 -1
  189. package/web-shell/assets/{ishikawaDiagram-5VMMS53U-fF0Id5B6.js → ishikawaDiagram-5VMMS53U-qJj-sQFs.js} +1 -1
  190. package/web-shell/assets/{journeyDiagram-EYS64GPL-BOAezBVe.js → journeyDiagram-EYS64GPL-Ck0jv8SO.js} +1 -1
  191. package/web-shell/assets/{kanban-definition-3QL26DDD-DdNBof9J.js → kanban-definition-3QL26DDD-Ck6_Ydmt.js} +1 -1
  192. package/web-shell/assets/{layout-CXX3l5w0.js → layout-yLaSulE8.js} +1 -1
  193. package/web-shell/assets/{linear-Dnaccp-S.js → linear-CXw5rE6U.js} +1 -1
  194. package/web-shell/assets/{mermaid.core-BzdC3B6T.js → mermaid.core-6WQsyLcq.js} +6 -6
  195. package/web-shell/assets/{mindmap-definition-FBJOCRG2-D-gMUzLw.js → mindmap-definition-FBJOCRG2-BDAmAz8h.js} +1 -1
  196. package/web-shell/assets/{pegDiagram-XKGWAZYB-B9n1WVZq.js → pegDiagram-XKGWAZYB-Rvn5mpol.js} +1 -1
  197. package/web-shell/assets/{pieDiagram-E7YTZNPT-ok49U0zT.js → pieDiagram-E7YTZNPT-DHw4avFL.js} +1 -1
  198. package/web-shell/assets/{quadrantDiagram-AXDQQJYC-DJKha-v3.js → quadrantDiagram-AXDQQJYC-vch6jDK-.js} +1 -1
  199. package/web-shell/assets/{railroadDiagram-O6MQD6OU-DjL4pl7y.js → railroadDiagram-O6MQD6OU-DfVCzYpO.js} +1 -1
  200. package/web-shell/assets/{requirementDiagram-EFPCY7ZU-BpmmRw3A.js → requirementDiagram-EFPCY7ZU-BQAnwpSv.js} +1 -1
  201. package/web-shell/assets/{sankeyDiagram-P5KCCOFB-KpteHB8X.js → sankeyDiagram-P5KCCOFB-fJuxdbbi.js} +1 -1
  202. package/web-shell/assets/{sequenceDiagram-WJ2MYXX4-COMghCpA.js → sequenceDiagram-WJ2MYXX4-B3TtvHJp.js} +1 -1
  203. package/web-shell/assets/{sizeCapture-X5ZJPWSS-5fEwJD-n.js → sizeCapture-X5ZJPWSS-DlJmbcZd.js} +1 -1
  204. package/web-shell/assets/{stateDiagram-HBIQ2CUA-CnC7oXvs.js → stateDiagram-HBIQ2CUA--0kiPvGS.js} +1 -1
  205. package/web-shell/assets/stateDiagram-v2-4QOOHH4V-Dw-ppcvp.js +1 -0
  206. package/web-shell/assets/{swimlanes-XN3QIQJK-bVlhZdve.js → swimlanes-XN3QIQJK-CAytfKbo.js} +1 -1
  207. package/web-shell/assets/swimlanesDiagram-VK2B7HYN-B36XZQuh.js +8 -0
  208. package/web-shell/assets/{timeline-definition-24CTP7MA-CBvYgMu5.js → timeline-definition-24CTP7MA-C-BUmwu6.js} +1 -1
  209. package/web-shell/assets/{vennDiagram-4TSXK5OY-CUTYvV1j.js → vennDiagram-4TSXK5OY-W_dgEGv2.js} +1 -1
  210. package/web-shell/assets/{wardleyDiagram-VM6X3IG4-Djl4gxCB.js → wardleyDiagram-VM6X3IG4-ikAv1QJ9.js} +1 -1
  211. package/web-shell/assets/{xychartDiagram-S5SC5T6Z-BcJZtI2X.js → xychartDiagram-S5SC5T6Z-BmY9Ily6.js} +1 -1
  212. package/web-shell/index.html +1 -1
  213. package/web-shell/sw.js +1 -1
  214. package/web-shell/assets/SpreadsheetPreview-C-GgIuPX.js +0 -1
  215. package/web-shell/assets/channel-6Pj4KPAs.js +0 -1
  216. package/web-shell/assets/classDiagram-DTDB5LWJ-BaTUuuB8.js +0 -1
  217. package/web-shell/assets/classDiagram-v2-JRS7N3AN-BaTUuuB8.js +0 -1
  218. package/web-shell/assets/stateDiagram-v2-4QOOHH4V-V_cfZFBL.js +0 -1
  219. package/web-shell/assets/swimlanesDiagram-VK2B7HYN-25wVg0WL.js +0 -8
@@ -0,0 +1,402 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ h1_reference.py — HackerOne Hacktivity Reference Agent
4
+
5
+ Queries HackerOne's public GraphQL API for disclosed reports and surfaces
6
+ relevant findings during recon. No API key required. Max 50 results/page.
7
+
8
+ Usage examples:
9
+ # Top voted reports (best validated techniques — great starting point)
10
+ python3 h1_reference.py --top-voted --limit 25
11
+
12
+ # Highest bounty reports (signal for business-impact framing)
13
+ python3 h1_reference.py --top-bounty --limit 10
14
+
15
+ # Keyword search in titles across multiple pages
16
+ python3 h1_reference.py --query "SSRF" --pages 10
17
+ python3 h1_reference.py --query "OAuth bypass" --pages 5
18
+
19
+ # Filter by severity (client-side)
20
+ python3 h1_reference.py --top-voted --severity critical high --limit 20
21
+
22
+ # Filter by CWE (client-side, matches CWE label substring)
23
+ python3 h1_reference.py --top-voted --cwe "SSRF" "Request Forgery"
24
+
25
+ # Program-specific disclosures
26
+ python3 h1_reference.py --program shopify --pages 3
27
+
28
+ # Lookup a program's numeric team ID
29
+ python3 h1_reference.py --lookup-program gitlab
30
+
31
+ # Full combo: top-bounty SSRF reports, critical/high only
32
+ python3 h1_reference.py --top-bounty --query "SSRF" --severity critical high --pages 10
33
+
34
+ # JSON output for piping
35
+ python3 h1_reference.py --top-voted --query "XSS" --pages 5 --json
36
+ """
37
+
38
+ import argparse
39
+ import base64
40
+ import json
41
+ import sys
42
+ import re
43
+ import time
44
+ import urllib.request
45
+ import urllib.error
46
+ from typing import Optional
47
+
48
+ GRAPHQL_URL = "https://hackerone.com/graphql"
49
+ HEADERS = {
50
+ "Content-Type": "application/json",
51
+ "User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36",
52
+ "Origin": "https://hackerone.com",
53
+ "Referer": "https://hackerone.com/hacktivity",
54
+ }
55
+ PAGE_SIZE = 50
56
+
57
+ # HackerOne's GraphQL server crashes on named variables + substate filter + report fields.
58
+ # We build inline query strings to avoid this. Additional known crashes:
59
+ # - disclosed_at field with substate filter
60
+ # - sort + substate filter + report fields
61
+ REPORT_FIELDS = """... on HacktivityDocument {
62
+ id
63
+ severity_rating
64
+ total_awarded_amount
65
+ currency
66
+ cwe
67
+ cve_ids
68
+ votes
69
+ team { handle name }
70
+ reporter { username }
71
+ report { _id title url }
72
+ }"""
73
+
74
+ TEAM_LOOKUP_QUERY = """
75
+ query TeamLookup($handle: String!) {
76
+ team(handle: $handle) {
77
+ id
78
+ _id
79
+ handle
80
+ name
81
+ url
82
+ }
83
+ }
84
+ """
85
+
86
+
87
+ def _escape(s: str) -> str:
88
+ return s.replace("\\", "\\\\").replace('"', '\\"')
89
+
90
+
91
+ def _gql_list(items: list) -> str:
92
+ return "[" + ", ".join(f'"{_escape(str(i))}"' for i in items) + "]"
93
+
94
+
95
+ def _offset_cursor(n: int) -> str:
96
+ """H1 uses base64(str(n)) as cursor offsets."""
97
+ return base64.b64encode(str(n).encode()).decode()
98
+
99
+
100
+ def gql_raw(query: str) -> dict:
101
+ payload = json.dumps({"query": query}).encode()
102
+ req = urllib.request.Request(GRAPHQL_URL, data=payload, headers=HEADERS, method="POST")
103
+ try:
104
+ with urllib.request.urlopen(req, timeout=20) as resp:
105
+ return json.loads(resp.read())
106
+ except urllib.error.HTTPError as e:
107
+ body = e.read().decode(errors="replace")
108
+ print(f"[!] HTTP {e.code}: {body[:300]}", file=sys.stderr)
109
+ sys.exit(1)
110
+ except Exception as e:
111
+ print(f"[!] Request failed: {e}", file=sys.stderr)
112
+ sys.exit(1)
113
+
114
+
115
+ def gql_vars(query: str, variables: dict) -> dict:
116
+ payload = json.dumps({"query": query, "variables": variables}).encode()
117
+ req = urllib.request.Request(GRAPHQL_URL, data=payload, headers=HEADERS, method="POST")
118
+ try:
119
+ with urllib.request.urlopen(req, timeout=20) as resp:
120
+ return json.loads(resp.read())
121
+ except urllib.error.HTTPError as e:
122
+ body = e.read().decode(errors="replace")
123
+ print(f"[!] HTTP {e.code}: {body[:300]}", file=sys.stderr)
124
+ sys.exit(1)
125
+ except Exception as e:
126
+ print(f"[!] Request failed: {e}", file=sys.stderr)
127
+ sys.exit(1)
128
+
129
+
130
+ def lookup_program(handle: str) -> Optional[dict]:
131
+ """Resolve a program handle to its team record, or None if not found/private.
132
+
133
+ Returns the team dict so the caller can use the canonical `handle` H1 stores
134
+ (TeamLookup is case-insensitive, but the hacktivity query_string is not, so
135
+ `--program Shopify` must query the canonical `shopify`, not the raw input)."""
136
+ data = gql_vars(TEAM_LOOKUP_QUERY, {"handle": handle})
137
+ team = (data.get("data") or {}).get("team")
138
+ if not team:
139
+ print(f"[!] Program '{handle}' not found or is private", file=sys.stderr)
140
+ return None
141
+ # Progress goes to stderr so --json stdout stays clean and pipeable (jq).
142
+ print(f"[+] {team['handle']} → id={team['_id']}, name={team['name']}", file=sys.stderr)
143
+ return team
144
+
145
+
146
+ def build_page_query(args, after: Optional[str] = None) -> str:
147
+ """
148
+ Build an inline GraphQL query for one page of results.
149
+
150
+ H1 crash/schema rules (discovered empirically):
151
+ - substate filter + sort + report fields → CRASH
152
+ - disclosed_at field + substate filter → CRASH
153
+ - named variables + substate filter + report fields → CRASH
154
+ - terms: {team_id: ...} is no longer searchable on CompleteHacktivityReportIndex
155
+
156
+ Strategy:
157
+ - Program filter (--program): query_string "team_handle:<handle>" (supports sort + pagination)
158
+ - Pure sort (no --program): no substate filter, sort works fine
159
+ - Default: substate filter, no sort
160
+ """
161
+ has_sort = args.top_voted or args.top_bounty
162
+ has_program = bool(args.program_id)
163
+
164
+ after_str = f', after: "{_escape(after)}"' if after else ""
165
+
166
+ if has_program:
167
+ # H1 dropped team_id filtering; query_string with team_handle works and
168
+ # still accepts sort + pagination.
169
+ sort_str = ""
170
+ if has_sort:
171
+ sort_field = "votes" if args.top_voted else "total_awarded_amount"
172
+ sort_str = f', sort: {{field: "{sort_field}", direction: DESC}}'
173
+ qs = _escape(f"team_handle:{args.program}")
174
+ return (
175
+ f'{{ search(index: CompleteHacktivityReportIndex, '
176
+ f'query_string: "{qs}", '
177
+ f'first: {PAGE_SIZE}{after_str}{sort_str}) '
178
+ f'{{ total_count pageInfo {{ endCursor }} nodes {{ {REPORT_FIELDS} }} }} }}'
179
+ )
180
+ elif has_sort:
181
+ # Sort-only mode: no substate filter, works without crashing
182
+ sort_field = "votes" if args.top_voted else "total_awarded_amount"
183
+ return (
184
+ f'{{ search(index: CompleteHacktivityReportIndex, query: {{bool: {{}}}}, '
185
+ f'first: {PAGE_SIZE}{after_str}, sort: {{field: "{sort_field}", direction: DESC}}) '
186
+ f'{{ total_count pageInfo {{ endCursor }} nodes {{ {REPORT_FIELDS} }} }} }}'
187
+ )
188
+ else:
189
+ # Default filter mode: substate only, no sort
190
+ return (
191
+ f'{{ search(index: CompleteHacktivityReportIndex, '
192
+ f'query: {{bool: {{filter: [{{terms: {{substate: ["resolved"]}}}}]}}}}, '
193
+ f'first: {PAGE_SIZE}{after_str}) '
194
+ f'{{ total_count pageInfo {{ endCursor }} nodes {{ {REPORT_FIELDS} }} }} }}'
195
+ )
196
+
197
+
198
+ def fetch_all_pages(args) -> list[dict]:
199
+ """Fetch up to args.pages pages from the H1 GraphQL API."""
200
+ all_nodes: list[dict] = []
201
+ cursor = None
202
+
203
+ for page_num in range(1, args.pages + 1):
204
+ if page_num > 1:
205
+ time.sleep(0.3) # polite rate limiting
206
+
207
+ query = build_page_query(args, after=cursor)
208
+ data = gql_raw(query)
209
+
210
+ if "errors" in data or data.get("data") is None:
211
+ for err in (data.get("errors") or []):
212
+ print(f"[!] GraphQL error (page {page_num}): {err.get('message')}", file=sys.stderr)
213
+ break
214
+
215
+ search = data["data"]["search"]
216
+ nodes = search.get("nodes", [])
217
+ all_nodes.extend(nodes)
218
+ cursor = search.get("pageInfo", {}).get("endCursor")
219
+
220
+ if not nodes or not cursor:
221
+ break
222
+
223
+ # Stop early if we already have enough matches (when keyword filtering)
224
+ if not args.query and not args.severity and not args.cwe:
225
+ matching = len([n for n in all_nodes if n.get("report")])
226
+ if matching >= args.limit:
227
+ break
228
+
229
+ return all_nodes
230
+
231
+
232
+ def apply_client_filters(nodes: list[dict], args) -> list[dict]:
233
+ keyword_pattern = re.compile(args.query, re.IGNORECASE) if args.query else None
234
+ severity_set = set(s.lower() for s in args.severity) if args.severity else None
235
+ cwe_patterns = [re.compile(c, re.IGNORECASE) for c in args.cwe] if args.cwe else []
236
+
237
+ results = []
238
+ for node in nodes:
239
+ report = node.get("report")
240
+ if not report:
241
+ continue
242
+
243
+ title = report.get("title", "")
244
+
245
+ if keyword_pattern and not keyword_pattern.search(title):
246
+ continue
247
+
248
+ if severity_set:
249
+ node_sev = (node.get("severity_rating") or "none").lower()
250
+ if node_sev not in severity_set:
251
+ continue
252
+
253
+ if cwe_patterns:
254
+ node_cwe = node.get("cwe") or ""
255
+ if not any(p.search(node_cwe) for p in cwe_patterns):
256
+ continue
257
+
258
+ results.append(node)
259
+
260
+ return results
261
+
262
+
263
+ def client_sort(results: list[dict], args) -> list[dict]:
264
+ """Apply client-side sort when server-side sort was skipped (filter mode)."""
265
+ has_sort = args.top_voted or args.top_bounty
266
+ has_program = bool(args.program_id)
267
+
268
+ if has_sort and has_program:
269
+ key = "votes" if args.top_voted else "total_awarded_amount"
270
+ results = sorted(results, key=lambda n: n.get(key) or 0, reverse=True)
271
+
272
+ return results
273
+
274
+
275
+ def format_severity(s: Optional[str]) -> str:
276
+ if not s:
277
+ return "none"
278
+ colors = {
279
+ "critical": "\033[91m",
280
+ "high": "\033[33m",
281
+ "medium": "\033[93m",
282
+ "low": "\033[32m",
283
+ "none": "\033[37m",
284
+ }
285
+ reset = "\033[0m"
286
+ c = colors.get(s.lower(), "")
287
+ return f"{c}{s.upper()}{reset}"
288
+
289
+
290
+ def print_results(results: list[dict], total_fetched: int, args):
291
+ if not results:
292
+ print("[*] No matching results found.")
293
+ return
294
+
295
+ print(f"\n{'='*72}")
296
+ label_parts = []
297
+ if args.top_voted:
298
+ label_parts.append("top voted")
299
+ if args.top_bounty:
300
+ label_parts.append("top bounty")
301
+ if args.query:
302
+ label_parts.append(f'keyword="{args.query}"')
303
+ if args.severity:
304
+ label_parts.append(f"severity={','.join(args.severity)}")
305
+ if args.program:
306
+ label_parts.append(f"program={args.program}")
307
+ label = " | ".join(label_parts) if label_parts else "all disclosed"
308
+ print(f" HackerOne Reference — {label}")
309
+ print(f" {len(results)} matches from {total_fetched} fetched reports")
310
+ print(f"{'='*72}\n")
311
+
312
+ for i, node in enumerate(results[: args.limit], 1):
313
+ report = node.get("report", {}) or {}
314
+ team = node.get("team", {}) or {}
315
+ reporter = node.get("reporter", {}) or {}
316
+
317
+ title = report.get("title", "Unknown")
318
+ url = report.get("url", "")
319
+ severity = format_severity(node.get("severity_rating"))
320
+ cwe = node.get("cwe") or ""
321
+ cves = ", ".join(node.get("cve_ids") or [])
322
+ bounty = node.get("total_awarded_amount")
323
+ currency = node.get("currency") or "USD"
324
+ votes = node.get("votes") or 0
325
+ program = team.get("handle", "?")
326
+ reporter_name = reporter.get("username", "?")
327
+
328
+ bounty_str = f"${bounty:,} {currency}" if bounty else "no bounty"
329
+
330
+ print(f"[{i:02d}] {title}")
331
+ print(f" Severity : {severity} | CWE: {cwe or 'n/a'}")
332
+ print(f" Program : {program} | Reporter: {reporter_name}")
333
+ if cves:
334
+ print(f" CVE : {cves}")
335
+ print(f" Bounty : {bounty_str} | Votes: {votes}")
336
+ print(f" URL : {url}")
337
+ print()
338
+
339
+
340
+ def main():
341
+ parser = argparse.ArgumentParser(
342
+ description="HackerOne Hacktivity Reference Agent — surface relevant disclosures during recon",
343
+ formatter_class=argparse.RawDescriptionHelpFormatter,
344
+ epilog=__doc__,
345
+ )
346
+ parser.add_argument("--query", "-q", help="Keyword regex to match in report titles (client-side)")
347
+ parser.add_argument(
348
+ "--severity", "-s",
349
+ nargs="+",
350
+ choices=["none", "low", "medium", "high", "critical"],
351
+ metavar="LEVEL",
352
+ help="Client-side severity filter: none low medium high critical",
353
+ )
354
+ parser.add_argument(
355
+ "--cwe",
356
+ nargs="+",
357
+ metavar="PATTERN",
358
+ help="Client-side CWE label filter (regex, e.g. 'SSRF' 'Traversal')",
359
+ )
360
+ parser.add_argument("--program", "-p", metavar="HANDLE", help="Filter by program handle")
361
+ parser.add_argument("--lookup-program", metavar="HANDLE", help="Resolve a program handle to its numeric ID and exit")
362
+ parser.add_argument("--top-voted", action="store_true", help="Sort by community votes (validated techniques)")
363
+ parser.add_argument("--top-bounty", action="store_true", help="Sort by bounty amount (impact framing reference)")
364
+ parser.add_argument("--limit", "-n", type=int, default=20, help="Max results to display (default: 20)")
365
+ parser.add_argument(
366
+ "--pages",
367
+ type=int,
368
+ default=1,
369
+ help="Number of pages to fetch (50 results/page, default: 1). Use 5-20 for keyword searches.",
370
+ )
371
+ parser.add_argument("--json", action="store_true", help="Output raw JSON instead of formatted text")
372
+
373
+ args = parser.parse_args()
374
+
375
+ if args.lookup_program:
376
+ lookup_program(args.lookup_program)
377
+ return
378
+
379
+ args.program_id = None
380
+ if args.program is not None:
381
+ handle = args.program.strip()
382
+ if not handle:
383
+ print("[!] --program requires a non-empty handle", file=sys.stderr)
384
+ sys.exit(1)
385
+ team = lookup_program(handle)
386
+ if not team:
387
+ sys.exit(1)
388
+ args.program = team["handle"] # canonical handle for the query_string
389
+ args.program_id = team["_id"]
390
+
391
+ nodes = fetch_all_pages(args)
392
+ results = apply_client_filters(nodes, args)
393
+ results = client_sort(results, args)
394
+
395
+ if args.json:
396
+ print(json.dumps(results[: args.limit], indent=2))
397
+ else:
398
+ print_results(results, len(nodes), args)
399
+
400
+
401
+ if __name__ == "__main__":
402
+ main()
@@ -0,0 +1,180 @@
1
+ #!/usr/bin/env python3
2
+ """Stdlib-only secret scanner. Mirrors the 48-pattern catalog from
3
+ the `offensive-osint` skill (§17).
4
+
5
+ Usage:
6
+ echo "AKIAIOSFODNN7EXAMPLE" | python3 secret_scan.py
7
+ python3 secret_scan.py file1.txt file2.js dir/
8
+
9
+ Output: one JSON object per line:
10
+ {pattern, severity, category, match, source, line}
11
+
12
+ Exit codes:
13
+ 0 — completed (regardless of whether secrets found)
14
+ 2 — invalid arguments
15
+ """
16
+ import json
17
+ import os
18
+ import re
19
+ import sys
20
+
21
+ SEV_CRITICAL = "critical"
22
+ SEV_HIGH = "high"
23
+ SEV_MEDIUM = "medium"
24
+ SEV_LOW = "low"
25
+
26
+ # Order matters: most-specific patterns first so generic catches
27
+ # don't pre-empt typed ones.
28
+ PATTERNS = [
29
+ # AWS
30
+ ("AWS_ACCESS_KEY", SEV_CRITICAL, "aws", r"\b(AKIA|ASIA)[0-9A-Z]{16}\b"),
31
+ ("AWS_SECRET_TYPED", SEV_CRITICAL, "aws", r"(?i)aws[_\-]?secret[_\-]?access[_\-]?key['\"\s:=]+([A-Za-z0-9/+=]{40})"),
32
+ ("AWS_SECRET_LOOSE", SEV_HIGH, "aws", r"(?i)aws(.{0,20})?(secret|sk)[\"'=: ]+([0-9a-z/+=]{40})"),
33
+
34
+ # Google Cloud Platform
35
+ ("GCP_SERVICE_ACCOUNT", SEV_CRITICAL, "gcp", r'"type"\s*:\s*"service_account"'),
36
+ ("GOOGLE_API_KEY", SEV_HIGH, "gcp", r"\bAIza[0-9A-Za-z_\-]{35}\b"),
37
+
38
+ # GitHub
39
+ ("GH_PAT_CLASSIC", SEV_CRITICAL, "github", r"\bghp_[A-Za-z0-9]{36}\b"),
40
+ ("GH_PAT_FINEGRAINED", SEV_CRITICAL, "github", r"\bgithub_pat_[A-Za-z0-9_]{82}\b"),
41
+ ("GH_OAUTH", SEV_HIGH, "github", r"\bgho_[A-Za-z0-9]{36}\b"),
42
+ ("GH_S2S", SEV_HIGH, "github", r"\bgh[usr]_[A-Za-z0-9]{36,}\b"),
43
+
44
+ # Stripe
45
+ ("STRIPE_LIVE", SEV_CRITICAL, "stripe", r"\bsk_live_[0-9A-Za-z]{24,}\b"),
46
+ ("STRIPE_TEST", SEV_LOW, "stripe", r"\bsk_test_[0-9A-Za-z]{24,}\b"),
47
+
48
+ # Slack
49
+ ("SLACK_TOKEN", SEV_HIGH, "slack", r"\bxox[abpors]-[0-9A-Za-z\-]{10,48}\b"),
50
+ ("SLACK_WEBHOOK", SEV_MEDIUM, "slack", r"https://hooks\.slack\.com/services/T[A-Z0-9]+/B[A-Z0-9]+/[A-Za-z0-9]+"),
51
+
52
+ # Email service providers
53
+ ("SENDGRID", SEV_HIGH, "email_svc", r"\bSG\.[A-Za-z0-9_\-]{22}\.[A-Za-z0-9_\-]{43}\b"),
54
+ ("MAILGUN_V1", SEV_HIGH, "email_svc", r"\bkey-[0-9a-zA-Z]{32}\b"),
55
+ ("MAILGUN_LOOSE", SEV_HIGH, "email_svc", r"\bkey-[0-9a-f]{32}\b"),
56
+
57
+ # Twilio
58
+ ("TWILIO_API", SEV_HIGH, "twilio", r"\bSK[0-9a-fA-F]{32}\b"),
59
+ ("TWILIO_SID", SEV_MEDIUM, "twilio", r"\bAC[a-f0-9]{32}\b"),
60
+ ("TWILIO_AUTH", SEV_HIGH, "twilio", r"(?i)twilio(.{0,20})?(auth|token)[\"'=: ]+([a-f0-9]{32})"),
61
+
62
+ # PaaS
63
+ ("HEROKU_API", SEV_MEDIUM, "paas", r"(?i)heroku(.{0,20})?api[\"'=: ]+([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})"),
64
+
65
+ # Firebase
66
+ ("FIREBASE_URL", SEV_LOW, "firebase", r"\bhttps?://[a-z0-9\-]+\.firebaseio\.com\b"),
67
+
68
+ # Tokens / auth headers
69
+ ("JWT", SEV_MEDIUM, "jwt", r"\beyJ[A-Za-z0-9_\-]{10,}\.eyJ[A-Za-z0-9_\-]{10,}\.[A-Za-z0-9_\-]{10,}\b"),
70
+ ("BEARER_AUTH", SEV_MEDIUM, "bearer", r"(?i)authorization[\"'=: ]+bearer\s+[A-Za-z0-9._\-]{20,}"),
71
+ ("BASIC_AUTH_URL", SEV_MEDIUM, "basic_auth", r"https?://[^/\s:@]+:[^/\s:@]+@[^/\s]+"),
72
+
73
+ # Private keys
74
+ ("RSA_PRIVKEY", SEV_CRITICAL, "private_key", r"-----BEGIN RSA PRIVATE KEY-----"),
75
+ ("EC_PRIVKEY", SEV_CRITICAL, "private_key", r"-----BEGIN EC PRIVATE KEY-----"),
76
+ ("OPENSSH_PRIVKEY", SEV_CRITICAL, "private_key", r"-----BEGIN OPENSSH PRIVATE KEY-----"),
77
+ ("GENERIC_PRIVKEY", SEV_CRITICAL, "private_key", r"-----BEGIN (DSA |PGP |)PRIVATE KEY-----"),
78
+
79
+ # Generic
80
+ ("GENERIC_API_KEY", SEV_MEDIUM, "generic", r"(?i)(?:api[_\-]?key|apikey|api_secret|access_token|secret[_\-]?token)['\"\s:=]+[\"']([A-Za-z0-9+/=_\-]{24,})[\"']"),
81
+
82
+ # Modern AI APIs (v2.1)
83
+ ("ANTHROPIC_API", SEV_CRITICAL, "ai_api", r"\bsk-ant-(?:api03|admin01)-[A-Za-z0-9_\-]{93,}\b"),
84
+ ("OPENAI_LEGACY", SEV_CRITICAL, "ai_api", r"\bsk-[A-Za-z0-9]{20}T3BlbkFJ[A-Za-z0-9]{20}\b"),
85
+ ("OPENAI_PROJECT", SEV_CRITICAL, "ai_api", r"\bsk-proj-[A-Za-z0-9_\-]{40,}T3BlbkFJ[A-Za-z0-9_\-]{40,}\b"),
86
+ ("OPENAI_SESSION", SEV_HIGH, "ai_api", r"\bsess-[A-Za-z0-9]{40}\b"),
87
+ ("HUGGINGFACE", SEV_HIGH, "ai_api", r"\bhf_[A-Za-z0-9]{30,}\b"),
88
+
89
+ # Cloud infra
90
+ ("CLOUDFLARE_API", SEV_CRITICAL, "infra_api", r"(?i)cf[_\-]?api[_\-]?key['\"\s:=]+([a-f0-9]{37})"),
91
+ ("DIGITALOCEAN", SEV_HIGH, "infra_api", r"\bdop_v1_[a-f0-9]{64}\b"),
92
+
93
+ # Package registries
94
+ ("NPM_TOKEN", SEV_HIGH, "package_registry", r"\bnpm_[A-Za-z0-9]{36}\b"),
95
+ ("PYPI_TOKEN", SEV_HIGH, "package_registry", r"\bpypi-AgENdGV[A-Za-z0-9_\-]+\b"),
96
+ ("DOCKER_HUB_PAT", SEV_HIGH, "package_registry", r"\bdckr_pat_[A-Za-z0-9_\-]{27,}\b"),
97
+
98
+ # SaaS
99
+ ("ATLASSIAN_TOKEN", SEV_HIGH, "saas_api", r"\bATATT3xFfGF0[A-Za-z0-9_\-]{180,}\b"),
100
+ ("LINEAR_API", SEV_MEDIUM, "saas_api", r"\blin_api_[A-Za-z0-9]{40}\b"),
101
+
102
+ # Observability
103
+ ("NEWRELIC_LICENSE", SEV_MEDIUM, "observability", r"\b(?:NRAA|NRAK|NRBR)-[A-F0-9]{27}\b"),
104
+ ("DATADOG_API", SEV_HIGH, "observability", r"(?i)dd[_\-]?api[_\-]?key['\"\s:=]+([a-f0-9]{32})"),
105
+ ("SENTRY_DSN", SEV_LOW, "observability", r"https://[a-f0-9]+@o[0-9]+\.ingest\.sentry\.io/[0-9]+"),
106
+
107
+ # Tunneling
108
+ ("NGROK_AUTH", SEV_MEDIUM, "tunneling", r"\b[12][A-Za-z0-9]{26}_[A-Za-z0-9]{32,}\b"),
109
+
110
+ # Bot tokens
111
+ ("DISCORD_BOT", SEV_HIGH, "bot_token", r"\b[MN][A-Za-z\d]{23}\.[\w\-]{6}\.[\w\-]{27}\b"),
112
+ ("TELEGRAM_BOT", SEV_HIGH, "bot_token", r"\b\d{8,10}:[A-Za-z0-9_\-]{35}\b"),
113
+ ]
114
+
115
+ COMPILED = [(n, s, c, re.compile(p)) for (n, s, c, p) in PATTERNS]
116
+
117
+ # Noisy directories pruned by exact name below the scan root (never the root itself).
118
+ SKIP_DIRS = {".git", "node_modules", "__pycache__", ".venv", "venv", "dist", "build", ".cache"}
119
+
120
+
121
+ def scan_text(text: str, source: str = "<stdin>"):
122
+ """Scan a text blob; yield one dict per match."""
123
+ for line_no, line in enumerate(text.splitlines(), start=1):
124
+ for name, sev, cat, rx in COMPILED:
125
+ for m in rx.finditer(line):
126
+ yield {
127
+ "pattern": name,
128
+ "severity": sev,
129
+ "category": cat,
130
+ "match": m.group(0)[:80], # truncate to avoid huge dumps
131
+ "source": source,
132
+ "line": line_no,
133
+ }
134
+
135
+
136
+ def scan_path(path: str):
137
+ """Recursively scan a file or directory."""
138
+ if os.path.isdir(path):
139
+ for root, dirs, files in os.walk(path):
140
+ # Prune noisy directories by exact name BELOW the root — never the root
141
+ # itself. A substring test on the whole path skipped `./dist`, `.github`
142
+ # (contains `.git`) etc., scanning nothing and exiting a false "clean".
143
+ dirs[:] = [d for d in dirs if d not in SKIP_DIRS]
144
+ for f in files:
145
+ p = os.path.join(root, f)
146
+ yield from scan_path(p)
147
+ return
148
+ try:
149
+ # Skip large files (>10MB) — but say so: a silently-skipped bundle is a false "clean".
150
+ if os.path.getsize(path) > 10 * 1024 * 1024:
151
+ print(f"[warning] skipped (>10MB, NOT scanned): {path}", file=sys.stderr)
152
+ return
153
+ with open(path, "r", errors="replace") as fh:
154
+ yield from scan_text(fh.read(), source=path)
155
+ except (OSError, IOError) as e:
156
+ # Missing/unreadable path must not be mistaken for "no secrets found".
157
+ print(f"[warning] could not read (skipped): {path} ({e})", file=sys.stderr)
158
+ return
159
+
160
+
161
+ def main():
162
+ if len(sys.argv) > 1:
163
+ if sys.argv[1] in ("-h", "--help"):
164
+ print(__doc__)
165
+ sys.exit(0)
166
+ for arg in sys.argv[1:]:
167
+ for hit in scan_path(arg):
168
+ print(json.dumps(hit))
169
+ else:
170
+ # Read from stdin
171
+ try:
172
+ data = sys.stdin.read()
173
+ except KeyboardInterrupt:
174
+ sys.exit(0)
175
+ for hit in scan_text(data):
176
+ print(json.dumps(hit))
177
+
178
+
179
+ if __name__ == "__main__":
180
+ main()