entrygraph 0.1.42__tar.gz → 0.1.44__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 (201) hide show
  1. {entrygraph-0.1.42 → entrygraph-0.1.44}/PKG-INFO +1 -1
  2. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/_version.py +2 -2
  3. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/detect/entrypoints/golang.py +72 -14
  4. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/detect/entrypoints/ruby.py +13 -0
  5. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/extract/golang.py +20 -0
  6. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/extract/ir.py +4 -0
  7. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/test_entrypoints_go.py +108 -1
  8. entrygraph-0.1.44/tests/test_entrypoints_ruby.py +63 -0
  9. {entrygraph-0.1.42 → entrygraph-0.1.44}/.github/workflows/ci.yml +0 -0
  10. {entrygraph-0.1.42 → entrygraph-0.1.44}/.github/workflows/release.yml +0 -0
  11. {entrygraph-0.1.42 → entrygraph-0.1.44}/.gitignore +0 -0
  12. {entrygraph-0.1.42 → entrygraph-0.1.44}/LICENSE +0 -0
  13. {entrygraph-0.1.42 → entrygraph-0.1.44}/README.md +0 -0
  14. {entrygraph-0.1.42 → entrygraph-0.1.44}/RELEASING.md +0 -0
  15. {entrygraph-0.1.42 → entrygraph-0.1.44}/pyproject.toml +0 -0
  16. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/__init__.py +0 -0
  17. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/__main__.py +0 -0
  18. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/api.py +0 -0
  19. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/cli/__init__.py +0 -0
  20. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/cli/main.py +0 -0
  21. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/cli/render.py +0 -0
  22. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/data/sinks/csharp.toml +0 -0
  23. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/data/sinks/go.toml +0 -0
  24. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/data/sinks/java.toml +0 -0
  25. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/data/sinks/javascript.toml +0 -0
  26. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/data/sinks/lib_javascript.toml +0 -0
  27. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/data/sinks/lib_python.toml +0 -0
  28. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/data/sinks/php.toml +0 -0
  29. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/data/sinks/python.toml +0 -0
  30. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/data/sinks/ruby.toml +0 -0
  31. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/data/sinks/rust.toml +0 -0
  32. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/db/__init__.py +0 -0
  33. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/db/engine.py +0 -0
  34. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/db/meta.py +0 -0
  35. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/db/models.py +0 -0
  36. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/db/queries.py +0 -0
  37. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/detect/__init__.py +0 -0
  38. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/detect/entrypoints/__init__.py +0 -0
  39. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/detect/entrypoints/base.py +0 -0
  40. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/detect/entrypoints/configs.py +0 -0
  41. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/detect/entrypoints/csharp.py +0 -0
  42. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/detect/entrypoints/java.py +0 -0
  43. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/detect/entrypoints/javascript.py +0 -0
  44. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/detect/entrypoints/php.py +0 -0
  45. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/detect/entrypoints/python.py +0 -0
  46. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/detect/entrypoints/rust.py +0 -0
  47. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/detect/frameworks.py +0 -0
  48. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/detect/manifests.py +0 -0
  49. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/detect/taint.py +0 -0
  50. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/errors.py +0 -0
  51. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/extract/__init__.py +0 -0
  52. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/extract/base.py +0 -0
  53. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/extract/csharp.py +0 -0
  54. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/extract/java.py +0 -0
  55. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/extract/javascript.py +0 -0
  56. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/extract/php.py +0 -0
  57. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/extract/python.py +0 -0
  58. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/extract/registry.py +0 -0
  59. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/extract/ruby.py +0 -0
  60. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/extract/rust.py +0 -0
  61. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/fs/__init__.py +0 -0
  62. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/fs/hashing.py +0 -0
  63. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/fs/lang.py +0 -0
  64. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/fs/walker.py +0 -0
  65. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/graph/__init__.py +0 -0
  66. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/graph/adjacency.py +0 -0
  67. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/graph/cte.py +0 -0
  68. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/graph/scoring.py +0 -0
  69. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/kinds.py +0 -0
  70. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/parsing/__init__.py +0 -0
  71. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/parsing/parsers.py +0 -0
  72. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/parsing/queries.py +0 -0
  73. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/pipeline/__init__.py +0 -0
  74. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/pipeline/scanner.py +0 -0
  75. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/pipeline/worker.py +0 -0
  76. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/pipeline/writer.py +0 -0
  77. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/py.typed +0 -0
  78. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/queries/csharp/calls.scm +0 -0
  79. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/queries/csharp/definitions.scm +0 -0
  80. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/queries/csharp/imports.scm +0 -0
  81. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/queries/go/calls.scm +0 -0
  82. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/queries/go/definitions.scm +0 -0
  83. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/queries/go/imports.scm +0 -0
  84. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/queries/java/calls.scm +0 -0
  85. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/queries/java/definitions.scm +0 -0
  86. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/queries/java/imports.scm +0 -0
  87. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/queries/javascript/calls.scm +0 -0
  88. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/queries/javascript/definitions.scm +0 -0
  89. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/queries/javascript/imports.scm +0 -0
  90. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/queries/php/calls.scm +0 -0
  91. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/queries/php/definitions.scm +0 -0
  92. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/queries/php/imports.scm +0 -0
  93. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/queries/python/calls.scm +0 -0
  94. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/queries/python/definitions.scm +0 -0
  95. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/queries/python/imports.scm +0 -0
  96. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/queries/ruby/calls.scm +0 -0
  97. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/queries/ruby/definitions.scm +0 -0
  98. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/queries/ruby/imports.scm +0 -0
  99. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/queries/rust/calls.scm +0 -0
  100. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/queries/rust/definitions.scm +0 -0
  101. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/queries/rust/imports.scm +0 -0
  102. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/resolve/__init__.py +0 -0
  103. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/resolve/externals.py +0 -0
  104. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/resolve/hierarchy.py +0 -0
  105. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/resolve/resolver.py +0 -0
  106. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/resolve/symbol_table.py +0 -0
  107. {entrygraph-0.1.42 → entrygraph-0.1.44}/src/entrygraph/results.py +0 -0
  108. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/conftest.py +0 -0
  109. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/fixtures/csharp/aspnet_app/Controllers/ReportsController.cs +0 -0
  110. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/fixtures/csharp/aspnet_app/Program.cs +0 -0
  111. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/fixtures/csharp/aspnet_app/Services/ReportService.cs +0 -0
  112. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/fixtures/csharp/aspnet_app/app.csproj +0 -0
  113. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/fixtures/csharp/minimalapi_app/Program.cs +0 -0
  114. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/fixtures/csharp/minimalapi_app/app.csproj +0 -0
  115. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/fixtures/go/gin_app/go.mod +0 -0
  116. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/fixtures/go/gin_app/main.go +0 -0
  117. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/fixtures/go/gin_app/service.go +0 -0
  118. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/fixtures/go/nethttp_app/go.mod +0 -0
  119. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/fixtures/go/nethttp_app/main.go +0 -0
  120. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/fixtures/java/methodref_app/pom.xml +0 -0
  121. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/fixtures/java/methodref_app/src/main/java/com/example/App.java +0 -0
  122. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/fixtures/java/spring_app/pom.xml +0 -0
  123. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/fixtures/java/spring_app/src/main/java/com/example/Application.java +0 -0
  124. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/fixtures/java/spring_app/src/main/java/com/example/ReportRunner.java +0 -0
  125. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/fixtures/java/spring_app/src/main/java/com/example/ReportService.java +0 -0
  126. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/fixtures/java/spring_app/src/main/java/com/example/UserController.java +0 -0
  127. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/fixtures/javascript/commonjs_app/server.js +0 -0
  128. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/fixtures/javascript/express_app/package.json +0 -0
  129. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/fixtures/javascript/express_app/src/routes.js +0 -0
  130. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/fixtures/javascript/express_app/src/services.js +0 -0
  131. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/fixtures/php/laravel_app/app/Http/Controllers/ReportController.php +0 -0
  132. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/fixtures/php/laravel_app/artisan +0 -0
  133. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/fixtures/php/laravel_app/composer.json +0 -0
  134. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/fixtures/php/laravel_app/routes/web.php +0 -0
  135. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/fixtures/python/chained_sinks/app.py +0 -0
  136. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/fixtures/python/flask_app/app/__init__.py +0 -0
  137. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/fixtures/python/flask_app/app/db.py +0 -0
  138. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/fixtures/python/flask_app/app/routes.py +0 -0
  139. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/fixtures/python/flask_app/app/services.py +0 -0
  140. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/fixtures/python/flask_app/cli.py +0 -0
  141. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/fixtures/python/flask_app/requirements.txt +0 -0
  142. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/fixtures/python/fuzzy_sink/app.py +0 -0
  143. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/fixtures/python/heal_fidelity/caller.py +0 -0
  144. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/fixtures/python/heal_fidelity/worker.py +0 -0
  145. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/fixtures/python/may_continue/app.py +0 -0
  146. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/fixtures/python/sanitizer/app.py +0 -0
  147. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/fixtures/python/taint_source/handler.py +0 -0
  148. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/fixtures/ruby/sinatra_app/Gemfile +0 -0
  149. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/fixtures/ruby/sinatra_app/app.rb +0 -0
  150. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/fixtures/ruby/sinatra_app/services/runner.rb +0 -0
  151. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/fixtures/rust/axum_app/Cargo.toml +0 -0
  152. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/fixtures/rust/axum_app/src/handlers.rs +0 -0
  153. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/fixtures/rust/axum_app/src/main.rs +0 -0
  154. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/fixtures/rust/axum_callback_app/Cargo.toml +0 -0
  155. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/fixtures/rust/axum_callback_app/src/main.rs +0 -0
  156. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/fixtures/rust/scoped_sink_app/Cargo.toml +0 -0
  157. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/fixtures/rust/scoped_sink_app/src/main.rs +0 -0
  158. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/test_api.py +0 -0
  159. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/test_cli.py +0 -0
  160. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/test_commonjs.py +0 -0
  161. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/test_csharp_callbacks.py +0 -0
  162. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/test_cte_bounds.py +0 -0
  163. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/test_engine_pragmas.py +0 -0
  164. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/test_entrypoint_expansion.py +0 -0
  165. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/test_entrypoints.py +0 -0
  166. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/test_entrypoints_javascript.py +0 -0
  167. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/test_extract_csharp.py +0 -0
  168. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/test_extract_go.py +0 -0
  169. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/test_extract_java.py +0 -0
  170. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/test_extract_javascript.py +0 -0
  171. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/test_extract_php.py +0 -0
  172. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/test_extract_python.py +0 -0
  173. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/test_extract_ruby.py +0 -0
  174. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/test_extract_rust.py +0 -0
  175. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/test_frameworks.py +0 -0
  176. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/test_fuzzy_sink.py +0 -0
  177. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/test_go_callbacks.py +0 -0
  178. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/test_hardening.py +0 -0
  179. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/test_heal_fidelity.py +0 -0
  180. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/test_incremental.py +0 -0
  181. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/test_indexer.py +0 -0
  182. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/test_java_callbacks.py +0 -0
  183. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/test_lang.py +0 -0
  184. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/test_manifests.py +0 -0
  185. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/test_may_continue.py +0 -0
  186. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/test_models.py +0 -0
  187. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/test_pool.py +0 -0
  188. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/test_reachability.py +0 -0
  189. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/test_registry_cache.py +0 -0
  190. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/test_render.py +0 -0
  191. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/test_resolver.py +0 -0
  192. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/test_rust_callbacks.py +0 -0
  193. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/test_rust_scoped_sinks.py +0 -0
  194. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/test_sanitizer_languages.py +0 -0
  195. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/test_scoring.py +0 -0
  196. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/test_sink_catalog.py +0 -0
  197. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/test_taint.py +0 -0
  198. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/test_taint_sanitizers.py +0 -0
  199. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/test_taint_sources.py +0 -0
  200. {entrygraph-0.1.42 → entrygraph-0.1.44}/tests/test_walker.py +0 -0
  201. {entrygraph-0.1.42 → entrygraph-0.1.44}/uv.lock +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: entrygraph
3
- Version: 0.1.42
3
+ Version: 0.1.44
4
4
  Summary: Language-agnostic code graph: query symbols, entrypoints, and source-to-sink call paths from a SQLite index
5
5
  Project-URL: Repository, https://github.com/brettbergin/entrygraph
6
6
  Author-email: Brett Bergin <brettberginbc@yahoo.com>
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
18
18
  commit_id: str | None
19
19
  __commit_id__: str | None
20
20
 
21
- __version__ = version = '0.1.42'
22
- __version_tuple__ = version_tuple = (0, 1, 42)
21
+ __version__ = version = '0.1.44'
22
+ __version_tuple__ = version_tuple = (0, 1, 44)
23
23
 
24
24
  __commit_id__ = commit_id = None
@@ -22,6 +22,12 @@ _GIN_METHODS = (
22
22
  _NETHTTP_REGISTER = frozenset({"HandleFunc", "Handle"})
23
23
 
24
24
 
25
+ def _is_go_test(path: str) -> bool:
26
+ """Go test files (`*_test.go`) register routes only to exercise handlers; those
27
+ are test-harness calls, not the production route surface (#33)."""
28
+ return path.endswith("_test.go")
29
+
30
+
25
31
  def _go_main(x: FileExtraction) -> list[EntrypointHint]:
26
32
  hints = []
27
33
  for symbol in x.symbols:
@@ -43,6 +49,8 @@ def _go_main(x: FileExtraction) -> list[EntrypointHint]:
43
49
 
44
50
 
45
51
  def _nethttp_routes(x: FileExtraction) -> list[EntrypointHint]:
52
+ if _is_go_test(x.path):
53
+ return []
46
54
  hints = []
47
55
  for ref in x.references:
48
56
  if (
@@ -67,7 +75,43 @@ def _nethttp_routes(x: FileExtraction) -> list[EntrypointHint]:
67
75
  return hints
68
76
 
69
77
 
78
+ def _group_prefixes(x: FileExtraction) -> dict[str, str]:
79
+ """Map each gin/fiber router-group variable to its composed path prefix.
80
+
81
+ `api := app.Group("/api"); v1 := api.Group("/v1")` -> {api: /api, v1: /api/v1}.
82
+ A nested group inherits its parent group's prefix; Go requires a variable to be
83
+ declared before use, so ascending line order resolves the chain in one pass. A
84
+ group with no assign target (`h(app.Group("/x"))`, passed straight into another
85
+ function) is out of static reach and contributes no prefix.
86
+ """
87
+ prefixes: dict[str, str] = {}
88
+ groups = sorted(
89
+ (
90
+ ref
91
+ for ref in x.references
92
+ if ref.kind == "call"
93
+ and ref.callee_name == "Group"
94
+ and ref.assign_target
95
+ and ref.receiver_text is not None
96
+ and ref.arg_preview
97
+ ),
98
+ key=lambda r: r.span.start_line,
99
+ )
100
+ for ref in groups:
101
+ if ref.arg_preview is None: # already filtered above; narrows for the type-checker
102
+ continue
103
+ local = first_string_arg("(" + ref.arg_preview.lstrip("("))
104
+ if local is None:
105
+ continue # closure-only group (chi-style middleware group) — no prefix
106
+ parent = prefixes.get(ref.receiver_text or "", "")
107
+ prefixes[ref.assign_target or ""] = _compose_prefixes([parent, local])
108
+ return prefixes
109
+
110
+
70
111
  def _gin_routes(x: FileExtraction) -> list[EntrypointHint]:
112
+ if _is_go_test(x.path):
113
+ return []
114
+ prefixes = _group_prefixes(x)
71
115
  hints = []
72
116
  for ref in x.references:
73
117
  if (
@@ -77,20 +121,30 @@ def _gin_routes(x: FileExtraction) -> list[EntrypointHint]:
77
121
  and ref.arg_preview
78
122
  ):
79
123
  route = first_string_arg("(" + ref.arg_preview.lstrip("("))
80
- if route is not None and route.startswith("/"):
81
- verb = ref.callee_name.upper()
82
- method = verb if verb in _HTTP_VERBS else "*"
83
- hints.append(
84
- EntrypointHint(
85
- rule_id="go.gin.route",
86
- kind=EntrypointKind.HTTP_ROUTE,
87
- handler_qualified_name=ref.caller_qualified_name,
88
- route=route,
89
- http_methods=[method],
90
- framework="gin",
91
- metadata={"registration": ref.arg_preview},
92
- )
124
+ if route is None:
125
+ continue
126
+ verb = ref.callee_name.upper()
127
+ is_verb = verb in _HTTP_VERBS
128
+ group_prefix = prefixes.get(ref.receiver_text)
129
+ # A grouped route often drops the leading slash (`v1.GET("users")`) since
130
+ # the group carries the prefix; accept that only for a concrete verb on a
131
+ # known group var. Otherwise keep the conservative leading-slash check
132
+ # (guards against Handle/Any's method-first arg and stray string args).
133
+ if not route.startswith("/") and not (is_verb and group_prefix is not None):
134
+ continue
135
+ method = verb if is_verb else "*"
136
+ full = _compose_prefixes([group_prefix or "", route])
137
+ hints.append(
138
+ EntrypointHint(
139
+ rule_id="go.gin.route",
140
+ kind=EntrypointKind.HTTP_ROUTE,
141
+ handler_qualified_name=ref.caller_qualified_name,
142
+ route=full,
143
+ http_methods=[method],
144
+ framework="gin",
145
+ metadata={"registration": ref.arg_preview},
93
146
  )
147
+ )
94
148
  return hints
95
149
 
96
150
 
@@ -128,6 +182,8 @@ def _chi_routes(x: FileExtraction) -> list[EntrypointHint]:
128
182
  falls inside a Route call's span gets that prefix (nested Routes stack). Mount
129
183
  (`r.Mount("/api", subRouter())`) points at a router built in another function,
130
184
  which is out of static reach, so its prefix isn't composed."""
185
+ if _is_go_test(x.path):
186
+ return []
131
187
  scopes: list[tuple[int, int, str]] = []
132
188
  for ref in x.references:
133
189
  if (
@@ -185,6 +241,8 @@ def _gorilla_routes(x: FileExtraction) -> list[EntrypointHint]:
185
241
  per line. Previously only bare HandleFunc was matched — the `.Path().Methods()`
186
242
  form and any `.Methods()` verb were dropped (loki: ~0% of gorilla routes).
187
243
  """
244
+ if _is_go_test(x.path):
245
+ return []
188
246
  routes: dict[int, str] = {}
189
247
  methods: dict[int, list[str]] = {}
190
248
  handlers: dict[int, str | None] = {}
@@ -253,7 +311,7 @@ def _grpc_services(x: FileExtraction) -> list[EntrypointHint]:
253
311
  `route` — the Entrypoint row has no name column, and it keeps distinct services
254
312
  from collapsing in dedup (they all share `handler_qualified_name=None`).
255
313
  """
256
- if x.path.endswith("_test.go"):
314
+ if _is_go_test(x.path):
257
315
  return [] # test harnesses spin up real services; not production surface (#33)
258
316
  hints = []
259
317
  seen: set[str] = set()
@@ -21,6 +21,15 @@ _SINATRA_VERBS = frozenset({"get", "post", "put", "delete", "patch"})
21
21
  _RAILS_VERBS = frozenset({"get", "post", "put", "patch", "delete", "resources", "resource", "root"})
22
22
 
23
23
 
24
+ def _is_ruby_test(path: str) -> bool:
25
+ """RSpec / Test::Unit files. Rack::Test reuses the bare `get '/x'` verb DSL
26
+ inside specs, indistinguishable from a Sinatra/Grape route declaration, so those
27
+ files must not contribute to the route surface (#33)."""
28
+ return (
29
+ path.endswith(("_spec.rb", "_test.rb")) or "/spec/" in f"/{path}" or "/test/" in f"/{path}"
30
+ )
31
+
32
+
24
33
  def _is_rails_routes_file(path: str) -> bool:
25
34
  """The main `config/routes.rb` plus split route files loaded via `draw(:x)`
26
35
  (`config/routes/api.rb`, `config/routes/admin.rb`, ...). Missing the split
@@ -29,6 +38,8 @@ def _is_rails_routes_file(path: str) -> bool:
29
38
 
30
39
 
31
40
  def _sinatra_routes(x: FileExtraction) -> list[EntrypointHint]:
41
+ if _is_ruby_test(x.path):
42
+ return []
32
43
  hints = []
33
44
  for ref in x.references:
34
45
  if (
@@ -106,6 +117,8 @@ def _rake_tasks(x: FileExtraction) -> list[EntrypointHint]:
106
117
 
107
118
  def _grape_routes(x: FileExtraction) -> list[EntrypointHint]:
108
119
  """Grape API classes: class-body `get '/x'` / `post '/y'` declarations."""
120
+ if _is_ruby_test(x.path):
121
+ return []
109
122
  hints = []
110
123
  for ref in x.references:
111
124
  if (
@@ -263,6 +263,7 @@ class GoExtractor:
263
263
  caller_qualified_name=caller,
264
264
  arg_count=len(args.named_children) if args is not None else 0,
265
265
  arg_preview=truncate(node_text(args)) if args is not None else None,
266
+ assign_target=self._assign_target(node),
266
267
  )
267
268
  )
268
269
  self._emit_callbacks(args, caller, out)
@@ -280,6 +281,25 @@ class GoExtractor:
280
281
  )
281
282
  )
282
283
 
284
+ def _assign_target(self, call: Node) -> str | None:
285
+ """LHS variable when `call` is the sole RHS of a single-var `:=`/`=`.
286
+
287
+ `api := app.Group("/api")` -> "api". Multi-assignment (`a, b := f()`) and
288
+ calls nested in a larger expression (`h(app.Group("/x"))`) return None —
289
+ the group there isn't bound to a reachable variable.
290
+ """
291
+ right = call.parent
292
+ if right is None or right.type != "expression_list":
293
+ return None
294
+ stmt = right.parent
295
+ if stmt is None or stmt.type not in ("short_var_declaration", "assignment_statement"):
296
+ return None
297
+ left = stmt.child_by_field_name("left")
298
+ if left is None or len(left.named_children) != 1 or len(right.named_children) != 1:
299
+ return None
300
+ ident = left.named_children[0]
301
+ return node_text(ident) if ident.type == "identifier" else None
302
+
283
303
  def _emit_callbacks(self, args: Node | None, caller: str | None, out: FileExtraction) -> None:
284
304
  """Bare-identifier arguments passed to a call — a function value that may be
285
305
  invoked later, e.g. ``http.HandleFunc("/", handler)``. Resolution keeps only
@@ -58,6 +58,10 @@ class RawReference:
58
58
  caller_qualified_name: str | None # FQN of enclosing def; None = module level
59
59
  arg_count: int = 0
60
60
  arg_preview: str | None = None # truncated literal args, for sink triage
61
+ # LHS variable when this call is the sole RHS of a single-var `:=`/`=`
62
+ # (`api := app.Group("/api")`). Lets router-group rules link routes registered
63
+ # on the group var back to its path prefix. Populated by the Go extractor.
64
+ assign_target: str | None = None
61
65
 
62
66
 
63
67
  @dataclass(slots=True)
@@ -19,7 +19,7 @@ def _go_ext(references, path="main.go"):
19
19
  )
20
20
 
21
21
 
22
- def _call(callee, receiver, arg, start=1, end=None):
22
+ def _call(callee, receiver, arg, start=1, end=None, assign=None):
23
23
  return RawReference(
24
24
  kind="call",
25
25
  callee_text=f"{receiver}.{callee}" if receiver else callee,
@@ -28,6 +28,7 @@ def _call(callee, receiver, arg, start=1, end=None):
28
28
  span=Span(start, 0, end if end is not None else start, 40),
29
29
  caller_qualified_name="app.routes",
30
30
  arg_preview=arg,
31
+ assign_target=assign,
31
32
  )
32
33
 
33
34
 
@@ -118,3 +119,109 @@ def test_grpc_test_harness_registrations_excluded():
118
119
  # A real service registered inside a *_test.go harness is not production surface.
119
120
  refs = [_call("RegisterFrontendServer", "frontendv1pb", "(grpcServer, v1)")]
120
121
  assert _grpc_rule().match(_go_ext(refs, path="pkg/frontend/frontend_test.go")) == []
122
+
123
+
124
+ def _gin_rule():
125
+ return {r.id: r for r in rules_for("go", {"gin"})}["go.gin.route"]
126
+
127
+
128
+ def _fiber_rule():
129
+ return {r.id: r for r in rules_for("go", {"fiber"})}["go.fiber.route"]
130
+
131
+
132
+ def test_gin_group_prefix_composed():
133
+ # api := router.Group("/api"); api.GET("/users", h) -> /api/users (#36). The
134
+ # group var is bound via the call's assign_target.
135
+ refs = [
136
+ _call("Group", "router", '("/api")', start=1, assign="api"),
137
+ _call("GET", "api", '("/users", listUsers)', start=2),
138
+ _call("GET", "router", '("/health", health)', start=3), # ungrouped
139
+ ]
140
+ got = {(h.http_methods[0], h.route) for h in _gin_rule().match(_go_ext(refs))}
141
+ assert got == {("GET", "/api/users"), ("GET", "/health")}
142
+
143
+
144
+ def test_gin_nested_groups_stack():
145
+ # api := app.Group("/api"); v1 := api.Group("/v1"); v1.GET("/users", h)
146
+ refs = [
147
+ _call("Group", "app", '("/api")', start=1, assign="api"),
148
+ _call("Group", "api", '("/v1")', start=2, assign="v1"),
149
+ _call("GET", "v1", '("/users", h)', start=3),
150
+ ]
151
+ got = {(h.http_methods[0], h.route) for h in _gin_rule().match(_go_ext(refs))}
152
+ assert got == {("GET", "/api/v1/users")}
153
+
154
+
155
+ def test_gin_grouped_route_without_leading_slash():
156
+ # Grouped routes commonly drop the leading slash (gin versioning example);
157
+ # accept it for a concrete verb on a known group var and still prefix it.
158
+ refs = [
159
+ _call("Group", "router", '("/v1")', start=1, assign="apiV1"),
160
+ _call("GET", "apiV1", '("users", h)', start=2),
161
+ ]
162
+ got = {(h.http_methods[0], h.route) for h in _gin_rule().match(_go_ext(refs))}
163
+ assert got == {("GET", "/v1/users")}
164
+
165
+
166
+ def test_gin_ungrouped_route_still_requires_leading_slash():
167
+ # A slash-less path on a non-group receiver stays filtered (guards against
168
+ # Handle/Any's method-first arg and stray string args).
169
+ refs = [_call("GET", "router", '("users", h)', start=1)]
170
+ assert _gin_rule().match(_go_ext(refs)) == []
171
+
172
+
173
+ def test_gin_group_passed_to_function_has_no_prefix():
174
+ # h(app.Group("/api")) has no assign target — out of static reach, so a later
175
+ # same-named receiver must not pick up a phantom prefix.
176
+ refs = [
177
+ _call("Group", "app", '("/api")', start=1, assign=None),
178
+ _call("GET", "app", '("/health", h)', start=2),
179
+ ]
180
+ got = {(h.http_methods[0], h.route) for h in _gin_rule().match(_go_ext(refs))}
181
+ assert got == {("GET", "/health")}
182
+
183
+
184
+ def test_fiber_group_prefix_end_to_end():
185
+ # Exercises the real Go extractor (assign_target capture) + fiber rule together.
186
+ from entrygraph.extract.base import FileContext
187
+ from entrygraph.extract.golang import GoExtractor
188
+ from entrygraph.parsing.parsers import parse
189
+
190
+ src = (
191
+ b"package router\n"
192
+ b"func SetupRoutes(app *fiber.App) {\n"
193
+ b' api := app.Group("/api")\n'
194
+ b' api.Get("/", handler.Hello)\n'
195
+ b' auth := api.Group("/auth")\n'
196
+ b' auth.Post("/login", handler.Login)\n'
197
+ b"}\n"
198
+ )
199
+ ctx = FileContext(
200
+ path="router/router.go",
201
+ language="go",
202
+ module_path="router",
203
+ source=src,
204
+ is_package=False,
205
+ )
206
+ x = GoExtractor().extract(parse("go", src), ctx)
207
+ got = {(h.http_methods[0], h.route) for h in _fiber_rule().match(x)}
208
+ assert got == {("GET", "/api"), ("POST", "/api/auth/login")}
209
+
210
+
211
+ def test_go_route_rules_skip_test_files():
212
+ # *_test.go registers routes only to exercise handlers (chi corpus: 152/204
213
+ # routes came from _test.go). All Go HTTP-route rules must skip them (#33).
214
+ refs = [_call("Get", "r", '("/users", h)')]
215
+ assert _chi_rule().match(_go_ext(refs, path="middleware/compress_test.go")) == []
216
+ assert _gin_rule().match(_go_ext(refs, path="api/routes_test.go")) == []
217
+ assert _fiber_rule().match(_go_ext(refs, path="api/routes_test.go")) == []
218
+ # sanity: the same refs in a non-test file still produce a route
219
+ assert _chi_rule().match(_go_ext(refs, path="middleware/compress.go"))
220
+
221
+
222
+ def test_go_nethttp_and_grpc_skip_test_files():
223
+ nethttp = {r.id: r for r in rules_for("go", {"net/http"})}["go.nethttp.route"]
224
+ refs = [_call("HandleFunc", "http", '("/x", h)')]
225
+ assert nethttp.match(_go_ext(refs, path="server_test.go")) == []
226
+ grpc = [_call("RegisterPusherServer", "pb", "(s, impl)")]
227
+ assert _grpc_rule().match(_go_ext(grpc, path="server_test.go")) == []
@@ -0,0 +1,63 @@
1
+ """Ruby entrypoint-rule tests (kept per-language so PRs touching different
2
+ languages don't serially conflict on one shared test module)."""
3
+
4
+ from __future__ import annotations
5
+
6
+ from entrygraph.detect.entrypoints import rules_for
7
+ from entrygraph.extract.ir import FileExtraction, RawReference, Span
8
+
9
+
10
+ def _ruby_ext(references, path):
11
+ return FileExtraction(
12
+ path=path,
13
+ language="ruby",
14
+ module_path=path.replace("/", ".").removesuffix(".rb"),
15
+ parse_ok=True,
16
+ error_count=0,
17
+ symbols=[],
18
+ references=list(references),
19
+ )
20
+
21
+
22
+ def _verb(verb, route):
23
+ return RawReference(
24
+ kind="call",
25
+ callee_text=verb,
26
+ callee_name=verb,
27
+ receiver_text=None,
28
+ span=Span(1, 0, 1, 40),
29
+ caller_qualified_name=None,
30
+ arg_preview=f"('{route}')",
31
+ )
32
+
33
+
34
+ def _sinatra_rule():
35
+ return {r.id: r for r in rules_for("ruby", {"sinatra"})}["ruby.sinatra.route"]
36
+
37
+
38
+ def _grape_rule():
39
+ return {r.id: r for r in rules_for("ruby", {"grape"})}["ruby.grape.route"]
40
+
41
+
42
+ def test_sinatra_route_in_app_file_detected():
43
+ hints = _sinatra_rule().match(_ruby_ext([_verb("get", "/health")], "app.rb"))
44
+ assert [h.route for h in hints] == ["/health"]
45
+
46
+
47
+ def test_sinatra_ignores_rack_test_calls_in_spec_and_test_files():
48
+ # Rack::Test uses the same bare `get '/x'` DSL inside specs; those files are not
49
+ # the route surface (sinatra corpus: 256/274 routes came from test/spec) (#33).
50
+ for path in (
51
+ "test/routing_test.rb",
52
+ "spec/app_spec.rb",
53
+ "rack-protection/spec/lib/rack/protection/ip_spoofing_spec.rb",
54
+ "some/nested/test/helper_test.rb",
55
+ ):
56
+ assert _sinatra_rule().match(_ruby_ext([_verb("get", "/")], path)) == []
57
+
58
+
59
+ def test_grape_ignores_test_files():
60
+ assert _grape_rule().match(_ruby_ext([_verb("post", "/x")], "spec/api_spec.rb")) == []
61
+ assert [h.route for h in _grape_rule().match(_ruby_ext([_verb("post", "/x")], "api.rb"))] == [
62
+ "/x"
63
+ ]
File without changes
File without changes
File without changes
File without changes
File without changes