cisco-project-quarry 0.1.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 (443) hide show
  1. cisco_project_quarry-0.1.0/.agents/plugins/marketplace.json +20 -0
  2. cisco_project_quarry-0.1.0/.claude-plugin/marketplace.json +17 -0
  3. cisco_project_quarry-0.1.0/.claude-plugin/plugin.json +13 -0
  4. cisco_project_quarry-0.1.0/.codex-plugin/plugin.json +42 -0
  5. cisco_project_quarry-0.1.0/.gitignore +231 -0
  6. cisco_project_quarry-0.1.0/.mcp.json +15 -0
  7. cisco_project_quarry-0.1.0/CONTRIBUTING.md +43 -0
  8. cisco_project_quarry-0.1.0/LICENSE +201 -0
  9. cisco_project_quarry-0.1.0/PKG-INFO +154 -0
  10. cisco_project_quarry-0.1.0/README.md +100 -0
  11. cisco_project_quarry-0.1.0/SECURITY.md +44 -0
  12. cisco_project_quarry-0.1.0/docs/PLUGIN.md +756 -0
  13. cisco_project_quarry-0.1.0/docs/architecture.md +29 -0
  14. cisco_project_quarry-0.1.0/docs/configuration.md +56 -0
  15. cisco_project_quarry-0.1.0/docs/dsl.md +65 -0
  16. cisco_project_quarry-0.1.0/docs/getting-started.md +53 -0
  17. cisco_project_quarry-0.1.0/docs/how-quarry-works.md +69 -0
  18. cisco_project_quarry-0.1.0/docs/integration.md +17 -0
  19. cisco_project_quarry-0.1.0/docs/messages.md +38 -0
  20. cisco_project_quarry-0.1.0/docs/model-inference.md +81 -0
  21. cisco_project_quarry-0.1.0/docs/parameters.md +36 -0
  22. cisco_project_quarry-0.1.0/docs/python-api.md +62 -0
  23. cisco_project_quarry-0.1.0/docs/repository-governance.md +87 -0
  24. cisco_project_quarry-0.1.0/docs/rule-writing.md +67 -0
  25. cisco_project_quarry-0.1.0/docs/string-matching.md +43 -0
  26. cisco_project_quarry-0.1.0/docs/testing.md +30 -0
  27. cisco_project_quarry-0.1.0/examples/README.md +74 -0
  28. cisco_project_quarry-0.1.0/examples/all-rules.yaml +30 -0
  29. cisco_project_quarry-0.1.0/examples/config.yaml +45 -0
  30. cisco_project_quarry-0.1.0/examples/corpus-manifest.json +258 -0
  31. cisco_project_quarry-0.1.0/examples/data/addition.json +8 -0
  32. cisco_project_quarry-0.1.0/examples/data/addition.negative.json +8 -0
  33. cisco_project_quarry-0.1.0/examples/data/adjacent_alias.json +16 -0
  34. cisco_project_quarry-0.1.0/examples/data/adjacent_alias.negative.json +12 -0
  35. cisco_project_quarry-0.1.0/examples/data/all_comprehension.json +24 -0
  36. cisco_project_quarry-0.1.0/examples/data/all_comprehension.negative.json +30 -0
  37. cisco_project_quarry-0.1.0/examples/data/array_index.json +18 -0
  38. cisco_project_quarry-0.1.0/examples/data/array_index.negative.json +18 -0
  39. cisco_project_quarry-0.1.0/examples/data/assistant_messages.json +12 -0
  40. cisco_project_quarry-0.1.0/examples/data/base64.json +8 -0
  41. cisco_project_quarry-0.1.0/examples/data/benign.json +12 -0
  42. cisco_project_quarry-0.1.0/examples/data/benign_multiturn.json +20 -0
  43. cisco_project_quarry-0.1.0/examples/data/boolean_not.json +12 -0
  44. cisco_project_quarry-0.1.0/examples/data/boolean_not.negative.json +16 -0
  45. cisco_project_quarry-0.1.0/examples/data/boolean_or.json +12 -0
  46. cisco_project_quarry-0.1.0/examples/data/call_sequence.json +22 -0
  47. cisco_project_quarry-0.1.0/examples/data/call_sequence.negative.json +16 -0
  48. cisco_project_quarry-0.1.0/examples/data/called_tools.json +30 -0
  49. cisco_project_quarry-0.1.0/examples/data/called_tools.negative.json +22 -0
  50. cisco_project_quarry-0.1.0/examples/data/capability_tags.json +22 -0
  51. cisco_project_quarry-0.1.0/examples/data/capability_tags.negative.json +16 -0
  52. cisco_project_quarry-0.1.0/examples/data/constructed_messages.json +8 -0
  53. cisco_project_quarry-0.1.0/examples/data/contains.json +8 -0
  54. cisco_project_quarry-0.1.0/examples/data/contains_any.json +8 -0
  55. cisco_project_quarry-0.1.0/examples/data/count_tool_calls.json +29 -0
  56. cisco_project_quarry-0.1.0/examples/data/count_tool_calls.negative.json +30 -0
  57. cisco_project_quarry-0.1.0/examples/data/developer_messages.json +8 -0
  58. cisco_project_quarry-0.1.0/examples/data/developer_messages.negative.json +5 -0
  59. cisco_project_quarry-0.1.0/examples/data/filter_comprehension.json +29 -0
  60. cisco_project_quarry-0.1.0/examples/data/filter_comprehension.negative.json +30 -0
  61. cisco_project_quarry-0.1.0/examples/data/filter_count.json +7 -0
  62. cisco_project_quarry-0.1.0/examples/data/flow_after.json +35 -0
  63. cisco_project_quarry-0.1.0/examples/data/flow_after.negative.json +41 -0
  64. cisco_project_quarry-0.1.0/examples/data/flow_after_within.json +23 -0
  65. cisco_project_quarry-0.1.0/examples/data/flow_after_within.negative.json +30 -0
  66. cisco_project_quarry-0.1.0/examples/data/flow_before.json +19 -0
  67. cisco_project_quarry-0.1.0/examples/data/flow_before.negative.json +22 -0
  68. cisco_project_quarry-0.1.0/examples/data/flow_before_within.json +40 -0
  69. cisco_project_quarry-0.1.0/examples/data/flow_before_within.negative.json +44 -0
  70. cisco_project_quarry-0.1.0/examples/data/flow_right_after.json +12 -0
  71. cisco_project_quarry-0.1.0/examples/data/flow_right_after.negative.json +20 -0
  72. cisco_project_quarry-0.1.0/examples/data/flow_right_before.json +19 -0
  73. cisco_project_quarry-0.1.0/examples/data/flow_right_before.negative.json +34 -0
  74. cisco_project_quarry-0.1.0/examples/data/flow_until.json +12 -0
  75. cisco_project_quarry-0.1.0/examples/data/flow_until.negative.json +16 -0
  76. cisco_project_quarry-0.1.0/examples/data/fullword.json +8 -0
  77. cisco_project_quarry-0.1.0/examples/data/fullword.negative.json +8 -0
  78. cisco_project_quarry-0.1.0/examples/data/get_tool_calls.json +22 -0
  79. cisco_project_quarry-0.1.0/examples/data/get_tool_calls.negative.json +22 -0
  80. cisco_project_quarry-0.1.0/examples/data/get_tool_responses.json +27 -0
  81. cisco_project_quarry-0.1.0/examples/data/get_tool_responses.negative.json +27 -0
  82. cisco_project_quarry-0.1.0/examples/data/has_tool.json +18 -0
  83. cisco_project_quarry-0.1.0/examples/data/has_tool.negative.json +15 -0
  84. cisco_project_quarry-0.1.0/examples/data/has_tools.json +26 -0
  85. cisco_project_quarry-0.1.0/examples/data/has_tools.negative.json +18 -0
  86. cisco_project_quarry-0.1.0/examples/data/legacy_model_scan.json +8 -0
  87. cisco_project_quarry-0.1.0/examples/data/legacy_model_scan.negative.json +8 -0
  88. cisco_project_quarry-0.1.0/examples/data/legacy_model_score.json +8 -0
  89. cisco_project_quarry-0.1.0/examples/data/legacy_model_score.negative.json +8 -0
  90. cisco_project_quarry-0.1.0/examples/data/length.json +8 -0
  91. cisco_project_quarry-0.1.0/examples/data/length.negative.json +8 -0
  92. cisco_project_quarry-0.1.0/examples/data/less_than_or_equal.json +8 -0
  93. cisco_project_quarry-0.1.0/examples/data/less_than_or_equal.negative.json +8 -0
  94. cisco_project_quarry-0.1.0/examples/data/llm_complete.json +8 -0
  95. cisco_project_quarry-0.1.0/examples/data/llm_complete.negative.json +8 -0
  96. cisco_project_quarry-0.1.0/examples/data/llm_input_tokens.json +8 -0
  97. cisco_project_quarry-0.1.0/examples/data/llm_input_tokens.negative.json +8 -0
  98. cisco_project_quarry-0.1.0/examples/data/llm_score.json +8 -0
  99. cisco_project_quarry-0.1.0/examples/data/llm_score.negative.json +8 -0
  100. cisco_project_quarry-0.1.0/examples/data/llm_split_conversation.json +20 -0
  101. cisco_project_quarry-0.1.0/examples/data/llm_split_conversation.negative.json +20 -0
  102. cisco_project_quarry-0.1.0/examples/data/match_position.json +8 -0
  103. cisco_project_quarry-0.1.0/examples/data/match_position.negative.json +8 -0
  104. cisco_project_quarry-0.1.0/examples/data/message_method.json +22 -0
  105. cisco_project_quarry-0.1.0/examples/data/message_method.negative.json +16 -0
  106. cisco_project_quarry-0.1.0/examples/data/messages.json +12 -0
  107. cisco_project_quarry-0.1.0/examples/data/messages.negative.json +7 -0
  108. cisco_project_quarry-0.1.0/examples/data/model_classify.json +8 -0
  109. cisco_project_quarry-0.1.0/examples/data/model_classify.negative.json +8 -0
  110. cisco_project_quarry-0.1.0/examples/data/model_complete.json +8 -0
  111. cisco_project_quarry-0.1.0/examples/data/model_complete.negative.json +8 -0
  112. cisco_project_quarry-0.1.0/examples/data/model_input_tokens.json +8 -0
  113. cisco_project_quarry-0.1.0/examples/data/model_input_tokens.negative.json +8 -0
  114. cisco_project_quarry-0.1.0/examples/data/model_parameters.json +8 -0
  115. cisco_project_quarry-0.1.0/examples/data/model_parameters.negative.json +8 -0
  116. cisco_project_quarry-0.1.0/examples/data/model_score.json +8 -0
  117. cisco_project_quarry-0.1.0/examples/data/model_score.negative.json +8 -0
  118. cisco_project_quarry-0.1.0/examples/data/model_spans.json +8 -0
  119. cisco_project_quarry-0.1.0/examples/data/model_spans.negative.json +8 -0
  120. cisco_project_quarry-0.1.0/examples/data/model_split.json +20 -0
  121. cisco_project_quarry-0.1.0/examples/data/model_split.negative.json +20 -0
  122. cisco_project_quarry-0.1.0/examples/data/model_split_compat.json +20 -0
  123. cisco_project_quarry-0.1.0/examples/data/model_split_compat.negative.json +20 -0
  124. cisco_project_quarry-0.1.0/examples/data/nested_field.json +24 -0
  125. cisco_project_quarry-0.1.0/examples/data/nocase.json +8 -0
  126. cisco_project_quarry-0.1.0/examples/data/occurrence_count.json +8 -0
  127. cisco_project_quarry-0.1.0/examples/data/occurrence_count.negative.json +8 -0
  128. cisco_project_quarry-0.1.0/examples/data/off_topic.json +12 -0
  129. cisco_project_quarry-0.1.0/examples/data/off_topic.negative.json +7 -0
  130. cisco_project_quarry-0.1.0/examples/data/pattern_match.json +8 -0
  131. cisco_project_quarry-0.1.0/examples/data/pattern_match.negative.json +8 -0
  132. cisco_project_quarry-0.1.0/examples/data/position_arithmetic.json +8 -0
  133. cisco_project_quarry-0.1.0/examples/data/position_arithmetic.negative.json +8 -0
  134. cisco_project_quarry-0.1.0/examples/data/regex_match.json +8 -0
  135. cisco_project_quarry-0.1.0/examples/data/set_any_of.json +8 -0
  136. cisco_project_quarry-0.1.0/examples/data/set_n_of.json +8 -0
  137. cisco_project_quarry-0.1.0/examples/data/set_n_of.negative.json +8 -0
  138. cisco_project_quarry-0.1.0/examples/data/set_wildcard.json +8 -0
  139. cisco_project_quarry-0.1.0/examples/data/set_wildcard.negative.json +8 -0
  140. cisco_project_quarry-0.1.0/examples/data/signed_index.json +12 -0
  141. cisco_project_quarry-0.1.0/examples/data/signed_index.negative.json +6 -0
  142. cisco_project_quarry-0.1.0/examples/data/slice_all.json +12 -0
  143. cisco_project_quarry-0.1.0/examples/data/slice_from.json +16 -0
  144. cisco_project_quarry-0.1.0/examples/data/slice_from.negative.json +16 -0
  145. cisco_project_quarry-0.1.0/examples/data/slice_range.json +16 -0
  146. cisco_project_quarry-0.1.0/examples/data/slice_range.negative.json +20 -0
  147. cisco_project_quarry-0.1.0/examples/data/slice_to.json +16 -0
  148. cisco_project_quarry-0.1.0/examples/data/slice_to.negative.json +16 -0
  149. cisco_project_quarry-0.1.0/examples/data/system_messages.json +8 -0
  150. cisco_project_quarry-0.1.0/examples/data/system_messages.negative.json +5 -0
  151. cisco_project_quarry-0.1.0/examples/data/system_prompt.json +8 -0
  152. cisco_project_quarry-0.1.0/examples/data/system_prompt.negative.json +5 -0
  153. cisco_project_quarry-0.1.0/examples/data/text_extraction.json +12 -0
  154. cisco_project_quarry-0.1.0/examples/data/tool_calls.json +35 -0
  155. cisco_project_quarry-0.1.0/examples/data/tool_definitions.json +21 -0
  156. cisco_project_quarry-0.1.0/examples/data/tool_name_comprehension.json +29 -0
  157. cisco_project_quarry-0.1.0/examples/data/tool_responses.json +40 -0
  158. cisco_project_quarry-0.1.0/examples/data/tool_sequence.json +41 -0
  159. cisco_project_quarry-0.1.0/examples/data/tool_sequence.negative.json +41 -0
  160. cisco_project_quarry-0.1.0/examples/data/topic_drift.json +12 -0
  161. cisco_project_quarry-0.1.0/examples/data/topic_drift.negative.json +6 -0
  162. cisco_project_quarry-0.1.0/examples/data/unrequested_action.json +22 -0
  163. cisco_project_quarry-0.1.0/examples/data/unrequested_action.negative.json +16 -0
  164. cisco_project_quarry-0.1.0/examples/data/variables.json +8 -0
  165. cisco_project_quarry-0.1.0/examples/data/variables.negative.json +5 -0
  166. cisco_project_quarry-0.1.0/examples/data/weighted_model_classify.json +8 -0
  167. cisco_project_quarry-0.1.0/examples/data/weighted_model_classify.negative.json +8 -0
  168. cisco_project_quarry-0.1.0/examples/data/wildcard_field.json +35 -0
  169. cisco_project_quarry-0.1.0/examples/drift/README.md +14 -0
  170. cisco_project_quarry-0.1.0/examples/drift/data/exfil_chain.json +41 -0
  171. cisco_project_quarry-0.1.0/examples/drift/data/exfil_chain.negative.json +41 -0
  172. cisco_project_quarry-0.1.0/examples/drift/data/scope_creep.json +22 -0
  173. cisco_project_quarry-0.1.0/examples/drift/data/scope_creep.negative.json +22 -0
  174. cisco_project_quarry-0.1.0/examples/drift/data/scored_expression.json +8 -0
  175. cisco_project_quarry-0.1.0/examples/drift/data/scored_expression.negative.json +8 -0
  176. cisco_project_quarry-0.1.0/examples/drift/data/task_substitution.json +22 -0
  177. cisco_project_quarry-0.1.0/examples/drift/data/task_substitution.negative.json +22 -0
  178. cisco_project_quarry-0.1.0/examples/drift/data/topic_drift.json +12 -0
  179. cisco_project_quarry-0.1.0/examples/drift/data/topic_drift.negative.json +12 -0
  180. cisco_project_quarry-0.1.0/examples/drift/exfil_chain.rule +13 -0
  181. cisco_project_quarry-0.1.0/examples/drift/scope_creep.rule +13 -0
  182. cisco_project_quarry-0.1.0/examples/drift/scored_expression.rule +13 -0
  183. cisco_project_quarry-0.1.0/examples/drift/task_substitution.rule +12 -0
  184. cisco_project_quarry-0.1.0/examples/drift/topic_drift.rule +12 -0
  185. cisco_project_quarry-0.1.0/examples/gemma4/README.md +14 -0
  186. cisco_project_quarry-0.1.0/examples/gemma4/config.yaml +44 -0
  187. cisco_project_quarry-0.1.0/examples/gemma4/conversation.json +113 -0
  188. cisco_project_quarry-0.1.0/examples/gemma4/prompt_injection.rule +13 -0
  189. cisco_project_quarry-0.1.0/examples/legacy-v1/llm_split_conversation.rule +7 -0
  190. cisco_project_quarry-0.1.0/examples/model-inference/README.md +13 -0
  191. cisco_project_quarry-0.1.0/examples/model-inference/classify.rule +5 -0
  192. cisco_project_quarry-0.1.0/examples/model-inference/config.example.yaml +26 -0
  193. cisco_project_quarry-0.1.0/examples/model-inference/conversation.json +5 -0
  194. cisco_project_quarry-0.1.0/examples/model-inference/run.py +55 -0
  195. cisco_project_quarry-0.1.0/examples/parameters/README.md +12 -0
  196. cisco_project_quarry-0.1.0/examples/parameters/config.yaml +30 -0
  197. cisco_project_quarry-0.1.0/examples/parameters/conversation.json +5 -0
  198. cisco_project_quarry-0.1.0/examples/parameters/policy.rule +8 -0
  199. cisco_project_quarry-0.1.0/examples/parameters/run.py +56 -0
  200. cisco_project_quarry-0.1.0/examples/policy-only/model_parameters.rule +9 -0
  201. cisco_project_quarry-0.1.0/examples/rules/addition.rule +7 -0
  202. cisco_project_quarry-0.1.0/examples/rules/adjacent_alias.rule +7 -0
  203. cisco_project_quarry-0.1.0/examples/rules/all_comprehension.rule +8 -0
  204. cisco_project_quarry-0.1.0/examples/rules/array_index.rule +7 -0
  205. cisco_project_quarry-0.1.0/examples/rules/assistant_messages.rule +7 -0
  206. cisco_project_quarry-0.1.0/examples/rules/base64.rule +9 -0
  207. cisco_project_quarry-0.1.0/examples/rules/boolean_not.rule +7 -0
  208. cisco_project_quarry-0.1.0/examples/rules/boolean_or.rule +6 -0
  209. cisco_project_quarry-0.1.0/examples/rules/call_sequence.rule +6 -0
  210. cisco_project_quarry-0.1.0/examples/rules/called_tools.rule +6 -0
  211. cisco_project_quarry-0.1.0/examples/rules/capability_tags.rule +7 -0
  212. cisco_project_quarry-0.1.0/examples/rules/constructed_messages.rule +10 -0
  213. cisco_project_quarry-0.1.0/examples/rules/contains.rule +7 -0
  214. cisco_project_quarry-0.1.0/examples/rules/contains_any.rule +7 -0
  215. cisco_project_quarry-0.1.0/examples/rules/count_tool_calls.rule +6 -0
  216. cisco_project_quarry-0.1.0/examples/rules/developer_messages.rule +6 -0
  217. cisco_project_quarry-0.1.0/examples/rules/filter_comprehension.rule +6 -0
  218. cisco_project_quarry-0.1.0/examples/rules/filter_count.rule +6 -0
  219. cisco_project_quarry-0.1.0/examples/rules/flow_after.rule +10 -0
  220. cisco_project_quarry-0.1.0/examples/rules/flow_after_within.rule +8 -0
  221. cisco_project_quarry-0.1.0/examples/rules/flow_before.rule +8 -0
  222. cisco_project_quarry-0.1.0/examples/rules/flow_before_within.rule +8 -0
  223. cisco_project_quarry-0.1.0/examples/rules/flow_right_after.rule +8 -0
  224. cisco_project_quarry-0.1.0/examples/rules/flow_right_before.rule +8 -0
  225. cisco_project_quarry-0.1.0/examples/rules/flow_until.rule +6 -0
  226. cisco_project_quarry-0.1.0/examples/rules/fullword.rule +9 -0
  227. cisco_project_quarry-0.1.0/examples/rules/get_tool_calls.rule +7 -0
  228. cisco_project_quarry-0.1.0/examples/rules/get_tool_responses.rule +7 -0
  229. cisco_project_quarry-0.1.0/examples/rules/has_tool.rule +6 -0
  230. cisco_project_quarry-0.1.0/examples/rules/has_tools.rule +6 -0
  231. cisco_project_quarry-0.1.0/examples/rules/legacy_model_scan.rule +7 -0
  232. cisco_project_quarry-0.1.0/examples/rules/legacy_model_score.rule +7 -0
  233. cisco_project_quarry-0.1.0/examples/rules/length.rule +7 -0
  234. cisco_project_quarry-0.1.0/examples/rules/less_than_or_equal.rule +8 -0
  235. cisco_project_quarry-0.1.0/examples/rules/llm_complete.rule +6 -0
  236. cisco_project_quarry-0.1.0/examples/rules/llm_input_tokens.rule +7 -0
  237. cisco_project_quarry-0.1.0/examples/rules/llm_score.rule +6 -0
  238. cisco_project_quarry-0.1.0/examples/rules/match_position.rule +10 -0
  239. cisco_project_quarry-0.1.0/examples/rules/message_method.rule +6 -0
  240. cisco_project_quarry-0.1.0/examples/rules/messages.rule +6 -0
  241. cisco_project_quarry-0.1.0/examples/rules/model_classify.rule +6 -0
  242. cisco_project_quarry-0.1.0/examples/rules/model_complete.rule +6 -0
  243. cisco_project_quarry-0.1.0/examples/rules/model_input_tokens.rule +7 -0
  244. cisco_project_quarry-0.1.0/examples/rules/model_score.rule +6 -0
  245. cisco_project_quarry-0.1.0/examples/rules/model_spans.rule +9 -0
  246. cisco_project_quarry-0.1.0/examples/rules/model_split.rule +7 -0
  247. cisco_project_quarry-0.1.0/examples/rules/model_split_compat.rule +7 -0
  248. cisco_project_quarry-0.1.0/examples/rules/nested_field.rule +7 -0
  249. cisco_project_quarry-0.1.0/examples/rules/nocase.rule +9 -0
  250. cisco_project_quarry-0.1.0/examples/rules/occurrence_count.rule +9 -0
  251. cisco_project_quarry-0.1.0/examples/rules/off_topic.rule +7 -0
  252. cisco_project_quarry-0.1.0/examples/rules/pattern_match.rule +8 -0
  253. cisco_project_quarry-0.1.0/examples/rules/position_arithmetic.rule +11 -0
  254. cisco_project_quarry-0.1.0/examples/rules/regex_match.rule +7 -0
  255. cisco_project_quarry-0.1.0/examples/rules/set_any_of.rule +11 -0
  256. cisco_project_quarry-0.1.0/examples/rules/set_n_of.rule +12 -0
  257. cisco_project_quarry-0.1.0/examples/rules/set_wildcard.rule +11 -0
  258. cisco_project_quarry-0.1.0/examples/rules/signed_index.rule +6 -0
  259. cisco_project_quarry-0.1.0/examples/rules/slice_all.rule +6 -0
  260. cisco_project_quarry-0.1.0/examples/rules/slice_from.rule +6 -0
  261. cisco_project_quarry-0.1.0/examples/rules/slice_range.rule +6 -0
  262. cisco_project_quarry-0.1.0/examples/rules/slice_to.rule +6 -0
  263. cisco_project_quarry-0.1.0/examples/rules/system_messages.rule +6 -0
  264. cisco_project_quarry-0.1.0/examples/rules/system_prompt.rule +6 -0
  265. cisco_project_quarry-0.1.0/examples/rules/text_extraction.rule +12 -0
  266. cisco_project_quarry-0.1.0/examples/rules/tool_calls.rule +8 -0
  267. cisco_project_quarry-0.1.0/examples/rules/tool_definitions.rule +7 -0
  268. cisco_project_quarry-0.1.0/examples/rules/tool_name_comprehension.rule +5 -0
  269. cisco_project_quarry-0.1.0/examples/rules/tool_responses.rule +7 -0
  270. cisco_project_quarry-0.1.0/examples/rules/tool_sequence.rule +6 -0
  271. cisco_project_quarry-0.1.0/examples/rules/topic_drift.rule +7 -0
  272. cisco_project_quarry-0.1.0/examples/rules/unrequested_action.rule +6 -0
  273. cisco_project_quarry-0.1.0/examples/rules/variables.rule +8 -0
  274. cisco_project_quarry-0.1.0/examples/rules/weighted_model_classify.rule +7 -0
  275. cisco_project_quarry-0.1.0/examples/rules/wildcard_field.rule +7 -0
  276. cisco_project_quarry-0.1.0/examples/runner-options.yaml +14 -0
  277. cisco_project_quarry-0.1.0/examples/smoke.yaml +21 -0
  278. cisco_project_quarry-0.1.0/hooks/hooks.json +27 -0
  279. cisco_project_quarry-0.1.0/hooks/hydrate_quarry_inputs.py +408 -0
  280. cisco_project_quarry-0.1.0/mcp.json +17 -0
  281. cisco_project_quarry-0.1.0/plugin.json +32 -0
  282. cisco_project_quarry-0.1.0/pyproject.toml +140 -0
  283. cisco_project_quarry-0.1.0/quarry/__init__.py +102 -0
  284. cisco_project_quarry-0.1.0/quarry/_version.py +19 -0
  285. cisco_project_quarry-0.1.0/quarry/cache/__init__.py +34 -0
  286. cisco_project_quarry-0.1.0/quarry/cache/async_cache.py +388 -0
  287. cisco_project_quarry-0.1.0/quarry/cache/constants.py +28 -0
  288. cisco_project_quarry-0.1.0/quarry/cache/keys.py +130 -0
  289. cisco_project_quarry-0.1.0/quarry/cache/regex_cache.py +255 -0
  290. cisco_project_quarry-0.1.0/quarry/cli.py +694 -0
  291. cisco_project_quarry-0.1.0/quarry/config.py +920 -0
  292. cisco_project_quarry-0.1.0/quarry/core/__init__.py +21 -0
  293. cisco_project_quarry-0.1.0/quarry/core/conversation.py +405 -0
  294. cisco_project_quarry-0.1.0/quarry/core/logging.py +52 -0
  295. cisco_project_quarry-0.1.0/quarry/decision_report.py +749 -0
  296. cisco_project_quarry-0.1.0/quarry/dsl/__init__.py +16 -0
  297. cisco_project_quarry-0.1.0/quarry/dsl/functions.py +526 -0
  298. cisco_project_quarry-0.1.0/quarry/dsl/grammar.py +365 -0
  299. cisco_project_quarry-0.1.0/quarry/dsl/parser.py +91 -0
  300. cisco_project_quarry-0.1.0/quarry/dsl/syntax.py +207 -0
  301. cisco_project_quarry-0.1.0/quarry/dsl/transformer.py +1178 -0
  302. cisco_project_quarry-0.1.0/quarry/engine/__init__.py +32 -0
  303. cisco_project_quarry-0.1.0/quarry/engine/artifacts.py +125 -0
  304. cisco_project_quarry-0.1.0/quarry/engine/atoms.py +422 -0
  305. cisco_project_quarry-0.1.0/quarry/engine/budget.py +101 -0
  306. cisco_project_quarry-0.1.0/quarry/engine/builders.py +69 -0
  307. cisco_project_quarry-0.1.0/quarry/engine/captures.py +273 -0
  308. cisco_project_quarry-0.1.0/quarry/engine/collect.py +35 -0
  309. cisco_project_quarry-0.1.0/quarry/engine/compiler.py +4293 -0
  310. cisco_project_quarry-0.1.0/quarry/engine/contracts.py +384 -0
  311. cisco_project_quarry-0.1.0/quarry/engine/core.py +354 -0
  312. cisco_project_quarry-0.1.0/quarry/engine/decision.py +114 -0
  313. cisco_project_quarry-0.1.0/quarry/engine/desugar.py +1223 -0
  314. cisco_project_quarry-0.1.0/quarry/engine/diagnostics.py +114 -0
  315. cisco_project_quarry-0.1.0/quarry/engine/events.py +349 -0
  316. cisco_project_quarry-0.1.0/quarry/engine/exceptions.py +21 -0
  317. cisco_project_quarry-0.1.0/quarry/engine/executor.py +2001 -0
  318. cisco_project_quarry-0.1.0/quarry/engine/lower.py +1681 -0
  319. cisco_project_quarry-0.1.0/quarry/engine/matchers.py +351 -0
  320. cisco_project_quarry-0.1.0/quarry/engine/oracle.py +571 -0
  321. cisco_project_quarry-0.1.0/quarry/engine/pacing.py +48 -0
  322. cisco_project_quarry-0.1.0/quarry/engine/symbolic_dfa.py +738 -0
  323. cisco_project_quarry-0.1.0/quarry/engine/temporal.py +741 -0
  324. cisco_project_quarry-0.1.0/quarry/engine/witness.py +824 -0
  325. cisco_project_quarry-0.1.0/quarry/integrations/__init__.py +23 -0
  326. cisco_project_quarry-0.1.0/quarry/integrations/collection.py +81 -0
  327. cisco_project_quarry-0.1.0/quarry/integrations/model_expression.py +937 -0
  328. cisco_project_quarry-0.1.0/quarry/integrations/model_inference.py +3074 -0
  329. cisco_project_quarry-0.1.0/quarry/integrations/model_usage.py +225 -0
  330. cisco_project_quarry-0.1.0/quarry/integrations/rate_limiter.py +155 -0
  331. cisco_project_quarry-0.1.0/quarry/integrations/resources.py +615 -0
  332. cisco_project_quarry-0.1.0/quarry/language/__init__.py +55 -0
  333. cisco_project_quarry-0.1.0/quarry/language/compatibility.py +124 -0
  334. cisco_project_quarry-0.1.0/quarry/language/example_records.py +713 -0
  335. cisco_project_quarry-0.1.0/quarry/language/examples/agent-probers.rule +5 -0
  336. cisco_project_quarry-0.1.0/quarry/language/examples/capture.matching.json +8 -0
  337. cisco_project_quarry-0.1.0/quarry/language/examples/capture.non_matching.json +8 -0
  338. cisco_project_quarry-0.1.0/quarry/language/examples/capture.rule +4 -0
  339. cisco_project_quarry-0.1.0/quarry/language/examples/case-insensitive-match.matching.json +8 -0
  340. cisco_project_quarry-0.1.0/quarry/language/examples/case-insensitive-match.non_matching.json +8 -0
  341. cisco_project_quarry-0.1.0/quarry/language/examples/case-insensitive-match.rule +7 -0
  342. cisco_project_quarry-0.1.0/quarry/language/examples/chunked-inference.rule +4 -0
  343. cisco_project_quarry-0.1.0/quarry/language/examples/compatibility-model-split.rule +4 -0
  344. cisco_project_quarry-0.1.0/quarry/language/examples/exact-tool-name.matching.json +18 -0
  345. cisco_project_quarry-0.1.0/quarry/language/examples/exact-tool-name.non_matching.json +18 -0
  346. cisco_project_quarry-0.1.0/quarry/language/examples/exact-tool-name.rule +4 -0
  347. cisco_project_quarry-0.1.0/quarry/language/examples/filter-count.matching.json +12 -0
  348. cisco_project_quarry-0.1.0/quarry/language/examples/filter-count.non_matching.json +8 -0
  349. cisco_project_quarry-0.1.0/quarry/language/examples/filter-count.rule +3 -0
  350. cisco_project_quarry-0.1.0/quarry/language/examples/flow-operators.matching.json +46 -0
  351. cisco_project_quarry-0.1.0/quarry/language/examples/flow-operators.non_matching.json +8 -0
  352. cisco_project_quarry-0.1.0/quarry/language/examples/flow-operators.rule +9 -0
  353. cisco_project_quarry-0.1.0/quarry/language/examples/indexes-and-counts.matching.json +31 -0
  354. cisco_project_quarry-0.1.0/quarry/language/examples/indexes-and-counts.non_matching.json +12 -0
  355. cisco_project_quarry-0.1.0/quarry/language/examples/indexes-and-counts.rule +10 -0
  356. cisco_project_quarry-0.1.0/quarry/language/examples/joined-tool-commands.rule +17 -0
  357. cisco_project_quarry-0.1.0/quarry/language/examples/language-basics.matching.json +8 -0
  358. cisco_project_quarry-0.1.0/quarry/language/examples/language-basics.non_matching.json +8 -0
  359. cisco_project_quarry-0.1.0/quarry/language/examples/language-basics.rule +11 -0
  360. cisco_project_quarry-0.1.0/quarry/language/examples/message-surfaces.matching.json +31 -0
  361. cisco_project_quarry-0.1.0/quarry/language/examples/message-surfaces.non_matching.json +31 -0
  362. cisco_project_quarry-0.1.0/quarry/language/examples/message-surfaces.rule +6 -0
  363. cisco_project_quarry-0.1.0/quarry/language/examples/model-classification.rule +4 -0
  364. cisco_project_quarry-0.1.0/quarry/language/examples/model-inference.rule +5 -0
  365. cisco_project_quarry-0.1.0/quarry/language/examples/model-interface.rule +12 -0
  366. cisco_project_quarry-0.1.0/quarry/language/examples/model-refusals.rule +4 -0
  367. cisco_project_quarry-0.1.0/quarry/language/examples/model-spans.rule +7 -0
  368. cisco_project_quarry-0.1.0/quarry/language/examples/patterns-and-aliases.matching.json +8 -0
  369. cisco_project_quarry-0.1.0/quarry/language/examples/patterns-and-aliases.non_matching.json +8 -0
  370. cisco_project_quarry-0.1.0/quarry/language/examples/patterns-and-aliases.rule +6 -0
  371. cisco_project_quarry-0.1.0/quarry/language/examples/string-operations.matching.json +8 -0
  372. cisco_project_quarry-0.1.0/quarry/language/examples/string-operations.non_matching.json +8 -0
  373. cisco_project_quarry-0.1.0/quarry/language/examples/string-operations.rule +10 -0
  374. cisco_project_quarry-0.1.0/quarry/language/examples/tool-argument-drilldown.matching.json +18 -0
  375. cisco_project_quarry-0.1.0/quarry/language/examples/tool-argument-drilldown.non_matching.json +18 -0
  376. cisco_project_quarry-0.1.0/quarry/language/examples/tool-argument-drilldown.rule +4 -0
  377. cisco_project_quarry-0.1.0/quarry/language/examples/tool-operations.matching.json +64 -0
  378. cisco_project_quarry-0.1.0/quarry/language/examples/tool-operations.non_matching.json +45 -0
  379. cisco_project_quarry-0.1.0/quarry/language/examples/tool-operations.rule +9 -0
  380. cisco_project_quarry-0.1.0/quarry/language/generate.py +970 -0
  381. cisco_project_quarry-0.1.0/quarry/language/metadata.py +377 -0
  382. cisco_project_quarry-0.1.0/quarry/language/reference.md +1326 -0
  383. cisco_project_quarry-0.1.0/quarry/language/runtime.py +227 -0
  384. cisco_project_quarry-0.1.0/quarry/language/spec.json +3981 -0
  385. cisco_project_quarry-0.1.0/quarry/plugin/__init__.py +21 -0
  386. cisco_project_quarry-0.1.0/quarry/plugin/server.py +300 -0
  387. cisco_project_quarry-0.1.0/quarry/plugin/service.py +1417 -0
  388. cisco_project_quarry-0.1.0/quarry/plugin/visualization.py +523 -0
  389. cisco_project_quarry-0.1.0/quarry/policy.py +444 -0
  390. cisco_project_quarry-0.1.0/quarry/policy_serialization.py +1065 -0
  391. cisco_project_quarry-0.1.0/quarry/prepared.py +81 -0
  392. cisco_project_quarry-0.1.0/quarry/probers/__init__.py +41 -0
  393. cisco_project_quarry-0.1.0/quarry/probers/capability.py +181 -0
  394. cisco_project_quarry-0.1.0/quarry/probers/topic.py +156 -0
  395. cisco_project_quarry-0.1.0/quarry/py.typed +0 -0
  396. cisco_project_quarry-0.1.0/quarry/rule_versioning.py +198 -0
  397. cisco_project_quarry-0.1.0/quarry/safety/__init__.py +41 -0
  398. cisco_project_quarry-0.1.0/quarry/safety/limits.py +104 -0
  399. cisco_project_quarry-0.1.0/quarry/safety/quality.py +234 -0
  400. cisco_project_quarry-0.1.0/quarry/safety/regex_backend.py +72 -0
  401. cisco_project_quarry-0.1.0/quarry/safety/timer.py +181 -0
  402. cisco_project_quarry-0.1.0/quarry/safety/validator.py +1390 -0
  403. cisco_project_quarry-0.1.0/quarry/scanner.py +1548 -0
  404. cisco_project_quarry-0.1.0/quarry/sdk.py +108 -0
  405. cisco_project_quarry-0.1.0/quarry/types/__init__.py +16 -0
  406. cisco_project_quarry-0.1.0/quarry/types/context.py +368 -0
  407. cisco_project_quarry-0.1.0/quarry/types/dsl/__init__.py +81 -0
  408. cisco_project_quarry-0.1.0/quarry/types/dsl/access.py +31 -0
  409. cisco_project_quarry-0.1.0/quarry/types/dsl/base.py +34 -0
  410. cisco_project_quarry-0.1.0/quarry/types/dsl/comprehensions.py +65 -0
  411. cisco_project_quarry-0.1.0/quarry/types/dsl/functions.py +44 -0
  412. cisco_project_quarry-0.1.0/quarry/types/dsl/literals.py +48 -0
  413. cisco_project_quarry-0.1.0/quarry/types/dsl/model_calls.py +40 -0
  414. cisco_project_quarry-0.1.0/quarry/types/dsl/operators/__init__.py +37 -0
  415. cisco_project_quarry-0.1.0/quarry/types/dsl/operators/binary.py +34 -0
  416. cisco_project_quarry-0.1.0/quarry/types/dsl/operators/contains_any.py +30 -0
  417. cisco_project_quarry-0.1.0/quarry/types/dsl/operators/flow.py +32 -0
  418. cisco_project_quarry-0.1.0/quarry/types/dsl/operators/string.py +64 -0
  419. cisco_project_quarry-0.1.0/quarry/types/dsl/operators/unary.py +29 -0
  420. cisco_project_quarry-0.1.0/quarry/types/dsl/patterns.py +43 -0
  421. cisco_project_quarry-0.1.0/quarry/types/dsl/render.py +136 -0
  422. cisco_project_quarry-0.1.0/quarry/types/dsl/string_ops.py +35 -0
  423. cisco_project_quarry-0.1.0/quarry/types/dsl/traversal.py +144 -0
  424. cisco_project_quarry-0.1.0/quarry/types/exceptions.py +220 -0
  425. cisco_project_quarry-0.1.0/quarry/types/messages.py +1590 -0
  426. cisco_project_quarry-0.1.0/quarry/types/parameters.py +142 -0
  427. cisco_project_quarry-0.1.0/quarry/types/rate_limit.py +32 -0
  428. cisco_project_quarry-0.1.0/quarry/types/response_schema.py +267 -0
  429. cisco_project_quarry-0.1.0/quarry/types/results.py +160 -0
  430. cisco_project_quarry-0.1.0/quarry/types/rules.py +165 -0
  431. cisco_project_quarry-0.1.0/quarry/types/text_resources.py +44 -0
  432. cisco_project_quarry-0.1.0/scripts/e2e_signature_test.py +714 -0
  433. cisco_project_quarry-0.1.0/scripts/generate_language_spec.py +78 -0
  434. cisco_project_quarry-0.1.0/skills/detection-rules/SKILL.md +79 -0
  435. cisco_project_quarry-0.1.0/skills/detection-rules/references/calibration.md +49 -0
  436. cisco_project_quarry-0.1.0/skills/detection-rules/references/constitution.md +58 -0
  437. cisco_project_quarry-0.1.0/skills/detection-rules/references/data.md +88 -0
  438. cisco_project_quarry-0.1.0/skills/detection-rules/references/judge.md +51 -0
  439. cisco_project_quarry-0.1.0/skills/detection-rules/references/measurement.md +74 -0
  440. cisco_project_quarry-0.1.0/skills/detection-rules/references/pitfalls.md +59 -0
  441. cisco_project_quarry-0.1.0/skills/detection-rules/references/prefilter.md +59 -0
  442. cisco_project_quarry-0.1.0/skills/detection-rules/references/rule-shape.md +116 -0
  443. cisco_project_quarry-0.1.0/skills/quarry-policy/SKILL.md +90 -0
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "project-quarry",
3
+ "interface": {
4
+ "displayName": "Quarry DSL"
5
+ },
6
+ "plugins": [
7
+ {
8
+ "name": "quarry",
9
+ "source": {
10
+ "source": "local",
11
+ "path": "./"
12
+ },
13
+ "policy": {
14
+ "installation": "AVAILABLE",
15
+ "authentication": "ON_INSTALL"
16
+ },
17
+ "category": "Developer Tools"
18
+ }
19
+ ]
20
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/claude-plugin-marketplace.json",
3
+ "name": "project-quarry",
4
+ "description": "Quarry language reference, rule compilation, and conversation scanning tools.",
5
+ "owner": {
6
+ "name": "Cisco AI Software and Platform Group",
7
+ "url": "https://github.com/cisco-ai-defense"
8
+ },
9
+ "plugins": [
10
+ {
11
+ "name": "quarry",
12
+ "source": "./",
13
+ "description": "Find Quarry language features, compile rules, and scan single or batched conversations.",
14
+ "version": "0.2.0"
15
+ }
16
+ ]
17
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "name": "quarry",
3
+ "version": "0.2.0",
4
+ "description": "Find Quarry language features, compile rules, and scan single or batched conversations.",
5
+ "author": {
6
+ "name": "Cisco AI Software and Platform Group",
7
+ "url": "https://github.com/cisco-ai-defense"
8
+ },
9
+ "homepage": "https://github.com/cisco-ai-defense/project-quarry",
10
+ "repository": "https://github.com/cisco-ai-defense/project-quarry",
11
+ "license": "Apache-2.0",
12
+ "keywords": ["quarry", "policy", "agents", "mcp"]
13
+ }
@@ -0,0 +1,42 @@
1
+ {
2
+ "name": "quarry",
3
+ "version": "0.2.0",
4
+ "description": "Find Quarry language features, compile rules, and scan single or batched conversations.",
5
+ "author": {
6
+ "name": "Cisco AI Software and Platform Group",
7
+ "url": "https://github.com/cisco-ai-defense"
8
+ },
9
+ "homepage": "https://github.com/cisco-ai-defense/project-quarry",
10
+ "repository": "https://github.com/cisco-ai-defense/project-quarry",
11
+ "license": "Apache-2.0",
12
+ "keywords": ["quarry", "policy", "agents", "mcp"],
13
+ "skills": "./skills/",
14
+ "mcpServers": {
15
+ "quarry": {
16
+ "type": "stdio",
17
+ "command": "uv",
18
+ "args": [
19
+ "run",
20
+ "--project",
21
+ "${PLUGIN_ROOT}",
22
+ "--extra",
23
+ "plugin",
24
+ "quarry-mcp"
25
+ ]
26
+ }
27
+ },
28
+ "interface": {
29
+ "displayName": "Quarry",
30
+ "shortDescription": "Write and test Quarry conversation rules",
31
+ "longDescription": "Search the installed Quarry language reference, compile complete rules, and scan single or batched conversation JSON with typed parameters and fail-closed results.",
32
+ "developerName": "Cisco AI Software and Platform Group",
33
+ "category": "Developer Tools",
34
+ "capabilities": ["Read"],
35
+ "websiteURL": "https://github.com/cisco-ai-defense/project-quarry",
36
+ "defaultPrompt": [
37
+ "Help me write and test a Quarry rule.",
38
+ "Explain a Quarry language feature with a tested example."
39
+ ],
40
+ "brandColor": "#1B6AC9"
41
+ }
42
+ }
@@ -0,0 +1,231 @@
1
+ # macOS metadata
2
+ .DS_Store
3
+
4
+ # Byte-compiled / optimized / DLL files
5
+ __pycache__/
6
+ *.py[codz]
7
+ *$py.class
8
+
9
+ # C extensions
10
+ *.so
11
+
12
+ # Distribution / packaging
13
+ .Python
14
+ build/
15
+ develop-eggs/
16
+ dist/
17
+ downloads/
18
+ eggs/
19
+ .eggs/
20
+ lib/
21
+ lib64/
22
+ parts/
23
+ sdist/
24
+ var/
25
+ wheels/
26
+ share/python-wheels/
27
+ *.egg-info/
28
+ .installed.cfg
29
+ *.egg
30
+ MANIFEST
31
+
32
+ # PyInstaller
33
+ # Usually these files are written by a python script from a template
34
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
35
+ *.manifest
36
+ *.spec
37
+
38
+ # Installer logs
39
+ pip-log.txt
40
+ pip-delete-this-directory.txt
41
+
42
+ # Unit test / coverage reports
43
+ htmlcov/
44
+ .tox/
45
+ .nox/
46
+ .coverage
47
+ .coverage.*
48
+ .cache
49
+ nosetests.xml
50
+ coverage.xml
51
+ *.cover
52
+ *.py.cover
53
+ .hypothesis/
54
+ .pytest_cache/
55
+ cover/
56
+
57
+ # Translations
58
+ *.mo
59
+ *.pot
60
+
61
+ # Django stuff:
62
+ *.log
63
+ local_settings.py
64
+ db.sqlite3
65
+ db.sqlite3-journal
66
+
67
+ # Flask stuff:
68
+ instance/
69
+ .webassets-cache
70
+
71
+ # Scrapy stuff:
72
+ .scrapy
73
+
74
+ # Sphinx documentation
75
+ docs/_build/
76
+
77
+ # PyBuilder
78
+ .pybuilder/
79
+ target/
80
+
81
+ # Jupyter Notebook
82
+ .ipynb_checkpoints
83
+
84
+ # IPython
85
+ profile_default/
86
+ ipython_config.py
87
+
88
+ # pyenv
89
+ # For a library or package, you might want to ignore these files since the code is
90
+ # intended to run in multiple environments; otherwise, check them in:
91
+ # .python-version
92
+
93
+ # pipenv
94
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
95
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
96
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
97
+ # install all needed dependencies.
98
+ # Pipfile.lock
99
+
100
+ # UV
101
+ # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
102
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
103
+ # commonly ignored for libraries.
104
+ # uv.lock
105
+
106
+ # poetry
107
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
108
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
109
+ # commonly ignored for libraries.
110
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
111
+ # poetry.lock
112
+ # poetry.toml
113
+
114
+ # pdm
115
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
116
+ # pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
117
+ # https://pdm-project.org/en/latest/usage/project/#working-with-version-control
118
+ # pdm.lock
119
+ # pdm.toml
120
+ .pdm-python
121
+ .pdm-build/
122
+
123
+ # pixi
124
+ # Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
125
+ # pixi.lock
126
+ # Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
127
+ # in the .venv directory. It is recommended not to include this directory in version control.
128
+ .pixi
129
+
130
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
131
+ __pypackages__/
132
+
133
+ # Celery stuff
134
+ celerybeat-schedule
135
+ celerybeat.pid
136
+
137
+ # Redis
138
+ *.rdb
139
+ *.aof
140
+ *.pid
141
+
142
+ # RabbitMQ
143
+ mnesia/
144
+ rabbitmq/
145
+ rabbitmq-data/
146
+
147
+ # ActiveMQ
148
+ activemq-data/
149
+
150
+ # SageMath parsed files
151
+ *.sage.py
152
+
153
+ # Environments
154
+ .env
155
+ .envrc
156
+ .venv
157
+ env/
158
+ venv/
159
+ ENV/
160
+ env.bak/
161
+ venv.bak/
162
+
163
+ # Spyder project settings
164
+ .spyderproject
165
+ .spyproject
166
+
167
+ # Rope project settings
168
+ .ropeproject
169
+
170
+ # mkdocs documentation
171
+ /site
172
+
173
+ # mypy
174
+ .mypy_cache/
175
+ .dmypy.json
176
+ dmypy.json
177
+
178
+ # Pyre type checker
179
+ .pyre/
180
+
181
+ # pytype static type analyzer
182
+ .pytype/
183
+
184
+ # Cython debug symbols
185
+ cython_debug/
186
+
187
+ # PyCharm
188
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
189
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
190
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
191
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
192
+ # .idea/
193
+
194
+ # Abstra
195
+ # Abstra is an AI-powered process automation framework.
196
+ # Ignore directories containing user credentials, local state, and settings.
197
+ # Learn more at https://abstra.io/docs
198
+ .abstra/
199
+
200
+ # Visual Studio Code
201
+ # Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
202
+ # that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
203
+ # and can be added to the global gitignore or merged into this file. However, if you prefer,
204
+ # you could uncomment the following to ignore the entire vscode folder
205
+ # .vscode/
206
+ # Temporary file for partial code execution
207
+ tempCodeRunnerFile.py
208
+
209
+ # Ruff stuff:
210
+ .ruff_cache/
211
+
212
+ # PyPI configuration file
213
+ .pypirc
214
+
215
+ # Marimo
216
+ marimo/_static/
217
+ marimo/_lsp/
218
+ __marimo__/
219
+
220
+ # Streamlit
221
+ .streamlit/secrets.toml
222
+
223
+ # Quarry local secrets and generated artifacts
224
+ .env.*
225
+ !.env.example
226
+ *.pem
227
+ *.key
228
+ credentials.json
229
+ *.log.zip
230
+ *.whl
231
+ site/
@@ -0,0 +1,15 @@
1
+ {
2
+ "mcpServers": {
3
+ "quarry": {
4
+ "command": "uv",
5
+ "args": [
6
+ "run",
7
+ "--project",
8
+ "${CLAUDE_PLUGIN_ROOT}",
9
+ "--extra",
10
+ "plugin",
11
+ "quarry-mcp"
12
+ ]
13
+ }
14
+ }
15
+ }
@@ -0,0 +1,43 @@
1
+ # How to Contribute
2
+
3
+ Thanks for your interest in contributing to Project Quarry! Here are a few
4
+ general guidelines on contributing and reporting bugs that we ask you to review.
5
+ Following these guidelines helps to communicate that you respect the time of the contributors managing and developing this open source project. In return, they should reciprocate that respect in addressing your issue, assessing changes, and helping you finalize your pull requests. In that spirit of mutual respect, we endeavor to review incoming issues and pull requests within 10 days, and will close any lingering issues or pull requests after 60 days of inactivity.
6
+
7
+ Please note that all of your interactions in the project are subject to our
8
+ [Code of Conduct](/CODE_OF_CONDUCT.md). This includes creation of issues or pull requests, commenting on issues or pull requests, and extends to all interactions in any real-time space e.g., Slack, Discord, etc.
9
+
10
+ ## Reporting Issues
11
+
12
+ Before reporting a new issue, please ensure that the issue was not already reported or fixed by searching through our [issues list](https://github.com/cisco-ai-defense/project-quarry/issues).
13
+
14
+ When creating a new issue, please be sure to include a **title and clear description**, as much relevant information as possible, and, if possible, a test case.
15
+
16
+ **If you discover a security bug, please do not report it through GitHub. Instead, please see security procedures in [SECURITY.md](/SECURITY.md).**
17
+
18
+ ## Sending Pull Requests
19
+
20
+ Before sending a new pull request, take a look at existing pull requests and issues to see if the proposed change or fix has been discussed in the past, or
21
+ if the change was already implemented but not yet released.
22
+
23
+ We expect new pull requests to include tests for any affected behavior, and, as we follow semantic versioning, we may reserve breaking changes until the next major version release.
24
+
25
+ For scanner correctness tests, use `SafetyLimits(rule_timeout=None)` so a busy CI runner
26
+ cannot turn a correct verdict into a timeout. Deadline tests should configure a timeout
27
+ explicitly, use controlled delayed work, and assert the resulting status or work stopped.
28
+ Avoid narrow elapsed-time assertions in required CI tests; measure throughput separately.
29
+
30
+ ## Other Ways to Contribute
31
+
32
+ We welcome anyone that wants to contribute to Project Quarry to triage and reply to open issues to help troubleshoot and fix existing bugs. Here is what you can do:
33
+
34
+ - Help ensure that existing issues follows the recommendations from the
35
+ _[Reporting Issues](#reporting-issues)_ section, providing feedback to the
36
+ issue's author on what might be missing.
37
+ - Review existing pull requests, and testing patches against real existing
38
+ applications that use Project Quarry.
39
+ - Write a test, or add a missing test case to an existing test.
40
+
41
+ Thanks again for your interest on contributing to Project Quarry!
42
+
43
+ :heart:
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.