sharpit 0.3.0__tar.gz → 0.5.0__tar.gz

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 (1084) hide show
  1. sharpit-0.5.0/.gitattributes +4 -0
  2. sharpit-0.5.0/CHANGELOG.md +251 -0
  3. sharpit-0.5.0/PKG-INFO +255 -0
  4. sharpit-0.5.0/README.md +199 -0
  5. sharpit-0.5.0/SECURITY.md +34 -0
  6. sharpit-0.5.0/action.yml +80 -0
  7. sharpit-0.5.0/docs/README.md +23 -0
  8. sharpit-0.5.0/docs/architecture-advisor-checks.md +28 -0
  9. sharpit-0.5.0/docs/database-advisor-checks.md +89 -0
  10. sharpit-0.5.0/docs/development/ci.md +66 -0
  11. sharpit-0.5.0/docs/development/fleet.md +65 -0
  12. sharpit-0.5.0/docs/development/overhead-budgets.md +111 -0
  13. sharpit-0.5.0/docs/development/workflow.md +152 -0
  14. sharpit-0.5.0/docs/fastapi-advisor-checks.md +28 -0
  15. sharpit-0.5.0/docs/knowledge/retrospectives/2026-11-02-pytester-speed.md +33 -0
  16. sharpit-0.5.0/docs/reference/BOOTUI-CONTRACT-0.4-DRIFT.md +1182 -0
  17. sharpit-0.5.0/docs/reference/BOOTUI-CONTRACT-0.4-WAVE-A.md +127 -0
  18. sharpit-0.5.0/docs/reference/BOOTUI-CONTRACT-0.4-WAVE-B.md +943 -0
  19. sharpit-0.5.0/docs/reference/BOOTUI-CONTRACT-0.4-WAVE-C.md +1642 -0
  20. sharpit-0.5.0/docs/reference/PARITY.md +73 -0
  21. sharpit-0.5.0/docs/reference/report.schema.json +236 -0
  22. sharpit-0.5.0/docs/reports/2026-11-01-0.3.0-retrospective.md +69 -0
  23. sharpit-0.5.0/docs/reports/2026-11-02-0.4.0-decisions.md +79 -0
  24. sharpit-0.5.0/docs/reports/2026-11-02-0.4.0-overnight-retrospective.md +51 -0
  25. sharpit-0.5.0/docs/reports/2026-11-02-g1g2-red-audit.md +69 -0
  26. sharpit-0.5.0/docs/reports/2026-11-02-pytest-speed.md +34 -0
  27. sharpit-0.5.0/docs/reports/2026-11-02-speed-pytester-inprocess-handoff.md +129 -0
  28. sharpit-0.5.0/docs/reports/2026-11-04-0.5.0-decisions.md +148 -0
  29. sharpit-0.5.0/docs/reports/2026-11-04-0.5.0-morning-report.md +78 -0
  30. sharpit-0.5.0/docs/reports/2026-11-08-0.5.0-sql-output-decisions.md +132 -0
  31. sharpit-0.5.0/docs/screenshots.md +218 -0
  32. sharpit-0.5.0/docs/security-advisor-checks.md +88 -0
  33. sharpit-0.5.0/examples/fastapi_sqla/app.py +278 -0
  34. sharpit-0.5.0/pyproject.toml +138 -0
  35. sharpit-0.5.0/sonar-baseline.txt +1 -0
  36. sharpit-0.5.0/src/sharpit/__init__.py +9 -0
  37. sharpit-0.5.0/src/sharpit/engine/advisors/dismissals.py +348 -0
  38. sharpit-0.5.0/src/sharpit/engine/advisors/findings.py +107 -0
  39. sharpit-0.5.0/src/sharpit/engine/advisors/registry.py +87 -0
  40. sharpit-0.5.0/src/sharpit/engine/advisors/report.py +95 -0
  41. sharpit-0.5.0/src/sharpit/engine/advisors/rules.py +73 -0
  42. sharpit-0.5.0/src/sharpit/engine/advisors/scan.py +234 -0
  43. sharpit-0.5.0/src/sharpit/engine/appsource.py +367 -0
  44. sharpit-0.5.0/src/sharpit/engine/capture/__init__.py +62 -0
  45. sharpit-0.5.0/src/sharpit/engine/capture/activity.py +383 -0
  46. sharpit-0.5.0/src/sharpit/engine/capture/correlation.py +77 -0
  47. sharpit-0.5.0/src/sharpit/engine/capture/errortext.py +5 -0
  48. sharpit-0.5.0/src/sharpit/engine/capture/exceptions.py +399 -0
  49. sharpit-0.5.0/src/sharpit/engine/capture/exchanges.py +227 -0
  50. sharpit-0.5.0/src/sharpit/engine/capture/logtail.py +244 -0
  51. sharpit-0.5.0/src/sharpit/engine/capture/routes.py +137 -0
  52. sharpit-0.5.0/src/sharpit/engine/capture/securitylogs.py +290 -0
  53. sharpit-0.5.0/src/sharpit/engine/capture/sqlinsights.py +394 -0
  54. sharpit-0.5.0/src/sharpit/engine/capture/sqlscan.py +112 -0
  55. sharpit-0.5.0/src/sharpit/engine/capture/sqltrace.py +448 -0
  56. sharpit-0.5.0/src/sharpit/engine/capture/statement.py +19 -0
  57. sharpit-0.5.0/src/sharpit/engine/capture/traces.py +431 -0
  58. sharpit-0.5.0/src/sharpit/engine/capture/transactions.py +566 -0
  59. sharpit-0.5.0/src/sharpit/engine/collectors/alembic.py +434 -0
  60. sharpit-0.5.0/src/sharpit/engine/collectors/appsecurity.py +194 -0
  61. sharpit-0.5.0/src/sharpit/engine/collectors/architecture/__init__.py +3 -0
  62. sharpit-0.5.0/src/sharpit/engine/collectors/architecture/contracts.py +84 -0
  63. sharpit-0.5.0/src/sharpit/engine/collectors/architecture/graph.py +199 -0
  64. sharpit-0.5.0/src/sharpit/engine/collectors/architecture/report.py +185 -0
  65. sharpit-0.5.0/src/sharpit/engine/collectors/architecture/rules.py +661 -0
  66. sharpit-0.5.0/src/sharpit/engine/collectors/config/__init__.py +150 -0
  67. sharpit-0.5.0/src/sharpit/engine/collectors/config/settings_source.py +144 -0
  68. sharpit-0.5.0/src/sharpit/engine/collectors/data.py +188 -0
  69. sharpit-0.5.0/src/sharpit/engine/collectors/database_advisor/__init__.py +19 -0
  70. sharpit-0.5.0/src/sharpit/engine/collectors/database_advisor/catalog.py +183 -0
  71. sharpit-0.5.0/src/sharpit/engine/collectors/database_advisor/report.py +216 -0
  72. sharpit-0.5.0/src/sharpit/engine/collectors/database_advisor/rules_driver_pool.py +285 -0
  73. sharpit-0.5.0/src/sharpit/engine/collectors/database_advisor/rules_orm.py +330 -0
  74. sharpit-0.5.0/src/sharpit/engine/collectors/database_advisor/rules_runtime.py +117 -0
  75. sharpit-0.5.0/src/sharpit/engine/collectors/database_advisor/rules_schema.py +304 -0
  76. sharpit-0.5.0/src/sharpit/engine/collectors/database_advisor/rules_vendor.py +307 -0
  77. sharpit-0.5.0/src/sharpit/engine/collectors/fastapi_advisor/__init__.py +1 -0
  78. sharpit-0.5.0/src/sharpit/engine/collectors/fastapi_advisor/handlers.py +166 -0
  79. sharpit-0.5.0/src/sharpit/engine/collectors/fastapi_advisor/report.py +135 -0
  80. sharpit-0.5.0/src/sharpit/engine/collectors/fastapi_advisor/rules_app.py +116 -0
  81. sharpit-0.5.0/src/sharpit/engine/collectors/fastapi_advisor/rules_async.py +158 -0
  82. sharpit-0.5.0/src/sharpit/engine/collectors/fastapi_advisor/rules_models.py +100 -0
  83. sharpit-0.5.0/src/sharpit/engine/collectors/health.py +267 -0
  84. sharpit-0.5.0/src/sharpit/engine/collectors/mysql/__init__.py +1 -0
  85. sharpit-0.5.0/src/sharpit/engine/collectors/mysql/limits.py +74 -0
  86. sharpit-0.5.0/src/sharpit/engine/collectors/mysql/queries.py +161 -0
  87. sharpit-0.5.0/src/sharpit/engine/collectors/mysql/querytext.py +33 -0
  88. sharpit-0.5.0/src/sharpit/engine/collectors/mysql/sections.py +407 -0
  89. sharpit-0.5.0/src/sharpit/engine/collectors/mysql/service.py +370 -0
  90. sharpit-0.5.0/src/sharpit/engine/collectors/overview.py +46 -0
  91. sharpit-0.5.0/src/sharpit/engine/collectors/pools.py +84 -0
  92. sharpit-0.5.0/src/sharpit/engine/collectors/postgresql/__init__.py +1 -0
  93. sharpit-0.5.0/src/sharpit/engine/collectors/postgresql/limits.py +67 -0
  94. sharpit-0.5.0/src/sharpit/engine/collectors/postgresql/queries.py +223 -0
  95. sharpit-0.5.0/src/sharpit/engine/collectors/postgresql/querytext.py +154 -0
  96. sharpit-0.5.0/src/sharpit/engine/collectors/postgresql/sections.py +620 -0
  97. sharpit-0.5.0/src/sharpit/engine/collectors/postgresql/service.py +408 -0
  98. sharpit-0.5.0/src/sharpit/engine/collectors/restapi/report.py +29 -0
  99. sharpit-0.5.0/src/sharpit/engine/collectors/restapi/rules.py +817 -0
  100. sharpit-0.5.0/src/sharpit/engine/collectors/restapi/service.py +166 -0
  101. sharpit-0.5.0/src/sharpit/engine/collectors/security/__init__.py +80 -0
  102. sharpit-0.5.0/src/sharpit/engine/collectors/security/report.py +191 -0
  103. sharpit-0.5.0/src/sharpit/engine/collectors/security/rules_auth.py +244 -0
  104. sharpit-0.5.0/src/sharpit/engine/collectors/security/rules_config.py +108 -0
  105. sharpit-0.5.0/src/sharpit/engine/collectors/security/rules_source.py +205 -0
  106. sharpit-0.5.0/src/sharpit/engine/collectors/security/rules_transport.py +230 -0
  107. sharpit-0.5.0/src/sharpit/engine/collectors/sqlastats.py +157 -0
  108. sharpit-0.5.0/src/sharpit/engine/collectors/threads.py +254 -0
  109. sharpit-0.5.0/src/sharpit/engine/collectors/vulns/interpreter.py +398 -0
  110. sharpit-0.5.0/src/sharpit/engine/collectors/vulns/service.py +373 -0
  111. sharpit-0.5.0/src/sharpit/engine/context.py +87 -0
  112. sharpit-0.5.0/src/sharpit/engine/guard.py +405 -0
  113. sharpit-0.5.0/src/sharpit/engine/masking.py +520 -0
  114. sharpit-0.5.0/src/sharpit/engine/mcp.py +363 -0
  115. sharpit-0.5.0/src/sharpit/engine/models.py +75 -0
  116. sharpit-0.5.0/src/sharpit/engine/otel.py +116 -0
  117. sharpit-0.5.0/src/sharpit/engine/panels.py +110 -0
  118. sharpit-0.5.0/src/sharpit/engine/panels04/__init__.py +55 -0
  119. sharpit-0.5.0/src/sharpit/engine/panels04/architecture.py +1 -0
  120. sharpit-0.5.0/src/sharpit/engine/panels04/data.py +1 -0
  121. sharpit-0.5.0/src/sharpit/engine/panels04/database_advisor.py +1 -0
  122. sharpit-0.5.0/src/sharpit/engine/panels04/fastapi.py +1 -0
  123. sharpit-0.5.0/src/sharpit/engine/panels04/fastapi_security.py +1 -0
  124. sharpit-0.5.0/src/sharpit/engine/panels04/mysql.py +1 -0
  125. sharpit-0.5.0/src/sharpit/engine/panels04/postgresql.py +1 -0
  126. sharpit-0.5.0/src/sharpit/engine/panels04/security.py +1 -0
  127. sharpit-0.5.0/src/sharpit/engine/panels04/security_logs.py +1 -0
  128. sharpit-0.5.0/src/sharpit/engine/panels04/sqlalchemy_statistics.py +1 -0
  129. sharpit-0.5.0/src/sharpit/engine/panels04/traces.py +1 -0
  130. sharpit-0.5.0/src/sharpit/engine/panels04/transactions.py +1 -0
  131. sharpit-0.5.0/src/sharpit/engine/probe.py +370 -0
  132. sharpit-0.5.0/src/sharpit/engine/sources/dispatch.py +201 -0
  133. sharpit-0.5.0/src/sharpit/engine/sources/sqlite.py +376 -0
  134. sharpit-0.5.0/src/sharpit/engine/spi.py +140 -0
  135. sharpit-0.5.0/src/sharpit/engine/sqla/__init__.py +154 -0
  136. sharpit-0.5.0/src/sharpit/engine/sqla/dialect_source.py +89 -0
  137. sharpit-0.5.0/src/sharpit/engine/sqla/events.py +65 -0
  138. sharpit-0.5.0/src/sharpit/engine/sqla/inspect.py +233 -0
  139. sharpit-0.5.0/src/sharpit/engine/sqla/listeners.py +308 -0
  140. sharpit-0.5.0/src/sharpit/engine/sqla/orm.py +417 -0
  141. sharpit-0.5.0/src/sharpit/engine/sqla/readonly.py +240 -0
  142. sharpit-0.5.0/src/sharpit/engine/sqltext/__init__.py +231 -0
  143. sharpit-0.5.0/src/sharpit/engine/sqltext/constants.py +5 -0
  144. sharpit-0.5.0/src/sharpit/engine/sqltext/dialect.py +240 -0
  145. sharpit-0.5.0/src/sharpit/engine/sqltext/errors.py +485 -0
  146. sharpit-0.5.0/src/sharpit/engine/sqltext/family.py +48 -0
  147. sharpit-0.5.0/src/sharpit/engine/sqltext/identity.py +183 -0
  148. sharpit-0.5.0/src/sharpit/engine/sqltext/lexer.py +940 -0
  149. sharpit-0.5.0/src/sharpit/engine/sqltext/numbers.py +126 -0
  150. sharpit-0.5.0/src/sharpit/engine/sqltext/render.py +188 -0
  151. sharpit-0.5.0/src/sharpit/engine/sqltext/rules.py +193 -0
  152. sharpit-0.5.0/src/sharpit/engine/testsession/baseline.py +137 -0
  153. sharpit-0.5.0/src/sharpit/engine/testsession/facts.py +264 -0
  154. sharpit-0.5.0/src/sharpit/engine/testsession/finish.py +69 -0
  155. sharpit-0.5.0/src/sharpit/engine/testsession/gates.py +256 -0
  156. sharpit-0.5.0/src/sharpit/engine/testsession/outcome.py +339 -0
  157. sharpit-0.5.0/src/sharpit/engine/testsession/partial.py +41 -0
  158. sharpit-0.5.0/src/sharpit/engine/testsession/report.py +190 -0
  159. sharpit-0.5.0/src/sharpit/engine/testsession/report.schema.json +236 -0
  160. sharpit-0.5.0/src/sharpit/engine/testsession/sink.py +302 -0
  161. sharpit-0.5.0/src/sharpit/engine/testsession/swallowed.py +297 -0
  162. sharpit-0.5.0/src/sharpit/engine/tool_dispatch.py +281 -0
  163. sharpit-0.5.0/src/sharpit/engine/tools.py +674 -0
  164. sharpit-0.5.0/src/sharpit/engine/tools04/__init__.py +1 -0
  165. sharpit-0.5.0/src/sharpit/engine/tools04/architecture.py +83 -0
  166. sharpit-0.5.0/src/sharpit/engine/tools04/data.py +15 -0
  167. sharpit-0.5.0/src/sharpit/engine/tools04/database_advisor.py +112 -0
  168. sharpit-0.5.0/src/sharpit/engine/tools04/fastapi.py +106 -0
  169. sharpit-0.5.0/src/sharpit/engine/tools04/fastapi_security.py +17 -0
  170. sharpit-0.5.0/src/sharpit/engine/tools04/mysql.py +79 -0
  171. sharpit-0.5.0/src/sharpit/engine/tools04/postgresql.py +83 -0
  172. sharpit-0.5.0/src/sharpit/engine/tools04/security.py +107 -0
  173. sharpit-0.5.0/src/sharpit/engine/tools04/security_logs.py +15 -0
  174. sharpit-0.5.0/src/sharpit/engine/tools04/sql_trace.py +27 -0
  175. sharpit-0.5.0/src/sharpit/engine/tools04/sqlalchemy_statistics.py +29 -0
  176. sharpit-0.5.0/src/sharpit/engine/tools04/traces.py +36 -0
  177. sharpit-0.5.0/src/sharpit/engine/tools04/transactions.py +66 -0
  178. sharpit-0.5.0/src/sharpit/fastapi/adapter.py +292 -0
  179. sharpit-0.5.0/src/sharpit/fastapi/capture.py +509 -0
  180. sharpit-0.5.0/src/sharpit/fastapi/install.py +239 -0
  181. sharpit-0.5.0/src/sharpit/fastapi/introspector.py +999 -0
  182. sharpit-0.5.0/src/sharpit/fastapi/routes/__init__.py +663 -0
  183. sharpit-0.5.0/src/sharpit/fastapi/routes/activity.py +46 -0
  184. sharpit-0.5.0/src/sharpit/fastapi/routes/architecture.py +45 -0
  185. sharpit-0.5.0/src/sharpit/fastapi/routes/data.py +29 -0
  186. sharpit-0.5.0/src/sharpit/fastapi/routes/database_advisor.py +54 -0
  187. sharpit-0.5.0/src/sharpit/fastapi/routes/dismissed_findings.py +84 -0
  188. sharpit-0.5.0/src/sharpit/fastapi/routes/exceptions.py +22 -0
  189. sharpit-0.5.0/src/sharpit/fastapi/routes/fastapi.py +49 -0
  190. sharpit-0.5.0/src/sharpit/fastapi/routes/fastapi_security.py +36 -0
  191. sharpit-0.5.0/src/sharpit/fastapi/routes/http_exchanges.py +38 -0
  192. sharpit-0.5.0/src/sharpit/fastapi/routes/mysql.py +35 -0
  193. sharpit-0.5.0/src/sharpit/fastapi/routes/postgresql.py +35 -0
  194. sharpit-0.5.0/src/sharpit/fastapi/routes/security.py +46 -0
  195. sharpit-0.5.0/src/sharpit/fastapi/routes/security_logs.py +52 -0
  196. sharpit-0.5.0/src/sharpit/fastapi/routes/sql_trace.py +20 -0
  197. sharpit-0.5.0/src/sharpit/fastapi/routes/sqlalchemy_statistics.py +23 -0
  198. sharpit-0.5.0/src/sharpit/fastapi/routes/traces.py +46 -0
  199. sharpit-0.5.0/src/sharpit/fastapi/routes/transactions.py +55 -0
  200. sharpit-0.5.0/src/sharpit/pytest_plugin/__init__.py +622 -0
  201. sharpit-0.5.0/src/sharpit/pytest_plugin/apps.py +272 -0
  202. sharpit-0.5.0/src/sharpit/pytest_plugin/marker.py +42 -0
  203. sharpit-0.5.0/src/sharpit/pytest_plugin/options.py +136 -0
  204. sharpit-0.5.0/src/sharpit/pytest_plugin/report_io.py +141 -0
  205. sharpit-0.5.0/src/sharpit/pytest_plugin/session.py +233 -0
  206. sharpit-0.5.0/src/sharpit/pytest_plugin/swallowed.py +147 -0
  207. sharpit-0.5.0/src/sharpit/pytest_plugin/terminal.py +120 -0
  208. sharpit-0.5.0/src/sharpit/report/__init__.py +1 -0
  209. sharpit-0.5.0/src/sharpit/report/__main__.py +38 -0
  210. sharpit-0.5.0/src/sharpit/report/summary.py +84 -0
  211. sharpit-0.5.0/src/sharpit/settings.py +500 -0
  212. sharpit-0.5.0/src/sharpit/ui/static/assets/index-CMGt9aLB.css +1 -0
  213. sharpit-0.5.0/src/sharpit/ui/static/assets/index-XbN7c0LG.js +15 -0
  214. sharpit-0.5.0/src/sharpit/ui/static/index.html +14 -0
  215. sharpit-0.5.0/tests/_shard.py +172 -0
  216. sharpit-0.5.0/tests/action/test_action_definition.py +223 -0
  217. sharpit-0.5.0/tests/complexity_baseline.json +15 -0
  218. sharpit-0.5.0/tests/conftest.py +464 -0
  219. sharpit-0.5.0/tests/data_support.py +28 -0
  220. sharpit-0.5.0/tests/dialect_ids.py +10 -0
  221. sharpit-0.5.0/tests/docs/test_procurement_docs.py +313 -0
  222. sharpit-0.5.0/tests/engine/advisors/test_advisor_report.py +98 -0
  223. sharpit-0.5.0/tests/engine/advisors/test_advisor_rules.py +56 -0
  224. sharpit-0.5.0/tests/engine/advisors/test_dismissals.py +541 -0
  225. sharpit-0.5.0/tests/engine/advisors/test_findings.py +147 -0
  226. sharpit-0.5.0/tests/engine/advisors/test_registry.py +98 -0
  227. sharpit-0.5.0/tests/engine/advisors/test_scan.py +196 -0
  228. sharpit-0.5.0/tests/engine/capture/test_activity.py +468 -0
  229. sharpit-0.5.0/tests/engine/capture/test_exceptions.py +620 -0
  230. sharpit-0.5.0/tests/engine/capture/test_exchanges.py +243 -0
  231. sharpit-0.5.0/tests/engine/capture/test_http_routes.py +129 -0
  232. sharpit-0.5.0/tests/engine/capture/test_logtail.py +489 -0
  233. sharpit-0.5.0/tests/engine/capture/test_ported_citations.py +90 -0
  234. sharpit-0.5.0/tests/engine/capture/test_securitylogs.py +313 -0
  235. sharpit-0.5.0/tests/engine/capture/test_sqlinsights.py +248 -0
  236. sharpit-0.5.0/tests/engine/capture/test_sqlscan.py +1211 -0
  237. sharpit-0.5.0/tests/engine/capture/test_sqltrace.py +826 -0
  238. sharpit-0.5.0/tests/engine/capture/test_sqltrace_reentry.py +178 -0
  239. sharpit-0.5.0/tests/engine/capture/test_sqltrace_totals.py +145 -0
  240. sharpit-0.5.0/tests/engine/capture/test_statement.py +163 -0
  241. sharpit-0.5.0/tests/engine/capture/test_statement_render.py +50 -0
  242. sharpit-0.5.0/tests/engine/capture/test_traces.py +724 -0
  243. sharpit-0.5.0/tests/engine/capture/test_transactions.py +736 -0
  244. sharpit-0.5.0/tests/engine/collectors/architecture/test_architecture_report.py +100 -0
  245. sharpit-0.5.0/tests/engine/collectors/architecture/test_contracts.py +73 -0
  246. sharpit-0.5.0/tests/engine/collectors/architecture/test_graph.py +114 -0
  247. sharpit-0.5.0/tests/engine/collectors/architecture/test_rules.py +366 -0
  248. sharpit-0.5.0/tests/engine/collectors/database_advisor/test_rules_driver_pool.py +203 -0
  249. sharpit-0.5.0/tests/engine/collectors/database_advisor/test_rules_orm.py +263 -0
  250. sharpit-0.5.0/tests/engine/collectors/database_advisor/test_rules_runtime.py +91 -0
  251. sharpit-0.5.0/tests/engine/collectors/database_advisor/test_rules_schema.py +160 -0
  252. sharpit-0.5.0/tests/engine/collectors/database_advisor/test_rules_vendor.py +241 -0
  253. sharpit-0.5.0/tests/engine/collectors/database_advisor/test_scan_wiring.py +49 -0
  254. sharpit-0.5.0/tests/engine/collectors/fastapi_advisor/__init__.py +0 -0
  255. sharpit-0.5.0/tests/engine/collectors/fastapi_advisor/support.py +44 -0
  256. sharpit-0.5.0/tests/engine/collectors/fastapi_advisor/test_fastapi_advisor_handlers.py +81 -0
  257. sharpit-0.5.0/tests/engine/collectors/fastapi_advisor/test_fastapi_advisor_report.py +59 -0
  258. sharpit-0.5.0/tests/engine/collectors/fastapi_advisor/test_fastapi_advisor_rules_app.py +125 -0
  259. sharpit-0.5.0/tests/engine/collectors/fastapi_advisor/test_fastapi_advisor_rules_async.py +91 -0
  260. sharpit-0.5.0/tests/engine/collectors/fastapi_advisor/test_fastapi_advisor_rules_models.py +61 -0
  261. sharpit-0.5.0/tests/engine/collectors/mysql/fakes.py +263 -0
  262. sharpit-0.5.0/tests/engine/collectors/mysql/test_section_failures.py +75 -0
  263. sharpit-0.5.0/tests/engine/collectors/mysql/test_sections.py +161 -0
  264. sharpit-0.5.0/tests/engine/collectors/security/__init__.py +0 -0
  265. sharpit-0.5.0/tests/engine/collectors/security/conftest.py +50 -0
  266. sharpit-0.5.0/tests/engine/collectors/security/test_contract.py +45 -0
  267. sharpit-0.5.0/tests/engine/collectors/security/test_fix_round1.py +181 -0
  268. sharpit-0.5.0/tests/engine/collectors/security/test_rules_auth.py +148 -0
  269. sharpit-0.5.0/tests/engine/collectors/security/test_rules_config.py +89 -0
  270. sharpit-0.5.0/tests/engine/collectors/security/test_rules_source.py +68 -0
  271. sharpit-0.5.0/tests/engine/collectors/security/test_rules_transport.py +133 -0
  272. sharpit-0.5.0/tests/engine/collectors/security/test_scan.py +148 -0
  273. sharpit-0.5.0/tests/engine/config/test_config_report.py +423 -0
  274. sharpit-0.5.0/tests/engine/config/test_getenv_scan.py +64 -0
  275. sharpit-0.5.0/tests/engine/postgresql/__init__.py +0 -0
  276. sharpit-0.5.0/tests/engine/postgresql/fakes.py +212 -0
  277. sharpit-0.5.0/tests/engine/postgresql/test_limits.py +76 -0
  278. sharpit-0.5.0/tests/engine/postgresql/test_querytext.py +128 -0
  279. sharpit-0.5.0/tests/engine/postgresql/test_sections.py +543 -0
  280. sharpit-0.5.0/tests/engine/postgresql/test_service.py +345 -0
  281. sharpit-0.5.0/tests/engine/restapi/test_restapi_findings.py +358 -0
  282. sharpit-0.5.0/tests/engine/restapi/test_restapi_registry.py +114 -0
  283. sharpit-0.5.0/tests/engine/restapi/test_restapi_report.py +261 -0
  284. sharpit-0.5.0/tests/engine/restapi/test_restapi_rules.py +234 -0
  285. sharpit-0.5.0/tests/engine/restapi/test_swallowed_rule.py +73 -0
  286. sharpit-0.5.0/tests/engine/sqla/test_example_database_url.py +14 -0
  287. sharpit-0.5.0/tests/engine/sqltext/test_dialect.py +51 -0
  288. sharpit-0.5.0/tests/engine/sqltext/test_dialect_truth.py +54 -0
  289. sharpit-0.5.0/tests/engine/sqltext/test_identity.py +77 -0
  290. sharpit-0.5.0/tests/engine/sqltext/test_identity_key.py +441 -0
  291. sharpit-0.5.0/tests/engine/sqltext/test_lexer.py +198 -0
  292. sharpit-0.5.0/tests/engine/sqltext/test_no_mysql_flag.py +333 -0
  293. sharpit-0.5.0/tests/engine/sqltext/test_port_contract.py +63 -0
  294. sharpit-0.5.0/tests/engine/sqltext/test_readings_shape.py +48 -0
  295. sharpit-0.5.0/tests/engine/sqltext/test_render.py +85 -0
  296. sharpit-0.5.0/tests/engine/sqltext/test_resolver.py +626 -0
  297. sharpit-0.5.0/tests/engine/sqltext/test_rules_mysql_family.py +359 -0
  298. sharpit-0.5.0/tests/engine/sqltext/test_rules_postgresql.py +147 -0
  299. sharpit-0.5.0/tests/engine/sqltext/test_rules_sqlite.py +242 -0
  300. sharpit-0.5.0/tests/engine/sqltext/test_rules_table.py +244 -0
  301. sharpit-0.5.0/tests/engine/test_alembic.py +191 -0
  302. sharpit-0.5.0/tests/engine/test_application_family.py +459 -0
  303. sharpit-0.5.0/tests/engine/test_appsecurity.py +138 -0
  304. sharpit-0.5.0/tests/engine/test_appsource.py +336 -0
  305. sharpit-0.5.0/tests/engine/test_data.py +689 -0
  306. sharpit-0.5.0/tests/engine/test_dispatch.py +210 -0
  307. sharpit-0.5.0/tests/engine/test_guard.py +994 -0
  308. sharpit-0.5.0/tests/engine/test_headers.py +65 -0
  309. sharpit-0.5.0/tests/engine/test_health.py +421 -0
  310. sharpit-0.5.0/tests/engine/test_import_boundary.py +626 -0
  311. sharpit-0.5.0/tests/engine/test_masking.py +638 -0
  312. sharpit-0.5.0/tests/engine/test_masking_token_gate.py +70 -0
  313. sharpit-0.5.0/tests/engine/test_mcp.py +426 -0
  314. sharpit-0.5.0/tests/engine/test_models.py +57 -0
  315. sharpit-0.5.0/tests/engine/test_n_plus_one_overhead.py +104 -0
  316. sharpit-0.5.0/tests/engine/test_otel.py +140 -0
  317. sharpit-0.5.0/tests/engine/test_overview.py +119 -0
  318. sharpit-0.5.0/tests/engine/test_panel04_registry.py +37 -0
  319. sharpit-0.5.0/tests/engine/test_panels.py +90 -0
  320. sharpit-0.5.0/tests/engine/test_pools.py +182 -0
  321. sharpit-0.5.0/tests/engine/test_sqla.py +1310 -0
  322. sharpit-0.5.0/tests/engine/test_sqla_inspect.py +104 -0
  323. sharpit-0.5.0/tests/engine/test_sqla_read_only.py +299 -0
  324. sharpit-0.5.0/tests/engine/test_sqla_read_only_dialects.py +398 -0
  325. sharpit-0.5.0/tests/engine/test_sqlastats.py +351 -0
  326. sharpit-0.5.0/tests/engine/test_sqlite_source.py +422 -0
  327. sharpit-0.5.0/tests/engine/test_swallowed_overhead.py +75 -0
  328. sharpit-0.5.0/tests/engine/test_threads.py +470 -0
  329. sharpit-0.5.0/tests/engine/test_tools.py +715 -0
  330. sharpit-0.5.0/tests/engine/testsession/test_baseline.py +172 -0
  331. sharpit-0.5.0/tests/engine/testsession/test_gates.py +509 -0
  332. sharpit-0.5.0/tests/engine/testsession/test_outcome.py +393 -0
  333. sharpit-0.5.0/tests/engine/testsession/test_partial.py +39 -0
  334. sharpit-0.5.0/tests/engine/testsession/test_report.py +419 -0
  335. sharpit-0.5.0/tests/engine/testsession/test_sink.py +604 -0
  336. sharpit-0.5.0/tests/engine/testsession/test_sink_overhead.py +49 -0
  337. sharpit-0.5.0/tests/engine/testsession/test_swallowed.py +512 -0
  338. sharpit-0.5.0/tests/engine/testsession/tsfakes.py +123 -0
  339. sharpit-0.5.0/tests/engine/vulns/test_interpreter.py +641 -0
  340. sharpit-0.5.0/tests/engine/vulns/test_service.py +564 -0
  341. sharpit-0.5.0/tests/fastapi/test_activity_api.py +230 -0
  342. sharpit-0.5.0/tests/fastapi/test_alembic_api.py +219 -0
  343. sharpit-0.5.0/tests/fastapi/test_architecture_api.py +218 -0
  344. sharpit-0.5.0/tests/fastapi/test_architecture_source_reads.py +197 -0
  345. sharpit-0.5.0/tests/fastapi/test_capture_golden_parity.py +177 -0
  346. sharpit-0.5.0/tests/fastapi/test_capture_hooks.py +89 -0
  347. sharpit-0.5.0/tests/fastapi/test_capture_overhead.py +80 -0
  348. sharpit-0.5.0/tests/fastapi/test_capture_paging.py +134 -0
  349. sharpit-0.5.0/tests/fastapi/test_capture_wiring.py +493 -0
  350. sharpit-0.5.0/tests/fastapi/test_change_streams.py +133 -0
  351. sharpit-0.5.0/tests/fastapi/test_cli_api.py +185 -0
  352. sharpit-0.5.0/tests/fastapi/test_data_api.py +195 -0
  353. sharpit-0.5.0/tests/fastapi/test_database_advisor_api.py +266 -0
  354. sharpit-0.5.0/tests/fastapi/test_database_advisor_leased.py +157 -0
  355. sharpit-0.5.0/tests/fastapi/test_dialect_conflict_surfaces.py +141 -0
  356. sharpit-0.5.0/tests/fastapi/test_dismissed_findings_api.py +200 -0
  357. sharpit-0.5.0/tests/fastapi/test_dismissed_rules_api.py +122 -0
  358. sharpit-0.5.0/tests/fastapi/test_exceptions_api.py +563 -0
  359. sharpit-0.5.0/tests/fastapi/test_fastapi_absent.py +91 -0
  360. sharpit-0.5.0/tests/fastapi/test_fastapi_advisor_api.py +224 -0
  361. sharpit-0.5.0/tests/fastapi/test_fastapi_security_api.py +348 -0
  362. sharpit-0.5.0/tests/fastapi/test_health_api.py +110 -0
  363. sharpit-0.5.0/tests/fastapi/test_http_exchanges_api.py +152 -0
  364. sharpit-0.5.0/tests/fastapi/test_http_probe_api.py +696 -0
  365. sharpit-0.5.0/tests/fastapi/test_http_route_templates.py +175 -0
  366. sharpit-0.5.0/tests/fastapi/test_install.py +539 -0
  367. sharpit-0.5.0/tests/fastapi/test_introspection_trap.py +240 -0
  368. sharpit-0.5.0/tests/fastapi/test_introspector_providers.py +266 -0
  369. sharpit-0.5.0/tests/fastapi/test_introspector_routes.py +379 -0
  370. sharpit-0.5.0/tests/fastapi/test_introspector_security.py +423 -0
  371. sharpit-0.5.0/tests/fastapi/test_log_tail_api.py +439 -0
  372. sharpit-0.5.0/tests/fastapi/test_loggers_api.py +123 -0
  373. sharpit-0.5.0/tests/fastapi/test_mask_error_overhead.py +93 -0
  374. sharpit-0.5.0/tests/fastapi/test_mcp_api.py +198 -0
  375. sharpit-0.5.0/tests/fastapi/test_mysql_api.py +155 -0
  376. sharpit-0.5.0/tests/fastapi/test_mysql_get_no_read.py +23 -0
  377. sharpit-0.5.0/tests/fastapi/test_mysql_leased.py +79 -0
  378. sharpit-0.5.0/tests/fastapi/test_mysql_read_only_leased.py +66 -0
  379. sharpit-0.5.0/tests/fastapi/test_mysql_report_read.py +59 -0
  380. sharpit-0.5.0/tests/fastapi/test_panel_golden_parity.py +66 -0
  381. sharpit-0.5.0/tests/fastapi/test_pools_api.py +51 -0
  382. sharpit-0.5.0/tests/fastapi/test_postgresql_api.py +164 -0
  383. sharpit-0.5.0/tests/fastapi/test_security_api.py +247 -0
  384. sharpit-0.5.0/tests/fastapi/test_security_logs_api.py +398 -0
  385. sharpit-0.5.0/tests/fastapi/test_security_logs_overhead.py +95 -0
  386. sharpit-0.5.0/tests/fastapi/test_sql_trace_api.py +460 -0
  387. sharpit-0.5.0/tests/fastapi/test_sql_trace_insights_api.py +87 -0
  388. sharpit-0.5.0/tests/fastapi/test_sql_trace_overhead.py +156 -0
  389. sharpit-0.5.0/tests/fastapi/test_sqla_absent.py +245 -0
  390. sharpit-0.5.0/tests/fastapi/test_sqlalchemy_statistics_api.py +126 -0
  391. sharpit-0.5.0/tests/fastapi/test_traces_api.py +251 -0
  392. sharpit-0.5.0/tests/fastapi/test_traces_overhead.py +36 -0
  393. sharpit-0.5.0/tests/fastapi/test_transactions_api.py +273 -0
  394. sharpit-0.5.0/tests/fastapi/test_transactions_listener_cost.py +112 -0
  395. sharpit-0.5.0/tests/fastapi/test_transactions_overhead.py +91 -0
  396. sharpit-0.5.0/tests/fastapi/test_unimplemented_panel_surface.py +64 -0
  397. sharpit-0.5.0/tests/fastapi/test_vulns_api.py +205 -0
  398. sharpit-0.5.0/tests/fastapi/trap_surfaces_fastapi.py +5 -0
  399. sharpit-0.5.0/tests/fastapi/trap_surfaces_security.py +5 -0
  400. sharpit-0.5.0/tests/fixtures/apps/bench_twins/batch_app.py +44 -0
  401. sharpit-0.5.0/tests/fixtures/apps/bench_twins/clean_app.py +42 -0
  402. sharpit-0.5.0/tests/fixtures/apps/bench_twins/clean_main.py +14 -0
  403. sharpit-0.5.0/tests/fixtures/apps/bench_twins/counts_app.py +14 -0
  404. sharpit-0.5.0/tests/fixtures/apps/bench_twins/noisy_app.py +35 -0
  405. sharpit-0.5.0/tests/fixtures/apps/bench_twins/query_loop_app.py +32 -0
  406. sharpit-0.5.0/tests/fixtures/apps/bench_twins/serialize_app.py +70 -0
  407. sharpit-0.5.0/tests/fixtures/apps/swallow_twins/cases.py +23 -0
  408. sharpit-0.5.0/tests/fixtures/apps/swallow_twins/twinapp.py +49 -0
  409. sharpit-0.5.0/tests/fixtures/apps/swallow_twins/twinlib.py +19 -0
  410. sharpit-0.5.0/tests/fixtures/apps/swallowed_exception/cases.py +16 -0
  411. sharpit-0.5.0/tests/fixtures/apps/swallowed_exception/weekapp.py +32 -0
  412. sharpit-0.5.0/tests/fixtures/apps/unbounded_read/conftest.py +27 -0
  413. sharpit-0.5.0/tests/fixtures/apps/unbounded_read/fixture.py +31 -0
  414. sharpit-0.5.0/tests/fixtures/bootui/2.2.0/activity/captured.json +246 -0
  415. sharpit-0.5.0/tests/fixtures/bootui/2.2.0/activity/journal.captured.json +32 -0
  416. sharpit-0.5.0/tests/fixtures/bootui/2.2.0/activity/nullable.json +10 -0
  417. sharpit-0.5.0/tests/fixtures/bootui/2.2.0/activity/resources.captured.json +54 -0
  418. sharpit-0.5.0/tests/fixtures/bootui/2.2.0/activity/service-map.captured.json +97 -0
  419. sharpit-0.5.0/tests/fixtures/bootui/2.2.0/architecture/captured.json +43 -0
  420. sharpit-0.5.0/tests/fixtures/bootui/2.2.0/architecture/enums.json +37 -0
  421. sharpit-0.5.0/tests/fixtures/bootui/2.2.0/architecture/nullable.json +5 -0
  422. sharpit-0.5.0/tests/fixtures/bootui/2.2.0/beans/captured.json +33 -0
  423. sharpit-0.5.0/tests/fixtures/bootui/2.2.0/cli/captured.json +29 -0
  424. sharpit-0.5.0/tests/fixtures/bootui/2.2.0/config/captured.json +175 -0
  425. sharpit-0.5.0/tests/fixtures/bootui/2.2.0/data/nullable.json +4 -0
  426. sharpit-0.5.0/tests/fixtures/bootui/2.2.0/data/repositories.captured.json +5 -0
  427. sharpit-0.5.0/tests/fixtures/bootui/2.2.0/database-advisor/captured.json +51 -0
  428. sharpit-0.5.0/tests/fixtures/bootui/2.2.0/database-advisor/enums.json +37 -0
  429. sharpit-0.5.0/tests/fixtures/bootui/2.2.0/database-advisor/nullable.json +3 -0
  430. sharpit-0.5.0/tests/fixtures/bootui/2.2.0/database-connection-pools/nullable.json +14 -0
  431. sharpit-0.5.0/tests/fixtures/bootui/2.2.0/database-connection-pools/pools.captured.json +32 -0
  432. sharpit-0.5.0/tests/fixtures/bootui/2.2.0/dismissed-findings/captured.json +4 -0
  433. sharpit-0.5.0/tests/fixtures/bootui/2.2.0/dismissed-rules/captured.json +3 -0
  434. sharpit-0.5.0/tests/fixtures/bootui/2.2.0/exceptions/captured.json +30 -0
  435. sharpit-0.5.0/tests/fixtures/bootui/2.2.0/exceptions/caught.captured.json +9 -0
  436. sharpit-0.5.0/tests/fixtures/bootui/2.2.0/exceptions/nullable.json +7 -0
  437. sharpit-0.5.0/tests/fixtures/bootui/2.2.0/fastapi/captured.json +41 -0
  438. sharpit-0.5.0/tests/fixtures/bootui/2.2.0/fastapi/enums.json +37 -0
  439. sharpit-0.5.0/tests/fixtures/bootui/2.2.0/fastapi-security/captured.json +23 -0
  440. sharpit-0.5.0/tests/fixtures/bootui/2.2.0/fastapi-security/endpoints.captured.json +19 -0
  441. sharpit-0.5.0/tests/fixtures/bootui/2.2.0/fastapi-security/nullable.json +4 -0
  442. sharpit-0.5.0/tests/fixtures/bootui/2.2.0/health/captured.json +24 -0
  443. sharpit-0.5.0/tests/fixtures/bootui/2.2.0/http-exchanges/captured.json +99 -0
  444. sharpit-0.5.0/tests/fixtures/bootui/2.2.0/http-exchanges/nullable.json +8 -0
  445. sharpit-0.5.0/tests/fixtures/bootui/2.2.0/http-exchanges/routes.captured.json +50 -0
  446. sharpit-0.5.0/tests/fixtures/bootui/2.2.0/http-probe/captured.json +11 -0
  447. sharpit-0.5.0/tests/fixtures/bootui/2.2.0/ids.json +33 -0
  448. sharpit-0.5.0/tests/fixtures/bootui/2.2.0/log-tail/recent.captured.json +10 -0
  449. sharpit-0.5.0/tests/fixtures/bootui/2.2.0/loggers/captured.json +27 -0
  450. sharpit-0.5.0/tests/fixtures/bootui/2.2.0/mappings/flat.captured.json +34 -0
  451. sharpit-0.5.0/tests/fixtures/bootui/2.2.0/mcp-server/captured.json +33 -0
  452. sharpit-0.5.0/tests/fixtures/bootui/2.2.0/meta.json +11 -0
  453. sharpit-0.5.0/tests/fixtures/bootui/2.2.0/mysql/captured.json +13 -0
  454. sharpit-0.5.0/tests/fixtures/bootui/2.2.0/mysql/nullable.json +21 -0
  455. sharpit-0.5.0/tests/fixtures/bootui/2.2.0/overview/captured.json +32 -0
  456. sharpit-0.5.0/tests/fixtures/bootui/2.2.0/overview/nullable.json +4 -0
  457. sharpit-0.5.0/tests/fixtures/bootui/2.2.0/panels/captured.json +23 -0
  458. sharpit-0.5.0/tests/fixtures/bootui/2.2.0/postgresql/captured.json +198 -0
  459. sharpit-0.5.0/tests/fixtures/bootui/2.2.0/postgresql/nullable.json +45 -0
  460. sharpit-0.5.0/tests/fixtures/bootui/2.2.0/rest-api/captured.json +70 -0
  461. sharpit-0.5.0/tests/fixtures/bootui/2.2.0/rest-api/enums.json +27 -0
  462. sharpit-0.5.0/tests/fixtures/bootui/2.2.0/rest-api/error-contract.captured.json +38 -0
  463. sharpit-0.5.0/tests/fixtures/bootui/2.2.0/security/captured.json +41 -0
  464. sharpit-0.5.0/tests/fixtures/bootui/2.2.0/security/enums.json +37 -0
  465. sharpit-0.5.0/tests/fixtures/bootui/2.2.0/security-logs/captured.json +36 -0
  466. sharpit-0.5.0/tests/fixtures/bootui/2.2.0/security-logs/nullable.json +4 -0
  467. sharpit-0.5.0/tests/fixtures/bootui/2.2.0/sql-trace/captured.json +211 -0
  468. sharpit-0.5.0/tests/fixtures/bootui/2.2.0/sql-trace/insights.captured.json +120 -0
  469. sharpit-0.5.0/tests/fixtures/bootui/2.2.0/sql-trace/nullable.json +11 -0
  470. sharpit-0.5.0/tests/fixtures/bootui/2.2.0/sqlalchemy-statistics/nullable.json +18 -0
  471. sharpit-0.5.0/tests/fixtures/bootui/2.2.0/threads/captured.json +98 -0
  472. sharpit-0.5.0/tests/fixtures/bootui/2.2.0/threads/nullable.json +4 -0
  473. sharpit-0.5.0/tests/fixtures/bootui/2.2.0/traces/captured.json +35 -0
  474. sharpit-0.5.0/tests/fixtures/bootui/2.2.0/traces/nullable.json +3 -0
  475. sharpit-0.5.0/tests/fixtures/bootui/2.2.0/transactions/captured.json +82 -0
  476. sharpit-0.5.0/tests/fixtures/bootui/2.2.0/transactions/nullable.json +1 -0
  477. sharpit-0.5.0/tests/fixtures/bootui/2.2.0/vulnerabilities/captured.json +62 -0
  478. sharpit-0.5.0/tests/fixtures/bootui/2.2.0/vulnerabilities/nullable.json +3 -0
  479. sharpit-0.5.0/tests/fixtures/getenv_corpus/pkg/__init__.py +0 -0
  480. sharpit-0.5.0/tests/fixtures/report-summary-baseline.md +18 -0
  481. sharpit-0.5.0/tests/fixtures/report-summary.md +14 -0
  482. sharpit-0.5.0/tests/fixtures/restapi/rest_api_check_ids.txt +63 -0
  483. sharpit-0.5.0/tests/fixtures/sql_errors/aiomysql/bracket_block.txt +180 -0
  484. sharpit-0.5.0/tests/fixtures/sql_errors/aiomysql/bracket_syntax.txt +178 -0
  485. sharpit-0.5.0/tests/fixtures/sql_errors/aiomysql/closer_in_literal.txt +182 -0
  486. sharpit-0.5.0/tests/fixtures/sql_errors/aiomysql/closer_in_param.txt +180 -0
  487. sharpit-0.5.0/tests/fixtures/sql_errors/aiomysql/crlf.txt +186 -0
  488. sharpit-0.5.0/tests/fixtures/sql_errors/aiomysql/engine_log.txt +208 -0
  489. sharpit-0.5.0/tests/fixtures/sql_errors/aiomysql/engine_log_long.txt +204 -0
  490. sharpit-0.5.0/tests/fixtures/sql_errors/aiomysql/hide_parameters.txt +180 -0
  491. sharpit-0.5.0/tests/fixtures/sql_errors/aiomysql/long_params.txt +180 -0
  492. sharpit-0.5.0/tests/fixtures/sql_errors/aiomysql/long_statement.txt +178 -0
  493. sharpit-0.5.0/tests/fixtures/sql_errors/aiomysql/many_params.txt +208 -0
  494. sharpit-0.5.0/tests/fixtures/sql_errors/aiomysql/multiline_literal.txt +182 -0
  495. sharpit-0.5.0/tests/fixtures/sql_errors/aiomysql/mysql_no_backslash_literal.txt +180 -0
  496. sharpit-0.5.0/tests/fixtures/sql_errors/aiomysql/mysql_no_backslash_param.txt +180 -0
  497. sharpit-0.5.0/tests/fixtures/sql_errors/aiomysql/raw_syntax.txt +40 -0
  498. sharpit-0.5.0/tests/fixtures/sql_errors/aiomysql/raw_unique.txt +40 -0
  499. sharpit-0.5.0/tests/fixtures/sql_errors/aiomysql/sql_marker_in_literal.txt +180 -0
  500. sharpit-0.5.0/tests/fixtures/sql_errors/aiomysql/sql_marker_in_param.txt +180 -0
  501. sharpit-0.5.0/tests/fixtures/sql_errors/aiomysql/syntax_inline_literal.txt +178 -0
  502. sharpit-0.5.0/tests/fixtures/sql_errors/aiomysql/syntax_mid_literal.txt +178 -0
  503. sharpit-0.5.0/tests/fixtures/sql_errors/aiomysql/unique_params.txt +180 -0
  504. sharpit-0.5.0/tests/fixtures/sql_errors/aiosqlite/bracket_block.txt +168 -0
  505. sharpit-0.5.0/tests/fixtures/sql_errors/aiosqlite/bracket_syntax.txt +166 -0
  506. sharpit-0.5.0/tests/fixtures/sql_errors/aiosqlite/closer_in_literal.txt +170 -0
  507. sharpit-0.5.0/tests/fixtures/sql_errors/aiosqlite/closer_in_param.txt +168 -0
  508. sharpit-0.5.0/tests/fixtures/sql_errors/aiosqlite/crlf.txt +174 -0
  509. sharpit-0.5.0/tests/fixtures/sql_errors/aiosqlite/engine_log.txt +184 -0
  510. sharpit-0.5.0/tests/fixtures/sql_errors/aiosqlite/engine_log_long.txt +180 -0
  511. sharpit-0.5.0/tests/fixtures/sql_errors/aiosqlite/hide_parameters.txt +168 -0
  512. sharpit-0.5.0/tests/fixtures/sql_errors/aiosqlite/long_params.txt +168 -0
  513. sharpit-0.5.0/tests/fixtures/sql_errors/aiosqlite/long_statement.txt +166 -0
  514. sharpit-0.5.0/tests/fixtures/sql_errors/aiosqlite/many_params.txt +178 -0
  515. sharpit-0.5.0/tests/fixtures/sql_errors/aiosqlite/multiline_literal.txt +170 -0
  516. sharpit-0.5.0/tests/fixtures/sql_errors/aiosqlite/raw_syntax.txt +29 -0
  517. sharpit-0.5.0/tests/fixtures/sql_errors/aiosqlite/raw_unique.txt +29 -0
  518. sharpit-0.5.0/tests/fixtures/sql_errors/aiosqlite/sql_marker_in_literal.txt +168 -0
  519. sharpit-0.5.0/tests/fixtures/sql_errors/aiosqlite/sql_marker_in_param.txt +168 -0
  520. sharpit-0.5.0/tests/fixtures/sql_errors/aiosqlite/syntax_inline_literal.txt +166 -0
  521. sharpit-0.5.0/tests/fixtures/sql_errors/aiosqlite/syntax_mid_literal.txt +166 -0
  522. sharpit-0.5.0/tests/fixtures/sql_errors/aiosqlite/unique_params.txt +168 -0
  523. sharpit-0.5.0/tests/fixtures/sql_errors/asyncpg/bracket_block.txt +173 -0
  524. sharpit-0.5.0/tests/fixtures/sql_errors/asyncpg/bracket_syntax.txt +186 -0
  525. sharpit-0.5.0/tests/fixtures/sql_errors/asyncpg/closer_in_literal.txt +175 -0
  526. sharpit-0.5.0/tests/fixtures/sql_errors/asyncpg/closer_in_param.txt +174 -0
  527. sharpit-0.5.0/tests/fixtures/sql_errors/asyncpg/crlf.txt +179 -0
  528. sharpit-0.5.0/tests/fixtures/sql_errors/asyncpg/engine_log.txt +201 -0
  529. sharpit-0.5.0/tests/fixtures/sql_errors/asyncpg/engine_log_long.txt +197 -0
  530. sharpit-0.5.0/tests/fixtures/sql_errors/asyncpg/hide_parameters.txt +173 -0
  531. sharpit-0.5.0/tests/fixtures/sql_errors/asyncpg/long_params.txt +173 -0
  532. sharpit-0.5.0/tests/fixtures/sql_errors/asyncpg/long_statement.txt +186 -0
  533. sharpit-0.5.0/tests/fixtures/sql_errors/asyncpg/many_params.txt +181 -0
  534. sharpit-0.5.0/tests/fixtures/sql_errors/asyncpg/multiline_literal.txt +175 -0
  535. sharpit-0.5.0/tests/fixtures/sql_errors/asyncpg/pg_context.txt +172 -0
  536. sharpit-0.5.0/tests/fixtures/sql_errors/asyncpg/pg_line_hint.txt +191 -0
  537. sharpit-0.5.0/tests/fixtures/sql_errors/asyncpg/raw_syntax.txt +25 -0
  538. sharpit-0.5.0/tests/fixtures/sql_errors/asyncpg/raw_unique.txt +45 -0
  539. sharpit-0.5.0/tests/fixtures/sql_errors/asyncpg/sql_marker_in_literal.txt +173 -0
  540. sharpit-0.5.0/tests/fixtures/sql_errors/asyncpg/sql_marker_in_param.txt +173 -0
  541. sharpit-0.5.0/tests/fixtures/sql_errors/asyncpg/syntax_inline_literal.txt +186 -0
  542. sharpit-0.5.0/tests/fixtures/sql_errors/asyncpg/syntax_mid_literal.txt +186 -0
  543. sharpit-0.5.0/tests/fixtures/sql_errors/asyncpg/unique_params.txt +173 -0
  544. sharpit-0.5.0/tests/fixtures/sql_errors/manifest.json +2794 -0
  545. sharpit-0.5.0/tests/fixtures/sql_errors/mysqlclient/bracket_block.txt +100 -0
  546. sharpit-0.5.0/tests/fixtures/sql_errors/mysqlclient/bracket_syntax.txt +98 -0
  547. sharpit-0.5.0/tests/fixtures/sql_errors/mysqlclient/closer_in_literal.txt +102 -0
  548. sharpit-0.5.0/tests/fixtures/sql_errors/mysqlclient/closer_in_param.txt +100 -0
  549. sharpit-0.5.0/tests/fixtures/sql_errors/mysqlclient/crlf.txt +106 -0
  550. sharpit-0.5.0/tests/fixtures/sql_errors/mysqlclient/engine_log.txt +128 -0
  551. sharpit-0.5.0/tests/fixtures/sql_errors/mysqlclient/engine_log_long.txt +124 -0
  552. sharpit-0.5.0/tests/fixtures/sql_errors/mysqlclient/hide_parameters.txt +100 -0
  553. sharpit-0.5.0/tests/fixtures/sql_errors/mysqlclient/long_params.txt +100 -0
  554. sharpit-0.5.0/tests/fixtures/sql_errors/mysqlclient/long_statement.txt +98 -0
  555. sharpit-0.5.0/tests/fixtures/sql_errors/mysqlclient/many_params.txt +130 -0
  556. sharpit-0.5.0/tests/fixtures/sql_errors/mysqlclient/multiline_literal.txt +102 -0
  557. sharpit-0.5.0/tests/fixtures/sql_errors/mysqlclient/mysql_no_backslash_literal.txt +100 -0
  558. sharpit-0.5.0/tests/fixtures/sql_errors/mysqlclient/mysql_no_backslash_param.txt +100 -0
  559. sharpit-0.5.0/tests/fixtures/sql_errors/mysqlclient/raw_syntax.txt +21 -0
  560. sharpit-0.5.0/tests/fixtures/sql_errors/mysqlclient/raw_unique.txt +21 -0
  561. sharpit-0.5.0/tests/fixtures/sql_errors/mysqlclient/sql_marker_in_literal.txt +100 -0
  562. sharpit-0.5.0/tests/fixtures/sql_errors/mysqlclient/sql_marker_in_param.txt +100 -0
  563. sharpit-0.5.0/tests/fixtures/sql_errors/mysqlclient/syntax_inline_literal.txt +98 -0
  564. sharpit-0.5.0/tests/fixtures/sql_errors/mysqlclient/syntax_mid_literal.txt +98 -0
  565. sharpit-0.5.0/tests/fixtures/sql_errors/mysqlclient/unique_params.txt +100 -0
  566. sharpit-0.5.0/tests/fixtures/sql_errors/psycopg/bracket_block.txt +92 -0
  567. sharpit-0.5.0/tests/fixtures/sql_errors/psycopg/bracket_syntax.txt +94 -0
  568. sharpit-0.5.0/tests/fixtures/sql_errors/psycopg/closer_in_literal.txt +94 -0
  569. sharpit-0.5.0/tests/fixtures/sql_errors/psycopg/closer_in_param.txt +96 -0
  570. sharpit-0.5.0/tests/fixtures/sql_errors/psycopg/crlf.txt +98 -0
  571. sharpit-0.5.0/tests/fixtures/sql_errors/psycopg/engine_log.txt +120 -0
  572. sharpit-0.5.0/tests/fixtures/sql_errors/psycopg/engine_log_long.txt +116 -0
  573. sharpit-0.5.0/tests/fixtures/sql_errors/psycopg/hide_parameters.txt +92 -0
  574. sharpit-0.5.0/tests/fixtures/sql_errors/psycopg/long_params.txt +92 -0
  575. sharpit-0.5.0/tests/fixtures/sql_errors/psycopg/long_statement.txt +94 -0
  576. sharpit-0.5.0/tests/fixtures/sql_errors/psycopg/many_params.txt +98 -0
  577. sharpit-0.5.0/tests/fixtures/sql_errors/psycopg/multiline_literal.txt +94 -0
  578. sharpit-0.5.0/tests/fixtures/sql_errors/psycopg/pg_context.txt +98 -0
  579. sharpit-0.5.0/tests/fixtures/sql_errors/psycopg/pg_line_hint.txt +102 -0
  580. sharpit-0.5.0/tests/fixtures/sql_errors/psycopg/raw_syntax.txt +19 -0
  581. sharpit-0.5.0/tests/fixtures/sql_errors/psycopg/raw_unique.txt +17 -0
  582. sharpit-0.5.0/tests/fixtures/sql_errors/psycopg/sql_marker_in_literal.txt +92 -0
  583. sharpit-0.5.0/tests/fixtures/sql_errors/psycopg/sql_marker_in_param.txt +92 -0
  584. sharpit-0.5.0/tests/fixtures/sql_errors/psycopg/syntax_inline_literal.txt +94 -0
  585. sharpit-0.5.0/tests/fixtures/sql_errors/psycopg/syntax_mid_literal.txt +94 -0
  586. sharpit-0.5.0/tests/fixtures/sql_errors/psycopg/unique_params.txt +92 -0
  587. sharpit-0.5.0/tests/fixtures/sql_errors/psycopg2/bracket_block.txt +92 -0
  588. sharpit-0.5.0/tests/fixtures/sql_errors/psycopg2/bracket_syntax.txt +94 -0
  589. sharpit-0.5.0/tests/fixtures/sql_errors/psycopg2/closer_in_literal.txt +94 -0
  590. sharpit-0.5.0/tests/fixtures/sql_errors/psycopg2/closer_in_param.txt +96 -0
  591. sharpit-0.5.0/tests/fixtures/sql_errors/psycopg2/crlf.txt +98 -0
  592. sharpit-0.5.0/tests/fixtures/sql_errors/psycopg2/engine_log.txt +120 -0
  593. sharpit-0.5.0/tests/fixtures/sql_errors/psycopg2/engine_log_long.txt +116 -0
  594. sharpit-0.5.0/tests/fixtures/sql_errors/psycopg2/hide_parameters.txt +92 -0
  595. sharpit-0.5.0/tests/fixtures/sql_errors/psycopg2/long_params.txt +92 -0
  596. sharpit-0.5.0/tests/fixtures/sql_errors/psycopg2/long_statement.txt +94 -0
  597. sharpit-0.5.0/tests/fixtures/sql_errors/psycopg2/many_params.txt +98 -0
  598. sharpit-0.5.0/tests/fixtures/sql_errors/psycopg2/multiline_literal.txt +94 -0
  599. sharpit-0.5.0/tests/fixtures/sql_errors/psycopg2/pg_context.txt +98 -0
  600. sharpit-0.5.0/tests/fixtures/sql_errors/psycopg2/pg_line_hint.txt +102 -0
  601. sharpit-0.5.0/tests/fixtures/sql_errors/psycopg2/raw_syntax.txt +18 -0
  602. sharpit-0.5.0/tests/fixtures/sql_errors/psycopg2/raw_unique.txt +16 -0
  603. sharpit-0.5.0/tests/fixtures/sql_errors/psycopg2/sql_marker_in_literal.txt +92 -0
  604. sharpit-0.5.0/tests/fixtures/sql_errors/psycopg2/sql_marker_in_param.txt +92 -0
  605. sharpit-0.5.0/tests/fixtures/sql_errors/psycopg2/syntax_inline_literal.txt +94 -0
  606. sharpit-0.5.0/tests/fixtures/sql_errors/psycopg2/syntax_mid_literal.txt +94 -0
  607. sharpit-0.5.0/tests/fixtures/sql_errors/psycopg2/unique_params.txt +92 -0
  608. sharpit-0.5.0/tests/fixtures/sql_errors/pymysql/bracket_block.txt +126 -0
  609. sharpit-0.5.0/tests/fixtures/sql_errors/pymysql/bracket_syntax.txt +124 -0
  610. sharpit-0.5.0/tests/fixtures/sql_errors/pymysql/closer_in_literal.txt +128 -0
  611. sharpit-0.5.0/tests/fixtures/sql_errors/pymysql/closer_in_param.txt +126 -0
  612. sharpit-0.5.0/tests/fixtures/sql_errors/pymysql/crlf.txt +132 -0
  613. sharpit-0.5.0/tests/fixtures/sql_errors/pymysql/engine_log.txt +154 -0
  614. sharpit-0.5.0/tests/fixtures/sql_errors/pymysql/engine_log_long.txt +150 -0
  615. sharpit-0.5.0/tests/fixtures/sql_errors/pymysql/hide_parameters.txt +126 -0
  616. sharpit-0.5.0/tests/fixtures/sql_errors/pymysql/long_params.txt +126 -0
  617. sharpit-0.5.0/tests/fixtures/sql_errors/pymysql/long_statement.txt +124 -0
  618. sharpit-0.5.0/tests/fixtures/sql_errors/pymysql/many_params.txt +156 -0
  619. sharpit-0.5.0/tests/fixtures/sql_errors/pymysql/multiline_literal.txt +128 -0
  620. sharpit-0.5.0/tests/fixtures/sql_errors/pymysql/mysql_no_backslash_literal.txt +126 -0
  621. sharpit-0.5.0/tests/fixtures/sql_errors/pymysql/mysql_no_backslash_param.txt +126 -0
  622. sharpit-0.5.0/tests/fixtures/sql_errors/pymysql/raw_syntax.txt +34 -0
  623. sharpit-0.5.0/tests/fixtures/sql_errors/pymysql/raw_unique.txt +34 -0
  624. sharpit-0.5.0/tests/fixtures/sql_errors/pymysql/sql_marker_in_literal.txt +126 -0
  625. sharpit-0.5.0/tests/fixtures/sql_errors/pymysql/sql_marker_in_param.txt +126 -0
  626. sharpit-0.5.0/tests/fixtures/sql_errors/pymysql/syntax_inline_literal.txt +124 -0
  627. sharpit-0.5.0/tests/fixtures/sql_errors/pymysql/syntax_mid_literal.txt +124 -0
  628. sharpit-0.5.0/tests/fixtures/sql_errors/pymysql/unique_params.txt +126 -0
  629. sharpit-0.5.0/tests/fixtures/sql_errors/sqlite3/bracket_block.txt +84 -0
  630. sharpit-0.5.0/tests/fixtures/sql_errors/sqlite3/bracket_syntax.txt +82 -0
  631. sharpit-0.5.0/tests/fixtures/sql_errors/sqlite3/closer_in_literal.txt +86 -0
  632. sharpit-0.5.0/tests/fixtures/sql_errors/sqlite3/closer_in_param.txt +84 -0
  633. sharpit-0.5.0/tests/fixtures/sql_errors/sqlite3/crlf.txt +90 -0
  634. sharpit-0.5.0/tests/fixtures/sql_errors/sqlite3/engine_log.txt +100 -0
  635. sharpit-0.5.0/tests/fixtures/sql_errors/sqlite3/engine_log_long.txt +96 -0
  636. sharpit-0.5.0/tests/fixtures/sql_errors/sqlite3/hide_parameters.txt +84 -0
  637. sharpit-0.5.0/tests/fixtures/sql_errors/sqlite3/long_params.txt +84 -0
  638. sharpit-0.5.0/tests/fixtures/sql_errors/sqlite3/long_statement.txt +82 -0
  639. sharpit-0.5.0/tests/fixtures/sql_errors/sqlite3/many_params.txt +90 -0
  640. sharpit-0.5.0/tests/fixtures/sql_errors/sqlite3/multiline_literal.txt +86 -0
  641. sharpit-0.5.0/tests/fixtures/sql_errors/sqlite3/raw_syntax.txt +13 -0
  642. sharpit-0.5.0/tests/fixtures/sql_errors/sqlite3/raw_unique.txt +13 -0
  643. sharpit-0.5.0/tests/fixtures/sql_errors/sqlite3/sql_marker_in_literal.txt +84 -0
  644. sharpit-0.5.0/tests/fixtures/sql_errors/sqlite3/sql_marker_in_param.txt +84 -0
  645. sharpit-0.5.0/tests/fixtures/sql_errors/sqlite3/syntax_inline_literal.txt +82 -0
  646. sharpit-0.5.0/tests/fixtures/sql_errors/sqlite3/syntax_mid_literal.txt +82 -0
  647. sharpit-0.5.0/tests/fixtures/sql_errors/sqlite3/unique_params.txt +84 -0
  648. sharpit-0.5.0/tests/golden.py +173 -0
  649. sharpit-0.5.0/tests/live/__init__.py +0 -0
  650. sharpit-0.5.0/tests/live/conftest.py +160 -0
  651. sharpit-0.5.0/tests/live/oracle.py +263 -0
  652. sharpit-0.5.0/tests/live/test_a10_examples.py +42 -0
  653. sharpit-0.5.0/tests/live/test_a_server_answers.py +18 -0
  654. sharpit-0.5.0/tests/live/test_server_oracle.py +289 -0
  655. sharpit-0.5.0/tests/masking/a10/__init__.py +1 -0
  656. sharpit-0.5.0/tests/masking/a10/conftest.py +121 -0
  657. sharpit-0.5.0/tests/masking/a10/test_collectors.py +201 -0
  658. sharpit-0.5.0/tests/masking/a10/test_exceptions.py +125 -0
  659. sharpit-0.5.0/tests/masking/a10/test_gate.py +363 -0
  660. sharpit-0.5.0/tests/masking/a10/test_orm.py +149 -0
  661. sharpit-0.5.0/tests/masking/a10/test_recorder.py +125 -0
  662. sharpit-0.5.0/tests/masking/a10/test_session.py +89 -0
  663. sharpit-0.5.0/tests/masking/a10/test_spans.py +114 -0
  664. sharpit-0.5.0/tests/masking/mutant_worker.py +63 -0
  665. sharpit-0.5.0/tests/masking/resolver_plants.py +331 -0
  666. sharpit-0.5.0/tests/masking/server_corpus/__init__.py +50 -0
  667. sharpit-0.5.0/tests/masking/server_corpus/rows.jsonl.gz +0 -0
  668. sharpit-0.5.0/tests/masking/sql_corpus.py +599 -0
  669. sharpit-0.5.0/tests/masking/test_a12_resolver.py +145 -0
  670. sharpit-0.5.0/tests/masking/test_a_database_advisor_masking.py +67 -0
  671. sharpit-0.5.0/tests/masking/test_a_mysql_masking.py +45 -0
  672. sharpit-0.5.0/tests/masking/test_a_mysql_querytext_masking.py +69 -0
  673. sharpit-0.5.0/tests/masking/test_a_postgresql_masking.py +89 -0
  674. sharpit-0.5.0/tests/masking/test_a_sqlalchemy_statistics_masking.py +45 -0
  675. sharpit-0.5.0/tests/masking/test_a_sqltrace_insights_masking.py +49 -0
  676. sharpit-0.5.0/tests/masking/test_a_traces_masking.py +62 -0
  677. sharpit-0.5.0/tests/masking/test_a_transactions_masking.py +15 -0
  678. sharpit-0.5.0/tests/masking/test_b_fastapi_security_masking.py +36 -0
  679. sharpit-0.5.0/tests/masking/test_b_security_logs_masking.py +70 -0
  680. sharpit-0.5.0/tests/masking/test_b_security_masking.py +87 -0
  681. sharpit-0.5.0/tests/masking/test_d1_masking.py +41 -0
  682. sharpit-0.5.0/tests/masking/test_d2_masking.py +26 -0
  683. sharpit-0.5.0/tests/masking/test_d3_masking.py +26 -0
  684. sharpit-0.5.0/tests/masking/test_d4_masking.py +56 -0
  685. sharpit-0.5.0/tests/masking/test_error_regions.py +950 -0
  686. sharpit-0.5.0/tests/masking/test_exposure_matrix.py +227 -0
  687. sharpit-0.5.0/tests/masking/test_gates_bite.py +968 -0
  688. sharpit-0.5.0/tests/masking/test_joined_tails.py +42 -0
  689. sharpit-0.5.0/tests/masking/test_key_never_output.py +166 -0
  690. sharpit-0.5.0/tests/masking/test_live_anchors.py +76 -0
  691. sharpit-0.5.0/tests/masking/test_malformed_statements.py +71 -0
  692. sharpit-0.5.0/tests/masking/test_mask_spans.py +262 -0
  693. sharpit-0.5.0/tests/masking/test_masking_gate_script.py +192 -0
  694. sharpit-0.5.0/tests/masking/test_masking_scales_linearly.py +241 -0
  695. sharpit-0.5.0/tests/masking/test_masking_superset_of_main.py +151 -0
  696. sharpit-0.5.0/tests/masking/test_metadata_only_statements.py +99 -0
  697. sharpit-0.5.0/tests/masking/test_properties.py +448 -0
  698. sharpit-0.5.0/tests/masking/test_scan_reads_raw.py +195 -0
  699. sharpit-0.5.0/tests/masking/test_scan_window_secrets.py +47 -0
  700. sharpit-0.5.0/tests/masking/test_serialized_reports.py +190 -0
  701. sharpit-0.5.0/tests/masking/test_server_corpus.py +72 -0
  702. sharpit-0.5.0/tests/masking/test_sql_error_fixtures.py +91 -0
  703. sharpit-0.5.0/tests/masking/test_sql_error_surfaces.py +253 -0
  704. sharpit-0.5.0/tests/masking/test_statement_review_rows.py +217 -0
  705. sharpit-0.5.0/tests/masking/test_statement_surfaces.py +838 -0
  706. sharpit-0.5.0/tests/masking/test_unsupported.py +249 -0
  707. sharpit-0.5.0/tests/masking/test_unsupported_identity.py +116 -0
  708. sharpit-0.5.0/tests/overhead.py +96 -0
  709. sharpit-0.5.0/tests/pytest_plugin/test_plugin_apps.py +295 -0
  710. sharpit-0.5.0/tests/pytest_plugin/test_plugin_bad_baseline.py +51 -0
  711. sharpit-0.5.0/tests/pytest_plugin/test_plugin_baseline.py +225 -0
  712. sharpit-0.5.0/tests/pytest_plugin/test_plugin_bench_pins.py +172 -0
  713. sharpit-0.5.0/tests/pytest_plugin/test_plugin_gate_defaults.py +318 -0
  714. sharpit-0.5.0/tests/pytest_plugin/test_plugin_gates.py +751 -0
  715. sharpit-0.5.0/tests/pytest_plugin/test_plugin_identity.py +172 -0
  716. sharpit-0.5.0/tests/pytest_plugin/test_plugin_inert.py +174 -0
  717. sharpit-0.5.0/tests/pytest_plugin/test_plugin_options.py +114 -0
  718. sharpit-0.5.0/tests/pytest_plugin/test_plugin_report_only.py +28 -0
  719. sharpit-0.5.0/tests/pytest_plugin/test_plugin_reports.py +152 -0
  720. sharpit-0.5.0/tests/pytest_plugin/test_plugin_swallowed.py +280 -0
  721. sharpit-0.5.0/tests/pytest_plugin/test_plugin_swallowed_bench.py +95 -0
  722. sharpit-0.5.0/tests/pytest_plugin/test_plugin_terminal.py +183 -0
  723. sharpit-0.5.0/tests/pytest_plugin/test_plugin_unbounded_read.py +215 -0
  724. sharpit-0.5.0/tests/pytest_plugin/test_plugin_xdist.py +265 -0
  725. sharpit-0.5.0/tests/pytest_plugin/test_subprocess_budget.py +32 -0
  726. sharpit-0.5.0/tests/safety/README.md +32 -0
  727. sharpit-0.5.0/tests/safety/__init__.py +211 -0
  728. sharpit-0.5.0/tests/safety/test_a_data_safety.py +52 -0
  729. sharpit-0.5.0/tests/safety/test_a_database_advisor_safety.py +80 -0
  730. sharpit-0.5.0/tests/safety/test_a_mysql_safety.py +34 -0
  731. sharpit-0.5.0/tests/safety/test_a_postgresql_safety.py +98 -0
  732. sharpit-0.5.0/tests/safety/test_a_sqlalchemy_statistics_safety.py +44 -0
  733. sharpit-0.5.0/tests/safety/test_a_sqltrace_insights_safety.py +37 -0
  734. sharpit-0.5.0/tests/safety/test_a_traces_safety.py +48 -0
  735. sharpit-0.5.0/tests/safety/test_a_transactions_safety.py +49 -0
  736. sharpit-0.5.0/tests/safety/test_b_fastapi_security_safety.py +58 -0
  737. sharpit-0.5.0/tests/safety/test_b_security_logs_safety.py +45 -0
  738. sharpit-0.5.0/tests/safety/test_b_security_safety.py +90 -0
  739. sharpit-0.5.0/tests/safety/test_c_architecture_safety.py +104 -0
  740. sharpit-0.5.0/tests/safety/test_c_fastapi_safety.py +42 -0
  741. sharpit-0.5.0/tests/safety/test_d1_safety.py +54 -0
  742. sharpit-0.5.0/tests/safety/test_d2_safety.py +59 -0
  743. sharpit-0.5.0/tests/safety/test_d3_safety.py +36 -0
  744. sharpit-0.5.0/tests/safety/test_d4_safety.py +40 -0
  745. sharpit-0.5.0/tests/shard_weights.json +648 -0
  746. sharpit-0.5.0/tests/state_files.py +10 -0
  747. sharpit-0.5.0/tests/surface.py +169 -0
  748. sharpit-0.5.0/tests/test_architecture_docs_table.py +24 -0
  749. sharpit-0.5.0/tests/test_ci_layout.py +113 -0
  750. sharpit-0.5.0/tests/test_conformance.py +315 -0
  751. sharpit-0.5.0/tests/test_database_advisor_docs_table.py +38 -0
  752. sharpit-0.5.0/tests/test_dogfood_sqla.py +112 -0
  753. sharpit-0.5.0/tests/test_example_app.py +70 -0
  754. sharpit-0.5.0/tests/test_fastapi_docs_table.py +26 -0
  755. sharpit-0.5.0/tests/test_foundation_capture_setup.py +39 -0
  756. sharpit-0.5.0/tests/test_foundation_extension_slots.py +214 -0
  757. sharpit-0.5.0/tests/test_foundation_review_fixes.py +38 -0
  758. sharpit-0.5.0/tests/test_foundation_round2.py +261 -0
  759. sharpit-0.5.0/tests/test_foundation_round3.py +52 -0
  760. sharpit-0.5.0/tests/test_foundation_runtime_types.py +36 -0
  761. sharpit-0.5.0/tests/test_foundation_split_compat.py +33 -0
  762. sharpit-0.5.0/tests/test_foundation_structure.py +106 -0
  763. sharpit-0.5.0/tests/test_foundation_suite_equivalence.py +40 -0
  764. sharpit-0.5.0/tests/test_golden.py +109 -0
  765. sharpit-0.5.0/tests/test_golden_shapes.py +60 -0
  766. sharpit-0.5.0/tests/test_live_server_scope.py +52 -0
  767. sharpit-0.5.0/tests/test_masking_corpus.py +703 -0
  768. sharpit-0.5.0/tests/test_no_secret_shaped_literals.py +42 -0
  769. sharpit-0.5.0/tests/test_overhead_harness.py +208 -0
  770. sharpit-0.5.0/tests/test_packaging.py +51 -0
  771. sharpit-0.5.0/tests/test_patch_targets.py +259 -0
  772. sharpit-0.5.0/tests/test_report_schema.py +75 -0
  773. sharpit-0.5.0/tests/test_report_summary.py +231 -0
  774. sharpit-0.5.0/tests/test_safety_lane_sweeps.py +227 -0
  775. sharpit-0.5.0/tests/test_safety_matrix.py +801 -0
  776. sharpit-0.5.0/tests/test_sanitize_golden.py +145 -0
  777. sharpit-0.5.0/tests/test_security_docs_table.py +98 -0
  778. sharpit-0.5.0/tests/test_settings.py +522 -0
  779. sharpit-0.5.0/tests/test_settings_05.py +77 -0
  780. sharpit-0.5.0/tests/test_shard.py +176 -0
  781. sharpit-0.5.0/tests/test_side_effect_guard.py +281 -0
  782. sharpit-0.5.0/tests/test_state_dir_isolation.py +17 -0
  783. sharpit-0.5.0/tests/test_surface_05.py +57 -0
  784. sharpit-0.5.0/tests/test_surface_follows_flags.py +87 -0
  785. sharpit-0.5.0/website/docs/index.md +24 -0
  786. sharpit-0.5.0/website/docs/installation.md +16 -0
  787. sharpit-0.5.0/website/docs/pytest-plugin.md +210 -0
  788. sharpit-0.5.0/website/docs/settings.md +78 -0
  789. sharpit-0.5.0/website/docs/stylesheets/sharpit.css +69 -0
  790. sharpit-0.5.0/website/docs/stylesheets/tokens.css +35 -0
  791. sharpit-0.5.0/website/mkdocs.yml +88 -0
  792. sharpit-0.3.0/.gitattributes +0 -1
  793. sharpit-0.3.0/CHANGELOG.md +0 -115
  794. sharpit-0.3.0/PKG-INFO +0 -169
  795. sharpit-0.3.0/README.md +0 -118
  796. sharpit-0.3.0/docs/README.md +0 -19
  797. sharpit-0.3.0/docs/development/overhead-budgets.md +0 -57
  798. sharpit-0.3.0/docs/development/workflow.md +0 -70
  799. sharpit-0.3.0/docs/reference/report.schema.json +0 -212
  800. sharpit-0.3.0/examples/fastapi_sqla/app.py +0 -228
  801. sharpit-0.3.0/pyproject.toml +0 -117
  802. sharpit-0.3.0/sonar-baseline.txt +0 -1
  803. sharpit-0.3.0/src/sharpit/__init__.py +0 -8
  804. sharpit-0.3.0/src/sharpit/engine/advisors/dismissals.py +0 -143
  805. sharpit-0.3.0/src/sharpit/engine/advisors/findings.py +0 -95
  806. sharpit-0.3.0/src/sharpit/engine/advisors/registry.py +0 -61
  807. sharpit-0.3.0/src/sharpit/engine/advisors/report.py +0 -88
  808. sharpit-0.3.0/src/sharpit/engine/advisors/rules.py +0 -70
  809. sharpit-0.3.0/src/sharpit/engine/capture/__init__.py +0 -52
  810. sharpit-0.3.0/src/sharpit/engine/capture/activity.py +0 -314
  811. sharpit-0.3.0/src/sharpit/engine/capture/correlation.py +0 -40
  812. sharpit-0.3.0/src/sharpit/engine/capture/exceptions.py +0 -374
  813. sharpit-0.3.0/src/sharpit/engine/capture/exchanges.py +0 -191
  814. sharpit-0.3.0/src/sharpit/engine/capture/logtail.py +0 -176
  815. sharpit-0.3.0/src/sharpit/engine/capture/sqltrace.py +0 -626
  816. sharpit-0.3.0/src/sharpit/engine/collectors/alembic.py +0 -429
  817. sharpit-0.3.0/src/sharpit/engine/collectors/config/__init__.py +0 -153
  818. sharpit-0.3.0/src/sharpit/engine/collectors/config/getenv_scan.py +0 -98
  819. sharpit-0.3.0/src/sharpit/engine/collectors/config/settings_source.py +0 -144
  820. sharpit-0.3.0/src/sharpit/engine/collectors/health.py +0 -257
  821. sharpit-0.3.0/src/sharpit/engine/collectors/overview.py +0 -40
  822. sharpit-0.3.0/src/sharpit/engine/collectors/pools.py +0 -83
  823. sharpit-0.3.0/src/sharpit/engine/collectors/restapi/report.py +0 -81
  824. sharpit-0.3.0/src/sharpit/engine/collectors/restapi/rules.py +0 -754
  825. sharpit-0.3.0/src/sharpit/engine/collectors/restapi/service.py +0 -177
  826. sharpit-0.3.0/src/sharpit/engine/collectors/threads.py +0 -210
  827. sharpit-0.3.0/src/sharpit/engine/collectors/vulns/interpreter.py +0 -391
  828. sharpit-0.3.0/src/sharpit/engine/collectors/vulns/service.py +0 -358
  829. sharpit-0.3.0/src/sharpit/engine/context.py +0 -62
  830. sharpit-0.3.0/src/sharpit/engine/guard.py +0 -403
  831. sharpit-0.3.0/src/sharpit/engine/masking.py +0 -257
  832. sharpit-0.3.0/src/sharpit/engine/mcp.py +0 -347
  833. sharpit-0.3.0/src/sharpit/engine/panels.py +0 -88
  834. sharpit-0.3.0/src/sharpit/engine/probe.py +0 -362
  835. sharpit-0.3.0/src/sharpit/engine/sources/dispatch.py +0 -185
  836. sharpit-0.3.0/src/sharpit/engine/sources/sqlite.py +0 -363
  837. sharpit-0.3.0/src/sharpit/engine/spi.py +0 -69
  838. sharpit-0.3.0/src/sharpit/engine/sqla.py +0 -424
  839. sharpit-0.3.0/src/sharpit/engine/testsession/facts.py +0 -178
  840. sharpit-0.3.0/src/sharpit/engine/testsession/finish.py +0 -64
  841. sharpit-0.3.0/src/sharpit/engine/testsession/gates.py +0 -56
  842. sharpit-0.3.0/src/sharpit/engine/testsession/outcome.py +0 -305
  843. sharpit-0.3.0/src/sharpit/engine/testsession/report.py +0 -170
  844. sharpit-0.3.0/src/sharpit/engine/testsession/report.schema.json +0 -212
  845. sharpit-0.3.0/src/sharpit/engine/testsession/sink.py +0 -272
  846. sharpit-0.3.0/src/sharpit/engine/tools.py +0 -800
  847. sharpit-0.3.0/src/sharpit/fastapi/adapter.py +0 -787
  848. sharpit-0.3.0/src/sharpit/fastapi/capture.py +0 -404
  849. sharpit-0.3.0/src/sharpit/fastapi/introspector.py +0 -346
  850. sharpit-0.3.0/src/sharpit/pytest_plugin/__init__.py +0 -737
  851. sharpit-0.3.0/src/sharpit/pytest_plugin/marker.py +0 -29
  852. sharpit-0.3.0/src/sharpit/pytest_plugin/options.py +0 -61
  853. sharpit-0.3.0/src/sharpit/settings.py +0 -381
  854. sharpit-0.3.0/src/sharpit/ui/static/assets/index-DuLAbl33.css +0 -1
  855. sharpit-0.3.0/src/sharpit/ui/static/assets/index-gWqsiz8t.js +0 -14
  856. sharpit-0.3.0/src/sharpit/ui/static/index.html +0 -14
  857. sharpit-0.3.0/tests/complexity_baseline.json +0 -17
  858. sharpit-0.3.0/tests/conftest.py +0 -281
  859. sharpit-0.3.0/tests/engine/advisors/test_advisor_report.py +0 -83
  860. sharpit-0.3.0/tests/engine/advisors/test_advisor_rules.py +0 -55
  861. sharpit-0.3.0/tests/engine/advisors/test_dismissals.py +0 -286
  862. sharpit-0.3.0/tests/engine/advisors/test_findings.py +0 -124
  863. sharpit-0.3.0/tests/engine/advisors/test_registry.py +0 -84
  864. sharpit-0.3.0/tests/engine/capture/test_activity.py +0 -402
  865. sharpit-0.3.0/tests/engine/capture/test_exceptions.py +0 -565
  866. sharpit-0.3.0/tests/engine/capture/test_exchanges.py +0 -218
  867. sharpit-0.3.0/tests/engine/capture/test_logtail.py +0 -267
  868. sharpit-0.3.0/tests/engine/capture/test_sqltrace.py +0 -579
  869. sharpit-0.3.0/tests/engine/config/test_config_report.py +0 -421
  870. sharpit-0.3.0/tests/engine/config/test_getenv_scan.py +0 -64
  871. sharpit-0.3.0/tests/engine/restapi/test_restapi_findings.py +0 -354
  872. sharpit-0.3.0/tests/engine/restapi/test_restapi_registry.py +0 -103
  873. sharpit-0.3.0/tests/engine/restapi/test_restapi_report.py +0 -247
  874. sharpit-0.3.0/tests/engine/restapi/test_restapi_rules.py +0 -203
  875. sharpit-0.3.0/tests/engine/test_alembic.py +0 -191
  876. sharpit-0.3.0/tests/engine/test_dispatch.py +0 -207
  877. sharpit-0.3.0/tests/engine/test_guard.py +0 -982
  878. sharpit-0.3.0/tests/engine/test_headers.py +0 -31
  879. sharpit-0.3.0/tests/engine/test_health.py +0 -354
  880. sharpit-0.3.0/tests/engine/test_import_boundary.py +0 -163
  881. sharpit-0.3.0/tests/engine/test_masking.py +0 -350
  882. sharpit-0.3.0/tests/engine/test_mcp.py +0 -414
  883. sharpit-0.3.0/tests/engine/test_overview.py +0 -80
  884. sharpit-0.3.0/tests/engine/test_panels.py +0 -84
  885. sharpit-0.3.0/tests/engine/test_pools.py +0 -144
  886. sharpit-0.3.0/tests/engine/test_sqla.py +0 -405
  887. sharpit-0.3.0/tests/engine/test_sqlite_source.py +0 -400
  888. sharpit-0.3.0/tests/engine/test_threads.py +0 -418
  889. sharpit-0.3.0/tests/engine/test_tools.py +0 -490
  890. sharpit-0.3.0/tests/engine/testsession/test_gates.py +0 -142
  891. sharpit-0.3.0/tests/engine/testsession/test_outcome.py +0 -256
  892. sharpit-0.3.0/tests/engine/testsession/test_report.py +0 -396
  893. sharpit-0.3.0/tests/engine/testsession/test_sink.py +0 -463
  894. sharpit-0.3.0/tests/engine/testsession/tsfakes.py +0 -100
  895. sharpit-0.3.0/tests/engine/vulns/test_interpreter.py +0 -638
  896. sharpit-0.3.0/tests/engine/vulns/test_service.py +0 -499
  897. sharpit-0.3.0/tests/fastapi/test_activity_api.py +0 -184
  898. sharpit-0.3.0/tests/fastapi/test_alembic_api.py +0 -191
  899. sharpit-0.3.0/tests/fastapi/test_capture_hooks.py +0 -81
  900. sharpit-0.3.0/tests/fastapi/test_capture_overhead.py +0 -80
  901. sharpit-0.3.0/tests/fastapi/test_capture_wiring.py +0 -491
  902. sharpit-0.3.0/tests/fastapi/test_change_streams.py +0 -132
  903. sharpit-0.3.0/tests/fastapi/test_cli_api.py +0 -205
  904. sharpit-0.3.0/tests/fastapi/test_dismissed_rules_api.py +0 -122
  905. sharpit-0.3.0/tests/fastapi/test_exceptions_api.py +0 -489
  906. sharpit-0.3.0/tests/fastapi/test_health_api.py +0 -68
  907. sharpit-0.3.0/tests/fastapi/test_http_exchanges_api.py +0 -85
  908. sharpit-0.3.0/tests/fastapi/test_http_probe_api.py +0 -644
  909. sharpit-0.3.0/tests/fastapi/test_install.py +0 -480
  910. sharpit-0.3.0/tests/fastapi/test_introspector_providers.py +0 -266
  911. sharpit-0.3.0/tests/fastapi/test_introspector_routes.py +0 -214
  912. sharpit-0.3.0/tests/fastapi/test_log_tail_api.py +0 -406
  913. sharpit-0.3.0/tests/fastapi/test_loggers_api.py +0 -121
  914. sharpit-0.3.0/tests/fastapi/test_mcp_api.py +0 -184
  915. sharpit-0.3.0/tests/fastapi/test_pools_api.py +0 -49
  916. sharpit-0.3.0/tests/fastapi/test_sql_trace_api.py +0 -390
  917. sharpit-0.3.0/tests/fastapi/test_sql_trace_overhead.py +0 -66
  918. sharpit-0.3.0/tests/fastapi/test_sqla_absent.py +0 -167
  919. sharpit-0.3.0/tests/fastapi/test_vulns_api.py +0 -202
  920. sharpit-0.3.0/tests/fixtures/restapi/rest_api_check_ids.txt +0 -58
  921. sharpit-0.3.0/tests/overhead.py +0 -80
  922. sharpit-0.3.0/tests/pytest_plugin/test_plugin_apps.py +0 -111
  923. sharpit-0.3.0/tests/pytest_plugin/test_plugin_gates.py +0 -485
  924. sharpit-0.3.0/tests/pytest_plugin/test_plugin_inert.py +0 -169
  925. sharpit-0.3.0/tests/pytest_plugin/test_plugin_options.py +0 -98
  926. sharpit-0.3.0/tests/pytest_plugin/test_plugin_reports.py +0 -119
  927. sharpit-0.3.0/tests/pytest_plugin/test_plugin_xdist.py +0 -207
  928. sharpit-0.3.0/tests/test_conformance.py +0 -152
  929. sharpit-0.3.0/tests/test_dogfood_sqla.py +0 -112
  930. sharpit-0.3.0/tests/test_example_app.py +0 -41
  931. sharpit-0.3.0/tests/test_masking_corpus.py +0 -680
  932. sharpit-0.3.0/tests/test_overhead_harness.py +0 -121
  933. sharpit-0.3.0/tests/test_packaging.py +0 -47
  934. sharpit-0.3.0/tests/test_report_schema.py +0 -61
  935. sharpit-0.3.0/tests/test_safety_matrix.py +0 -692
  936. sharpit-0.3.0/tests/test_sanitize_golden.py +0 -16
  937. sharpit-0.3.0/tests/test_settings.py +0 -479
  938. sharpit-0.3.0/website/docs/index.md +0 -24
  939. sharpit-0.3.0/website/docs/installation.md +0 -16
  940. sharpit-0.3.0/website/docs/pytest-plugin.md +0 -203
  941. sharpit-0.3.0/website/docs/settings.md +0 -77
  942. sharpit-0.3.0/website/mkdocs.yml +0 -85
  943. {sharpit-0.3.0 → sharpit-0.5.0}/.gitignore +0 -0
  944. {sharpit-0.3.0 → sharpit-0.5.0}/LICENSE +0 -0
  945. {sharpit-0.3.0 → sharpit-0.5.0}/NOTICE +0 -0
  946. {sharpit-0.3.0 → sharpit-0.5.0}/docs/reference/BOOTUI-CONTRACT-MVP.md +0 -0
  947. {sharpit-0.3.0 → sharpit-0.5.0}/docs/reference/BOOTUI-PYTHON-MAPPING.md +0 -0
  948. {sharpit-0.3.0 → sharpit-0.5.0}/docs/reports/2026-10-31-dogfood-klipermedia.md +0 -0
  949. {sharpit-0.3.0 → sharpit-0.5.0}/docs/reports/2026-10-31-mvp-retrospective.md +0 -0
  950. {sharpit-0.3.0 → sharpit-0.5.0}/docs/reports/2026-10-31-mvp-summary.md +0 -0
  951. {sharpit-0.3.0 → sharpit-0.5.0}/docs/reports/2026-11-01-gflow-cli-sharpit.md +0 -0
  952. {sharpit-0.3.0 → sharpit-0.5.0}/examples/fastapi_sample/app.py +0 -0
  953. {sharpit-0.3.0 → sharpit-0.5.0}/examples/fastapi_sample/static/hello.txt +0 -0
  954. {sharpit-0.3.0 → sharpit-0.5.0}/examples/fastapi_sqla/__init__.py +0 -0
  955. {sharpit-0.3.0 → sharpit-0.5.0}/examples/fastapi_sqla/alembic.ini +0 -0
  956. {sharpit-0.3.0 → sharpit-0.5.0}/examples/fastapi_sqla/migrations/env.py +0 -0
  957. {sharpit-0.3.0 → sharpit-0.5.0}/examples/fastapi_sqla/migrations/script.py.mako +0 -0
  958. {sharpit-0.3.0 → sharpit-0.5.0}/examples/fastapi_sqla/migrations/versions/0001_owners.py +0 -0
  959. {sharpit-0.3.0 → sharpit-0.5.0}/examples/fastapi_sqla/migrations/versions/0002_pets.py +0 -0
  960. {sharpit-0.3.0 → sharpit-0.5.0}/examples/fastapi_sqla/migrations/versions/0003_visits.py +0 -0
  961. {sharpit-0.3.0 → sharpit-0.5.0}/examples/fastapi_sqla/tests_gate/conftest.py +0 -0
  962. {sharpit-0.3.0 → sharpit-0.5.0}/examples/fastapi_sqla/tests_gate/test_owners_gate.py +0 -0
  963. {sharpit-0.3.0 → sharpit-0.5.0}/sonar-project.properties +0 -0
  964. {sharpit-0.3.0 → sharpit-0.5.0}/src/sharpit/engine/__init__.py +0 -0
  965. {sharpit-0.3.0 → sharpit-0.5.0}/src/sharpit/engine/activation.py +0 -0
  966. {sharpit-0.3.0 → sharpit-0.5.0}/src/sharpit/engine/advisors/__init__.py +0 -0
  967. {sharpit-0.3.0 → sharpit-0.5.0}/src/sharpit/engine/advisors/retention.py +0 -0
  968. {sharpit-0.3.0 → sharpit-0.5.0}/src/sharpit/engine/capture/frames.py +0 -0
  969. {sharpit-0.3.0 → sharpit-0.5.0}/src/sharpit/engine/capture/streams.py +0 -0
  970. {sharpit-0.3.0 → sharpit-0.5.0}/src/sharpit/engine/collectors/__init__.py +0 -0
  971. {sharpit-0.3.0 → sharpit-0.5.0}/src/sharpit/engine/collectors/beans.py +0 -0
  972. {sharpit-0.3.0 → sharpit-0.5.0}/src/sharpit/engine/collectors/loggers.py +0 -0
  973. {sharpit-0.3.0 → sharpit-0.5.0}/src/sharpit/engine/collectors/mappings.py +0 -0
  974. {sharpit-0.3.0 → sharpit-0.5.0}/src/sharpit/engine/collectors/restapi/__init__.py +0 -0
  975. {sharpit-0.3.0 → sharpit-0.5.0}/src/sharpit/engine/collectors/vulns/__init__.py +0 -0
  976. {sharpit-0.3.0 → sharpit-0.5.0}/src/sharpit/engine/collectors/vulns/cvss.py +0 -0
  977. {sharpit-0.3.0 → sharpit-0.5.0}/src/sharpit/engine/collectors/vulns/epss.py +0 -0
  978. {sharpit-0.3.0 → sharpit-0.5.0}/src/sharpit/engine/collectors/vulns/inventory.py +0 -0
  979. {sharpit-0.3.0 → sharpit-0.5.0}/src/sharpit/engine/collectors/vulns/osv.py +0 -0
  980. {sharpit-0.3.0 → sharpit-0.5.0}/src/sharpit/engine/daemon_executor.py +0 -0
  981. {sharpit-0.3.0 → sharpit-0.5.0}/src/sharpit/engine/headers.py +0 -0
  982. {sharpit-0.3.0 → sharpit-0.5.0}/src/sharpit/engine/paging.py +0 -0
  983. {sharpit-0.3.0 → sharpit-0.5.0}/src/sharpit/engine/relaxed.py +0 -0
  984. {sharpit-0.3.0 → sharpit-0.5.0}/src/sharpit/engine/singleflight.py +0 -0
  985. {sharpit-0.3.0 → sharpit-0.5.0}/src/sharpit/engine/sources/__init__.py +0 -0
  986. {sharpit-0.3.0 → sharpit-0.5.0}/src/sharpit/engine/testsession/__init__.py +0 -0
  987. {sharpit-0.3.0 → sharpit-0.5.0}/src/sharpit/engine/testsession/filters.py +0 -0
  988. {sharpit-0.3.0 → sharpit-0.5.0}/src/sharpit/fastapi/__init__.py +0 -0
  989. {sharpit-0.3.0 → sharpit-0.5.0}/src/sharpit/fastapi/http.py +0 -0
  990. {sharpit-0.3.0 → sharpit-0.5.0}/src/sharpit/fastapi/signals.py +0 -0
  991. {sharpit-0.3.0 → sharpit-0.5.0}/src/sharpit/fastapi/sources.py +0 -0
  992. {sharpit-0.3.0 → sharpit-0.5.0}/src/sharpit/fastapi/sse.py +0 -0
  993. {sharpit-0.3.0 → sharpit-0.5.0}/src/sharpit/py.typed +0 -0
  994. {sharpit-0.3.0 → sharpit-0.5.0}/tests/engine/advisors/test_retention.py +0 -0
  995. {sharpit-0.3.0 → sharpit-0.5.0}/tests/engine/capture/test_correlation.py +0 -0
  996. {sharpit-0.3.0 → sharpit-0.5.0}/tests/engine/capture/test_streams.py +0 -0
  997. {sharpit-0.3.0/tests/fixtures/getenv_corpus/pkg → sharpit-0.5.0/tests/engine/collectors/architecture}/__init__.py +0 -0
  998. {sharpit-0.3.0 → sharpit-0.5.0}/tests/engine/config/test_settings_source.py +0 -0
  999. {sharpit-0.3.0 → sharpit-0.5.0}/tests/engine/test_activation.py +0 -0
  1000. {sharpit-0.3.0 → sharpit-0.5.0}/tests/engine/test_beans.py +0 -0
  1001. {sharpit-0.3.0 → sharpit-0.5.0}/tests/engine/test_context.py +0 -0
  1002. {sharpit-0.3.0 → sharpit-0.5.0}/tests/engine/test_loggers.py +0 -0
  1003. {sharpit-0.3.0 → sharpit-0.5.0}/tests/engine/test_mappings.py +0 -0
  1004. {sharpit-0.3.0 → sharpit-0.5.0}/tests/engine/test_paging.py +0 -0
  1005. {sharpit-0.3.0 → sharpit-0.5.0}/tests/engine/test_probe.py +0 -0
  1006. {sharpit-0.3.0 → sharpit-0.5.0}/tests/engine/test_relaxed.py +0 -0
  1007. {sharpit-0.3.0 → sharpit-0.5.0}/tests/engine/test_singleflight.py +0 -0
  1008. {sharpit-0.3.0 → sharpit-0.5.0}/tests/engine/test_sqlite_overhead.py +0 -0
  1009. {sharpit-0.3.0 → sharpit-0.5.0}/tests/engine/testsession/test_filters.py +0 -0
  1010. {sharpit-0.3.0 → sharpit-0.5.0}/tests/engine/testsession/test_finish.py +0 -0
  1011. {sharpit-0.3.0 → sharpit-0.5.0}/tests/engine/vulns/test_cvss.py +0 -0
  1012. {sharpit-0.3.0 → sharpit-0.5.0}/tests/engine/vulns/test_epss.py +0 -0
  1013. {sharpit-0.3.0 → sharpit-0.5.0}/tests/engine/vulns/test_inventory.py +0 -0
  1014. {sharpit-0.3.0 → sharpit-0.5.0}/tests/engine/vulns/test_osv.py +0 -0
  1015. {sharpit-0.3.0 → sharpit-0.5.0}/tests/engine/vulns/vulnfakes.py +0 -0
  1016. {sharpit-0.3.0 → sharpit-0.5.0}/tests/fastapi/test_concurrency.py +0 -0
  1017. {sharpit-0.3.0 → sharpit-0.5.0}/tests/fastapi/test_panel_availability.py +0 -0
  1018. {sharpit-0.3.0 → sharpit-0.5.0}/tests/fastapi/test_rest_api_api.py +0 -0
  1019. {sharpit-0.3.0 → sharpit-0.5.0}/tests/fastapi/test_signals.py +0 -0
  1020. {sharpit-0.3.0 → sharpit-0.5.0}/tests/fastapi/test_sqlite_console.py +0 -0
  1021. {sharpit-0.3.0 → sharpit-0.5.0}/tests/fastapi/test_stream_lifetime.py +0 -0
  1022. {sharpit-0.3.0 → sharpit-0.5.0}/tests/fastapi/test_threads_api.py +0 -0
  1023. {sharpit-0.3.0 → sharpit-0.5.0}/tests/fixtures/alembic/branch_merge/alembic.ini +0 -0
  1024. {sharpit-0.3.0 → sharpit-0.5.0}/tests/fixtures/alembic/branch_merge/migrations/versions/base.py +0 -0
  1025. {sharpit-0.3.0 → sharpit-0.5.0}/tests/fixtures/alembic/branch_merge/migrations/versions/left.py +0 -0
  1026. {sharpit-0.3.0 → sharpit-0.5.0}/tests/fixtures/alembic/branch_merge/migrations/versions/merge.py +0 -0
  1027. {sharpit-0.3.0 → sharpit-0.5.0}/tests/fixtures/alembic/branch_merge/migrations/versions/right.py +0 -0
  1028. {sharpit-0.3.0 → sharpit-0.5.0}/tests/fixtures/alembic/branch_merge/migrations/versions/side.py +0 -0
  1029. {sharpit-0.3.0 → sharpit-0.5.0}/tests/fixtures/alembic/branch_merge/migrations/versions/tip.py +0 -0
  1030. {sharpit-0.3.0 → sharpit-0.5.0}/tests/fixtures/alembic/broken/alembic.ini +0 -0
  1031. {sharpit-0.3.0 → sharpit-0.5.0}/tests/fixtures/alembic/broken/migrations/versions/not_a_revision.py +0 -0
  1032. {sharpit-0.3.0 → sharpit-0.5.0}/tests/fixtures/alembic/broken/migrations/versions/ok1_fine.py +0 -0
  1033. {sharpit-0.3.0 → sharpit-0.5.0}/tests/fixtures/alembic/linear/alembic.ini +0 -0
  1034. {sharpit-0.3.0 → sharpit-0.5.0}/tests/fixtures/alembic/linear/migrations/env.py +0 -0
  1035. {sharpit-0.3.0 → sharpit-0.5.0}/tests/fixtures/alembic/linear/migrations/versions/a1_create_owners.py +0 -0
  1036. {sharpit-0.3.0 → sharpit-0.5.0}/tests/fixtures/alembic/linear/migrations/versions/b2_add_pets.py +0 -0
  1037. {sharpit-0.3.0 → sharpit-0.5.0}/tests/fixtures/alembic/linear/migrations/versions/c3_add_visits.py +0 -0
  1038. {sharpit-0.3.0 → sharpit-0.5.0}/tests/fixtures/alembic/modern_template/alembic.ini +0 -0
  1039. {sharpit-0.3.0 → sharpit-0.5.0}/tests/fixtures/alembic/modern_template/migrations/versions/1f2e3d4c5b6a_initial.py +0 -0
  1040. {sharpit-0.3.0 → sharpit-0.5.0}/tests/fixtures/alembic/modern_template/migrations/versions/9a8b7c6d5e4f_add_index.py +0 -0
  1041. {sharpit-0.3.0 → sharpit-0.5.0}/tests/fixtures/alembic/package_dir/alembic.ini +0 -0
  1042. {sharpit-0.3.0 → sharpit-0.5.0}/tests/fixtures/alembic/package_dir/sharpit_alembic_fixture_pkg/__init__.py +0 -0
  1043. {sharpit-0.3.0 → sharpit-0.5.0}/tests/fixtures/alembic/package_dir/sharpit_alembic_fixture_pkg/migrations/versions/p1_first.py +0 -0
  1044. {sharpit-0.3.0 → sharpit-0.5.0}/tests/fixtures/bootui/beans.json +0 -0
  1045. {sharpit-0.3.0 → sharpit-0.5.0}/tests/fixtures/bootui/config.json +0 -0
  1046. {sharpit-0.3.0 → sharpit-0.5.0}/tests/fixtures/bootui/health.json +0 -0
  1047. {sharpit-0.3.0 → sharpit-0.5.0}/tests/fixtures/bootui/loggers.json +0 -0
  1048. {sharpit-0.3.0 → sharpit-0.5.0}/tests/fixtures/bootui/mappings.json +0 -0
  1049. {sharpit-0.3.0 → sharpit-0.5.0}/tests/fixtures/bootui/meta.json +0 -0
  1050. {sharpit-0.3.0 → sharpit-0.5.0}/tests/fixtures/bootui/overview.json +0 -0
  1051. {sharpit-0.3.0 → sharpit-0.5.0}/tests/fixtures/bootui/panels.json +0 -0
  1052. {sharpit-0.3.0 → sharpit-0.5.0}/tests/fixtures/bootui/vulnerabilities.json +0 -0
  1053. {sharpit-0.3.0 → sharpit-0.5.0}/tests/fixtures/bootui_tools_0_2_0.json +0 -0
  1054. {sharpit-0.3.0 → sharpit-0.5.0}/tests/fixtures/epss/CVE-2024-34064.json +0 -0
  1055. {sharpit-0.3.0 → sharpit-0.5.0}/tests/fixtures/getenv_corpus/pkg/forms.py +0 -0
  1056. {sharpit-0.3.0 → sharpit-0.5.0}/tests/fixtures/osv/GHSA-h75v-3vvj-5mfj.json +0 -0
  1057. {sharpit-0.3.0 → sharpit-0.5.0}/tests/fixtures/osv/PYSEC-2017-9999.json +0 -0
  1058. {sharpit-0.3.0 → sharpit-0.5.0}/tests/fixtures/osv/querybatch.json +0 -0
  1059. {sharpit-0.3.0 → sharpit-0.5.0}/tests/pytest_plugin/test_plugin_attribution.py +0 -0
  1060. {sharpit-0.3.0 → sharpit-0.5.0}/tests/pytest_plugin/test_plugin_facts.py +0 -0
  1061. {sharpit-0.3.0 → sharpit-0.5.0}/tests/pytest_plugin/test_plugin_marker.py +0 -0
  1062. {sharpit-0.3.0 → sharpit-0.5.0}/tests/pytest_speed_exceptions.json +0 -0
  1063. {sharpit-0.3.0 → sharpit-0.5.0}/tests/test_code_shape.py +0 -0
  1064. {sharpit-0.3.0 → sharpit-0.5.0}/tests/test_context_isolation.py +0 -0
  1065. {sharpit-0.3.0 → sharpit-0.5.0}/tests/test_durations.json +0 -0
  1066. {sharpit-0.3.0 → sharpit-0.5.0}/tests/test_durations.meta.json +0 -0
  1067. {sharpit-0.3.0 → sharpit-0.5.0}/tests/test_example_gate.py +0 -0
  1068. {sharpit-0.3.0 → sharpit-0.5.0}/tests/test_fixtures.py +0 -0
  1069. {sharpit-0.3.0 → sharpit-0.5.0}/tests/test_overhead_check.py +0 -0
  1070. {sharpit-0.3.0 → sharpit-0.5.0}/tests/test_pytest_speed_check.py +0 -0
  1071. {sharpit-0.3.0 → sharpit-0.5.0}/tests/test_release_workflow.py +0 -0
  1072. {sharpit-0.3.0 → sharpit-0.5.0}/tests/test_sonar_ratchet.py +0 -0
  1073. {sharpit-0.3.0 → sharpit-0.5.0}/tests/test_sqla_sample_smoke.py +0 -0
  1074. {sharpit-0.3.0 → sharpit-0.5.0}/website/docs/activation.md +0 -0
  1075. {sharpit-0.3.0 → sharpit-0.5.0}/website/docs/deviations.md +0 -0
  1076. {sharpit-0.3.0 → sharpit-0.5.0}/website/docs/how-it-works.md +0 -0
  1077. {sharpit-0.3.0 → sharpit-0.5.0}/website/docs/mcp.md +0 -0
  1078. {sharpit-0.3.0 → sharpit-0.5.0}/website/docs/panels.md +0 -0
  1079. {sharpit-0.3.0 → sharpit-0.5.0}/website/docs/quickstart.md +0 -0
  1080. {sharpit-0.3.0 → sharpit-0.5.0}/website/docs/report.md +0 -0
  1081. {sharpit-0.3.0 → sharpit-0.5.0}/website/docs/safety.md +0 -0
  1082. {sharpit-0.3.0 → sharpit-0.5.0}/website/docs/sql-sources.md +0 -0
  1083. {sharpit-0.3.0 → sharpit-0.5.0}/website/requirements.in +0 -0
  1084. {sharpit-0.3.0 → sharpit-0.5.0}/website/requirements.txt +0 -0
@@ -0,0 +1,4 @@
1
+ * text=auto eol=lf
2
+
3
+ # SQL error fixtures are driver output: keep CRLF and lone CR exactly as captured.
4
+ tests/fixtures/sql_errors/** -text
@@ -0,0 +1,251 @@
1
+ # Changelog
2
+
3
+ All notable changes to sharpit are documented here. The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/)
4
+ and the project uses [Semantic Versioning](https://semver.org/).
5
+
6
+ ## [Unreleased]
7
+
8
+ ## [0.5.0] - 2026-11-08
9
+
10
+ ### Added
11
+
12
+ - `transactions` panel: SQLAlchemy transactions per request (status, duration, savepoint depth, connection hold time) in a bounded ring, with slow-transaction and connection-hold thresholds; error messages masked; MCP read tool. Settings `transactions_*`.
13
+ - `mysql` panel: MySQL and MariaDB vital signs, sessions, statements, indexes, tables, lock waits, replication and settings, read on an explicit `POST {api}/mysql/read` through a verified read-only session with statement and lock timeouts and row limits; statement text normalised, masked and truncated at 400 characters. Settings `mysql_max_*`. `asyncmy` and `mysqlclient` are untested.
14
+ - `security-logs` panel: 401 and 403 responses recorded as `AUTHENTICATION_FAILURE` / `AUTHORIZATION_FAILURE`, filterable by principal, type and time, with a stream and MCP `get_security_logs`. Needs the capture middleware.
15
+ - `sharpit.record_security_event(type, principal=None, data=None)`: records an audit event (for example `AUTHENTICATION_SUCCESS`) for the current request. It never raises and does nothing outside a request, with sharpit inactive or with the panel disabled.
16
+ - `fastapi-security` panel (BootUI's `spring-security`): routes, their security dependencies and scopes, and an explain view for a path.
17
+ - `security` advisor: 27 rules (21 ported, 6 sharpit-only) over CORS, trusted hosts, auth dependencies, configuration and source literals; the catalogue and the 33 dropped BootUI rules with reasons are in `docs/security-advisor-checks.md`.
18
+ - `database-advisor`: 33 checks over the bounded schema catalog, SQLAlchemy engine and pool settings, mapped models (`install(models=...)`), the SQL Trace window and PostgreSQL/MySQL vendor catalogs; read in one read-only transaction; the 15 dropped BootUI checks are listed with reasons in `docs/database-advisor-checks.md`. Settings `database_advisor_max_*`.
19
+ - `architecture` advisor: 20 `ARCH-*` rules over the application's import graph (package cycles, module isolation, layering, coding practices, `pyproject.toml` import-linter contracts). Settings `architecture_max_files`, `architecture_max_file_bytes`.
20
+ - `fastapi` advisor (BootUI's `spring`): 10 rules over route handlers and the app (blocking calls in async handlers, background tasks, Pydantic models, response models, events, exception handlers); catalogue in `docs/fastapi-advisor-checks.md`.
21
+ - Each advisor scans on `POST {api}/<advisor>/scan` or through the HTTP CLI tool (`POST {api}/cli/tools/<advisor>_scan`, with `-` as `_`; sharpit ships no console script); `GET` returns the last scan, violations page per rule; MCP tools are read-only.
22
+ - SQL Trace insights: `GET {api}/sql-trace/insights`, statement rankings and per-route attribution (top 20 routes, by masked path, joined on the request id); MCP `get_sql_trace_insights` and CLI `sql-trace insights` (sharpit-only). With HTTP exchange capture off, route attribution is unavailable and the rankings stay.
23
+ - `install(app_package=...)` (env `SHARPIT_APP_PACKAGE`): the dotted package the advisors and config scan read, resolved through `sys.modules` only, never imported. Source reads go through one bounded index (file count, size and time limits, no symlinks followed).
24
+ - `sharpit.unbounded-read` gate: during a test, an ORM read that loads at least twice the bound page size in a request to an endpoint with paging parameters is a finding; marker `@pytest.mark.sharpit(allow_unbounded_read=True)` relaxes it. Needs `sharpit.install`.
25
+ - BootUI 2.2.0 capture drift: `http-exchanges` rows carry `route`, `routeSource` (`FRAMEWORK_TEMPLATE` or `MASKED_PATH`) and `requestId`, the report carries `retention`, `GET {api}/http-exchanges?route=` filters by route and `GET {api}/http-exchanges/routes` rolls up per-route counts, errors and p50/p95/p99 (MCP `get_http_routes`, CLI `http routes`); `sql-trace` entries carry `durationMicros`, `requestId`, `executionId`, `threadKind` and `requestPhase` (the last three null) and the report `retention`; `exceptions` groups carry `lastRequestId` and `lastExecutionId` (null); `log-tail` lines carry `messageOmitted`; `GET {api}/exceptions/caught` answers `available: false` (sharpit has no caught-exception sensor); `activity` gains the 2.2.0 profile keys, entry `badges` (empty) and `exceptionGroupId`, the KPIs `latencySampleCount` and `slowestEndpointRoute`, `slowestEndpointRouteId`, `slowestEndpointRouteSource`, `GET {api}/activity/journal` and `GET {api}/activity/resources` (both report unavailable: sharpit keeps no runtime journal and samples no memory or CPU) and MCP `get_request_profile` (CLI `activity profile`); `get_live_activity`, `get_sql_traces` and `get_log_tail` take a query and a limit. Memory keys, the journal clear route and compacted default limits for these tools are not built.
26
+ - BootUI 2.2.0 drift for `vulnerabilities`, `mcp-server` and `rest-api`: the vulnerabilities report and its dependencies carry `runtimeReach`, `advisorySymbols` and `advisorySymbolSource` (reported unavailable, empty and `NONE`), and `get_vulnerabilities_report` returns a compacted view (default limit 10); the `mcp-server` status lists protocol `2026-07-28` ahead of `2025-06-18` and gains `cancellations` (counts `notifications/cancelled`; calls are synchronous, so a cancel cannot stop one) and `progressDropped` (always 0, sharpit sends no progress notifications); the `rest-api` advisor ports `RAPI-RESP-011` (a GET whose declared response is `X | None` with the default status) and does not port `RAPI-RESP-010`, `RAPI-VALID-006` and `RAPI-VER-007`: the reasons are in the rule registry, and no report or panel lists them. CVSS v4.0 score selection and `sampleLocations` are not done: the score falls back to the database label and `sampleLocations` stays `[]`.
27
+ - N+1 findings on a repeated statement that is not a relationship lazy load now give the application line of the repeat.
28
+ - `database-connection-pools` gains `poolLibraryPresent` and `implementation`; `readOnly`/`autoCommit` are nullable; `get_threads` defaults to 25 entries (BootUI 2.2.0).
29
+ - The `pytest --sharpit` terminal summary says which gates and advisors the run checked and which it did not, plus routes and SQL the tests did not exercise and that sharpit does no security testing.
30
+
31
+ ### Changed
32
+
33
+ - The docs site uses the console's neutral palette and ochre accent; `design/` holds the tokens and rules every surface shares.
34
+
35
+ - `sql-trace` entry `timestamp` is epoch milliseconds, as the contract says; it was an ISO-8601 string. This also applies to the `sql` rows of a request profile.
36
+ - Advisor rule results use BootUI's status values: `VIOLATION`, `PASS`, `SKIPPED`, `ERROR` (were `FAILED` and `PASSED` in the `rest-api` panel). A rule whose every finding is dismissed reports `PASS`. `sharpit-report/1` (`PASSED/FAILED/UNKNOWN/SKIPPED`) is unchanged.
37
+ - `pytest --sharpit` is about 1.24x the plain run on a query-heavy suite (was about 1.48x): the test-session sink memoises the masked SQL fingerprint of each repeated statement per sink, which halved the suite overhead (2.05 s to 1.02 s on a 12,343-statement suite) and cut the per-statement hook cost from about 50 µs to about 11 µs. Masked output is unchanged, and the memo is never shared across sinks or masker settings.
38
+ - `sharpit.swallowed-exception` gate: a PEP 249 database error (`DatabaseError`, `OperationalError`, `IntegrityError`, `DataError`, `InternalError`, `ProgrammingError`, matched by class name) handled by a broad `except` that neither re-raises nor logs now fails the test, as programming errors already did; it was an INFO note in 0.4.0. `programmingError` in the report stays `false` for these. This widens the 0.4.0 rule.
39
+ - `sharpit.swallowed-exception` gate: a method call counts as logging only on a logger receiver (`log`, `logger`, `logging`, `warnings`, a `getLogger(...)` result, chained structlog loggers, and similar); passing the caught exception to a recognised sink or to a one-level helper in the same module counts as handled. Bare `log(...)`/`warn(...)` calls still count.
40
+ - `beans`: a provider class's `resource` comes from the class object (`__firstlineno__` on Python 3.13+, the first method's line on 3.12) instead of reading the source file; on 3.12 the line can differ by a few lines.
41
+ - `fastapi-security`: scopes are de-duplicated (FastAPI 0.115 accumulates `security_scopes` down the tree).
42
+ - `config`: explicit `config_scan` module names are also found on `sys.path` without importing them; undecodable bytes in a source file are replaced instead of being recorded as a limitation.
43
+ - SQLite test-session baselines use a machine-local identity key by default; set `SHARPIT_IDENTITY_KEY` to the same secret in CI jobs that compare a committed baseline.
44
+ - An unregistered engine that reports the wrong database name in an application using a different single family is read as the name it reports; a comment that family keeps can therefore remain visible.
45
+ - Test-session group keys are built from masked text, so a key changes for a statement the masker edits (`password = ?` reads `password = ****** where id = ?`). N+1 baselines and dismissals on those groups re-flag after an upgrade: 1,396 of 20,000 generic rows and 2,048 of 20,000 MySQL rows in the corpus change.
46
+ - A statement whose database family is unknown or in conflict shows nothing past a `#`, on any line: it is a comment on MySQL, an operator on PostgreSQL and a variable on SQLite.
47
+ - The SQL dialect is resolved per event from what the connection or exception proves; an application using a single database family applies that family to unwired events.
48
+ - A database driver exception shows its class, one structured code, the masked `[SQL: ...]` statement, and `[parameters: ******]` when parameters were bound, and never the driver's free-text message.
49
+ - A statement of an unsupported database family shows `[statement hidden: unsupported database]` at every exposure level, and parameter capture does not reveal it.
50
+ - Under `METADATA_ONLY` exposure, no statement text or database error text is shown; SQL Trace groups keep the masked statement shape (`SELECT ? FROM users WHERE id = ?`), never more than `MASKED` shows.
51
+
52
+ ### Fixed
53
+
54
+ - Phone layout of the rail and fluid tables, heading styles, and Retry on load errors.
55
+
56
+ - Route introspection (mappings, rest-api, fastapi-security, beans) no longer drops routes of an `APIRoute` subclass set through `route_class`, no longer raises on an app object without `__dict__`, and classifies an `APIRoute` inside a plain Starlette sub-app as `unknown` instead of inspectable.
57
+ - `sharpit.swallowed-exception`: a handler that passes the exception to a helper that logs it is no longer a finding; an `error(...)` call on a non-logger object no longer counts as logging.
58
+ - A lazy load with no application frame on the stack (for example during FastAPI response serialisation) names the relationship's declaration line instead of "unknown".
59
+
60
+ ### Security
61
+
62
+ - Introspection reads route, mount and router attributes from the instance `__dict__` and matches route types with `issubclass(type(route), ...)`, so a property or `__class__` defined by the application is never evaluated by a GET or MCP read.
63
+ - MySQL/MariaDB and SQLite reads run only after the session is verified read-only, and are refused on an `AUTOCOMMIT` connection.
64
+ - The database advisor reads only URL key names from an allow-list (`connect_timeout`, `charset`, `sslmode`), never a value and never the password.
65
+ - `security-logs` masks event values when they are read (keys, secret values, `Bearer`, `Basic` and `Token` credentials, `token=` text) and caps stored strings. A value over the length cap is masked at record time, before the cut, so it stays masked under `FULL` exposure; a shorter one follows the exposure setting.
66
+ - In the compacted `get_vulnerabilities_report` view, the scan message and advisory summaries and details are masked, because an OSV failure message can carry proxy credentials.
67
+ - Literals inside square brackets (`ARRAY['x']`, `ARRAY [lower($$x$$)]`, `doc['x']`, `items[3]`, `a[1][2]`) are normalised in SQL Trace and everywhere else the statement scan runs. A bracket that opens with a letter or underscore, holds only word characters and spaces and is no subscript stays readable (`[col name]`). Any other bracket is scanned as a value: `[2024 sales]` shows `[? sales]`, and the apostrophe in `[it's]` opens a string, so the statement reads `[it?` from there on.
68
+ - `mask_text` matches `Bearer`, `Basic` and `Token` in any case, takes the word `token` after a scheme (`bearer token abc123`), and masks the whole value after an `Authorization` key.
69
+ - Masking and the trace error scan no longer take quadratic time on a crafted value (runs of quotes after `token`, closing punctuation at a word's end, repeated `eyJ`, `BEGIN` or `[SQL: `, unclosed `[` or `(` after a key), so a logged client value cannot freeze the host.
70
+ - With parameter capture off, an error with an `[SQL: ` marker is masked, normalised from the marker on and masked again on every surface that shows it: `exceptions`, `log-tail`, `transactions`, `http-probe`, `health`, `alembic`, `postgresql`, `mysql`, `data`, traces, SQL Trace (also for an error raised for another statement) and the test-session report, so `[SQL: SELECT a[1], 'x']` no longer shows `'x'`. The first mask reads the raw text, because the scan turns a key or a token into `?`. They kept its literals before. Quoted values on the message's first line and the lines between it and the block (a `DETAIL:` line) are dropped there too; SQL Trace drops them before the first mask, as 0.4.0 did. An OpenTelemetry statement and the `mysql` panel's query text are masked, normalised and masked the same way.
71
+ - `mask_text` runs the 0.4.0 text pipeline first and a stricter pass over its output, so whatever either masks stays masked: a quoted value spanning lines and a secret inside a token as in 0.4.0, and a sensitive value to the end of its line, so a value with a space, a nested bracket or a closer inside a string no longer shows its tail.
72
+ - `SHARPIT_VULNERABILITIES_OSV_BASE_URI` and `SHARPIT_VULNERABILITIES_EPSS_BASE_URI` accept only `http` and `https`, because the default opener also reads `file:` and `ftp:`. Any other value takes the default and adds a warning that does not repeat the value, as a URI can carry credentials.
73
+ - ruff's `S` (security) rules run on `src/` in CI.
74
+
75
+ ### Known limitations
76
+
77
+ - Post-scan or post-read goldens are absent (they need captures only the owner can make), so the parity test for each of these panels checks the pre-scan golden and skips the post-scan one: `security`, `database-advisor`, `architecture`, `fastapi`, `mysql` (a post-read golden needs a MySQL datasource on the reference app) and `vulnerabilities` (its golden is a failed-scan capture, so items are unchecked). `data` and `sqlalchemy-statistics` stay unverified: BootUI's golden list for `data` is empty and the reference app has no Hibernate statistics. `docs/reference/PARITY.md` has the per-panel table.
78
+ - `fastapi` advisor: six rules are not built (`docs/fastapi-advisor-checks.md`, "Not yet"): FASTAPI-ASYNC-003, FASTAPI-ASYNC-004, FASTAPI-DEP-001, SPRING-WEB-001, SPRING-CONFIG-002, SPRING-DATA-001. `functools.partial` and library handlers are skipped.
79
+ - `security` advisor: the masker turns `allow_credentials=True` into `******` in the CORS message; any `key="..."` keyword argument of 8 or more characters is a HIGH SEC-SRC-001 false positive.
80
+ - `sharpit.swallowed-exception` matches a database error by class name: a non-database exception named `DataError` or `InternalError` can fail a test, and a driver exception with another name that is not wrapped is missed.
81
+ - `transactions`: a connection held idle after `commit()` adds the idle time to the transaction until the next pool check-in, `begin` or `rollback`.
82
+ - `database-advisor`: models mapped to a view are reported by DB-HIB-002 (the catalog lists no views); tables outside the default schema are not compared; DB-HIB-005 is skipped on SQLite.
83
+ - `app_package` is not honoured by every advisor: `rest-api` ignores it and reads the app's routes. A package that is not imported leaves `fastapi` at `PARTIAL` with 0 handlers.
84
+ - `app_package` widens a dotted name to its top-level package, so the advisors scan sibling subpackages; only the first directory of a namespace package is scanned; `config` may pick a different root than the advisors when `install()` runs outside the package and `app_package` is unset.
85
+ - MariaDB read-only verification is tested with fakes only; the leased test checks MySQL 8.4.
86
+ - SQL Trace insights groups routes by masked path, not by route template; thread and time-window correlation are not offered.
87
+ - `pytest --sharpit` still adds about 11 µs per repeated statement (rule filtering, normalisation and counters), about 1.24x the plain run on a query-heavy suite.
88
+ - `GET {api}/activity/service-map`, `GET {api}/activity/request/{id}/journal` and `GET {api}/rest-api/error-contract` are not built: they answer 404. The BootUI goldens for the first and last stay unchecked.
89
+ - `activity` merges requests, SQL and exceptions only, so `typeCounts` never has `TRANSACTION`, `SECURITY`, `MESSAGING` or `MARKER` keys.
90
+ - `fastapi-security` reports a route guarded by `HTTPBearer(auto_error=False)` plus a check in a dependency as `secured: false` / `permitAll` with `bestEffort: true`, and drops its scopes: an anonymous request passes the scheme, and sharpit does not read the dependency's body.
91
+ - The 2.2.0 capture drift reports `activity` journal and resources, caught exceptions and the reserved retention share as unavailable (null with a reason).
92
+ - Every sharpit read through a pool that shares one connection (`StaticPool`, `SingletonThreadPool`, `AssertionPool`) is refused before the checkout, because returning that connection would roll back the host's open transaction. An in-memory SQLite host gets `SHARED_CONNECTION_REFUSED`: its health ping is `UNKNOWN`, Alembic reports the database unavailable, and the `postgresql` and `mysql` panels and advisor scans that read the database report it as an error. A connection shared through `creator=` on an ordinary pool cannot be detected.
93
+ - MySQL-aware statement normalisation applies where the dialect is known: the `mysql` panel, SQLAlchemy statements in SQL Trace, activity, insights and the test-session report (from the engine's dialect), OpenTelemetry spans that carry `db.system` or `db.system.name`, and on any span a SQL error whose text names a MySQL driver (`pymysql`, `MySQLdb`, `asyncmy`, `mariadb`, `mysql.connector`). Raw `sqlite3` statements, other text on spans without either attribute and the unbounded-read shape of a `Session` built on a binds map keep the generic scan, and their text still goes through the masker.
94
+ - `mask_text` masks a sensitive value to the end of its line: sharpit does not guess where a value ends, so whatever follows it on that line is hidden too, other keys and closing quotes or brackets included, and JSON on one line stops being valid after the first sensitive key. A quoted value is masked whole across lines, as in 0.4.0; an unquoted sensitive value stops at its line. A key's bracketed value is treated as one value up to 256 characters, a bound 0.4.0 did not have; past it the strict pass still masks a sensitive value to the end of its line.
95
+ - A driver error with no `[SQL: ...]` block keeps its values (`Key (email)=(bob@example.com) already exists`), and a MySQL replication error's `Query: '...'` text goes through `mask_text` only. Key-named secrets and credential shapes are masked in both; other literals are not.
96
+ - An error with an `[SQL: ` marker is masked, normalised and masked again. Everything after the marker is normalised, not only the statement: `[parameters: ...]` and the `Background` link too, digits and quoted text read `?`, line breaks collapse, and text past 20,000 characters is dropped. The statements stored by SQL Trace, the test session and the N+1 messages are normalised and then masked, as in 0.4.0.
97
+ - `mask_text` masks the word after `basic` or `bearer` in any case, also in English or SQL (`basic usage` shows `basic ******`, `SELECT basic FROM t` shows `SELECT basic ****** t`), and does not mask `Digest` parameter lists. With no key before it, an ordinary word or a punctuation-only value after `token` stays readable (`Token expired`, `FROM Token WHERE`), so a credential of 16 letters or fewer in one case, or of punctuation alone, is not masked there.
98
+ - On FastAPI 0.16x an `include_router` prefix cannot be recovered from the route, so those routes report `MASKED_PATH` instead of a template.
99
+ - A driver error read from text alone keeps an unquoted driver value visible in four shapes: a SQLite `ATTACH` path or a trigger's `RAISE` message on a driver line with no quote, a chain line planted by a value on the driver line, and a docs-link line planted by a value in a `StatementError` that has no link of its own. Quoted values, the `[SQL: ...]` block and its parameters stay masked.
100
+ - Text an application writes as a statement is read as SQL.
101
+ - In free text, a value with no key name before it can be shown.
102
+ - An unquoted value after `PASSWORD` or `IDENTIFIED BY` is shown as written: PostgreSQL and MySQL reject it as a syntax error, so it appears only on a mistyped, failed statement. A quoted value is hidden.
103
+ - An unproven event from a second database that sharpit has not seen is read as the application's one registered family.
104
+ - Database forks (such as Percona or Aurora) are read as their parent family; no fork runs in the live tests.
105
+ - SQL Server and Oracle statements are hidden (`[statement hidden: unsupported database]`): sharpit has no verified rules for them.
106
+ - On SQLite a `"..."` run is hidden: SQLite reads it as a name, or as a string when no column matches.
107
+ - Live fuzzing with MySQL's ANSI_QUOTES session mode is deferred past 0.5.0.
108
+
109
+ ## [0.4.0] - 2026-11-02
110
+
111
+ ### Added
112
+
113
+ - `traces` panel: OpenTelemetry spans from the application's own SDK `TracerProvider`, with SQL literals in `db.statement` normalised and masked; MCP `get_traces`. sharpit never imports OpenTelemetry or installs a provider, it attaches one span processor to the provider the app already set up.
114
+ - `data` panel: SQLAlchemy 2.0 mapped classes (table, primary-key type, relationships) from the new `install(models=...)` keyword (a declarative base, registry, or a list of them or of mapped classes); MCP `get_data_repositories`. sharpit never configures mappers or runs SQL to read them.
115
+ - `postgresql` panel: vital signs, sessions, statements, indexes, tables, vacuum, replication and settings, read on an explicit `POST {api}/postgresql/read` in one read-only transaction with statement and lock timeouts, a read budget and row limits; query text masked (numbers and comments too). `GET` returns the last read; MCP `get_postgresql_report`. `pg_stat_statements` created but not preloaded makes that section `SKIPPED`.
116
+ - `sqlalchemy-statistics` panel (BootUI's `hibernate-statistics`): statement counts from SQL Trace's lifetime totals, the slowest statement and N+1 candidates per route; Hibernate-only counters are `null` with a reason; MCP `get_sqlalchemy_statistics`.
117
+ - Per-finding dismissal: `GET`, `POST` and `DELETE {api}/dismissed-findings` (BootUI 2.2.0), stored under `dismissedFindings` in `sharpit.yml`; mutations check the owning panel is enabled and writable.
118
+ - Report-only mode (`--sharpit-report-only`, ini `sharpit_report_only`): findings never fail the build, any unknown reason still does. The report gains `mode` and `unknownReasons`.
119
+ - Baselines: `--sharpit-baseline=PATH` (ini `sharpit_baseline`) and `--sharpit-write-baseline=PATH`. A baselined finding is `existing` and does not fail, an unlisted one is `new`, a missing one `fixed`; a count gate above its baselined count is `new`. Writing refuses a partial run or one with unknown reasons. Vulnerability findings are not baselined.
120
+ - GitHub Action (`action.yml` at the repository root) that runs pytest with sharpit, report-only by default, and writes a findings summary to the job summary; `python -m sharpit.report summary <report.json>` renders that Markdown.
121
+ - `sharpit.swallowed-exception` gate: during a test, an exception handled by a broad `except` in application code that neither re-raises nor logs is a finding. It fails the test for programming errors (`AttributeError`, `TypeError`, `NameError`, `ImportError`, `UnboundLocalError`) and is an INFO note otherwise; marker `@pytest.mark.sharpit(allow_swallowed=True)` relaxes it.
122
+ - N+1 findings caused by a SQLAlchemy lazy load name the relationship (`Player.performances lazy-loaded 1018 times`), suggest `selectinload` or `joinedload`, and give the application line of the first lazy load and the masked statement. Fingerprints are unchanged.
123
+ - App autodetection for `pytest --sharpit`: the one FastAPI or Starlette app already imported by the suite is used without `--sharpit-app`; `--sharpit-require-app` (ini `sharpit_require_app`) restores the 0.3.0 fail-closed behaviour.
124
+ - `--sharpit-verbose` (or `-vv`) lists every advisor note in the terminal.
125
+ - Overview run metadata from BootUI 2.2.0.
126
+ - `SECURITY.md`: supported versions, private reporting, and the network-egress statement (only the OSV and EPSS clients use the network).
127
+
128
+ ### Changed
129
+
130
+ - With no single app (none, several, or one without routes), the `rest-api` advisor is `SKIPPED` rather than `unknown`, so a clean suite passes; the advisor run status gains `SKIPPED` (additive in `sharpit-report/1`).
131
+ - The terminal gate counts list only findings that fail the gate; other advisor notes become one count line pointing at the report. The JSON and JUnit reports are unchanged.
132
+ - A test-runtime gate finding that failed its test is a JUnit `<failure>` under any `--sharpit-fail-on`.
133
+ - INFO findings never fail a gate, at any `--sharpit-fail-on`.
134
+ - Finding identities in `sharpit.yml` may contain inner spaces; existing entries still parse.
135
+ - The overview view is titled Scorecard, as in BootUI 2.2.0. MCP no longer suggests config property names.
136
+
137
+ ### Security
138
+
139
+ - With parameter capture off, SQL Trace, traces and the test report no longer show a double-quoted SQL value or
140
+ secret. The leak affected 0.3.0; upgrade (#41).
141
+
142
+ ## [0.3.0] - 2026-11-01
143
+
144
+ ### Added
145
+
146
+ - Finding contract (`Finding`, `AdvisorRun`) and advisor registry with pass/fail/unknown status semantics (#19).
147
+ - `pytest --sharpit` plugin with test-id tagging, unattributed bucket, phase split, xdist merge, and JSON (`sharpit-report/1`) and JUnit reports (#20). Count gates (queries per test with `--sharpit-max-queries`, N+1, swallowed exceptions) fail the test; advisor findings at or above `--sharpit-fail-on` fail the run; `unknown` fails it unless `--sharpit-allow-unknown` (limit for unattributed SQL: `--sharpit-max-unattributed`).
148
+ - Per-test budget marker `@pytest.mark.sharpit(max_queries=..., allow_n_plus_one=..., max_exceptions=...)` (#21).
149
+ - REST API advisor on the contract, per-finding dismissal via fingerprint in `sharpit.yml`, and panel detail action (#22).
150
+ - Raw `sqlite3` SQL source, unified source dispatcher, and public `attach_sql_sources()` / `detach_sql_sources()` helpers (#23).
151
+ - `SHARPIT_SQL_TRACE_SQLITE3_ENABLED` (`sql_trace_sqlite3_enabled`, default `true`) controls the raw `sqlite3` source in the console; `pytest --sharpit` always attaches it.
152
+
153
+ ### Changed
154
+
155
+ - REST API scanner evidence for an app with no routes reports `usable: false, coverageComplete: true` (confirmed-empty scope), matching BootUI.
156
+ - REST API finding targets now name the handler (`<METHOD> <path> <module:qualname>`), so two handlers on one route stay two findings; fingerprints of 0.3.0 REST API findings depend on it.
157
+ - The test-session SQL filter treats migration tables (`alembic_version`, `schema_migrations`, `flyway_schema_history`, `django_migrations`, `knex_migrations`) as noise, not only `alembic_version`.
158
+ - A rule whose every occurrence is dismissed by fingerprint stays `dismissed: false` with a count of 0.
159
+ - The JUnit report fails only non-dismissed findings at or above `--sharpit-fail-on`.
160
+ - Secret values matching vendor token prefixes (`sk_live_`, `sk_test_`, `ghp_`, `glpat-`, `xoxb-`, `AIza`, `sk-ant-`, `sk-proj-`, and related keys) are masked.
161
+
162
+ ## [0.2.0] - 2026-10-31
163
+
164
+ ### Added
165
+
166
+ - F1 (HTTP Exchanges): `http-exchanges` panel and endpoint with a ring buffer of recent HTTP requests, duration, headers, status code, and path masking.
167
+ - F2 (Exceptions): `exceptions` panel and endpoints capturing unhandled errors from middleware, wrapped handlers, and log records, grouped by class and innermost application frame.
168
+ - F3 (SQL Trace): `sql-trace` panel, endpoints, and live SSE stream capturing SQLAlchemy queries via class-level events with statement categorization, normalized SQL, and slow query alerts.
169
+ - F4 (Live Activity): `activity` panel and live SSE stream correlating HTTP requests, SQL queries, and exceptions with N+1 query detection.
170
+ - F5 (Log Tail): `log-tail` panel, endpoints, and live SSE stream buffering recent logs with a 1 MiB memory cap and resume token support.
171
+ - F6 (Migrations): `alembic` panel inspecting Alembic migrations in Flyway-compatible format, with database versions read on POST `alembic/refresh`.
172
+ - F7 (Database Connection Pools): `database-connection-pools` panel and endpoint reporting SQLAlchemy pool sizes, active checkouts, and overflow status.
173
+ - F8 (Health): `health` panel and endpoint checking registered database engines via dialect ping and running custom checks on POST `health/check`.
174
+ - F9 (Threads and asyncio tasks): `threads` panel and endpoint dumping active threads and running asyncio tasks with request correlation.
175
+ - F10 (REST API advisor): `rest-api` advisor panel and endpoints running static analysis checks over FastAPI routes with severity scoring and violation paging.
176
+ - F11 (Shared advisor plumbing): shared rule definitions, single-flight scans, violation retention endpoint, and per-panel dismissal gates.
177
+ - F12 (HTTP Probe): `http-probe` panel and endpoint executing in-process ASGI calls against local routes with loopback protection and response masking.
178
+ - MCP and CLI tools for the new panels: `get_http_exchanges`, `get_exceptions`, `get_exception_detail`, `get_sql_traces`,
179
+ `get_live_activity`, `get_log_tail`, `get_alembic_migrations`, `get_database_connection_pools`, `get_health`, `get_threads`,
180
+ `get_rest_api_report`, `get_rest_api_rule_violations`.
181
+ - Documentation site (MkDocs Material) published to GitHub Pages; the README links to it.
182
+ - `fastapi_sqla` sample app for trying the SQL panels against a real FastAPI app.
183
+
184
+ ### Changed
185
+
186
+ - Rule dismissals now check the owning panel's enabled and read-only state (`RAPI-` for `rest-api`, `::pypi:` for `vulnerabilities`), returning 403 when the panel is read-only or disabled.
187
+ - Client disconnect before response completion records status 499 in HTTP exchanges.
188
+ - Exception fingerprints group by exception class and innermost application frame rather than top stack frames.
189
+ - SQL trace uses SQLAlchemy class-level listeners rather than JDBC proxies; SQL literals are normalized and masked when parameter capture is disabled.
190
+ - Live streams (SSE) close every 3 seconds (`SHARPIT_STREAM_MAX_SECONDS`) with a retry hint to prevent blocking uvicorn reload or lifespan shutdown.
191
+ - Total concurrent live streams across all panels are capped at 20, returning HTTP 503 when full.
192
+ - Alembic database-version reads and database health checks run on POST requests (`alembic/refresh`, `health/check`) and serve cached results on GET to ensure GET requests have no side effects.
193
+ - Database connection pool reports strip query strings from database connection URLs (emitted in `jdbcUrl` for BootUI parity) to prevent secret leakage.
194
+ - Threads panel includes asyncio tasks with request correlation; OS thread states are inferred as RUNNABLE or WAITING without JVM CPU or lock metrics.
195
+ - HTTP probe executes directly via in-process ASGI calls without opening network sockets, refusing paths under the sharpit mount.
196
+ - Release workflow uploads only `.whl` and `.tar.gz` assets to GitHub Releases.
197
+ - The default branch is `main` (was `master`); CI, docs, skills and badges point at it.
198
+
199
+ ## [0.1.0] - 2026-10-31
200
+
201
+ First release: an embedded, local-only developer console for FastAPI apps, ported from
202
+ [BootUI](https://github.com/jdubois/boot-ui) (Julien Dubois, Apache-2.0).
203
+
204
+ ### Added
205
+
206
+ - `sharpit.install(app, settings=..., **options)` mounts the console at `/sharpit` and a BootUI-compatible JSON API at
207
+ `/sharpit/api`. `settings=` takes pydantic-settings instances so the Config panel can show each value's source.
208
+ - Panels: Overview, Configuration (environment, `.env`, pydantic-settings and `os.getenv` keys, masked), Mappings,
209
+ Loggers (runtime level changes), Beans (dependency providers, middleware, lifespan), Vulnerabilities (OSV scan with
210
+ EPSS scores, on explicit request; dismissable rules in `.sharpit/sharpit.yml`), MCP Server and CLI.
211
+ - Read-only MCP endpoint (`POST /sharpit/api/mcp`, off by default; `SHARPIT_MCP_ENABLED=ON`) with the tools
212
+ `get_overview`, `get_config`, `get_mappings`, `get_loggers`, `get_beans` and `get_vulnerabilities_report`; the CLI
213
+ HTTP endpoint (`/sharpit/api/cli`) offers the same catalogue plus the vulnerability scan.
214
+ - Configuration through `SHARPIT_*` environment variables and `install()` keywords; the environment wins. Invalid values
215
+ fall back to a fail-safe value and record a warning.
216
+ - Fail-closed activation: on for `SHARPIT_ENABLED=ON`, a dev profile, `uvicorn --reload` or `fastapi dev`; a `prod`
217
+ profile switches it off unless `SHARPIT_ENABLED=ON` forces it. When off, the mount stays in place (as in BootUI) and
218
+ every path under it answers a plain 404 from the host's 404 handler; a host with a catch-all or authenticate-first
219
+ route answers those paths differently, so the mount can be told apart. `path="/"` and a trailing slash are refused.
220
+ - Request guard: loopback-only by default, `Host` allow-list, full-origin (API paths) and `Sec-Fetch-Site` cross-site checks on
221
+ every method, bearer token with `HttpOnly` session cookie for untrusted sources.
222
+ - Secret masking of values, defaults and suggestions in API, MCP and CLI output, including pydantic `SecretStr` and any URL with userinfo.
223
+ - Extras `sharpit[fastapi]` and `sharpit[settings]`; typed package (`py.typed`); prebuilt UI in the wheel, so end users
224
+ never need Node.
225
+
226
+ ### Deviations from BootUI
227
+
228
+ Listed in section 14 of the design spec. The main ones:
229
+
230
+ - FastAPI only; Django and Flask are out of scope.
231
+ - A new Svelte UI instead of BootUI's Vue UI, over the same JSON contract.
232
+ - Activation uses profile variables and a dev-server signal read from the command line (no DevTools equivalent);
233
+ `uvicorn.run(..., reload=True)` from a script is not detected.
234
+ - The cross-site check applies to every method, compares the full origin on API paths, and any forwarded header makes a caller
235
+ untrusted unless a trusted proxy is configured.
236
+ - `defaultValue` is masked as well, because Python defaults come from code.
237
+ - Beans are dependency providers, middleware and lifespan rather than an IoC container.
238
+ - Deferred: config overrides, health, profile diff and the `sharpit` command-line client (the HTTP endpoint ships).
239
+
240
+ ### Known limitations
241
+
242
+ - State (token, MCP switch, logger levels, scan cache) is per process under `--workers` and `--reload`.
243
+ - Behind a TLS-terminating proxy, uvicorn needs `--proxy-headers` for the Origin check to pass.
244
+ - Masking is name- and shape-based: vendor-prefixed tokens under harmless names (`sk_live_...`, `ghp_...`) can show.
245
+
246
+ [Unreleased]: https://github.com/ffroliva/sharpit/compare/v0.5.0...HEAD
247
+ [0.5.0]: https://github.com/ffroliva/sharpit/releases/tag/v0.5.0
248
+ [0.4.0]: https://github.com/ffroliva/sharpit/releases/tag/v0.4.0
249
+ [0.3.0]: https://github.com/ffroliva/sharpit/releases/tag/v0.3.0
250
+ [0.2.0]: https://github.com/ffroliva/sharpit/releases/tag/v0.2.0
251
+ [0.1.0]: https://github.com/ffroliva/sharpit/releases/tag/v0.1.0
sharpit-0.5.0/PKG-INFO ADDED
@@ -0,0 +1,255 @@
1
+ Metadata-Version: 2.5
2
+ Name: sharpit
3
+ Version: 0.5.0
4
+ Summary: Local developer console and pytest gate for FastAPI apps, a Python port of BootUI by Julien Dubois.
5
+ Project-URL: Homepage, https://github.com/ffroliva/sharpit
6
+ Project-URL: Source, https://github.com/ffroliva/sharpit
7
+ Project-URL: Issues, https://github.com/ffroliva/sharpit/issues
8
+ Project-URL: Changelog, https://github.com/ffroliva/sharpit/blob/main/CHANGELOG.md
9
+ Author: Flavio Oliva
10
+ License-Expression: Apache-2.0
11
+ License-File: LICENSE
12
+ License-File: NOTICE
13
+ Keywords: bootui,debugging,developer-tools,devtools,fastapi,introspection,mcp,starlette
14
+ Classifier: Development Status :: 3 - Alpha
15
+ Classifier: Environment :: Web Environment
16
+ Classifier: Framework :: FastAPI
17
+ Classifier: Intended Audience :: Developers
18
+ Classifier: License :: OSI Approved :: Apache Software License
19
+ Classifier: Operating System :: OS Independent
20
+ Classifier: Programming Language :: Python :: 3
21
+ Classifier: Programming Language :: Python :: 3 :: Only
22
+ Classifier: Programming Language :: Python :: 3.12
23
+ Classifier: Programming Language :: Python :: 3.13
24
+ Classifier: Programming Language :: Python :: 3.14
25
+ Classifier: Topic :: Software Development :: Debuggers
26
+ Classifier: Typing :: Typed
27
+ Requires-Python: >=3.12
28
+ Requires-Dist: packaging>=23
29
+ Requires-Dist: starlette>=0.44
30
+ Provides-Extra: fastapi
31
+ Requires-Dist: fastapi>=0.115; extra == 'fastapi'
32
+ Provides-Extra: settings
33
+ Requires-Dist: pydantic-settings>=2.4; extra == 'settings'
34
+ Provides-Extra: test
35
+ Requires-Dist: aiosqlite>=0.20; extra == 'test'
36
+ Requires-Dist: alembic>=1.13; extra == 'test'
37
+ Requires-Dist: fastapi>=0.115; extra == 'test'
38
+ Requires-Dist: httpx>=0.27; extra == 'test'
39
+ Requires-Dist: hypothesis>=6.100; extra == 'test'
40
+ Requires-Dist: jsonschema>=4.21; extra == 'test'
41
+ Requires-Dist: opentelemetry-sdk>=1.26; extra == 'test'
42
+ Requires-Dist: psycopg[binary]>=3.2; extra == 'test'
43
+ Requires-Dist: pydantic-settings>=2.4; extra == 'test'
44
+ Requires-Dist: pymysql>=1.1; extra == 'test'
45
+ Requires-Dist: pytest-asyncio>=0.24; extra == 'test'
46
+ Requires-Dist: pytest-cov>=5; extra == 'test'
47
+ Requires-Dist: pytest-rerunfailures>=14; extra == 'test'
48
+ Requires-Dist: pytest-timeout>=2.3; extra == 'test'
49
+ Requires-Dist: pytest-xdist>=3.6; extra == 'test'
50
+ Requires-Dist: pytest>=8; extra == 'test'
51
+ Requires-Dist: python-multipart>=0.0.9; extra == 'test'
52
+ Requires-Dist: sqlalchemy[asyncio]>=2.0.38; extra == 'test'
53
+ Requires-Dist: testcontainers>=4.8; extra == 'test'
54
+ Requires-Dist: uvicorn>=0.30; extra == 'test'
55
+ Description-Content-Type: text/markdown
56
+
57
+ # sharpit
58
+
59
+ [![CI](https://github.com/ffroliva/sharpit/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/ffroliva/sharpit/actions/workflows/ci.yml)
60
+ [![Release](https://github.com/ffroliva/sharpit/actions/workflows/release.yml/badge.svg)](https://github.com/ffroliva/sharpit/actions/workflows/release.yml)
61
+ [![PyPI version](https://img.shields.io/pypi/v/sharpit.svg)](https://pypi.org/project/sharpit/)
62
+ [![Quality Gate](https://sonarcloud.io/api/project_badges/measure?project=ffroliva_sharpit&metric=alert_status&branch=main)](https://sonarcloud.io/summary/overall?id=ffroliva_sharpit&branch=main)
63
+ [![Coverage](https://sonarcloud.io/api/project_badges/measure?project=ffroliva_sharpit&metric=coverage&branch=main)](https://sonarcloud.io/component_measures?id=ffroliva_sharpit&metric=coverage&branch=main)
64
+
65
+ [![Reliability](https://sonarcloud.io/api/project_badges/measure?project=ffroliva_sharpit&metric=reliability_rating&branch=main)](https://sonarcloud.io/summary/overall?id=ffroliva_sharpit&branch=main)
66
+ [![Security](https://sonarcloud.io/api/project_badges/measure?project=ffroliva_sharpit&metric=security_rating&branch=main)](https://sonarcloud.io/summary/overall?id=ffroliva_sharpit&branch=main)
67
+ [![Maintainability](https://sonarcloud.io/api/project_badges/measure?project=ffroliva_sharpit&metric=sqale_rating&branch=main)](https://sonarcloud.io/summary/overall?id=ffroliva_sharpit&branch=main)
68
+ [![Duplication](https://sonarcloud.io/api/project_badges/measure?project=ffroliva_sharpit&metric=duplicated_lines_density&branch=main)](https://sonarcloud.io/component_measures?id=ffroliva_sharpit&metric=duplicated_lines_density&branch=main)
69
+
70
+ [![Python 3.12 | 3.13 | 3.14](https://img.shields.io/badge/python-3.12%20%7C%203.13%20%7C%203.14-blue.svg)](https://github.com/ffroliva/sharpit/blob/main/pyproject.toml)
71
+ [![Licence: Apache-2.0](https://img.shields.io/github/license/ffroliva/sharpit)](https://github.com/ffroliva/sharpit/blob/main/LICENSE)
72
+ [![Status: alpha](https://img.shields.io/badge/status-alpha-orange.svg)](https://github.com/ffroliva/sharpit/blob/main/CHANGELOG.md)
73
+ [![Code style: ruff](https://img.shields.io/badge/code%20style-ruff-000000.svg)](https://github.com/astral-sh/ruff)
74
+ [![Type checked: pyright](https://img.shields.io/badge/type%20checked-pyright-blue.svg)](https://github.com/microsoft/pyright)
75
+
76
+ A local developer console and pytest gate for FastAPI apps.
77
+
78
+ ## Gate CI on findings
79
+
80
+ sharpit turns runtime capture into automated test gates with `pytest --sharpit`. It tracks SQL
81
+ statements and observable exceptions per test, detects N+1 queries, checks query budgets, and runs
82
+ static analysis advisors. If a test exceeds its query budget, triggers an N+1 query, or swallows an
83
+ unhandled exception, the build fails. When capture cannot see enough to judge, the run status is
84
+ `unknown` and fails closed.
85
+
86
+ ```bash
87
+ pytest --sharpit --sharpit-report=sharpit-report.json --sharpit-junit=sharpit-junit.xml
88
+ ```
89
+
90
+ You no longer need `--sharpit-app` for a typical suite: sharpit picks the one FastAPI or Starlette app defined in the
91
+ project modules your tests already imported (it never imports a module to look). With none, several, or one without
92
+ routes, the REST API advisor is `SKIPPED` and a clean suite still passes; `--sharpit-require-app` makes that `unknown`
93
+ again, as in 0.3.0. The terminal `gate counts:` lists only findings that fail the gate; `--sharpit-verbose` (or `-vv`)
94
+ lists every one. The JSON report and JUnit file always hold every finding.
95
+
96
+ ### Adopting on an existing suite
97
+
98
+ Start without breaking the build, then freeze what is already there:
99
+
100
+ ```bash
101
+ pytest --sharpit --sharpit-report-only # report everything, fail on nothing but blindness
102
+ pytest --sharpit --sharpit-write-baseline=sharpit-baseline.json # after a complete run: record today's findings
103
+ pytest --sharpit --sharpit-baseline=sharpit-baseline.json # in CI: only new findings fail
104
+ ```
105
+
106
+ - **Report-only** (`--sharpit-report-only`, ini `sharpit_report_only = true`) runs every gate and advisor and writes the
107
+ report, but findings do not fail tests or the session. An unknown reason still exits 1 unless
108
+ `--sharpit-allow-unknown`: report-only relaxes findings, never blindness.
109
+ - **Baselines** match findings by fingerprint. A listed finding is `existing` and never fails, an unlisted one is `new`
110
+ and gates as usual, a listed one not seen is `fixed`. A count gate that grows past its baselined count is `new`.
111
+ Vulnerability findings are not baselined, and INFO findings never fail.
112
+ - `--sharpit-write-baseline=PATH` is the only way a baseline is written. It refuses a partial run (`-k`, `-m`, node ids,
113
+ `--lf`, `--deselect`, `-x` stopping early, an interrupt) and a run with any unknown reason.
114
+ - A missing or malformed baseline never switches sharpit off: the session runs and the baseline becomes an unknown
115
+ reason, which fails the run. Own the baseline file in CODEOWNERS, or a PR can baseline its own findings.
116
+
117
+ ### GitHub Action
118
+
119
+ The repository root is a composite action (`action.yml`) that runs pytest with sharpit and writes a findings summary to
120
+ the job summary. Pin it to a release tag:
121
+
122
+ ```yaml
123
+ - uses: ffroliva/sharpit@<release tag>
124
+ with:
125
+ pytest-args: "-q tests/"
126
+ baseline: sharpit-baseline.json
127
+ ```
128
+
129
+ Inputs: `pytest-args` (split with Python shlex), `report-only` (default `"true"`: findings are reported, never fail the
130
+ build), `baseline`, `fail-on` (lowest severity that fails), `report-path` (default `sharpit-report.json`), `install`
131
+ (`pip` installs the pinned sharpit; `none` when your project already depends on it, in which case `python` must be
132
+ able to import sharpit) and `runner` (default `python -m pytest`, for example `uv run pytest`). Set `report-only: "false"`
133
+ to gate. The pytest exit code is never masked: the summary step runs `if: always()` and only warns if it fails. The
134
+ summary is rendered by `python -m sharpit.report summary <report.json>`. On Windows runners `runner` and `pytest-args`
135
+ are split in non-POSIX mode so backslashes in paths survive.
136
+
137
+ ### On the author's own project: gflow-cli
138
+
139
+ Run by sharpit's author on the 0.3.0 integration branch against gflow-cli (a public FastAPI daemon using raw `sqlite3`; see [sharpit's own report](docs/reports/2026-11-01-gflow-cli-sharpit.md)), sharpit ran across **5,662** tests (5 failed by sharpit gates):
140
+ - **0 unattributed SQL statements** across ~53k statements executed (27,997 attributed + 25,092 filtered);
141
+ - **6 N+1 findings**, of which 1 was a real defect, 2 were noise (filtered since 0.3.0), and 3 were expected polling;
142
+ - Showed out-of-code runtime observation without changing production code.
143
+
144
+ ## 60 seconds
145
+
146
+ Install sharpit with the FastAPI host extra:
147
+
148
+ ```bash
149
+ pip install "sharpit[fastapi]"
150
+ # or
151
+ uv add "sharpit[fastapi]"
152
+ ```
153
+
154
+ Add one call to your FastAPI app:
155
+
156
+ ```python
157
+ from fastapi import FastAPI
158
+ import sharpit
159
+
160
+ app = FastAPI()
161
+
162
+ # Register your application middleware first, then mount sharpit:
163
+ sharpit.install(app) # mounts /sharpit and /sharpit/api
164
+ ```
165
+
166
+ Run tests with sharpit gate reporting:
167
+
168
+ ```bash
169
+ pytest --sharpit --sharpit-report=sharpit-report.json
170
+ ```
171
+
172
+ Run it locally with a dev signal and open <http://127.0.0.1:8000/sharpit/>:
173
+
174
+ ```bash
175
+ fastapi dev app.py # or: uvicorn app:app --reload
176
+ ```
177
+
178
+ ## Overview
179
+
180
+ One call mounts a web console at `/sharpit` and a JSON API at `/sharpit/api` inside your own app,
181
+ so a running service shows its configuration and where each value came from, every route, the dependency providers, loggers you can retune live, and a vulnerability
182
+ scan of the installed packages.
183
+
184
+ sharpit is a Python/FastAPI port of [BootUI](https://github.com/jdubois/boot-ui) by Julien Dubois (Apache-2.0),
185
+ the Spring Boot developer console. It ports BootUI's design goals, JSON contract and test cases; the UI is new.
186
+
187
+ ![sharpit overview](https://raw.githubusercontent.com/ffroliva/sharpit/main/ui/tests/e2e/screenshots/overview-light.png)
188
+
189
+ Every panel in light and dark: [screenshot catalog](https://github.com/ffroliva/sharpit/blob/main/docs/screenshots.md).
190
+
191
+ > **Status: alpha (0.5.0, FastAPI only).** Django and Flask are not supported. See [CHANGELOG.md](https://github.com/ffroliva/sharpit/blob/main/CHANGELOG.md).
192
+
193
+ ## Installation and extras
194
+
195
+ Python 3.12+. Runtime dependencies are only `starlette>=0.44` and `packaging>=23`.
196
+
197
+ ```bash
198
+ pip install "sharpit[fastapi]"
199
+ ```
200
+
201
+ Optional extras:
202
+
203
+ | Extra | Adds | Why |
204
+ |---|---|---|
205
+ | `sharpit[fastapi]` | `fastapi>=0.115` | the supported host |
206
+ | `sharpit[settings]` | `pydantic-settings>=2.4` | the Config panel shows which source each value came from |
207
+
208
+ ## Configuration and activation
209
+
210
+ Call `sharpit.install(app)` after adding your own middleware. Starlette builds middleware from the outside in, so
211
+ calling `install()` last ensures sharpit's capture middleware sits outside your application middleware. This lets sharpit
212
+ measure total request durations and record unhandled errors correctly.
213
+
214
+ Keyword arguments for `sharpit.install()`:
215
+
216
+ - `engines`: optional sequence of SQLAlchemy `Engine` or `AsyncEngine` instances to monitor in connection pools and
217
+ health checks (e.g. `engines=[engine]`). If omitted, engines are discovered automatically on first connection.
218
+ - `health_checks`: optional mapping of check names to zero-argument callables (e.g. `health_checks={"cache": ping_cache}`).
219
+ - `alembic_config`: optional path to `alembic.ini` (default `"alembic.ini"`).
220
+ - `settings`: optional pydantic-settings instance or sequence of instances to show configuration provenance.
221
+ - `models`: optional SQLAlchemy 2.0 declarative base, registry, or a list of them or of mapped classes, for the Data
222
+ panel (e.g. `models=Base`). sharpit never configures mappers or runs SQL to read them.
223
+
224
+ With a PostgreSQL engine, the PostgreSQL panel reads vital signs, sessions, statements, indexes, tables, vacuum,
225
+ replication and settings on an explicit `POST /sharpit/api/postgresql/read`: one read-only transaction with statement
226
+ and lock timeouts, a read budget and row limits, query text masked. `GET` returns the last read and never touches the database.
227
+
228
+ The `sqlalchemy-statistics` panel (BootUI's `hibernate-statistics`; `GET {api}/sqlalchemy-statistics`, MCP
229
+ `get_sqlalchemy_statistics`) shows statement counts from SQL Trace's lifetime totals, the slowest statement and N+1
230
+ candidates per route. SQLAlchemy reports SQL statements, not ORM sessions or entities, so the Hibernate-only counters
231
+ (sessions, flushes, transactions, entity and collection counts) are `null`, each with a reason. It needs SQL Trace, and
232
+ reports `statistics.warnings` when SQL Trace recording is paused.
233
+
234
+ Other options are keyword arguments or environment variables, see [Settings](https://ffroliva.github.io/sharpit/settings/).
235
+
236
+ If `/sharpit` answers 404, read [Activation](https://ffroliva.github.io/sharpit/activation/): sharpit stays off unless a dev signal turns it on.
237
+
238
+ ## Documentation
239
+
240
+ The full documentation is at **<https://ffroliva.github.io/sharpit/>**:
241
+
242
+ - [Activation](https://ffroliva.github.io/sharpit/activation/): when sharpit turns on, and why a plain `uvicorn app:app` gives 404
243
+ - [Panels](https://ffroliva.github.io/sharpit/panels/): what each panel shows
244
+ - [Pytest plugin](https://ffroliva.github.io/sharpit/pytest-plugin/): CI gates for queries, N+1, exceptions, and advisors
245
+ - [Test report](https://ffroliva.github.io/sharpit/report/): the `sharpit-report/1` JSON schema and JUnit XML
246
+ - [SQL sources](https://ffroliva.github.io/sharpit/sql-sources/): tracing SQLAlchemy and raw `sqlite3`
247
+ - [MCP for AI agents](https://ffroliva.github.io/sharpit/mcp/): the read-only MCP endpoint and its tools
248
+ - [Settings](https://ffroliva.github.io/sharpit/settings/): every environment variable and `install()` keyword
249
+ - [Safety model](https://ffroliva.github.io/sharpit/safety/): local-only guard, tokens, masking, proxies and workers
250
+ - [How it works](https://ffroliva.github.io/sharpit/how-it-works/) and [Deviations from BootUI](https://ffroliva.github.io/sharpit/deviations/)
251
+
252
+ ## Licence
253
+
254
+ Apache License 2.0. See [LICENSE](https://github.com/ffroliva/sharpit/blob/main/LICENSE) and [NOTICE](https://github.com/ffroliva/sharpit/blob/main/NOTICE). sharpit is derived from
255
+ [BootUI](https://github.com/jdubois/boot-ui), Copyright Julien Dubois.