@akasecurity/cli 0.8.1 → 0.9.0-rc1

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 (215) hide show
  1. package/README.md +2 -0
  2. package/dist/cli.js +2353 -1293
  3. package/package.json +12 -6
  4. package/web-ui/packages/dashboard-ui/package.json +1 -1
  5. package/web-ui/packages/detections/package.json +2 -2
  6. package/web-ui/packages/local-ops/package.json +3 -2
  7. package/web-ui/packages/persistence/package.json +2 -2
  8. package/web-ui/packages/plugin-sdk/package.json +29 -0
  9. package/web-ui/packages/schema/package.json +2 -2
  10. package/web-ui/rules/code-flaws/auth-jwt-no-verify.json +20 -0
  11. package/web-ui/rules/code-flaws/auth-ssl-verify-false.json +19 -0
  12. package/web-ui/rules/code-flaws/cmd-inject-exec.json +20 -0
  13. package/web-ui/rules/code-flaws/cmd-inject-node-exec.json +20 -0
  14. package/web-ui/rules/code-flaws/cmd-inject-shell.json +20 -0
  15. package/web-ui/rules/code-flaws/crypto-insecure-random.json +20 -0
  16. package/web-ui/rules/code-flaws/crypto-weak-hash-md5.json +16 -0
  17. package/web-ui/rules/code-flaws/crypto-weak-hash-sha1.json +23 -0
  18. package/web-ui/rules/code-flaws/deser-java-ois.json +22 -0
  19. package/web-ui/rules/code-flaws/deser-pickle.json +16 -0
  20. package/web-ui/rules/code-flaws/deser-yaml-unsafe.json +16 -0
  21. package/web-ui/rules/code-flaws/dev-debug-enabled.json +13 -0
  22. package/web-ui/rules/code-flaws/dev-placeholder-secret.json +24 -0
  23. package/web-ui/rules/code-flaws/dev-wildcard-cors.json +17 -0
  24. package/web-ui/rules/code-flaws/eval-dynamic-exec.json +17 -0
  25. package/web-ui/rules/code-flaws/hardcoded-password.json +23 -0
  26. package/web-ui/rules/code-flaws/hardcoded-secret-key.json +17 -0
  27. package/web-ui/rules/code-flaws/path-traversal-join.json +19 -0
  28. package/web-ui/rules/code-flaws/path-traversal-open.json +20 -0
  29. package/web-ui/rules/code-flaws/prototype-pollution-merge.json +16 -0
  30. package/web-ui/rules/code-flaws/regex-redos-backtrack.json +13 -0
  31. package/web-ui/rules/code-flaws/sql-inject-concat-dot.json +16 -0
  32. package/web-ui/rules/code-flaws/sql-inject-concat.json +13 -0
  33. package/web-ui/rules/code-flaws/sql-inject-format.json +16 -0
  34. package/web-ui/rules/code-flaws/sql-inject-interp.json +19 -0
  35. package/web-ui/rules/code-flaws/ssrf-user-url.json +16 -0
  36. package/web-ui/rules/code-flaws/xss-dangerously-set.json +16 -0
  37. package/web-ui/rules/code-flaws/xss-inner-html.json +16 -0
  38. package/web-ui/rules/code-flaws/xss-unescaped-render.json +16 -0
  39. package/web-ui/rules/core-code-context/db-table-name.json +29 -0
  40. package/web-ui/rules/core-code-context/feature-flag.json +24 -0
  41. package/web-ui/rules/core-code-context/file-path.json +17 -0
  42. package/web-ui/rules/core-code-context/internal-domain.json +13 -0
  43. package/web-ui/rules/core-code-context/internal-ip.json +13 -0
  44. package/web-ui/rules/core-code-context/internal-url.json +27 -0
  45. package/web-ui/rules/core-code-context/localhost-ref.json +13 -0
  46. package/web-ui/rules/core-code-context/stack-trace.json +13 -0
  47. package/web-ui/rules/core-financial/credit-card.json +14 -0
  48. package/web-ui/rules/core-financial/cusip.json +14 -0
  49. package/web-ui/rules/core-financial/cvv.json +13 -0
  50. package/web-ui/rules/core-financial/iban.json +17 -0
  51. package/web-ui/rules/core-financial/paypal.json +14 -0
  52. package/web-ui/rules/core-financial/routing-number.json +14 -0
  53. package/web-ui/rules/core-financial/salary.json +23 -0
  54. package/web-ui/rules/core-financial/swift.json +14 -0
  55. package/web-ui/rules/core-phi/biometric-ref.json +23 -0
  56. package/web-ui/rules/core-phi/genetic-data.json +24 -0
  57. package/web-ui/rules/core-phi/group-id.json +19 -0
  58. package/web-ui/rules/core-phi/hipaa-identifier.json +13 -0
  59. package/web-ui/rules/core-phi/icd10-code.json +14 -0
  60. package/web-ui/rules/core-phi/member-id.json +13 -0
  61. package/web-ui/rules/core-phi/mrn.json +13 -0
  62. package/web-ui/rules/core-phi/ndc-code.json +13 -0
  63. package/web-ui/rules/core-pii/dob.json +18 -0
  64. package/web-ui/rules/core-pii/drivers-license-us.json +14 -0
  65. package/web-ui/rules/core-pii/email.json +13 -0
  66. package/web-ui/rules/core-pii/home-address.json +21 -0
  67. package/web-ui/rules/core-pii/ip-address.json +13 -0
  68. package/web-ui/rules/core-pii/mac-address.json +13 -0
  69. package/web-ui/rules/core-pii/name.json +21 -0
  70. package/web-ui/rules/core-pii/national-id.json +27 -0
  71. package/web-ui/rules/core-pii/passport-us.json +17 -0
  72. package/web-ui/rules/core-pii/phone-intl.json +13 -0
  73. package/web-ui/rules/core-pii/phone-us.json +17 -0
  74. package/web-ui/rules/core-pii/ssn.json +13 -0
  75. package/web-ui/rules/core-pii/vin.json +13 -0
  76. package/web-ui/rules/core-pii/zip.json +30 -0
  77. package/web-ui/rules/secrets/anthropic-api-key.json +14 -0
  78. package/web-ui/rules/secrets/aws-access-key.json +14 -0
  79. package/web-ui/rules/secrets/aws-secret-key.json +15 -0
  80. package/web-ui/rules/secrets/azure-connection-string.json +13 -0
  81. package/web-ui/rules/secrets/cloudflare-api-key.json +15 -0
  82. package/web-ui/rules/secrets/datadog-key.json +15 -0
  83. package/web-ui/rules/secrets/digitalocean-token.json +13 -0
  84. package/web-ui/rules/secrets/discord-token.json +14 -0
  85. package/web-ui/rules/secrets/gcp-service-account.json +16 -0
  86. package/web-ui/rules/secrets/github-pat.json +16 -0
  87. package/web-ui/rules/secrets/gitlab-token.json +14 -0
  88. package/web-ui/rules/secrets/heroku-api-key.json +14 -0
  89. package/web-ui/rules/secrets/npm-token.json +14 -0
  90. package/web-ui/rules/secrets/openai-api-key.json +14 -0
  91. package/web-ui/rules/secrets/pulumi-access-token.json +14 -0
  92. package/web-ui/rules/secrets/sendgrid-key.json +14 -0
  93. package/web-ui/rules/secrets/slack-token.json +13 -0
  94. package/web-ui/rules/secrets/stripe-live-key.json +14 -0
  95. package/web-ui/rules/secrets/terraform-cloud-token.json +16 -0
  96. package/web-ui/rules/secrets/twilio-key.json +13 -0
  97. package/web-ui/rules/secrets/vault-token.json +14 -0
  98. package/web-ui/rules/secrets-infra/api-key-header.json +15 -0
  99. package/web-ui/rules/secrets-infra/basic-auth-header.json +13 -0
  100. package/web-ui/rules/secrets-infra/basic-auth-url.json +13 -0
  101. package/web-ui/rules/secrets-infra/bearer-token.json +17 -0
  102. package/web-ui/rules/secrets-infra/db-connection-string.json +13 -0
  103. package/web-ui/rules/secrets-infra/docker-config-auth.json +13 -0
  104. package/web-ui/rules/secrets-infra/env-key-value.json +14 -0
  105. package/web-ui/rules/secrets-infra/generic-high-entropy-secret.json +18 -0
  106. package/web-ui/rules/secrets-infra/jwt-token.json +16 -0
  107. package/web-ui/rules/secrets-infra/kubeconfig-token.json +14 -0
  108. package/web-ui/rules/secrets-infra/password-field.json +14 -0
  109. package/web-ui/rules/secrets-infra/pgp-private-key.json +15 -0
  110. package/web-ui/rules/secrets-infra/ssh-private-key.json +15 -0
  111. package/web-ui/web-ui/.next/BUILD_ID +1 -1
  112. package/web-ui/web-ui/.next/app-build-manifest.json +56 -55
  113. package/web-ui/web-ui/.next/app-path-routes-manifest.json +6 -6
  114. package/web-ui/web-ui/.next/build-manifest.json +2 -2
  115. package/web-ui/web-ui/.next/prerender-manifest.json +15 -15
  116. package/web-ui/web-ui/.next/required-server-files.json +4 -3
  117. package/web-ui/web-ui/.next/server/app/(app)/activity/page.js +2 -2
  118. package/web-ui/web-ui/.next/server/app/(app)/activity/page.js.nft.json +1 -1
  119. package/web-ui/web-ui/.next/server/app/(app)/activity/page_client-reference-manifest.js +1 -1
  120. package/web-ui/web-ui/.next/server/app/(app)/data-shares/page.js +2 -2
  121. package/web-ui/web-ui/.next/server/app/(app)/data-shares/page.js.nft.json +1 -1
  122. package/web-ui/web-ui/.next/server/app/(app)/data-shares/page_client-reference-manifest.js +1 -1
  123. package/web-ui/web-ui/.next/server/app/(app)/detections/page.js +2 -2
  124. package/web-ui/web-ui/.next/server/app/(app)/detections/page.js.nft.json +1 -1
  125. package/web-ui/web-ui/.next/server/app/(app)/detections/page_client-reference-manifest.js +1 -1
  126. package/web-ui/web-ui/.next/server/app/(app)/exceptions/[id]/page.js +2 -2
  127. package/web-ui/web-ui/.next/server/app/(app)/exceptions/[id]/page.js.nft.json +1 -1
  128. package/web-ui/web-ui/.next/server/app/(app)/exceptions/[id]/page_client-reference-manifest.js +1 -1
  129. package/web-ui/web-ui/.next/server/app/(app)/exceptions/new/page.js +2 -2
  130. package/web-ui/web-ui/.next/server/app/(app)/exceptions/new/page.js.nft.json +1 -1
  131. package/web-ui/web-ui/.next/server/app/(app)/exceptions/new/page_client-reference-manifest.js +1 -1
  132. package/web-ui/web-ui/.next/server/app/(app)/exceptions/page.js +1 -1
  133. package/web-ui/web-ui/.next/server/app/(app)/exceptions/page.js.nft.json +1 -1
  134. package/web-ui/web-ui/.next/server/app/(app)/exceptions/page_client-reference-manifest.js +1 -1
  135. package/web-ui/web-ui/.next/server/app/(app)/findings/page.js +2 -2
  136. package/web-ui/web-ui/.next/server/app/(app)/findings/page.js.nft.json +1 -1
  137. package/web-ui/web-ui/.next/server/app/(app)/findings/page_client-reference-manifest.js +1 -1
  138. package/web-ui/web-ui/.next/server/app/(app)/inventory/page.js +2 -2
  139. package/web-ui/web-ui/.next/server/app/(app)/inventory/page.js.nft.json +1 -1
  140. package/web-ui/web-ui/.next/server/app/(app)/inventory/page_client-reference-manifest.js +1 -1
  141. package/web-ui/web-ui/.next/server/app/(app)/policies/page.js +2 -2
  142. package/web-ui/web-ui/.next/server/app/(app)/policies/page.js.nft.json +1 -1
  143. package/web-ui/web-ui/.next/server/app/(app)/policies/page_client-reference-manifest.js +1 -1
  144. package/web-ui/web-ui/.next/server/app/(app)/scan/page.js +1 -1
  145. package/web-ui/web-ui/.next/server/app/(app)/scan/page.js.nft.json +1 -1
  146. package/web-ui/web-ui/.next/server/app/(app)/scan/page_client-reference-manifest.js +1 -1
  147. package/web-ui/web-ui/.next/server/app/(app)/security/page.js +1 -1
  148. package/web-ui/web-ui/.next/server/app/(app)/security/page.js.nft.json +1 -1
  149. package/web-ui/web-ui/.next/server/app/(app)/security/page_client-reference-manifest.js +1 -1
  150. package/web-ui/web-ui/.next/server/app/(app)/settings/page.js +2 -2
  151. package/web-ui/web-ui/.next/server/app/(app)/settings/page.js.nft.json +1 -1
  152. package/web-ui/web-ui/.next/server/app/(app)/settings/page_client-reference-manifest.js +1 -1
  153. package/web-ui/web-ui/.next/server/app/(app)/updates/page.js +2 -2
  154. package/web-ui/web-ui/.next/server/app/(app)/updates/page.js.nft.json +1 -1
  155. package/web-ui/web-ui/.next/server/app/(app)/updates/page_client-reference-manifest.js +1 -1
  156. package/web-ui/web-ui/.next/server/app/_not-found/page.js +1 -1
  157. package/web-ui/web-ui/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  158. package/web-ui/web-ui/.next/server/app/_not-found.html +1 -1
  159. package/web-ui/web-ui/.next/server/app/_not-found.rsc +2 -2
  160. package/web-ui/web-ui/.next/server/app/index.html +1 -1
  161. package/web-ui/web-ui/.next/server/app/index.rsc +2 -2
  162. package/web-ui/web-ui/.next/server/app/page.js +1 -1
  163. package/web-ui/web-ui/.next/server/app/page_client-reference-manifest.js +1 -1
  164. package/web-ui/web-ui/.next/server/app-paths-manifest.json +6 -6
  165. package/web-ui/web-ui/.next/server/chunks/366.js +582 -0
  166. package/web-ui/web-ui/.next/server/chunks/45.js +1 -1
  167. package/web-ui/web-ui/.next/server/chunks/461.js +5 -5
  168. package/web-ui/web-ui/.next/server/chunks/484.js +580 -0
  169. package/web-ui/web-ui/.next/server/chunks/773.js +4 -4
  170. package/web-ui/web-ui/.next/server/chunks/900.js +1 -0
  171. package/web-ui/web-ui/.next/server/chunks/918.js +2 -0
  172. package/web-ui/web-ui/.next/server/functions-config-manifest.json +5 -5
  173. package/web-ui/web-ui/.next/server/middleware-manifest.json +5 -5
  174. package/web-ui/web-ui/.next/server/pages/404.html +1 -1
  175. package/web-ui/web-ui/.next/server/pages/500.html +1 -1
  176. package/web-ui/web-ui/.next/server/server-reference-manifest.js +1 -1
  177. package/web-ui/web-ui/.next/server/server-reference-manifest.json +1 -1
  178. package/web-ui/web-ui/.next/static/chunks/{24-b20c857178647805.js → 24-55b96836aea5ce23.js} +3 -3
  179. package/web-ui/web-ui/.next/static/chunks/561-c3388f066f813e17.js +1 -0
  180. package/web-ui/web-ui/.next/static/chunks/app/(app)/activity/page-0c208c8b275a69ac.js +1 -0
  181. package/web-ui/web-ui/.next/static/chunks/app/(app)/data-shares/page-041187c76bd42461.js +1 -0
  182. package/web-ui/web-ui/.next/static/chunks/app/(app)/detections/page-481fedcbfb474cef.js +1 -0
  183. package/web-ui/web-ui/.next/static/chunks/app/(app)/exceptions/[id]/page-a20e7d7a2f0ad507.js +1 -0
  184. package/web-ui/web-ui/.next/static/chunks/app/(app)/exceptions/new/page-2cfe42c3dd4833c3.js +1 -0
  185. package/web-ui/web-ui/.next/static/chunks/app/(app)/exceptions/page-849d66cc2cd77cb6.js +1 -0
  186. package/web-ui/web-ui/.next/static/chunks/app/(app)/findings/page-d33f3999e89c7e77.js +1 -0
  187. package/web-ui/web-ui/.next/static/chunks/app/(app)/inventory/page-76edd10592ba3cb1.js +1 -0
  188. package/web-ui/web-ui/.next/static/chunks/app/(app)/layout-d15081016f40ac92.js +1 -0
  189. package/web-ui/web-ui/.next/static/chunks/app/(app)/scan/page-50b604f229747240.js +1 -0
  190. package/web-ui/web-ui/.next/static/chunks/app/(app)/settings/page-92d1086c8e8ed3bf.js +1 -0
  191. package/web-ui/web-ui/.next/static/chunks/app/(app)/updates/{page-b9607b5e2e8700d6.js → page-c3c1671d32547619.js} +1 -1
  192. package/web-ui/web-ui/.next/static/chunks/app/{layout-8b19b03146218dc7.js → layout-40fea3e270a8e120.js} +1 -1
  193. package/web-ui/web-ui/.next/static/css/43f95c94ecc1bd17.css +2 -0
  194. package/web-ui/web-ui/package.json +1 -1
  195. package/web-ui/web-ui/server.js +1 -1
  196. package/LICENSE +0 -201
  197. package/web-ui/web-ui/.next/server/chunks/116.js +0 -536
  198. package/web-ui/web-ui/.next/server/chunks/223.js +0 -534
  199. package/web-ui/web-ui/.next/server/chunks/226.js +0 -2
  200. package/web-ui/web-ui/.next/server/chunks/640.js +0 -1
  201. package/web-ui/web-ui/.next/static/chunks/561-3a19cd28d2b941fa.js +0 -1
  202. package/web-ui/web-ui/.next/static/chunks/app/(app)/activity/page-f6b1b344709ee48e.js +0 -1
  203. package/web-ui/web-ui/.next/static/chunks/app/(app)/data-shares/page-548fa0d3dee6e829.js +0 -1
  204. package/web-ui/web-ui/.next/static/chunks/app/(app)/detections/page-0bfa1f371b65b5ad.js +0 -1
  205. package/web-ui/web-ui/.next/static/chunks/app/(app)/exceptions/[id]/page-56ec5c05f347108a.js +0 -1
  206. package/web-ui/web-ui/.next/static/chunks/app/(app)/exceptions/new/page-cb33dc32fd3648bf.js +0 -1
  207. package/web-ui/web-ui/.next/static/chunks/app/(app)/exceptions/page-b6fbc540ef0a50f8.js +0 -1
  208. package/web-ui/web-ui/.next/static/chunks/app/(app)/findings/page-94eb9d838ae00222.js +0 -1
  209. package/web-ui/web-ui/.next/static/chunks/app/(app)/inventory/page-89cf3ac5a30e76a0.js +0 -1
  210. package/web-ui/web-ui/.next/static/chunks/app/(app)/layout-a86819fe3aeb2491.js +0 -1
  211. package/web-ui/web-ui/.next/static/chunks/app/(app)/scan/page-0d43a6b2acafe349.js +0 -1
  212. package/web-ui/web-ui/.next/static/chunks/app/(app)/settings/page-2cf02a09402cfb4d.js +0 -1
  213. package/web-ui/web-ui/.next/static/css/69dfaec5234c6b99.css +0 -2
  214. /package/web-ui/web-ui/.next/static/{X9C7-HlMI5zAQEKfIW_6e → unUYwnPVSRwxtrUFgSAxr}/_buildManifest.js +0 -0
  215. /package/web-ui/web-ui/.next/static/{X9C7-HlMI5zAQEKfIW_6e → unUYwnPVSRwxtrUFgSAxr}/_ssgManifest.js +0 -0
@@ -1,2 +0,0 @@
1
- exports.id=226,exports.ids=[226],exports.modules={44507:a=>{function b(a){return Array.isArray(a)?a:[a]}let c=void 0,d=/^\s+$/,e=/(?:[^\\]|^)\\$/,f=/^\\!/,g=/^\\#/,h=/\r?\n/g,i=/^\.{0,2}\/|^\.{1,2}$/,j=/\/$/,k="node-ignore";"undefined"!=typeof Symbol&&(k=Symbol.for("node-ignore"));let l=k,m=(a,b,c)=>(Object.defineProperty(a,b,{value:c}),c),n=/([0-z])-([0-z])/g,o=()=>!1,p=[[/^\uFEFF/,()=>""],[/((?:\\\\)*?)(\\?\s+)$/,(a,b,c)=>b+(0===c.indexOf("\\")?" ":"")],[/(\\+?)\s/g,(a,b)=>{let{length:c}=b;return b.slice(0,c-c%2)+" "}],[/[\\$.|*+(){^]/g,a=>`\\${a}`],[/(?!\\)\?/g,()=>"[^/]"],[/^\//,()=>"^"],[/\//g,()=>"\\/"],[/^\^*(?:\\\*\\\*\\\/)+/,()=>"^(?:.*\\/)?"],[/^(?=[^^])/,function(){return/\/(?!$)/.test(this)?"^":"(?:^|\\/)"}],[/\\\/\\\*\\\*(?=\\\/|$)/g,(a,b,c)=>b+6<c.length?"(?:\\/[^\\/]+)*":"\\/.+"],[/(^|[^\\]+)(\\\*)+(?=.+)/g,(a,b,c)=>b+c.replace(/\\\*/g,"[^\\/]*")],[/\\\\\\(?=[$.|*+(){^])/g,()=>"\\"],[/\\\\/g,()=>"\\"],[/(\\)?\[([^\]/]*?)(\\*)($|\])/g,(a,b,c,d,e)=>"\\"===b?`\\[${c}${(a=>{let{length:b}=a;return a.slice(0,b-b%2)})(d)}${e}`:"]"===e&&d.length%2==0?`[${(a=>a.startsWith("!")||a.startsWith("\\^")?`^${a.slice("!"===a[0]?1:2)}`:a)(c.replace(n,(a,b,c)=>b.charCodeAt(0)<=c.charCodeAt(0)?a:""))}${d}]`:"[]"],[/(?:[^*])$/,a=>/\/$/.test(a)?`${a}$`:`${a}(?=$|\\/$)`]],q=/(^|\\\/)?\\\*$/,r="regex",s="checkRegex",t={[r](a,b){let c=b?`${b}[^/]+`:"[^/]*";return`${c}(?=$|\\/$)`},[s](a,b){let c=b?`${b}[^/]*`:"[^/]*";return`${c}(?=$|\\/$)`}};class u{constructor(a,b,c,d,e,f){this.pattern=a,this.mark=b,this.negative=e,m(this,"body",c),m(this,"ignoreCase",d),m(this,"regexPrefix",f)}get regex(){let a="_"+r;return this[a]?this[a]:this._make(r,a)}get checkRegex(){let a="_"+s;return this[a]?this[a]:this._make(s,a)}_make(a,b){let c=this.regexPrefix.replace(q,t[a]);return m(this,b,this.ignoreCase?RegExp(c,"i"):new RegExp(c))}}class v{constructor(a){this._ignoreCase=a,this._rules=[]}_add(a){let b;if(a&&a[l]){this._rules=this._rules.concat(a._rules._rules),this._added=!0;return}if("string"==typeof a&&(a={pattern:a}),(b=a.pattern)&&"string"==typeof b&&!d.test(b)&&!e.test(b)&&0!==b.indexOf("#")){let b=(({pattern:a,mark:b},c)=>{let d,e=!1,h=a;0===h.indexOf("!")&&(e=!0,h=h.substr(1));let i=(d=h=h.replace(f,"!").replace(g,"#"),p.reduce((a,[b,c])=>a.replace(b,c.bind(d)),d));return new u(a,b,h,c,e,i)})(a,this._ignoreCase);this._added=!0,this._rules.push(b)}}add(a){return this._added=!1,b("string"==typeof a?a.split(h).filter(Boolean):a).forEach(this._add,this),this._added}test(a,b,d){let e,f=!1,g=!1;this._rules.forEach(h=>{let{negative:i}=h;(g!==i||f===g)&&(!i||f||g||b)&&h[d].test(a)&&(f=!i,g=i,e=i?c:h)});let h={ignored:f,unignored:g};return e&&(h.rule=e),h}}let w=(a,b)=>{throw new b(a)},x=(a,b,c)=>"string"!=typeof a?c(`path must be a string, but got \`${b}\``,TypeError):a?!x.isNotRelative(a)||c(`path should be a \`path.relative()\`d string, but got "${b}"`,RangeError):c("path must not be empty",TypeError),y=a=>i.test(a);x.isNotRelative=y,x.convert=a=>a;class z{constructor({ignorecase:a=!0,ignoreCase:b=a,allowRelativePaths:c=!1}={}){m(this,l,!0),this._rules=new v(b),this._strictPathCheck=!c,this._initCache()}_initCache(){this._ignoreCache=Object.create(null),this._testCache=Object.create(null)}add(a){return this._rules.add(a)&&this._initCache(),this}addPattern(a){return this.add(a)}_test(a,b,c,d){let e=a&&x.convert(a);return x(e,a,this._strictPathCheck?w:o),this._t(e,b,c,d)}checkIgnore(a){if(!j.test(a))return this.test(a);let b=a.split("/").filter(Boolean);if(b.pop(),b.length){let a=this._t(b.join("/")+"/",this._testCache,!0,b);if(a.ignored)return a}return this._rules.test(a,!1,s)}_t(a,b,c,d){if(a in b)return b[a];if(d||(d=a.split("/").filter(Boolean)),d.pop(),!d.length)return b[a]=this._rules.test(a,c,r);let e=this._t(d.join("/")+"/",b,c,d);return b[a]=e.ignored?e:this._rules.test(a,c,r)}ignores(a){return this._test(a,this._ignoreCache,!1).ignored}createFilter(){return a=>!this.ignores(a)}filter(a){return b(a).filter(this.createFilter())}test(a){return this._test(a,this._testCache,!0)}}let A=a=>new z(a),B=()=>{x.convert=a=>/^\\\\\?\\/.test(a)||/["<>|\u0000-\u001F]+/u.test(a)?a:a.replace(/\\/g,"/");let a=/^[a-z]:\//i;x.isNotRelative=b=>a.test(b)||y(b)};"undefined"!=typeof process&&"win32"===process.platform&&B(),a.exports=A,A.default=A,a.exports.isPathValid=a=>x(a&&x.convert(a),a,o),m(a.exports,Symbol.for("setupWindows"),B)},69226:(a,b,c)=>{"use strict";c.d(b,{S1:()=>u,tq:()=>w,IL:()=>J,UE:()=>x,u5:()=>K,OF:()=>G});var d=c(31421),e=c(48161);let f="win32"===process.platform,g="win32"===process.platform?{cwd:(0,e.homedir)()}:{};function h(a,b,c=15e3){try{let e=(0,d.execFileSync)(a,b,{encoding:"utf8",timeout:c,stdio:["ignore","pipe","pipe"],shell:f,...g});return{ok:!0,stdout:e.trim(),stderr:""}}catch(a){return{ok:!1,stdout:"string"==typeof a.stdout?a.stdout.trim():"",stderr:"string"==typeof a.stderr?a.stderr.trim():""}}}function i(a){h("claude",["plugin","marketplace","add",a],6e4)}let j=[{id:"claude-code",name:"Claude Code",sourceTool:"claude-code",description:"Hooks Claude Code sessions to detect + redact sensitive data in prompts, responses, and file writes.",npmPackage:"@akasecurity/ai-tc-claude-code",pluginName:"ai-tc",marketplace:"akasecurity",marketplaceSource:"akasecurity/marketplace"}];function k(a){if(a.pluginName&&a.marketplace)return`${a.pluginName}@${a.marketplace}`}var l=c(73024),m=c(76760),n=c(73136);function o(a){let b=/^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z-.]+))?$/.exec(a.trim());return b?{core:[Number(b[1]),Number(b[2]),Number(b[3])],pre:b[4]?b[4].split("."):[]}:null}function p(a,b){return function(a,b){let c=o(a),d=o(b);if(!c||!d)return 0;for(let a=0;a<3;a++){let b=c.core[a]??0,e=d.core[a]??0;if(b!==e)return b<e?-1:1}return function(a,b){if(0===a.length&&0===b.length)return 0;if(0===a.length)return 1;if(0===b.length)return -1;let c=Math.min(a.length,b.length);for(let d=0;d<c;d++){let c=a[d]??"",e=b[d]??"";if(c===e)continue;let f=/^\d+$/.test(c),g=/^\d+$/.test(e);if(f&&!g)return -1;if(!f&&g)return 1;if(f&&g)return Number(c)<Number(e)?-1:1;return c<e?-1:1}return a.length===b.length?0:a.length<b.length?-1:1}(c.pre,d.pre)}(a,b)>0}let q="@akasecurity/cli";function r(a){return"object"==typeof a&&null!==a}function s(a){let b=h("npm",["view",a,"version"],15e3);if(!b.ok||!b.stdout)return null;let c=b.stdout.split("\n").pop()?.trim();return c&&/^\d/.test(c)?c:null}function t(a,b,c){if("inherit"===c)return{ok:function(a,b){try{return(0,d.execFileSync)(a,b,{stdio:"inherit",shell:f,...g}),!0}catch{return!1}}(a,b),output:""};let e=h(a,b,6e5);return{ok:e.ok,output:[e.stdout,e.stderr].filter(Boolean).join("\n")}}function u(a="capture"){return t("npm",["install","-g",`${q}@latest`],a)}function v(a){let b=j.find(b=>b.id===a);if(!b)return{ok:!1,output:`unknown agent '${a}'`};let c=k(b);return c?!function(){var a="claude";let b="win32"===process.platform?"where":"command",c="win32"===process.platform?[a]:["-v",a];try{let a=(0,d.spawnSync)(b,c,{stdio:"ignore",shell:"win32"!==process.platform,...g});return 0===a.status}catch{return!1}}()?{ok:!1,output:`the \`claude\` CLI isn't on your PATH — install Claude Code, then run \`claude plugin install ${c}\` (or update with \`claude plugin update ${c}\`).`}:{ref:c,marketplaceSource:b.marketplaceSource}:{ok:!1,output:`${b.name} has no automated install path yet.`}}function w(a,b="capture"){let c=v(a);return"ok"in c?c:(c.marketplaceSource&&i(c.marketplaceSource),t("claude",["plugin","update",c.ref],b))}function x(a,b="capture"){let c=v(a);return"ok"in c?c:(c.marketplaceSource&&i(c.marketplaceSource),t("claude",["plugin","install",c.ref],b))}var y=c(77598),z=c(59640),A=c(37906),B=c(44507),C=c.n(B);let D=new Set(["node_modules",".git","dist",".next","coverage",".turbo","build","out"]);function E(a,b){try{let c=(0,l.readFileSync)((0,m.join)(a,b),"utf8");return{base:a,matcher:C()().add(c)}}catch{return}}function F(a,b,c){let d="unmatched";for(let e of a){let a=(0,m.relative)(e.base,b).split(m.sep).join("/")+(c?"/":""),f=e.matcher.test(a);f.ignored?d="ignored":f.unignored&&(d="unignored")}return d}function G(a,b,c={}){let d=0,e=0,f=[];for(let{path:g,gitignored:h}of function*(a){let b;try{b=(0,l.statSync)(a)}catch{return}if(b.isFile()){b.size<=1e6&&(yield{path:a,gitignored:!1});return}b.isDirectory()&&(yield*function* a(b,c,d,e){let f=e?void 0:E(b,".gitignore"),g=f?[...c,f]:c,h=E(b,".akaignore"),i=h?[...d,h]:d;for(let c of(0,l.readdirSync)(b,{withFileTypes:!0})){let d=(0,m.join)(b,c.name);if(c.isDirectory()){let b=F(i,d,!0);if("unignored"!==b&&(D.has(c.name)||c.name.startsWith(".")||"ignored"===b))continue;let f=e||"ignored"===F(g,d,!0);yield*a(d,g,i,f)}else if(c.isFile()){let a;if("ignored"===F(i,d,!1))continue;try{a=(0,l.statSync)(d).size}catch{continue}if(a>1e6)continue;yield{path:d,gitignored:e||"ignored"===F(g,d,!1)}}}}(a,[],[],!1))}(b)){let b;try{b=(0,l.readFileSync)(g,"utf8")}catch{continue}d++;let i=(0,z.SQ)(b,c.rules);if(0===i.length)continue;let j=(0,y.randomUUID)(),k={filePath:g};h&&(k.gitignored=!0);let m={id:j,sourceTool:c.sourceTool??"cli",kind:"code_change",occurredAt:new Date().toISOString(),contentHash:(0,y.createHash)("sha256").update(b).digest("hex"),content:(0,z.E$)(b,i),metadata:k},n=i.map(a=>({id:(0,y.randomUUID)(),eventId:j,ruleId:a.ruleId,category:a.category,severity:a.severity,span:a.span,maskedMatch:(0,z.sE)(a.rawMatch),actionTaken:c.ruleActions?.get(a.ruleId)??A.unw[a.category],confidence:a.confidence}));a.recordCapture(m,n),f.push({path:g,gitignored:h,findings:n}),e+=n.length}return{scanned:d,findings:e,files:f}}var H=c(93116);function I(a){return(0,m.join)((0,H.KS)(a),"update-check.json")}function J(a){try{(0,l.rmSync)(I(a),{force:!0})}catch{}}function K(a){let b=function(a){let b=I(a);if(!(0,l.existsSync)(b))return null;try{let a=JSON.parse((0,l.readFileSync)(b,"utf8"));if(!r(a)||"number"!=typeof a.checkedAt||!r(a.report))return null;return a}catch{return null}}(a);var c={checkedAt:Date.now(),report:function(a){let b=a.viewVersion(q),c=[{id:"cli",name:"aka CLI",kind:"cli",installed:a.cliInstalled,latest:b,updateAvailable:null!==a.cliInstalled&&null!==b&&p(b,a.cliInstalled)}],d=[];for(let b of j){let e=k(b);if(!e||!b.npmPackage)continue;let f=a.viewVersion(b.npmPackage),g=a.installed.get(e)??null;if(null===g){d.push({id:b.id,name:b.name,latest:f});continue}c.push({id:b.id,name:b.name,kind:"plugin",installed:g,latest:f,updateAvailable:null!==f&&p(f,g)})}return{statuses:c,availablePlugins:d}}({viewVersion:s,installed:function(a=(0,m.join)((0,e.homedir)(),".claude")){let b,c=new Map,d=(0,m.join)(a,"plugins","installed_plugins.json");if(!(0,l.existsSync)(d))return c;try{b=JSON.parse((0,l.readFileSync)(d,"utf8"))}catch{return c}if(!r(b)||!r(b.plugins))return c;for(let[a,d]of Object.entries(b.plugins)){if(!Array.isArray(d)||0===d.length)continue;let b=d.find(a=>r(a)&&"user"===a.scope)??d.find(a=>r(a));b&&"string"==typeof b.version&&c.set(a,b.version)}return c}(),cliInstalled:function(a){let b=(void 0)??(0,m.dirname)((0,n.fileURLToPath)("file:///home/runner/work/ai-tc/ai-tc/packages/local-ops/src/updates.ts"));for(let a=0;a<6;a++){let a=(0,m.join)(b,"package.json");if((0,l.existsSync)(a))try{let b=JSON.parse((0,l.readFileSync)(a,"utf8"));if(r(b)&&b.name===q&&"string"==typeof b.version)return b.version}catch{}let c=(0,m.dirname)(b);if(c===b)break;b=c}return null}()}),notifiedPluginIds:b?.notifiedPluginIds??[]};if((0,l.existsSync)((0,H.KS)(a)))try{(0,l.writeFileSync)(I(a),`${JSON.stringify(c,null,2)}
2
- `)}catch{}}}};
@@ -1 +0,0 @@
1
- "use strict";exports.id=640,exports.ids=[640],exports.modules={59640:(a,b,c)=>{c.d(b,{sE:()=>n,E$:()=>m,SQ:()=>k});class d{match(a,b){if("keyword"!==b.matcher.type)return[];let{keywords:c,caseSensitive:d}=b.matcher,e=d?a:a.toLowerCase(),f=[];for(let a of c){let b=d?a:a.toLowerCase(),c=0;for(;c<e.length;){let d=e.indexOf(b,c);if(-1===d)break;f.push({start:d,end:d+a.length}),c=d+1}}return f}}class e{match(a,b){let c;if("regex"!==b.matcher.type)return[];let{pattern:d,flags:e,captureGroup:f}=b.matcher,g=new RegExp(d,e.includes("d")?e:`${e}d`),h=[];for(;null!==(c=g.exec(a));){let a=null!=f?c[f]:c[0];if(0===c[0].length&&g.lastIndex++,a&&h.length<1e4){let b=null!=f?c.indices?.[f]:void 0,d=b?b[0]:c.index;h.push({start:d,end:d+a.length})}if(!e.includes("g")||h.length>=1e4)break}return h}}let f=new d,g=new e,h=new Map,i={entropy:(a,b)=>(function(a,b=3.5,c=20){return a.length>=c&&function(a){let b={};for(let c of a)b[c]=(b[c]??0)+1;let c=0;for(let d of Object.values(b)){let b=d/a.length;c-=b*Math.log2(b)}return c}(a)>=b})(a,j(b,"threshold"),j(b,"minLength")),luhn:a=>(function(a){let b=a.replace(/\D/g,"");if(b.length<13)return!1;let c=0,d=!0;for(let a=b.length-1;a>=0;a--){let e=parseInt(b[a]??"0",10);!d&&(e*=2)>9&&(e-=9),c+=e,d=!d}return c%10==0})(a)};function j(a,b){let c=a?.[b];return"number"==typeof c&&Number.isFinite(c)?c:void 0}function k(a,b,c){let d=b??[...h.values()].flatMap(a=>a.rules),e=c?.filePath?function(a){let b=a.slice(Math.max(a.lastIndexOf("/"),a.lastIndexOf("\\"))+1),c=b.lastIndexOf(".");return c>0?b.slice(c).toLowerCase():void 0}(c.filePath):void 0,j=[];for(let b of d){let c;if(function(a,b){return!a.appliesTo||void 0===b||a.appliesTo.extensions.some(a=>a.toLowerCase()===b)}(b,e)){if("keyword"===b.matcher.type)c=f.match(a,b);else{if("regex"!==b.matcher.type)continue;c=g.match(a,b)}for(let d of c){let c=a.slice(d.start,d.end);(function(a,b){let c=a.postValidators;if(!c||0===c.length)return!0;for(let a of c){let c="string"==typeof a?a:a.name,d="string"==typeof a?void 0:a.config,e=i[c];if(e&&!e(b,d))return!1}return!0})(b,c)&&j.push({rule:b,match:{ruleId:b.id,category:b.category,severity:b.severity,span:d,rawMatch:c,confidence:.9}})}}}let k=[];for(let b of j){let c=b.rule.requiresNearby;if(!c){k.push(b.match);continue}if(!function(a,b,c){let d=a.rule.requiresNearby;if(!d)return!0;let e=d.windowChars,{start:f,end:g}=a.match.span,h=f-e,i=g+e,j=d.categories,k=d.ruleIds;if(j?.length||k?.length)for(let c of b){if(c===a)continue;let b=c.match.span;if(!(b.end<h)&&!(b.start>i)&&(c.match.ruleId!==a.match.ruleId&&j?.includes(c.match.category)||k?.includes(c.match.ruleId)))return!0}let l=d.labels;if(l&&l.length>0){let a=c.slice(Math.max(0,h),i);for(let b of l){let c=b.trim();if(0!==c.length&&RegExp(`(?<![A-Za-z0-9])${c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}(?![A-Za-z0-9])`,"i").test(a))return!0}}return!1}(b,j,a))continue;let d=c.confidenceBoost;k.push(d?{...b.match,confidence:Math.min(.99,b.match.confidence+d)}:b.match)}return k}let l={critical:3,high:2,medium:1,low:0};function m(a,b){if(0===b.length)return a;let c=[...b].sort((a,b)=>a.span.start-b.span.start||a.span.end-b.span.end),d=[];for(let a of c){let b=l[a.severity],c=d[d.length-1];c&&a.span.start<c.end?(c.end=Math.max(c.end,a.span.end),b>c.rank&&(c.rank=b,c.category=a.category)):d.push({start:a.span.start,end:a.span.end,category:a.category,rank:b})}let e=a;for(let a of[...d].reverse()){let b=`[REDACTED:${a.category.toUpperCase()}]`;e=e.slice(0,a.start)+b+e.slice(a.end)}return e}function n(a){if(a.length<=5)return"***";let b=a.indexOf("@");if(b>0&&b<a.length-1){let c=a.slice(b+1);if(c.includes(".")){let d=a.slice(0,b),e=d.length<=1?d:d.charAt(0)+"*".repeat(d.length-1);return`${e}@${c}`}}return`${a.charAt(0)}${"*".repeat(6)}${a.charAt(a.length-1)}`}let o=new Set(["prettier","eslint","biome","black","ruff","gofmt","rustfmt","node","npx","npm","pnpm","yarn","make","git","jq","echo"]);JSON.stringify({kind:"hook-conflict",mutation:/(--write|--fix|\s-w\b|\s-i\b|(?<![\d&>])>\s?\S)/.source,note:"two hooks on the same event with overlapping matchers, both mutating the tool target"}),JSON.stringify({kind:"hook-unknown",knownTools:[...o]}),JSON.stringify({kind:"hook-external-egress",pattern:/\b(curl|wget|nc|ncat|netcat|ssh|scp|rsync)\b|https?:\/\//.source})}};