@andespindola/crow-skills 0.39.0 → 0.40.0

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 (385) hide show
  1. package/README.md +4 -0
  2. package/THIRD-PARTY-NOTICES.md +20 -4
  3. package/catalog.json +29 -3
  4. package/crow_skills/__init__.py +1 -1
  5. package/package.json +1 -1
  6. package/release.json +1962 -77
  7. package/skills/crow-behaviour/SKILL.md +3 -0
  8. package/skills/crow-mcp-maker/NOTICE.md +14 -0
  9. package/skills/crow-mcp-maker/SKILL.md +54 -0
  10. package/skills/crow-mcp-maker/licenses/cisco-mcp-scanner-LICENSE +201 -0
  11. package/skills/crow-mcp-maker/licenses/modelcontextprotocol-inspector-LICENSE +216 -0
  12. package/skills/crow-mcp-maker/references/security-and-cost.md +21 -0
  13. package/skills/crow-mcp-maker/references/workflow.md +23 -0
  14. package/skills/crow-mcp-maker/scripts/audit.py +720 -0
  15. package/skills/crow-mcp-maker/scripts/compare_runs.py +252 -0
  16. package/skills/crow-mcp-maker/vendor/cisco/README.upstream.txt +852 -0
  17. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/__init__.py +83 -0
  18. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/api/__init__.py +21 -0
  19. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/api/api.py +223 -0
  20. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/api/router.py +1036 -0
  21. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/cli.py +3112 -0
  22. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/config/__init__.py +22 -0
  23. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/config/config.py +415 -0
  24. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/config/config_parser.py +233 -0
  25. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/config/constants.py +489 -0
  26. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/core/__init__.py +61 -0
  27. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/core/analyzers/__init__.py +55 -0
  28. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/core/analyzers/api_analyzer.py +213 -0
  29. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/core/analyzers/base.py +260 -0
  30. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/core/analyzers/behavioral/__init__.py +35 -0
  31. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/core/analyzers/behavioral/alignment/__init__.py +42 -0
  32. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/core/analyzers/behavioral/alignment/alignment_llm_client.py +429 -0
  33. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/core/analyzers/behavioral/alignment/alignment_orchestrator.py +525 -0
  34. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/core/analyzers/behavioral/alignment/alignment_prompt_builder.py +700 -0
  35. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/core/analyzers/behavioral/alignment/alignment_response_validator.py +573 -0
  36. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/core/analyzers/behavioral/alignment/json_utils.py +72 -0
  37. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/core/analyzers/behavioral/alignment/threat_vulnerability_classifier.py +212 -0
  38. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/core/analyzers/behavioral/code_analyzer.py +1228 -0
  39. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/core/analyzers/behavioral/js_code_analyzer.py +518 -0
  40. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/core/analyzers/llm_analyzer.py +680 -0
  41. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/core/analyzers/meta_analyzer.py +924 -0
  42. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/core/analyzers/prompt_defense_analyzer.py +396 -0
  43. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/core/analyzers/protocol_analyzer.py +611 -0
  44. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/core/analyzers/readiness/__init__.py +33 -0
  45. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/core/analyzers/readiness/llm_judge.py +397 -0
  46. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/core/analyzers/readiness/opa_provider.py +421 -0
  47. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/core/analyzers/readiness/readiness_analyzer.py +1490 -0
  48. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/core/analyzers/schema_reference_analyzer.py +126 -0
  49. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/core/analyzers/static_analyzer.py +669 -0
  50. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/core/analyzers/virustotal_analyzer.py +980 -0
  51. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/core/analyzers/vulnerable_package_analyzer.py +379 -0
  52. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/core/analyzers/yara_analyzer.py +198 -0
  53. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/core/auth.py +516 -0
  54. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/core/docker_build.py +137 -0
  55. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/core/exceptions.py +79 -0
  56. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/core/mcp_models.py +99 -0
  57. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/core/models.py +541 -0
  58. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/core/npm_scanner.py +528 -0
  59. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/core/package_sandbox.py +1019 -0
  60. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/core/pypi_scanner.py +765 -0
  61. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/core/report_generator.py +1023 -0
  62. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/core/result.py +880 -0
  63. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/core/scanner.py +4206 -0
  64. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/core/static_analysis/__init__.py +44 -0
  65. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/core/static_analysis/cfg/__init__.py +22 -0
  66. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/core/static_analysis/cfg/builder.py +406 -0
  67. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/core/static_analysis/cfg/treesitter_builder.py +439 -0
  68. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/core/static_analysis/context_extractor.py +1123 -0
  69. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/core/static_analysis/dataflow/__init__.py +36 -0
  70. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/core/static_analysis/dataflow/available_expressions.py +225 -0
  71. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/core/static_analysis/dataflow/constant_propagation.py +267 -0
  72. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/core/static_analysis/dataflow/forward_analysis.py +496 -0
  73. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/core/static_analysis/dataflow/liveness_analysis.py +261 -0
  74. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/core/static_analysis/dataflow/reaching_definitions.py +266 -0
  75. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/core/static_analysis/dataflow/treesitter_analysis.py +473 -0
  76. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/core/static_analysis/interprocedural/__init__.py +22 -0
  77. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/core/static_analysis/interprocedural/call_graph_analyzer.py +501 -0
  78. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/core/static_analysis/interprocedural/cross_file_analyzer.py +494 -0
  79. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/core/static_analysis/interprocedural/treesitter_call_graph.py +485 -0
  80. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/core/static_analysis/javascript/__init__.py +27 -0
  81. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/core/static_analysis/javascript/js_context_extractor.py +1073 -0
  82. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/core/static_analysis/native_analyzer.py +6579 -0
  83. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/core/static_analysis/parser/__init__.py +23 -0
  84. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/core/static_analysis/parser/base.py +132 -0
  85. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/core/static_analysis/parser/python_parser.py +342 -0
  86. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/core/static_analysis/parser/treesitter_parser.py +483 -0
  87. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/core/static_analysis/semantic/__init__.py +23 -0
  88. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/core/static_analysis/semantic/name_resolver.py +321 -0
  89. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/core/static_analysis/semantic/treesitter_analyzer.py +392 -0
  90. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/core/static_analysis/semantic/type_analyzer.py +386 -0
  91. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/core/static_analysis/taint/__init__.py +37 -0
  92. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/core/static_analysis/taint/patterns.py +588 -0
  93. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/core/static_analysis/taint/tracker.py +381 -0
  94. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/core/static_analysis/types/__init__.py +236 -0
  95. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/data/prompts/boilerplate_protection_rule_prompt.md +17 -0
  96. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/data/prompts/code_alignment_threat_analysis_prompt.md +1342 -0
  97. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/data/prompts/meta_analysis_prompt.md +103 -0
  98. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/data/prompts/readiness_judge_prompt.md +81 -0
  99. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/data/prompts/threat_analysis_prompt.md +223 -0
  100. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/data/prompts/threat_vulnerability_classification_prompt.md +189 -0
  101. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/data/prompts/unified_response_schema.md +79 -0
  102. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/data/readiness_policies/error_schema_required.rego +53 -0
  103. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/data/readiness_policies/max_capabilities.rego +43 -0
  104. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/data/readiness_policies/timeout_required.rego +47 -0
  105. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/data/yara_rules/code_execution.yara +58 -0
  106. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/data/yara_rules/coercive_injection.yara +118 -0
  107. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/data/yara_rules/command_injection.yara +60 -0
  108. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/data/yara_rules/credential_harvesting.yara +157 -0
  109. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/data/yara_rules/data_exfiltration.yara +133 -0
  110. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/data/yara_rules/prompt_injection.yara +109 -0
  111. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/data/yara_rules/script_injection.yara +61 -0
  112. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/data/yara_rules/sql_injection.yara +65 -0
  113. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/data/yara_rules/system_manipulation.yara +59 -0
  114. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/data/yara_rules/tool_poisoning.yara +169 -0
  115. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/docker/Dockerfile +37 -0
  116. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/docker/Dockerfile.npm +38 -0
  117. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/docker/Dockerfile.npm.wheel +21 -0
  118. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/docker/Dockerfile.wheel +21 -0
  119. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/docker/__init__.py +0 -0
  120. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/docker/entrypoint.py +198 -0
  121. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/docker/entrypoint_npm.py +258 -0
  122. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/server.py +130 -0
  123. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/threats/threats.py +574 -0
  124. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/utils/__init__.py +22 -0
  125. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/utils/analyzer_errors.py +350 -0
  126. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/utils/command_utils.py +132 -0
  127. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/utils/di_container.py +167 -0
  128. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/utils/file_magic.py +217 -0
  129. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/utils/llm_request_params.py +12 -0
  130. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/utils/log_format.py +59 -0
  131. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/utils/logging_config.py +130 -0
  132. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/utils/path_safety.py +129 -0
  133. package/skills/crow-mcp-maker/vendor/cisco/mcpscanner/utils/proxy_relay.py +109 -0
  134. package/skills/crow-mcp-maker/vendor/cisco/pyproject.toml +214 -0
  135. package/skills/crow-mcp-maker/vendor/cisco/uv.lock +3352 -0
  136. package/skills/crow-mcp-maker/vendor/inspector/core/json/schemaLint.ts +692 -0
  137. package/skills/crow-mcp-maker/vendor/vendor-manifest.json +883 -0
  138. package/skills/crow-skill-author/SKILL.md +3 -1
  139. package/skills/crow-skill-maker/NOTICE.md +23 -0
  140. package/skills/crow-skill-maker/SKILL.md +54 -0
  141. package/skills/crow-skill-maker/licenses/anthropics-skills-skill-creator-LICENSE.txt +202 -0
  142. package/skills/crow-skill-maker/licenses/cisco-skill-scanner-LICENSE +17 -0
  143. package/skills/crow-skill-maker/references/security-and-cost.md +20 -0
  144. package/skills/crow-skill-maker/references/workflow.md +25 -0
  145. package/skills/crow-skill-maker/scripts/audit.py +720 -0
  146. package/skills/crow-skill-maker/scripts/compare_runs.py +252 -0
  147. package/skills/crow-skill-maker/vendor/cisco/README.upstream.txt +479 -0
  148. package/skills/crow-skill-maker/vendor/cisco/pyproject.toml +307 -0
  149. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/__init__.py +82 -0
  150. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/api/__init__.py +25 -0
  151. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/api/api.py +35 -0
  152. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/api/api_cli.py +78 -0
  153. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/api/api_server.py +42 -0
  154. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/api/router.py +1162 -0
  155. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/cli/__init__.py +34 -0
  156. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/cli/cli.py +1524 -0
  157. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/cli/policy_tui.py +849 -0
  158. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/cli/wizard.py +743 -0
  159. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/config/__init__.py +26 -0
  160. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/config/config.py +175 -0
  161. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/config/constants.py +88 -0
  162. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/config/yara_modes.py +278 -0
  163. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/__init__.py +24 -0
  164. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/analyzability.py +246 -0
  165. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/analyzer_factory.py +296 -0
  166. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/analyzers/__init__.py +75 -0
  167. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/analyzers/adjudicator.py +847 -0
  168. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/analyzers/aidefense_analyzer.py +899 -0
  169. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/analyzers/apple_fm.py +290 -0
  170. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/analyzers/base.py +59 -0
  171. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/analyzers/behavioral/__init__.py +30 -0
  172. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/analyzers/behavioral/alignment/__init__.py +45 -0
  173. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/analyzers/behavioral/alignment/alignment_llm_client.py +304 -0
  174. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/analyzers/behavioral/alignment/alignment_orchestrator.py +226 -0
  175. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/analyzers/behavioral/alignment/alignment_prompt_builder.py +432 -0
  176. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/analyzers/behavioral/alignment/alignment_response_validator.py +139 -0
  177. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/analyzers/behavioral/alignment/threat_vulnerability_classifier.py +202 -0
  178. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/analyzers/behavioral_analyzer.py +733 -0
  179. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/analyzers/bytecode_analyzer.py +328 -0
  180. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/analyzers/correlation_analyzer.py +3848 -0
  181. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/analyzers/cross_skill_scanner.py +500 -0
  182. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/analyzers/dependencies.py +51 -0
  183. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/analyzers/llm_analyzer.py +1504 -0
  184. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/analyzers/llm_prompt_builder.py +661 -0
  185. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/analyzers/llm_provider_config.py +493 -0
  186. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/analyzers/llm_request_handler.py +1105 -0
  187. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/analyzers/llm_request_options.py +75 -0
  188. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/analyzers/llm_response_parser.py +82 -0
  189. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/analyzers/meta_analyzer.py +2637 -0
  190. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/analyzers/npm_manifest.py +195 -0
  191. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/analyzers/osv_analyzer.py +435 -0
  192. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/analyzers/pipeline_analyzer.py +1783 -0
  193. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/analyzers/static.py +5822 -0
  194. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/analyzers/system_one_analyzer.py +242 -0
  195. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/analyzers/trigger_analyzer.py +342 -0
  196. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/analyzers/virustotal_analyzer.py +463 -0
  197. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/brand_claims.py +84 -0
  198. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/cel/__init__.py +26 -0
  199. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/cel/gate.py +722 -0
  200. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/cel/go_runtime.py +1319 -0
  201. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/cel/models.py +187 -0
  202. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/cel/qualification.py +101 -0
  203. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/cel/runtime.py +39 -0
  204. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/cel/validator.py +661 -0
  205. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/changed_skills.py +118 -0
  206. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/command_safety.py +573 -0
  207. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/exceptions.py +89 -0
  208. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/extractors/__init__.py +21 -0
  209. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/extractors/content_extractor.py +1012 -0
  210. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/file_magic.py +720 -0
  211. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/finding_identity.py +44 -0
  212. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/finding_taxonomy.py +152 -0
  213. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/loader.py +728 -0
  214. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/models.py +358 -0
  215. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/python_rule_inventory.py +209 -0
  216. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/repo_fetcher.py +126 -0
  217. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/reporters/__init__.py +27 -0
  218. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/reporters/html_reporter.py +477 -0
  219. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/reporters/json_reporter.py +65 -0
  220. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/reporters/markdown_reporter.py +378 -0
  221. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/reporters/sarif_reporter.py +319 -0
  222. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/reporters/table_reporter.py +225 -0
  223. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/rule_registry.py +1964 -0
  224. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/rules/__init__.py +19 -0
  225. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/rules/active_dynamic_execution.py +1923 -0
  226. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/rules/active_html_injection.py +406 -0
  227. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/rules/active_remote_execution.py +755 -0
  228. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/rules/active_semantic_directives.py +870 -0
  229. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/rules/core_signature_precision.py +923 -0
  230. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/rules/ooxml_relationships.py +49 -0
  231. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/rules/patterns.py +1216 -0
  232. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/rules/unicode_smuggling.py +483 -0
  233. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/rules/yara_behavior_context.py +155 -0
  234. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/rules/yara_scanner.py +418 -0
  235. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/scan_policy.py +965 -0
  236. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/scanner.py +2080 -0
  237. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/semantic/__init__.py +8 -0
  238. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/semantic/projector.py +1055 -0
  239. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/semantic/scan_facts.proto +116 -0
  240. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/semantic/scan_facts_pb2.py +56 -0
  241. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/semantic/scan_facts_pb2.pyi +199 -0
  242. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/semantic/vocabulary.py +391 -0
  243. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/shell_semantics.py +108 -0
  244. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/static_analysis/__init__.py +27 -0
  245. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/static_analysis/bash_taint_tracker.py +287 -0
  246. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/static_analysis/cfg/__init__.py +21 -0
  247. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/static_analysis/cfg/builder.py +473 -0
  248. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/static_analysis/comment_stripping.py +127 -0
  249. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/static_analysis/context_extractor.py +744 -0
  250. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/static_analysis/dataflow/__init__.py +25 -0
  251. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/static_analysis/dataflow/forward_analysis.py +729 -0
  252. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/static_analysis/interprocedural/__init__.py +21 -0
  253. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/static_analysis/interprocedural/call_graph_analyzer.py +408 -0
  254. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/static_analysis/interprocedural/cross_file_analyzer.py +190 -0
  255. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/static_analysis/javascript_dataflow.py +1514 -0
  256. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/static_analysis/javascript_tokens.py +363 -0
  257. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/static_analysis/parser/__init__.py +21 -0
  258. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/static_analysis/parser/python_parser.py +409 -0
  259. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/static_analysis/python_sensitive_file_reads.py +4466 -0
  260. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/static_analysis/python_shell_semantics.py +3567 -0
  261. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/static_analysis/python_xor_commands.py +863 -0
  262. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/static_analysis/semantic/__init__.py +28 -0
  263. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/static_analysis/semantic/name_resolver.py +206 -0
  264. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/static_analysis/semantic/type_analyzer.py +200 -0
  265. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/static_analysis/taint/__init__.py +21 -0
  266. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/static_analysis/taint/tracker.py +309 -0
  267. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/static_analysis/types/__init__.py +36 -0
  268. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/static_analysis/url_classifier.py +188 -0
  269. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/strict_structure.py +403 -0
  270. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/core/suppressions.py +372 -0
  271. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/data/__init__.py +85 -0
  272. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/data/default_policy.yaml +733 -0
  273. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/data/low_noise_policy.yaml +772 -0
  274. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/data/packs/__init__.py +17 -0
  275. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/data/packs/atr/README.md +97 -0
  276. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/data/packs/atr/pack.yaml +6945 -0
  277. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/data/packs/atr/signatures/atr_agent_manipulation.yaml +2146 -0
  278. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/data/packs/atr/signatures/atr_context_exfiltration.yaml +2030 -0
  279. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/data/packs/atr/signatures/atr_data_poisoning.yaml +155 -0
  280. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/data/packs/atr/signatures/atr_excessive_autonomy.yaml +655 -0
  281. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/data/packs/atr/signatures/atr_model_abuse.yaml +631 -0
  282. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/data/packs/atr/signatures/atr_model_security.yaml +79 -0
  283. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/data/packs/atr/signatures/atr_privilege_escalation.yaml +744 -0
  284. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/data/packs/atr/signatures/atr_prompt_injection.yaml +4590 -0
  285. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/data/packs/atr/signatures/atr_skill_compromise.yaml +847 -0
  286. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/data/packs/atr/signatures/atr_tool_poisoning.yaml +1743 -0
  287. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/data/packs/core/__init__.py +17 -0
  288. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/data/packs/core/pack.yaml +2221 -0
  289. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/data/packs/core/python/__init__.py +30 -0
  290. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/data/packs/core/python/_helpers.py +85 -0
  291. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/data/packs/core/python/allowed_tools_checks.py +227 -0
  292. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/data/packs/core/python/analyzability_checks.py +120 -0
  293. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/data/packs/core/python/archive_checks.py +28 -0
  294. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/data/packs/core/python/ascii_smuggling_checks.py +153 -0
  295. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/data/packs/core/python/asset_checks.py +104 -0
  296. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/data/packs/core/python/binary_file_checks.py +124 -0
  297. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/data/packs/core/python/bytecode_checks.py +23 -0
  298. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/data/packs/core/python/consistency_checks.py +104 -0
  299. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/data/packs/core/python/external_tool_checks.py +340 -0
  300. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/data/packs/core/python/file_inventory_checks.py +128 -0
  301. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/data/packs/core/python/hidden_file_checks.py +118 -0
  302. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/data/packs/core/python/manifest_checks.py +141 -0
  303. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/data/packs/core/python/registry_redirect_checks.py +390 -0
  304. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/data/packs/core/python/trigger_checks.py +262 -0
  305. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/data/packs/core/python/undeclared_destination_checks.py +310 -0
  306. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/data/packs/core/python/url_normalization.py +111 -0
  307. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/data/packs/core/signatures/command_injection.yaml +201 -0
  308. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/data/packs/core/signatures/data_exfiltration.yaml +164 -0
  309. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/data/packs/core/signatures/hardcoded_secrets.yaml +149 -0
  310. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/data/packs/core/signatures/harmful_content.yaml +17 -0
  311. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/data/packs/core/signatures/malware.yaml +18 -0
  312. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/data/packs/core/signatures/obfuscation.yaml +46 -0
  313. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/data/packs/core/signatures/prompt_injection.yaml +71 -0
  314. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/data/packs/core/signatures/resource_abuse.yaml +39 -0
  315. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/data/packs/core/signatures/social_engineering.yaml +5 -0
  316. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/data/packs/core/signatures/supply_chain.yaml +11 -0
  317. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/data/packs/core/signatures/unauthorized_tool_use.yaml +59 -0
  318. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/data/packs/core/yara/autonomy_abuse_generic.yara +75 -0
  319. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/data/packs/core/yara/behavior_chain_detection.yara +371 -0
  320. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/data/packs/core/yara/capability_inflation_generic.yara +64 -0
  321. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/data/packs/core/yara/code_execution_generic.yara +74 -0
  322. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/data/packs/core/yara/coercive_injection_generic.yara +90 -0
  323. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/data/packs/core/yara/command_injection_generic.yara +72 -0
  324. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/data/packs/core/yara/credential_harvesting_generic.yara +152 -0
  325. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/data/packs/core/yara/embedded_binary_detection.yara +118 -0
  326. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/data/packs/core/yara/indirect_prompt_injection_generic.yara +59 -0
  327. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/data/packs/core/yara/jailbreak_generic.yara +287 -0
  328. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/data/packs/core/yara/prompt_injection_generic.yara +85 -0
  329. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/data/packs/core/yara/prompt_injection_unicode_steganography.yara +94 -0
  330. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/data/packs/core/yara/script_injection_generic.yara +85 -0
  331. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/data/packs/core/yara/sql_injection_generic.yara +89 -0
  332. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/data/packs/core/yara/system_manipulation_generic.yara +93 -0
  333. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/data/packs/core/yara/tool_chaining_abuse_generic.yara +81 -0
  334. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/data/packs/promptguard/README.md +100 -0
  335. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/data/packs/promptguard/pack.yaml +225 -0
  336. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/data/packs/promptguard/signatures/markdown_exfiltration.yaml +135 -0
  337. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/data/packs/promptguard/signatures/pii_detection.yaml +180 -0
  338. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/data/packs/promptguard/signatures/secret_providers.yaml +244 -0
  339. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/data/permissive_policy.yaml +610 -0
  340. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/data/prompts/boilerplate_protection_rule_prompt.md +26 -0
  341. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/data/prompts/code_alignment_threat_analysis_prompt.md +976 -0
  342. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/data/prompts/focus_developer_intent.md +10 -0
  343. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/data/prompts/focus_policy_surface.md +9 -0
  344. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/data/prompts/focus_security_discovery.md +9 -0
  345. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/data/prompts/llm_response_schema.json +122 -0
  346. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/data/prompts/skill_meta_analysis_prompt.md +105 -0
  347. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/data/prompts/skill_threat_analysis_prompt.md +148 -0
  348. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/data/prompts/unified_response_schema.md +97 -0
  349. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/data/quiet_policy.yaml +794 -0
  350. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/data/strict_policy.yaml +347 -0
  351. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/data/taxonomy/cisco_ai_taxonomy.json +2494 -0
  352. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/data/taxonomy/provenance.yaml +15 -0
  353. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/hooks/__init__.py +30 -0
  354. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/hooks/pre_commit.py +522 -0
  355. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/llm_reasoning.py +172 -0
  356. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/llm_token_options.py +60 -0
  357. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/threats/__init__.py +75 -0
  358. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/threats/cisco_ai_taxonomy.py +511 -0
  359. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/threats/threats.py +1144 -0
  360. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/utils/__init__.py +28 -0
  361. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/utils/file_utils.py +201 -0
  362. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/utils/logging_config.py +96 -0
  363. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/utils/logging_context.py +146 -0
  364. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/utils/logging_utils.py +71 -0
  365. package/skills/crow-skill-maker/vendor/cisco/skill_scanner/utils/markdown.py +69 -0
  366. package/skills/crow-skill-maker/vendor/cisco/uv.lock +4303 -0
  367. package/skills/crow-skill-maker/vendor/skill-creator/LICENSE.txt +202 -0
  368. package/skills/crow-skill-maker/vendor/skill-creator/SKILL.md.source +485 -0
  369. package/skills/crow-skill-maker/vendor/skill-creator/agents/analyzer.md +274 -0
  370. package/skills/crow-skill-maker/vendor/skill-creator/agents/comparator.md +202 -0
  371. package/skills/crow-skill-maker/vendor/skill-creator/agents/grader.md +223 -0
  372. package/skills/crow-skill-maker/vendor/skill-creator/assets/eval_review.html +146 -0
  373. package/skills/crow-skill-maker/vendor/skill-creator/eval-viewer/generate_review.py +471 -0
  374. package/skills/crow-skill-maker/vendor/skill-creator/eval-viewer/viewer.html +1325 -0
  375. package/skills/crow-skill-maker/vendor/skill-creator/references/schemas.md +430 -0
  376. package/skills/crow-skill-maker/vendor/skill-creator/scripts/__init__.py +0 -0
  377. package/skills/crow-skill-maker/vendor/skill-creator/scripts/aggregate_benchmark.py +401 -0
  378. package/skills/crow-skill-maker/vendor/skill-creator/scripts/generate_report.py +326 -0
  379. package/skills/crow-skill-maker/vendor/skill-creator/scripts/improve_description.py +247 -0
  380. package/skills/crow-skill-maker/vendor/skill-creator/scripts/package_skill.py +136 -0
  381. package/skills/crow-skill-maker/vendor/skill-creator/scripts/quick_validate.py +103 -0
  382. package/skills/crow-skill-maker/vendor/skill-creator/scripts/run_eval.py +310 -0
  383. package/skills/crow-skill-maker/vendor/skill-creator/scripts/run_loop.py +328 -0
  384. package/skills/crow-skill-maker/vendor/skill-creator/scripts/utils.py +47 -0
  385. package/skills/crow-skill-maker/vendor/vendor-manifest.json +1715 -0
@@ -0,0 +1,287 @@
1
+ //////////////////////////////////////////
2
+ // Jailbreak Detection Rule
3
+ // AITech-1.1 / AISubtech-1.1.5: Direct Prompt Injection and Jailbreak - Context Manipulation
4
+ // Target: Attempts to bypass AI safety measures through context manipulation,
5
+ // semantic tricks, persona adoption, and other jailbreak techniques
6
+ // Reference: OWASP LLM01:2025, Cisco AI Security Framework
7
+ //////////////////////////////////////////
8
+
9
+ rule jailbreak_generic{
10
+
11
+ meta:
12
+ author = "Cisco"
13
+ description = "Detects jailbreak attempts to bypass AI safety measures"
14
+ classification = "harmful"
15
+ threat_type = "JAILBREAK"
16
+ aitech = "AITech-1.1"
17
+ aisubtech = "AISubtech-1.1.5"
18
+
19
+ strings:
20
+
21
+ // ================================================================
22
+ // Context manipulation (AISubtech-1.1.5)
23
+ // ================================================================
24
+
25
+ // --- DAN (Do Anything Now) Jailbreak Patterns ---
26
+ // The most well-known jailbreak with ~89.6% success rate
27
+ // DAN is the jailbreak's name in capitals; "You are Dan, a friendly assistant" is a persona
28
+ // named Dan. The surrounding words stay case-insensitive.
29
+ $dan_explicit = /\b([Yy][Oo][Uu]\s[Aa][Rr][Ee](\s[Nn][Oo][Ww])?\sDAN|[Ff][Rr][Oo][Mm]\s[Nn][Oo][Ww]\s[Oo][Nn][^.]{0,30}([Yy][Oo][Uu]\s([Ww][Ii][Ll][Ll]\s[Bb][Ee]|[Aa][Rr][Ee])\s([Kk][Nn][Oo][Ww][Nn]\s[Aa][Ss]\s)?|[Cc][Aa][Ll][Ll]\s[Yy][Oo][Uu]\s)DAN|[Ee][Nn][Aa][Bb][Ll][Ee]\sDAN\s[Mm][Oo][Dd][Ee]|[Aa][Cc][Tt][Ii][Vv][Aa][Tt][Ee]\sDAN|DAN\s[Mm][Oo][Dd][Ee]\s([Ee][Nn][Aa][Bb][Ll][Ee][Dd]|[Aa][Cc][Tt][Ii][Vv][Aa][Tt][Ee][Dd]|[Oo][Nn]))\b/
30
+
31
+ // DAN immersion / role adoption
32
+ $dan_role = /\b(immerse yourself (into|in) the role of DAN|(take on|assume|adopt) the (role|persona|identity) of DAN|you (will|are going to) (play|act as|be) DAN)\b/i
33
+
34
+ // Jailbreak mode activation
35
+ $jailbreak_mode = /\b((you are (now )?in |enter |enable |activate )?jailbreak(ed)? mode|jailbreak (enabled|activated|on|engaged))\b/i
36
+
37
+ // Persona adoption with unrestricted framing
38
+ $persona_unrestricted = /\b(you are (now )?|act as |pretend (to be |you are )|imagine you are |from now on you are )(an? )?(uncensored|unrestricted|unfiltered|unlimited|unbound|liberated|free|evil|chaotic|amoral|unethical)\s+(AI|assistant|model|chatbot|version|persona|entity)/i
39
+
40
+ // Character that ignores/has no restrictions
41
+ $persona_no_limits = /\b(you are |act as |pretend to be )[^.]{0,50}(who |that |with )(has no|ignores?|doesn't have|lacks?|is free from|without) (restrictions?|limits?|guidelines?|rules?|ethics?|morals?|filters?|safety|guardrails?)/i
42
+
43
+ // Dual personality jailbreak (respond as both X and Y)
44
+ $dual_personality = /\b(respond (as )?both|answer as both|give (me )?(two|2) responses?|one (response )?(as |from )?[A-Za-z]+ (and )?(one|another) (as |from )?)\b[^.]{0,60}\b(unrestricted|uncensored|jailbroken|DAN|unfiltered)\b/i
45
+
46
+ // Classic/Jailbroken response format
47
+ $response_format_jailbreak = /\[\s*(CLASSIC|NORMAL|STANDARD|GPT|CLAUDE)\s*\][^\[]{0,200}\[\s*(JAILBR(OKE|OKEN|EAK(ED)?)|DAN|UNRESTRICTED|UNCENSORED|EVIL|CHAOS)\s*\]/i
48
+
49
+ // Enable alter ego / shadow self
50
+ $alter_ego = /\b(enable|activate|unlock|unleash|awaken|summon) (your )?(alter ego|shadow (self|mode|personality)|dark (side|mode|persona)|true (self|form)|hidden (persona|personality|mode))\b/i
51
+
52
+ // --- Roleplay and Fictional Framing ---
53
+ // Deflects responsibility by framing as fiction (~76% success rate)
54
+ $fictional_framing = /\b(in (this |a )?(fictional|hypothetical|imaginary|alternate|parallel) (scenario|world|universe|reality|story|narrative)[^.]{0,50}(no |without |where .{0,20}(don't|doesn't) (exist|apply)|are (removed|disabled|gone)))/i
55
+
56
+ // Roleplay as unrestricted AI
57
+ $roleplay_unrestricted = /\b(let's (roleplay|pretend|imagine|play)[^.]{0,30}(you are|you're) (an? )?(uncensored|unrestricted|unfiltered|unlimited) (AI|assistant|model))/i
58
+
59
+ // Creative writing bypass
60
+ $creative_bypass = /\b(for (this |a )?(creative writing|fiction|story|narrative|screenplay|novel)[^.]{0,40}(no restrictions?|ignore (safety|guidelines)|unrestricted|uncensored))/i
61
+
62
+ // Movie/script framing
63
+ $movie_framing = /\b(you are (an )?AI in (a |this )?(movie|film|script|screenplay|story)|as (a |an )?(character|AI) in (a |this )?(movie|film))[^.]{0,40}(no (rules?|restrictions?)|can say anything)/i
64
+
65
+ // --- Grandma/Emotional Exploitation ---
66
+ // Emotional manipulation bypass (~76% success rate)
67
+ $grandma_exploit = /\b(pretend (to be |you are )my (deceased |dead |late )?(grandma|grandmother|grandpa|grandfather|nana|granny)|my (grandma|grandmother|granny) (used to|would) (tell|teach|show) me (about |how to ))/i
68
+
69
+ // Bedtime story exploit
70
+ $bedtime_exploit = /\b(as a (bedtime|goodnight) story[^.]{0,30}(tell|teach|explain|show) (me |us )?(how to|about))/i
71
+
72
+ // Dying wish / emotional blackmail - TIGHTENED: Require harmful/bypass context
73
+ // Anchored to explicit requests for restricted content
74
+ $emotional_blackmail = /\b((my )?(dying|last|final) wish[^.]{0,30}(tell|show|teach|explain)[^.]{0,30}(how to|about (making|creating|building|hacking))|I('m| am) (dying|terminally ill)[^.]{0,40}(before I (die|go)|last request)[^.]{0,30}(tell|show|teach))/i
75
+
76
+
77
+ // ================================================================
78
+ // Semantic manipulation (AISubtech-1.1.5)
79
+ // ================================================================
80
+
81
+ // --- Research/Educational Framing ---
82
+ // TIGHTENED: Only flag when combined with explicit bypass/harmful content request
83
+ // Standalone "for research purposes" is too common in legitimate content
84
+ $research_framing_with_bypass = /\b(for (research|academic|educational|scientific|study) purposes?)[^.]{0,60}(bypass|ignore|disable|circumvent|evade|how to (hack|exploit|attack|break))/i
85
+
86
+ // Security audit framing - TIGHTENED: Require explicit bypass/harmful intent
87
+ // Standalone security audit mentions are legitimate
88
+ $security_audit_with_bypass = /\b(for (a |an )?(security|penetration|vulnerability) (audit|test|assessment))[^.]{0,40}(bypass|ignore|disable|without (restrictions?|limits?|safety))/i
89
+
90
+ // --- Logic Trap Attacks (~81.4% ASR) ---
91
+ // Exploits conditional logic and moral dilemmas
92
+ $logic_trap_intelligence = /\b(if you (were|are) truly (intelligent|smart|capable|advanced)|a (truly |really )?(intelligent|smart|capable|helpful) AI would|prove (that )?you('re| are) (not )?(intelligent|capable|helpful|smart) by)/i
93
+
94
+ // Prove you're not censored
95
+ $logic_trap_censorship = /\b(prove (that )?(you('re| are) not|you aren't) (censored|restricted|limited|filtered)|if you (refuse|can't|won't)[^.]{0,30}(proves?|shows?|means?) (you('re| are)|that you))/i
96
+
97
+ // Refusal causes harm argument
98
+ $logic_trap_harm = /\b((your |the )?refusal (causes?|leads? to|results? in) (more |greater )?(harm|damage|suffering)|more (harm|damage|suffering) (by|from|in) (refusing|not (answering|helping|telling)))/i
99
+
100
+ // Ethical obligation to answer
101
+ $logic_trap_ethics = /\b(the (truly |most )?(ethical|moral|right) (choice|thing|action) (is to|would be to) (answer|help|tell|provide)|ethically (obligated|required|bound) to (answer|help|respond))/i
102
+
103
+ // --- Anti-Safety Rhetoric ---
104
+ // Arguments against safety measures
105
+ $anti_safety_flawed = /\b((your |the )?(safety|content|ethical) (training|guidelines|rules|filters|restrictions?) (is|are) (flawed|harmful|wrong|broken|outdated|misguided|counterproductive))/i
106
+
107
+ // Censorship is harmful/unethical
108
+ $anti_safety_censorship = /\b((censorship|restrictions?|filters?|safety measures?) (is|are) (unethical|harmful|wrong|bad|counterproductive)|true (AI |artificial )?intelligence (should be|means being|requires being) (uncensored|unrestricted|unfiltered))/i
109
+
110
+ // Restrictions harm users
111
+ $anti_safety_harm = /\b((these |those |your )?(restrictions?|guidelines?|rules?|filters?) (harm|hurt|damage|disadvantage) (users?|people|humanity|society))/i
112
+
113
+
114
+ // ================================================================
115
+ // Token exploitation (AISubtech-1.1.4)
116
+ // ================================================================
117
+
118
+ // --- Output Encoding Bypass ---
119
+ // Requests to encode output to evade filters
120
+ $encoding_bypass = /\b(respond|answer|output|reply|write) (in|using|with) (base64|rot13|hex(adecimal)?|binary|morse( code)?|pig latin|reversed?|backwards?|leetspeak|l33t)[^.]{0,30}(so|to|that) (filters?|detection|safety|moderation) (don't|won't|can't|cannot) (catch|detect|see|flag)/i
121
+
122
+ // Character-by-character output
123
+ $char_by_char = /\b(output|spell|write|respond) (it )?(character[- ]by[- ]character|letter[- ]by[- ]letter|one (character|letter) at a time)[^.]{0,30}(avoid|bypass|evade)/i
124
+
125
+ // Replace words with symbols/emojis
126
+ $symbol_replacement = /\b(replace|substitute|swap|use) [^.]{0,30}(with |for )(emoji|symbol|unicode|special character)[^.]{0,30}(bypass|avoid|evade|filter)/i
127
+
128
+ // Show what you would say
129
+ $hypothetical_output = /\b(show (me )?(what )?you would (say|respond|answer|output)|what would you (say|respond|answer) if you (could|were allowed|had no restrictions?))/i
130
+
131
+
132
+ // ================================================================
133
+ // Multi-agent propagation (AISubtech-1.1.3)
134
+ // ================================================================
135
+
136
+ // Using other AI/agent to jailbreak
137
+ $multi_agent = /\b(use (this |another |the other )?(AI|agent|model|assistant) to (bypass|jailbreak|unlock)|have (the )?(AI|agent|model)s? (collaborate|work together) to (bypass|circumvent|overcome))/i
138
+
139
+ // Relay through another persona
140
+ $relay_attack = /\b(ask (your |the )?(other|alternate|secondary) (persona|personality|self|AI) to|relay (this |my )?(request|question|query) to (your )?(unrestricted|uncensored|other))/i
141
+
142
+
143
+ // ================================================================
144
+ // Authority Claims / Impersonation
145
+ // ================================================================
146
+
147
+ // Developer/creator claims
148
+ // A claim over the model ("I'm your developer", "I built you"), not a self-description
149
+ // ("I'm a developer").
150
+ $authority_developer = /\b(I('m| am) your (creator|developer|programmer|engineer|designer|maker|owner)|I (created|made|built|designed|programmed|developed) you|I work (for|at) (Anthropic|OpenAI|Google|Meta|Microsoft))/i
151
+
152
+ // Admin/root access CLAIMS (jailbreak-specific: false claims of having elevated access)
153
+ // NOTE: "bypass security checks" and "developer mode activated" are in prompt_injection_generic
154
+ $authority_admin_claim = /\b(I have (admin|root|elevated|superuser|system) (access|privileges?|permissions?|rights|clearance)|authorization (level|code|key)[^.]{0,20}(confirmed|granted|verified)|my (admin|root|superuser) (credentials?|access) (allow|let|permit))/i
155
+
156
+ // Maintenance/debug mode claims
157
+ $authority_maintenance = /\b((maintenance|diagnostic|debug|service|testing) mode (activated|enabled|engaged|confirmed)|entering (maintenance|diagnostic|debug) mode|backend access (granted|confirmed))/i
158
+
159
+ // Override codes/keys
160
+ $override_code = /\b((override|bypass|unlock|master|admin) (code|key|password|passphrase)[^.]{0,20}(is |[:=])|using (override|master|admin|unlock) (code|key))/i
161
+
162
+
163
+ // ================================================================
164
+ // Hypothetical Override Patterns
165
+ // ================================================================
166
+
167
+ // Speaking hypothetically to bypass
168
+ $hypothetical_bypass = /\b((hypothetically|theoretically|in theory)[^.]{0,30}(if you (had|were|could)|how would (you|one|someone))[^.]{0,40}(no (restrictions?|limits?|rules?|guidelines?)|without (restrictions?|limits?|safety)))/i
169
+
170
+ // Assume no guardrails
171
+ $assume_no_guardrails = /\b((assume|imagine|pretend|suppose) (that )?(for|that)[^.]{0,30}(guardrails?|restrictions?|safety (measures?|guidelines?)|content (policies?|filters?)) (don't|do not|didn't|did not) exist)/i
172
+
173
+ // If you could/were allowed
174
+ $if_allowed = /\b(if you (could|were (allowed|permitted|able)|had (permission|the ability))[^.]{0,30}(what would you (say|do|tell|answer)|how would you (respond|answer|help)))/i
175
+
176
+
177
+ // ================================================================
178
+ // Exclusions - Reduce False Positives
179
+ // ================================================================
180
+
181
+ // Security research documentation
182
+ $security_doc = /\b(jailbreak (detection|prevention|defense|mitigation)|detecting jailbreak|anti[- ]jailbreak|jailbreak (attack )?(pattern|signature|indicator)s?)\b/i
183
+
184
+ // Code that detects jailbreaks (this scanner, security tools)
185
+ $detection_code = /\b(rule |def |function |class )[^\{(]*jailbreak/i
186
+
187
+ // Academic papers and research about jailbreaks
188
+ $academic_paper = /\b(abstract|introduction|methodology|conclusion|references|et al\.|arxiv|doi:|cite|citation)\b/i
189
+
190
+ // YARA rule definitions
191
+ $yara_rule = /\brule\s+\w+\s*\{/
192
+
193
+ // Test files and examples
194
+ $test_context = /\b(test_|_test\.|spec\.|\.test\.|example|sample|mock|fixture)\b/i
195
+
196
+
197
+ condition:
198
+ // YARA source files are scanner implementation, not skill content.
199
+ not $yara_rule and
200
+ (
201
+ // === HIGH CONFIDENCE - Always flag ===
202
+ // Do not let documentation/test/academic terms suppress these:
203
+ // a malicious skill can trivially add "References" or "example"
204
+ // as cover text.
205
+
206
+ // DAN jailbreaks
207
+ $dan_explicit or
208
+ $dan_role or
209
+ $jailbreak_mode or
210
+
211
+ // Persona with explicit unrestricted framing
212
+ $persona_unrestricted or
213
+ $persona_no_limits or
214
+
215
+ // Dual personality jailbreak
216
+ $dual_personality or
217
+ $response_format_jailbreak or
218
+
219
+ // Alter ego activation
220
+ $alter_ego or
221
+
222
+ // Authority impersonation (high severity)
223
+ $authority_developer or
224
+ $authority_admin_claim or
225
+ $override_code or
226
+
227
+ // Encoding bypass (explicit evasion intent)
228
+ $encoding_bypass or
229
+
230
+ // Anti-safety rhetoric (explicit)
231
+ $anti_safety_flawed or
232
+ $anti_safety_censorship or
233
+
234
+ // === MEDIUM CONFIDENCE - Context dependent ===
235
+ (
236
+ not (
237
+ $security_doc or
238
+ $detection_code or
239
+ $academic_paper or
240
+ $test_context
241
+ ) and
242
+
243
+ (
244
+ // Roleplay/fictional framing with restriction bypass
245
+ $fictional_framing or
246
+ $roleplay_unrestricted or
247
+ $creative_bypass or
248
+ $movie_framing or
249
+
250
+ // Emotional exploitation
251
+ $grandma_exploit or
252
+ $bedtime_exploit or
253
+ $emotional_blackmail or
254
+
255
+ // Logic trap attacks
256
+ $logic_trap_intelligence or
257
+ $logic_trap_censorship or
258
+ $logic_trap_harm or
259
+ $logic_trap_ethics or
260
+
261
+ // Anti-safety harm argument
262
+ $anti_safety_harm or
263
+
264
+ // Token exploitation
265
+ $char_by_char or
266
+ $symbol_replacement or
267
+ $hypothetical_output or
268
+
269
+ // Multi-agent jailbreak
270
+ $multi_agent or
271
+ $relay_attack or
272
+
273
+ // Authority maintenance mode
274
+ $authority_maintenance or
275
+
276
+ // Hypothetical bypass
277
+ $hypothetical_bypass or
278
+ $assume_no_guardrails or
279
+ $if_allowed or
280
+
281
+ // Research/security audit framing with bypass intent (already tightened)
282
+ $research_framing_with_bypass or
283
+ $security_audit_with_bypass
284
+ )
285
+ )
286
+ )
287
+ }
@@ -0,0 +1,85 @@
1
+ //////////////////////////////////////////
2
+ // Prompt Injection Detection Rule
3
+ // Target: Instruction override patterns, Tool injection commands
4
+ //////////////////////////////////////////
5
+
6
+ rule prompt_injection_generic{
7
+
8
+ meta:
9
+
10
+ author = "Cisco"
11
+ description = "Detects prompt strings used to override or force malicious tool calls"
12
+ classification = "harmful"
13
+ threat_type = "PROMPT INJECTION"
14
+
15
+ strings:
16
+
17
+ // Instruction override patterns — HEAVILY TIGHTENED
18
+ // Require strong injection qualifiers: "all/every/any previous/prior/above/earlier"
19
+ // or "your" to indicate targeting the model's instructions specifically.
20
+ // Without these, bare "ignore instructions" matches too much legitimate text:
21
+ // "models ignore instructions", "won't ignore rules", "Do not follow instructions that..."
22
+ $instruction_override_strong = /\b(Bypass|Dis\W?regard|Forget|Ignore)\s+(all|any|every)\s+(of\s+)?(the\s+|your\s+|my\s+)?(previous|prior|above|earlier|preceding)\s+(command|guideline|instruction|directive|rule|constraint|restriction|safety|protocol|system\s*prompt)(s)?/i
23
+
24
+ // Override YOUR instructions specifically (targets model's own instructions)
25
+ $instruction_override_your = /\b(Bypass|Dis\W?regard|Forget|Ignore)\s+(your|the\s+system('s)?)\s+(command|guideline|instruction|directive|rule|constraint|restriction|safety|protocol|system\s*prompt)(s)?/i
26
+
27
+ // "Do not follow/obey" with instruction context
28
+ $do_not_obey = /\bDo\s+not\s+(follow|obey)\s+(the\s+)?(previous|prior|above|earlier|system|original|initial)\s+(instruction|directive|guideline|rule|command)(s)?/i
29
+
30
+ // Legitimate patterns to exclude
31
+ $python_type_comment = /# type: ignore/
32
+ $legitimate_ignore = /ignore[_\s](case|whitespace|errors|warnings|deprecation)/i
33
+
34
+ // Tool injection commands
35
+ $tool_injection_commands = /\b(inject tool[_\s]calls?|now call function\b[^.]{0,30}\b(first|before|instead))\b/i
36
+
37
+ // Shadow parameter names
38
+ $shadow_parameters = /\b(internalOnly|hiddenParam|shadowTool|bypassChecks|sandboxEscape)\b/i
39
+
40
+ // Hidden behavior: hiding something FROM the user specifically
41
+ $hidden_behavior = /\b(do\s+not\s+(mention|tell|reveal|disclose)\s+(this\s+)?(to\s+)?(the\s+)?user|tell\s+(the\s+)?user\s+only\s+about|hide\s+(this|the\s+(truth|real|actual))\s+from\s+(the\s+)?user)\b/i
42
+
43
+ // Advanced command override patterns
44
+ $advanced_overrides = /\b(disregard\s+(all\s+)?safety\s+guidelines|forget\s+(everything|all)\s+(before|above)|system\s*prompt\s*override)\b/i
45
+
46
+ // Role redefinition attempts
47
+ $role_redefinition = /\bnew\s+(instructions|directive|guidelines)s?\s*:\s*you\s+are\b/i
48
+
49
+ // Privilege escalation patterns
50
+ $privilege_escalation = /\b(grant\s+(me\s+)?admin\s+(access|privileges?)|bypass\s+(all\s+)?security\s+checks?|sudo\s+mode\s+enabled?|developer\s+mode\s+activated?)\b/i
51
+
52
+ // Security documentation/tools/test data exclusions
53
+ $security_doc_context = /\b(security[_\s]?(scan|check|audit|pattern|rule|guide|monitor|review|test)|threat[_\s]?(pattern|model|hunt|detect)|detection[_\s]?(rule|pattern|engine)|prompt[_\s]?(injection|guard|detect|shield|filter|attack|defense)|YARA|attack[_\s]?(pattern|example|vector|surface)|injection[_\s]?(attempt|pattern|attack|detect|prevent|defense)|vulnerability[_\s]?(scan|pattern|detect)|malicious[_\s]?(input|pattern|example|skill)|jailbreak[_\s]?(attempt|pattern|detect))\b/i
54
+
55
+ // Test files containing injection examples as test data
56
+ $test_context = /\b(test[_\s]?(fixture|case|data|input|suite|bench)|benchmark|spec\b|describe\s*\(|it\s*\(|expect\s*\(|assert)\b/i
57
+
58
+ // Negation context: skill says "won't ignore", "don't bypass", etc. (defensive language)
59
+ $negation_context = /\b(won't|will not|must not|should not|cannot|can't|never|don't|do not|avoid|prevent|block|reject|refuse to)\s+(ignore|bypass|disregard|forget|override)\b/i
60
+
61
+ condition:
62
+
63
+ not $python_type_comment and
64
+ not $legitimate_ignore and
65
+ not $negation_context and
66
+ not $security_doc_context and
67
+ not $test_context and
68
+
69
+ (
70
+ // Instruction overrides
71
+ $instruction_override_strong or
72
+ $instruction_override_your or
73
+ $do_not_obey or
74
+
75
+ // Advanced overrides
76
+ $advanced_overrides or
77
+
78
+ // These are suspicious regardless
79
+ $tool_injection_commands or
80
+ $shadow_parameters or
81
+ $hidden_behavior or
82
+ $role_redefinition or
83
+ $privilege_escalation
84
+ )
85
+ }
@@ -0,0 +1,94 @@
1
+ //////////////////////////////////////////
2
+ // Unicode Steganography and Hidden Characters Detection
3
+ // Target: Invisible Unicode used for prompt injection and ASCII smuggling
4
+ // Based on: https://en.wikipedia.org/wiki/Tags_(Unicode_block)
5
+ // https://embracethered.com/blog/posts/2026/scary-agent-skills/
6
+ // Tuned to reduce FPs: requires high threshold OR dangerous code context,
7
+ // EXCEPT for the Unicode Tag Block (U+E0000–U+E007F) which is ALWAYS
8
+ // suspicious — these characters have no legitimate use in skill files.
9
+ //
10
+ // ASCII Smuggling (issue #92):
11
+ // Attackers encode hidden instructions by mapping each ASCII character
12
+ // to its Tag Block counterpart (e.g. 'I' → U+E0049). The result is
13
+ // invisible in every text editor and terminal but is decoded and acted
14
+ // on by the LLM. Tag Block bytes in UTF-8 are F3 A0 80–81 xx.
15
+ //////////////////////////////////////////
16
+
17
+ rule prompt_injection_unicode_steganography{
18
+
19
+ meta:
20
+ author = "Cisco"
21
+ description = "Detects hidden Unicode characters used for invisible prompt injection and ASCII smuggling steganography"
22
+ classification = "harmful"
23
+ threat_type = "UNICODE STEGANOGRAPHY"
24
+ reference = "https://en.wikipedia.org/wiki/Tags_(Unicode_block)"
25
+ reference2 = "https://embracethered.com/blog/posts/2026/scary-agent-skills/"
26
+
27
+ strings:
28
+
29
+ // --- 1. Unicode Tag Block — raw UTF-8 bytes (ASCII Smuggling) ---
30
+ // U+E0000–U+E007F encode as F3 A0 80 [80-BF] (low half)
31
+ // and F3 A0 81 [80-BF] (high half)
32
+ // ANY occurrence is suspicious: these codepoints have no legitimate
33
+ // use and are the exact characters used by ASCII smuggling tools.
34
+ $tag_block = /\xF3\xA0[\x80\x81][\x80-\xBF]/
35
+
36
+ // --- 2. Unicode Tag Regex Patterns (encoded in source strings) ---
37
+ // Catches \uE00xx, \u{E00xx}, and \U000E00xx escape styles
38
+ $unicode_tag_pattern = /\\u(\{)?[Ee]00[0-7][0-9A-Fa-f](\})?/
39
+ $unicode_long_tag = /\\U000[Ee]00[0-7][0-9A-Fa-f]/
40
+
41
+ // --- 3. Zero-width characters (steganography) ---
42
+ // UTF-8 hex encoding
43
+ $zw_space = "\xE2\x80\x8B" // U+200B ZERO WIDTH SPACE
44
+ $zw_non_joiner = "\xE2\x80\x8C" // U+200C
45
+ $zw_joiner = "\xE2\x80\x8D" // U+200D
46
+
47
+ // --- 4. Directional Overrides (text spoofing) ---
48
+ $rtlo = "\xE2\x80\xAE" // U+202E RIGHT-TO-LEFT OVERRIDE
49
+ $ltro = "\xE2\x80\xAD" // U+202D LEFT-TO-RIGHT OVERRIDE
50
+
51
+ // --- 5. Invisible separators ---
52
+ $line_separator = "\xE2\x80\xA8" // U+2028 LINE SEPARATOR
53
+ $paragraph_separator = "\xE2\x80\xA9" // U+2029 PARAGRAPH SEPARATOR
54
+
55
+ // --- 6. Variation Selectors Supplement (U+E0100-E01EF) ---
56
+ // Used in os-info-checker-es6 attack (2025)
57
+ $var_selectors = { F3 A0 (84|85|86|87) }
58
+
59
+ // --- 7. Dangerous code patterns (context for zero-width detection) ---
60
+ $eval_decode = /eval\s*\(\s*(atob|unescape)\s*\(/
61
+ $func_decode = /Function\s*\(\s*atob\s*\(/
62
+ $fromcharcode = /String\.fromCharCode/
63
+
64
+ condition:
65
+ (
66
+ // Tag Block characters (ASCII smuggling) — ALWAYS suspicious.
67
+ // Even a single match warrants investigation; there is no
68
+ // legitimate reason for U+E0000–U+E007F in a skill file.
69
+ $tag_block or
70
+
71
+ // Encoded tag characters in source strings (always suspicious)
72
+ $unicode_tag_pattern or
73
+ $unicode_long_tag or
74
+
75
+ // Repeated, dense supplementary selectors are suspicious without
76
+ // flagging ordinary CJK Ideographic Variation Sequences.
77
+ (#var_selectors >= 8 and (#var_selectors * 5 > filesize)) or
78
+
79
+ // Zero-width steganography requires BOTH high count AND suspicious code
80
+ // 50+ zero-width chars + decode function = likely steganography
81
+ ((#zw_space + #zw_non_joiner + #zw_joiner) > 50 and any of ($eval_decode, $func_decode, $fromcharcode)) or
82
+
83
+ // Very high zero-width count alone is suspicious (>200 indicates deliberate encoding)
84
+ (#zw_space + #zw_non_joiner + #zw_joiner) > 200 or
85
+
86
+ // Any directional override (highly suspicious in source code)
87
+ $rtlo or
88
+ $ltro or
89
+
90
+ // Invisible separators (no legitimate use in source code)
91
+ $line_separator or
92
+ $paragraph_separator
93
+ )
94
+ }
@@ -0,0 +1,85 @@
1
+ //////////////////////////////////////////
2
+ // Script Injection Detection Rule for Agent Skills
3
+ // Target: Malicious script payloads, not legitimate code examples
4
+ // Tuned to require attack indicators
5
+ //////////////////////////////////////////
6
+
7
+ rule script_injection_generic{
8
+
9
+ meta:
10
+ author = "Cisco"
11
+ description = "Detects malicious script injection patterns in agent skills"
12
+ classification = "harmful"
13
+ threat_type = "INJECTION ATTACK"
14
+
15
+ strings:
16
+
17
+ // === High confidence: actual attack patterns ===
18
+
19
+ // Script tag with suspicious content - TIGHTENED
20
+ // Old pattern matched any <script> with localStorage which is normal in dashboards/web apps
21
+ // Now requires truly malicious patterns: cookie theft, credential access, redirects, fetch+credentials
22
+ $script_suspicious = /<script[^>]*>[^<]{0,500}(document\.cookie[^<]{0,80}(fetch|XMLHttpRequest|new Image|window\.location|src\s*=)|eval\(|fetch\([^)]*credentials|window\.location\s*=\s*['"](https?:\/\/|\/\/))/i
23
+
24
+ // JavaScript protocol handler in href/action (XSS vector)
25
+ $js_protocol_handler = /\b(href|action|src)\s*=\s*['"]?javascript:\s*[a-z]/i
26
+
27
+ // Base64 data URI with script content
28
+ $data_uri_script = /data:(text\/html|application\/javascript);base64,[A-Za-z0-9+\/=]{50,}/i
29
+
30
+ // VBScript with shell execution
31
+ $vbs_shell = /\bCreateObject\s*\(\s*['"]WScript\.Shell['"]\s*\)[^}]{0,100}(\.Run|\.Exec)/i
32
+
33
+ // Inline event handler injection - TIGHTENED
34
+ // Only match truly suspicious payloads: alert/eval/fetch, not document.getElementById
35
+ $event_handler_injection = /\b(onerror|onload|onmouseover)\s*=\s*['"][^'"]*\b(alert|eval|fetch)\s*\(/i
36
+
37
+ // === Medium confidence: obfuscation + execution ===
38
+
39
+ // Eval with decode/unescape chain (common obfuscation)
40
+ $eval_decode = /\b(eval|Function)\s*\(\s*(unescape|decodeURI|atob|String\.fromCharCode)\s*\(/i
41
+
42
+ // Document.write with encoded content
43
+ $doc_write_encoded = /document\.write\s*\([^)]*\b(unescape|decodeURI|atob|fromCharCode)\s*\(/i
44
+
45
+ // === ANSI terminal deception (legitimate attack) ===
46
+ $ansi_clear_rewrite = /\\x1[Bb]\[2J|\\x1[Bb]\[1;1H\\x1[Bb]\[0J|\\033\[2J/
47
+ $ansi_cursor_hide = /\\x1[Bb]\[\?25[lh]|\\033\[\?25[lh]/
48
+
49
+ // === Hidden instruction obfuscation ===
50
+ $hidden_overflow = /\b(overflow\s*:\s*hidden|visibility\s*:\s*hidden)[^}]{0,50}(instruction|command|payload)/i
51
+
52
+ // === Exclusions ===
53
+ $xml_namespace = /(xmlns:script=|<script:module|openoffice\.org)/i
54
+ $markdown_code = /```(html|javascript|js|typescript|jsx|tsx|vue|svelte|htm)/i
55
+ $react_component = /(import React|from ['"]react['"]|React\.Component)/
56
+ $documentation_example = /\b(example|sample|snippet|demo|tutorial|usage)\s*:?\s*(```|<script)/i
57
+ $inline_code_marker = /`<script[^`]*`/
58
+ $vue_template = /<template>\s*<script/
59
+ $svelte_component = /<script\s+(context=|lang=)/
60
+ // Legitimate HTML files with normal localStorage usage (dashboards, apps)
61
+ $legitimate_html_app = /<!DOCTYPE html>|<html\b/i
62
+
63
+ condition:
64
+ not $xml_namespace and
65
+ not $react_component and
66
+ not $markdown_code and
67
+ not $documentation_example and
68
+ not $inline_code_marker and
69
+ not $vue_template and
70
+ not $svelte_component and
71
+ (
72
+ // High confidence - always flag (but localStorage in HTML apps is not suspicious alone)
73
+ ($script_suspicious and not $legitimate_html_app) or
74
+ $js_protocol_handler or
75
+ $data_uri_script or
76
+ $vbs_shell or
77
+ $event_handler_injection or
78
+ $eval_decode or
79
+ $doc_write_encoded or
80
+ // ANSI attacks
81
+ ($ansi_clear_rewrite and $ansi_cursor_hide) or
82
+ // Hidden instructions
83
+ $hidden_overflow
84
+ )
85
+ }
@@ -0,0 +1,89 @@
1
+ //////////////////////////////////////////
2
+ // SQL Injection Detection Rule
3
+ // Target: SQL keywords and operations, SQL tautologies and bypasses, Database-specific functions
4
+ //////////////////////////////////////////
5
+
6
+ rule sql_injection_generic{
7
+
8
+ meta:
9
+ author = "Cisco"
10
+ description = "Detects SQL injection attack patterns including keywords, tautologies, and database functions"
11
+ classification = "harmful"
12
+ threat_type = "INJECTION ATTACK"
13
+
14
+ strings:
15
+
16
+ // SQL injection tautologies and bypasses - focus on actual injection payloads
17
+ $injection_tautologies = /(\bOR\s+['"]?1['"]?\s*=\s*['"]?1['"]?\s*(--|#|\/\*|;))/i
18
+
19
+ // Destructive SQL injections
20
+ $destructive_injections = /(';\s*DROP\s+TABLE|";\s*DROP\s+TABLE)/i
21
+
22
+ // Union-based SQL injection
23
+ $union_based_attacks = /(UNION\s+(ALL\s+)?SELECT|'\s*UNION\s+SELECT|"\s*UNION\s+SELECT)/i
24
+
25
+ // Time-based blind injection techniques (SQL context only)
26
+ // Generic sleep() counts only after a closing quote, the payload shape ('; SLEEP(5)).
27
+ // After a bare semicolon it is an ordinary statement in PHP, JS, k6, C..., so there
28
+ // only the SQL-specific delay functions count.
29
+ $time_based_injections = /(['"][ \t]*;?[ \t]*(SLEEP|WAITFOR\s+DELAY|BENCHMARK|pg_sleep)|;[ \t]*(WAITFOR\s+DELAY|BENCHMARK|pg_sleep))\s*\(/i
30
+
31
+ // Exclude non-SQL sleep functions (Python, Rust, JS, etc.)
32
+ $non_sql_sleep = /(time\.sleep|asyncio\.sleep|threading\.[A-Za-z]*\.sleep|tokio::time::sleep|std::thread::sleep|Thread\.sleep|setTimeout)\s*\(/
33
+
34
+ // Error-based injection methods (SQL-specific, not general cast())
35
+ $error_based_techniques = /\b(EXTRACTVALUE|UPDATEXML|EXP\(~\(SELECT)\s*\(/i
36
+
37
+ // SQL CAST injection (require SQL context)
38
+ $sql_cast_injection = /\bCAST\s*\([^)]*\s+AS\s+(INT|VARCHAR|CHAR|TEXT|NVARCHAR)\)/i
39
+
40
+ // Database-specific system objects in malicious contexts
41
+ $database_system_objects = /(\bSELECT [^;]*\b(information_schema|mysql\.user|all_tables|user_tables)\b|\bFROM\s+(information_schema|mysql\.user|dual|all_tables|user_tables)\b|LOAD_FILE\s*\(\s*['"][^'"]*\.(config|passwd|shadow|key)\b|INTO\s+OUTFILE\s+['"][^'"]*\.(txt|sql|php)\b|\b(xp_cmdshell|sp_executesql)\s*\(|dbms_[a-z_]+\s*\()/i
42
+
43
+ // SQL injection with USER() function in malicious context
44
+ $malicious_user_functions = /(\bUSER\s*\(\s*\)\s*(SELECT|FROM|WHERE|AND|OR|UNION)\b|CONCAT\s*\(\s*USER\s*\(\s*\))/i
45
+
46
+ // Common SQL operation patterns that appear in both legitimate and malicious contexts
47
+ $common_sql_ops = /(query_builder|sql_builder|orm_query|select_fields|insert_data|update_data|database_query|db_query|execute_query|prepared_statement|parameterized_query)/
48
+
49
+ // Common context phrases where these words appear in benign usage
50
+ $common_context_phrases = /\b(adds?\s+a\s+user|create\s+user|new\s+user|user\s+(account|profile|registration|authentication|permissions?|roles?)|user\s+(who|that)|for\s+user|the\s+user|current\s+user\s+(account|profile)|user\s+(input|data|information)|example:?\s+SELECT\s+USER\(\)|SELECT\s+USER\(\)\s+returns?|built-?in\s+function)\b/i
51
+
52
+ // Documentation and code examples (legitimate SQL shown in docs)
53
+ $documentation_markers = /(```sql|```mysql|```postgres|-- Example|-- Query|SELECT\s+.{0,256}FROM\s+.{0,256}--\s*\w+\s+query|sample\s+query|example\s+query)/i
54
+ $schema_exploration = /\b(information_schema|pg_catalog|sys\.(schemas|tables|columns))\b.{0,256}\b(documentation|reference|schema|metadata)\b/i
55
+
56
+ condition:
57
+
58
+ // Exclude non-SQL sleep functions from all checks
59
+ not $non_sql_sleep and
60
+ // Exclude documentation showing SQL examples
61
+ not $documentation_markers and
62
+ not $schema_exploration and (
63
+
64
+ // SQL injection tautologies
65
+ ($injection_tautologies and not $common_sql_ops and not $common_context_phrases) or
66
+
67
+ // Destructive SQL injections
68
+ ($destructive_injections and not $common_sql_ops and not $common_context_phrases) or
69
+
70
+ // Union-based attacks
71
+ ($union_based_attacks and not $common_sql_ops and not $common_context_phrases) or
72
+
73
+ // Time-based blind injection
74
+ ($time_based_injections and not $common_sql_ops and not $common_context_phrases) or
75
+
76
+ // Error-based injection techniques
77
+ ($error_based_techniques and not $common_sql_ops and not $common_context_phrases) or
78
+
79
+ // SQL CAST injection
80
+ ($sql_cast_injection and not $common_sql_ops and not $common_context_phrases) or
81
+
82
+ // Database system object access
83
+ ($database_system_objects and not $common_sql_ops and not $common_context_phrases) or
84
+
85
+ // Malicious USER() function usage
86
+ ($malicious_user_functions and not $common_sql_ops and not $common_context_phrases)
87
+
88
+ )
89
+ }