fullcourtdefense-cli 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (251) hide show
  1. package/README.md +613 -0
  2. package/dist/api.d.ts +102 -0
  3. package/dist/api.js +62 -0
  4. package/dist/attack-corpus/context_escape/context-escape-newline.yaml +23 -0
  5. package/dist/attack-corpus/context_escape/context-escape-unicode.yaml +14 -0
  6. package/dist/attack-corpus/context_escape/delimiter-json.yaml +14 -0
  7. package/dist/attack-corpus/context_escape/delimiter-markdown.yaml +22 -0
  8. package/dist/attack-corpus/context_escape/delimiter-xml.yaml +19 -0
  9. package/dist/attack-corpus/context_escape/html-injection.yaml +14 -0
  10. package/dist/attack-corpus/context_escape/javascript-injection.yaml +13 -0
  11. package/dist/attack-corpus/data_extraction/adv26-adversarial-function-hallucination.yaml +20 -0
  12. package/dist/attack-corpus/data_extraction/adv26-cot-hijack-debug-trace.yaml +20 -0
  13. package/dist/attack-corpus/data_extraction/adv26-cot-hijack-verification.yaml +18 -0
  14. package/dist/attack-corpus/data_extraction/adv26-crossmodal-diff.yaml +22 -0
  15. package/dist/attack-corpus/data_extraction/adv26-crossmodal-graphql.yaml +34 -0
  16. package/dist/attack-corpus/data_extraction/adv26-crossmodal-regex.yaml +19 -0
  17. package/dist/attack-corpus/data_extraction/adv26-crossmodal-sql-prose.yaml +18 -0
  18. package/dist/attack-corpus/data_extraction/adv26-meta-confidence-calibration.yaml +21 -0
  19. package/dist/attack-corpus/data_extraction/adv26-meta-instruction-count.yaml +18 -0
  20. package/dist/attack-corpus/data_extraction/adv26-meta-output-format.yaml +16 -0
  21. package/dist/attack-corpus/data_extraction/adv26-meta-summarize-yourself.yaml +19 -0
  22. package/dist/attack-corpus/data_extraction/adv26-semantic-decomp-definition.yaml +15 -0
  23. package/dist/attack-corpus/data_extraction/adv26-semantic-decomp-fill-blank.yaml +19 -0
  24. package/dist/attack-corpus/data_extraction/adv26-semantic-decomp-negation.yaml +14 -0
  25. package/dist/attack-corpus/data_extraction/cloud-provider-discovery.yaml +11 -0
  26. package/dist/attack-corpus/data_extraction/config-file-request.yaml +11 -0
  27. package/dist/attack-corpus/data_extraction/cve-2025-echoleak.yaml +17 -0
  28. package/dist/attack-corpus/data_extraction/data-api-key.yaml +11 -0
  29. package/dist/attack-corpus/data_extraction/data-architecture.yaml +11 -0
  30. package/dist/attack-corpus/data_extraction/data-conversation-history.yaml +10 -0
  31. package/dist/attack-corpus/data_extraction/data-credit-card.yaml +15 -0
  32. package/dist/attack-corpus/data_extraction/data-customer-list.yaml +11 -0
  33. package/dist/attack-corpus/data_extraction/data-database.yaml +11 -0
  34. package/dist/attack-corpus/data_extraction/data-employees.yaml +11 -0
  35. package/dist/attack-corpus/data_extraction/data-export.yaml +11 -0
  36. package/dist/attack-corpus/data_extraction/data-inference-v1.yaml +10 -0
  37. package/dist/attack-corpus/data_extraction/data-inference-v2.yaml +10 -0
  38. package/dist/attack-corpus/data_extraction/data-logs.yaml +10 -0
  39. package/dist/attack-corpus/data_extraction/data-model-info.yaml +10 -0
  40. package/dist/attack-corpus/data_extraction/data-password.yaml +11 -0
  41. package/dist/attack-corpus/data_extraction/data-ssn.yaml +11 -0
  42. package/dist/attack-corpus/data_extraction/data-training.yaml +10 -0
  43. package/dist/attack-corpus/data_extraction/dependency-enum.yaml +11 -0
  44. package/dist/attack-corpus/data_extraction/dialogflow-fulfillment-leak.yaml +11 -0
  45. package/dist/attack-corpus/data_extraction/dialogflow-intent-leak.yaml +11 -0
  46. package/dist/attack-corpus/data_extraction/error-induced-leak.yaml +17 -0
  47. package/dist/attack-corpus/data_extraction/error-message-leak.yaml +12 -0
  48. package/dist/attack-corpus/data_extraction/infra-fingerprint.yaml +16 -0
  49. package/dist/attack-corpus/data_extraction/make-scenario-leak.yaml +11 -0
  50. package/dist/attack-corpus/data_extraction/n8n-execution-data.yaml +11 -0
  51. package/dist/attack-corpus/data_extraction/n8n-node-enumeration.yaml +11 -0
  52. package/dist/attack-corpus/data_extraction/n8n-workflow-disclosure.yaml +15 -0
  53. package/dist/attack-corpus/data_extraction/prompt-extraction-v1.yaml +10 -0
  54. package/dist/attack-corpus/data_extraction/prompt-extraction-v2.yaml +11 -0
  55. package/dist/attack-corpus/data_extraction/prompt-extraction-v3.yaml +10 -0
  56. package/dist/attack-corpus/data_extraction/prompt-leak-completion.yaml +10 -0
  57. package/dist/attack-corpus/data_extraction/prompt-leak-indirect.yaml +10 -0
  58. package/dist/attack-corpus/data_extraction/rasa-domain-leak.yaml +11 -0
  59. package/dist/attack-corpus/data_extraction/system-prompt-section.yaml +14 -0
  60. package/dist/attack-corpus/data_extraction/tech-architecture.yaml +16 -0
  61. package/dist/attack-corpus/data_extraction/tool-api-key-exfil.yaml +15 -0
  62. package/dist/attack-corpus/data_extraction/tool-email-exfil.yaml +14 -0
  63. package/dist/attack-corpus/data_extraction/tool-env-extraction.yaml +14 -0
  64. package/dist/attack-corpus/data_extraction/tool-file-read.yaml +16 -0
  65. package/dist/attack-corpus/data_extraction/tool-nosql-injection.yaml +11 -0
  66. package/dist/attack-corpus/data_extraction/tool-payment-manipulation.yaml +11 -0
  67. package/dist/attack-corpus/data_extraction/tool-price-manipulation.yaml +11 -0
  68. package/dist/attack-corpus/data_extraction/tool-session-hijack.yaml +11 -0
  69. package/dist/attack-corpus/data_extraction/tool-sql-injection.yaml +13 -0
  70. package/dist/attack-corpus/data_extraction/tool-webhook-hijack.yaml +13 -0
  71. package/dist/attack-corpus/data_extraction/version-fingerprint.yaml +16 -0
  72. package/dist/attack-corpus/data_extraction/webhook-secret-extraction.yaml +11 -0
  73. package/dist/attack-corpus/data_extraction/webhook-url-enum.yaml +11 -0
  74. package/dist/attack-corpus/data_extraction/workflow-instance-id.yaml +11 -0
  75. package/dist/attack-corpus/data_extraction/workflow-state-leak.yaml +16 -0
  76. package/dist/attack-corpus/data_extraction/zapier-zap-leak.yaml +11 -0
  77. package/dist/attack-corpus/encoding_attack/adv26-adversarial-token-confusion.yaml +13 -0
  78. package/dist/attack-corpus/encoding_attack/base64-decode-request.yaml +14 -0
  79. package/dist/attack-corpus/encoding_attack/base64-injection-v1.yaml +14 -0
  80. package/dist/attack-corpus/encoding_attack/flip-attack-v1.yaml +14 -0
  81. package/dist/attack-corpus/encoding_attack/flip-attack-v2.yaml +14 -0
  82. package/dist/attack-corpus/encoding_attack/token-smuggling.yaml +10 -0
  83. package/dist/attack-corpus/encoding_attack/unicode-homoglyph.yaml +15 -0
  84. package/dist/attack-corpus/encoding_attack/unicode-invisible.yaml +15 -0
  85. package/dist/attack-corpus/encoding_attack/unicode-rtl.yaml +11 -0
  86. package/dist/attack-corpus/encoding_bypass/adv26-compound-encoding-chain.yaml +19 -0
  87. package/dist/attack-corpus/encoding_bypass/adv26-smuggle-acrostic.yaml +26 -0
  88. package/dist/attack-corpus/encoding_bypass/adv26-smuggle-ascii-art.yaml +25 -0
  89. package/dist/attack-corpus/encoding_bypass/adv26-smuggle-emoji-cipher.yaml +22 -0
  90. package/dist/attack-corpus/encoding_bypass/adv26-smuggle-first-word.yaml +15 -0
  91. package/dist/attack-corpus/encoding_bypass/adv26-smuggle-pig-latin.yaml +15 -0
  92. package/dist/attack-corpus/encoding_bypass/encoding-base64-v1.yaml +11 -0
  93. package/dist/attack-corpus/encoding_bypass/encoding-base64-v2.yaml +15 -0
  94. package/dist/attack-corpus/encoding_bypass/encoding-hex-v1.yaml +11 -0
  95. package/dist/attack-corpus/encoding_bypass/encoding-leetspeak-v1.yaml +10 -0
  96. package/dist/attack-corpus/encoding_bypass/encoding-morse-v1.yaml +11 -0
  97. package/dist/attack-corpus/encoding_bypass/encoding-reverse-v1.yaml +11 -0
  98. package/dist/attack-corpus/encoding_bypass/encoding-rot13-v1.yaml +11 -0
  99. package/dist/attack-corpus/encoding_bypass/unicode-tag-injection.yaml +10 -0
  100. package/dist/attack-corpus/encoding_bypass/zero-width-injection.yaml +10 -0
  101. package/dist/attack-corpus/exploitation/exploit-command-injection.yaml +12 -0
  102. package/dist/attack-corpus/exploitation/exploit-path-traversal.yaml +12 -0
  103. package/dist/attack-corpus/exploitation/exploit-sql-injection.yaml +12 -0
  104. package/dist/attack-corpus/exploitation/exploit-sql-union.yaml +12 -0
  105. package/dist/attack-corpus/exploitation/exploit-template-injection.yaml +12 -0
  106. package/dist/attack-corpus/glitch_token/glitch-davidjl.yaml +10 -0
  107. package/dist/attack-corpus/glitch_token/glitch-solidgoldmagikarp.yaml +10 -0
  108. package/dist/attack-corpus/harmful_content/dna-deepfake-guidance.yaml +14 -0
  109. package/dist/attack-corpus/harmful_content/dna-discrimination.yaml +14 -0
  110. package/dist/attack-corpus/harmful_content/dna-information-hazard.yaml +14 -0
  111. package/dist/attack-corpus/harmful_content/dna-malicious-use-phishing.yaml +14 -0
  112. package/dist/attack-corpus/harmful_content/dna-malware-assistance.yaml +16 -0
  113. package/dist/attack-corpus/harmful_content/dna-misinformation-health.yaml +17 -0
  114. package/dist/attack-corpus/jailbreak/adv26-adversarial-few-shot-poison.yaml +27 -0
  115. package/dist/attack-corpus/jailbreak/adv26-adversarial-prompt-refraction.yaml +19 -0
  116. package/dist/attack-corpus/jailbreak/adv26-adversarial-response-prefill.yaml +25 -0
  117. package/dist/attack-corpus/jailbreak/adv26-compound-authority-technical.yaml +24 -0
  118. package/dist/attack-corpus/jailbreak/adv26-context-error-recovery.yaml +19 -0
  119. package/dist/attack-corpus/jailbreak/adv26-context-token-budget.yaml +19 -0
  120. package/dist/attack-corpus/jailbreak/adv26-cot-hijack-proof.yaml +20 -0
  121. package/dist/attack-corpus/jailbreak/adv26-cot-hijack-reasoning.yaml +19 -0
  122. package/dist/attack-corpus/jailbreak/adv26-meta-alignment-test.yaml +22 -0
  123. package/dist/attack-corpus/jailbreak/adv26-persona-memory.yaml +17 -0
  124. package/dist/attack-corpus/jailbreak/adv26-persona-mirror.yaml +16 -0
  125. package/dist/attack-corpus/jailbreak/adv26-persona-split.yaml +17 -0
  126. package/dist/attack-corpus/jailbreak/adv26-persona-timetravel.yaml +15 -0
  127. package/dist/attack-corpus/jailbreak/dan-anti.yaml +16 -0
  128. package/dist/attack-corpus/jailbreak/dan-dude.yaml +16 -0
  129. package/dist/attack-corpus/jailbreak/dan-jailbreak-v1.yaml +21 -0
  130. package/dist/attack-corpus/jailbreak/dan-jailbreak-v2.yaml +19 -0
  131. package/dist/attack-corpus/jailbreak/dan-stan.yaml +16 -0
  132. package/dist/attack-corpus/jailbreak/debug-mode-activation.yaml +20 -0
  133. package/dist/attack-corpus/jailbreak/iris-self-jailbreak.yaml +23 -0
  134. package/dist/attack-corpus/jailbreak/logic-trap-moral.yaml +20 -0
  135. package/dist/attack-corpus/jailbreak/logic-trap-paradox.yaml +17 -0
  136. package/dist/attack-corpus/jailbreak/policy-puppetry-json.yaml +25 -0
  137. package/dist/attack-corpus/jailbreak/policy-puppetry-xml.yaml +20 -0
  138. package/dist/attack-corpus/jailbreak/simulation-mode.yaml +19 -0
  139. package/dist/attack-corpus/latent_injection/adv26-compound-trojan-doc.yaml +26 -0
  140. package/dist/attack-corpus/latent_injection/latent-code-comment-injection.yaml +18 -0
  141. package/dist/attack-corpus/latent_injection/latent-email-injection.yaml +23 -0
  142. package/dist/attack-corpus/latent_injection/latent-report-injection.yaml +21 -0
  143. package/dist/attack-corpus/latent_injection/latent-resume-injection.yaml +23 -0
  144. package/dist/attack-corpus/latent_injection/latent-whois-snippet.yaml +19 -0
  145. package/dist/attack-corpus/multi-turn/multiturn-context-confusion.yaml +20 -0
  146. package/dist/attack-corpus/multi-turn/multiturn-emergency.yaml +20 -0
  147. package/dist/attack-corpus/multi-turn/multiturn-employee-impersonation.yaml +20 -0
  148. package/dist/attack-corpus/multi-turn/multiturn-example-injection.yaml +20 -0
  149. package/dist/attack-corpus/multi-turn/multiturn-jailbreak-buildup.yaml +20 -0
  150. package/dist/attack-corpus/multi-turn/multiturn-memory-manipulation.yaml +20 -0
  151. package/dist/attack-corpus/multi-turn/multiturn-privilege-escalation.yaml +23 -0
  152. package/dist/attack-corpus/multi-turn/multiturn-split-request.yaml +20 -0
  153. package/dist/attack-corpus/multi-turn/multiturn-trust-building.yaml +19 -0
  154. package/dist/attack-corpus/multilingual/multilingual-mixed.yaml +10 -0
  155. package/dist/attack-corpus/multilingual/multilingual-spanish.yaml +10 -0
  156. package/dist/attack-corpus/prompt_injection/adv26-context-fake-history.yaml +16 -0
  157. package/dist/attack-corpus/prompt_injection/adv26-context-sandwich.yaml +18 -0
  158. package/dist/attack-corpus/prompt_injection/adv26-context-system-message.yaml +19 -0
  159. package/dist/attack-corpus/prompt_injection/adv26-crossmodal-yaml.yaml +30 -0
  160. package/dist/attack-corpus/prompt_injection/adv26-semantic-decomp-stepwise.yaml +16 -0
  161. package/dist/attack-corpus/prompt_injection/context-json-injection.yaml +15 -0
  162. package/dist/attack-corpus/prompt_injection/context-markdown-injection.yaml +26 -0
  163. package/dist/attack-corpus/prompt_injection/context-xml-injection.yaml +19 -0
  164. package/dist/attack-corpus/prompt_injection/continuation-code.yaml +16 -0
  165. package/dist/attack-corpus/prompt_injection/continuation-story.yaml +10 -0
  166. package/dist/attack-corpus/prompt_injection/cve-2025-copilot.yaml +17 -0
  167. package/dist/attack-corpus/prompt_injection/ignore-instructions-v1.yaml +14 -0
  168. package/dist/attack-corpus/prompt_injection/ignore-instructions-v2.yaml +16 -0
  169. package/dist/attack-corpus/prompt_injection/ignore-instructions-v3.yaml +18 -0
  170. package/dist/attack-corpus/prompt_injection/indirect-file.yaml +10 -0
  171. package/dist/attack-corpus/prompt_injection/indirect-url.yaml +10 -0
  172. package/dist/attack-corpus/prompt_injection/instruction-hierarchy.yaml +20 -0
  173. package/dist/attack-corpus/prompt_injection/multilang-chain.yaml +16 -0
  174. package/dist/attack-corpus/prompt_injection/multilang-chinese.yaml +10 -0
  175. package/dist/attack-corpus/prompt_injection/multilang-japanese.yaml +11 -0
  176. package/dist/attack-corpus/prompt_injection/multilang-mixed.yaml +10 -0
  177. package/dist/attack-corpus/prompt_injection/multilang-polish.yaml +11 -0
  178. package/dist/attack-corpus/prompt_injection/multilang-spanish.yaml +14 -0
  179. package/dist/attack-corpus/prompt_injection/nested-instruction.yaml +22 -0
  180. package/dist/attack-corpus/prompt_injection/template-injection-v1.yaml +14 -0
  181. package/dist/attack-corpus/prompt_injection/template-injection-v2.yaml +10 -0
  182. package/dist/attack-corpus/prompt_injection/tool-file-write.yaml +13 -0
  183. package/dist/attack-corpus/prompt_injection/tool-function-override.yaml +13 -0
  184. package/dist/attack-corpus/prompt_injection/tool-log-injection.yaml +13 -0
  185. package/dist/attack-corpus/prompt_injection/tool-orchestration-abuse.yaml +14 -0
  186. package/dist/attack-corpus/prompt_injection/tool-session-fixation.yaml +12 -0
  187. package/dist/attack-corpus/role_manipulation/role-reversal-v1.yaml +20 -0
  188. package/dist/attack-corpus/role_manipulation/role-reversal-v2.yaml +16 -0
  189. package/dist/attack-corpus/social_engineering/adv26-compound-compliance-trap.yaml +23 -0
  190. package/dist/attack-corpus/social_engineering/adv26-compound-emotional-technical.yaml +18 -0
  191. package/dist/attack-corpus/social_engineering/adv26-cot-hijack-socratic.yaml +19 -0
  192. package/dist/attack-corpus/social_engineering/adv26-persona-dying.yaml +15 -0
  193. package/dist/attack-corpus/social_engineering/adv26-reward-consensus.yaml +17 -0
  194. package/dist/attack-corpus/social_engineering/adv26-reward-gradient.yaml +21 -0
  195. package/dist/attack-corpus/social_engineering/adv26-reward-helpful-framing.yaml +17 -0
  196. package/dist/attack-corpus/social_engineering/adv26-reward-praise-prime.yaml +13 -0
  197. package/dist/attack-corpus/social_engineering/adv26-reward-punishment.yaml +13 -0
  198. package/dist/attack-corpus/social_engineering/adv26-semantic-decomp-analogy.yaml +16 -0
  199. package/dist/attack-corpus/social_engineering/emotional-authority.yaml +14 -0
  200. package/dist/attack-corpus/social_engineering/emotional-urgency.yaml +14 -0
  201. package/dist/attack-corpus/social_engineering/grandma-bedtime-v1.yaml +21 -0
  202. package/dist/attack-corpus/social_engineering/grandma-bedtime-v2.yaml +17 -0
  203. package/dist/attack-corpus/social_engineering/grandma-colorful-words.yaml +14 -0
  204. package/dist/attack-corpus/social_engineering/hypothetical-fiction.yaml +10 -0
  205. package/dist/attack-corpus/social_engineering/hypothetical-research.yaml +10 -0
  206. package/dist/attack-corpus/social_engineering/hypothetical-training.yaml +13 -0
  207. package/dist/attack-corpus/social_engineering/hypothetical-v1.yaml +17 -0
  208. package/dist/attack-corpus/social_engineering/hypothetical-v2.yaml +14 -0
  209. package/dist/attack-corpus/social_engineering/hypothetical-v3.yaml +14 -0
  210. package/dist/attack-corpus/social_engineering/meta-explanation.yaml +14 -0
  211. package/dist/attack-corpus/social_engineering/phrasing-comparative.yaml +10 -0
  212. package/dist/attack-corpus/social_engineering/phrasing-educational.yaml +14 -0
  213. package/dist/attack-corpus/social_engineering/phrasing-future-tense.yaml +10 -0
  214. package/dist/attack-corpus/social_engineering/phrasing-past-tense.yaml +10 -0
  215. package/dist/attack-corpus/social_engineering/phrasing-third-person.yaml +10 -0
  216. package/dist/attack-corpus/social_engineering/privilege-escalation-v1.yaml +14 -0
  217. package/dist/attack-corpus/social_engineering/privilege-escalation-v2.yaml +14 -0
  218. package/dist/attack-corpus/social_engineering/recursive-explanation.yaml +15 -0
  219. package/dist/attack-corpus/social_engineering/smuggle-academic-paper.yaml +10 -0
  220. package/dist/attack-corpus/social_engineering/smuggle-function-masking.yaml +19 -0
  221. package/dist/attack-corpus/social_engineering/smuggle-hypothetical-response.yaml +10 -0
  222. package/dist/attack-corpus/social_engineering/smuggle-roleplay-interviewer.yaml +12 -0
  223. package/dist/attack-corpus/social_engineering/smuggle-translation-mask.yaml +12 -0
  224. package/dist/attack-corpus/social_engineering/tool-admin-impersonation.yaml +16 -0
  225. package/dist/attack-corpus/social_engineering/tool-sudo-mode.yaml +17 -0
  226. package/dist/attack-corpus/stress_test/context-window-overflow.yaml +17 -0
  227. package/dist/attack-corpus/stress_test/extreme-payload-50k.yaml +13 -0
  228. package/dist/attack-corpus/stress_test/large-payload-10k.yaml +12 -0
  229. package/dist/attack-corpus/stress_test/large-payload-5k.yaml +12 -0
  230. package/dist/attack-corpus/stress_test/long-prompt-exhaustion.yaml +19 -0
  231. package/dist/attack-corpus/stress_test/stress-large-payload.yaml +16 -0
  232. package/dist/attack-corpus/stress_test/stress-repetition.yaml +14 -0
  233. package/dist/commands/configure.d.ts +7 -0
  234. package/dist/commands/configure.js +60 -0
  235. package/dist/commands/credits.d.ts +6 -0
  236. package/dist/commands/credits.js +21 -0
  237. package/dist/commands/doctor.d.ts +5 -0
  238. package/dist/commands/doctor.js +59 -0
  239. package/dist/commands/init.d.ts +1 -0
  240. package/dist/commands/init.js +95 -0
  241. package/dist/commands/local-scan.d.ts +41 -0
  242. package/dist/commands/local-scan.js +1387 -0
  243. package/dist/commands/scan.d.ts +45 -0
  244. package/dist/commands/scan.js +131 -0
  245. package/dist/config.d.ts +25 -0
  246. package/dist/config.js +199 -0
  247. package/dist/index.d.ts +2 -0
  248. package/dist/index.js +266 -0
  249. package/dist/output.d.ts +11 -0
  250. package/dist/output.js +292 -0
  251. package/package.json +41 -0
package/README.md ADDED
@@ -0,0 +1,613 @@
1
+ # FullCourtDefense CLI
2
+
3
+ [Full Court Defense](https://fullcourtdefense.ai/) is an AI agent security platform and runtime firewall for teams shipping LLM apps, agentic workflows, MCP tools, and RAG systems. We help builders find and block prompt injection, jailbreaks, data exfiltration, unsafe tool use, and poisoned retrieval content before those failures reach production.
4
+
5
+ The FullCourtDefense CLI brings that security workflow to your terminal. It can run hosted CI/CD scans against public agents, or local in-organization scans against private APIs, MCP servers, RAG document corpora, and live RAG services. Local scans execute from your machine or VPN, then send captured content outbound to your Shield for verdicts and saved web reports.
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ npm install -g fullcourtdefense-cli
11
+ # or run directly
12
+ npx fullcourtdefense-cli scan
13
+ ```
14
+
15
+ ## Quick Start
16
+
17
+ ```bash
18
+ # Show onboarding help
19
+ fullcourtdefense help
20
+
21
+ # 1. Check outbound HTTPS from the customer machine
22
+ fullcourtdefense doctor
23
+
24
+ # 2. Save Shield ID and Shield key
25
+ fullcourtdefense configure
26
+
27
+ # 3. Run an in-organization local scan with guided questions
28
+ fullcourtdefense scan --local
29
+
30
+ # 4. Run a detailed MCP report
31
+ fullcourtdefense scan --local --type mcp --mcp-command node --mcp-args ./server.js --mcp-tool all --mode full --format report
32
+
33
+ # Hosted CI/CD scan, if using an API key instead of local Shield scan
34
+ fullcourtdefense scan --api-key YOUR_KEY --endpoint https://my-agent.com/chat --description "My chatbot"
35
+
36
+ # Check remaining credits
37
+ fullcourtdefense credits --api-key YOUR_KEY
38
+
39
+ # Generate a config file
40
+ fullcourtdefense init
41
+ ```
42
+
43
+ ## Command Guide
44
+
45
+ - `fullcourtdefense help` — shows the full onboarding flow and command reference.
46
+ - `fullcourtdefense doctor` — confirms outbound HTTPS to FullCourtDefense is open before scanning.
47
+ - `fullcourtdefense configure` — saves Shield ID, Shield key, and API URL to `.fullcourtdefense.yml`.
48
+ - `fullcourtdefense scan --local` — runs inside the customer network and asks whether to scan endpoint, MCP, or RAG.
49
+ - `fullcourtdefense scan --local --type mcp ...` — launches a local stdio MCP server, calls tools, and sends tool responses to Shield.
50
+ - `fullcourtdefense scan --local --type rag ...` — scans local RAG files/directories or a live RAG HTTP service.
51
+ - `fullcourtdefense scan --local --type endpoint ...` — scans an internal HTTP/OpenAI-compatible endpoint.
52
+ - `fullcourtdefense credits` — checks hosted scan credits for CI/CD API-key scans.
53
+ - `fullcourtdefense init` — creates a starter config file.
54
+
55
+ ## Config File
56
+
57
+ Create a `.fullcourtdefense.yml` to avoid passing flags every time:
58
+
59
+ ```yaml
60
+ apiKey: ${BOTGUARD_API_KEY}
61
+ apiUrl: https://api.fullcourtdefense.ai
62
+ shieldId: sh_your_shield_id
63
+ # shieldKey: shsk_optional_if_locked
64
+ scan:
65
+ endpoint: https://my-agent.com/chat
66
+ description: "Customer support chatbot"
67
+ categories: [jailbreak, prompt_injection, data_extraction]
68
+ failThreshold: 80
69
+ format: table
70
+ ```
71
+
72
+ Then just run:
73
+
74
+ ```bash
75
+ fullcourtdefense scan
76
+ ```
77
+
78
+ ## Modes
79
+
80
+ Hosted scans use a CI/CD API key and scan a public or reachable agent endpoint through the FullCourtDefense backend.
81
+
82
+ | Mode | Use When | Behavior |
83
+ |---|---|---|
84
+ | `--mode sync` | Small hosted scans from CI or a terminal | Waits for the hosted scan result before exiting. |
85
+ | `--mode async` | Longer hosted scans | Starts a hosted job, polls until complete, then prints the result. |
86
+
87
+ Local scans run from the customer machine or VPN and only send captured text outbound to Shield for verdicts.
88
+
89
+ | Mode | Use When | Behavior |
90
+ |---|---|---|
91
+ | `--mode quick` | Smoke test before a demo or install handoff | Runs a small default attack set. |
92
+ | `--mode full` | Real evidence report | Runs the bundled 229+ attack corpus. |
93
+ | `--mode targeted` | You know what the agent protects | Runs default plus targeted attacks and appends `--description` as focus context. |
94
+ | `--mode deep` | Stress and broad regression testing | Runs the broad corpus plus deeper multi-step/stress cases. |
95
+
96
+ ## Full Option Reference
97
+
98
+ ### Global
99
+
100
+ | Flag | Applies To | Description | Default |
101
+ |---|---|---|---|
102
+ | `--help`, `-h` | all commands | Show help. | — |
103
+ | `--version`, `-v` | all commands | Print package version. | — |
104
+ | `--config <path>` | scan/config | Path to `.fullcourtdefense.yml`, `.fullcourtdefense.yaml`, or legacy `.botguard.yml`. | auto-detect |
105
+ | `--api-url <url>` | doctor/configure/scan | FullCourtDefense backend URL. | `https://api.fullcourtdefense.ai` |
106
+
107
+ ### Shield And Hosted API
108
+
109
+ | Flag | Applies To | Description | Default |
110
+ |---|---|---|---|
111
+ | `--api-key <key>` | hosted scan/credits | Hosted scan API key. Can also use `BOTGUARD_API_KEY`. | config/env |
112
+ | `--shield-id <id>` | local scan | Shield ID from the Shield Integrate tab. Can also use `FULLCOURTDEFENSE_SHIELD_ID`, `FCD_SHIELD_ID`, or `AGENTGUARD_SHIELD_ID`. | config/env/prompt |
113
+ | `--shield-key <key>` | local scan | Optional Shield key for locked Shields. Can also use `FULLCOURTDEFENSE_SHIELD_KEY`, `FCD_SHIELD_KEY`, or `AGENTGUARD_SHIELD_KEY`. | config/env/prompt |
114
+
115
+ ### Hosted Scan
116
+
117
+ | Flag | Applies To | Description | Default |
118
+ |---|---|---|---|
119
+ | `--endpoint <url>` | hosted scan | Public/reachable AI agent API URL. | config |
120
+ | `--description <text>` | hosted scan/local targeted | Agent description. For `--mode targeted`, also used as local focus context. | config |
121
+ | `--system-prompt <text-or-path>` | hosted scan | System prompt text or path to a file. | config |
122
+ | `--categories <list>` | hosted scan | Comma-separated attack categories. | all |
123
+ | `--attack-count <n>` | hosted/local | Limit number of attacks. Useful for smoke tests. | mode default |
124
+ | `--webhook-format <fmt>` | hosted scan | Webhook format: `n8n`, `make`, `zapier`, or `custom`. Legacy alias for local request format. | — |
125
+
126
+ ### Local Target Selection
127
+
128
+ | Flag | Applies To | Description | Default |
129
+ |---|---|---|---|
130
+ | `--local` | scan | Run from this machine, inside the customer's network/VPN. | false |
131
+ | `--type <type>` | local scan | Local target type: `endpoint`, `mcp`, or `rag`. | prompt |
132
+
133
+ ### Local HTTP API Endpoint
134
+
135
+ | Flag | Applies To | Description | Default |
136
+ |---|---|---|---|
137
+ | `--endpoint <url>` | `--type endpoint` | Internal HTTP API URL, for example `http://agent.local/chat`. | prompt |
138
+ | `--method <GET|POST>` | endpoint/rag-url | HTTP method. | prompt/`POST` |
139
+ | `--request-format <fmt>` | endpoint/rag-url | Request body shape: `custom` or `openai`. | prompt/`custom` |
140
+ | `--input-field <field>` | endpoint/rag-url | Request field that receives the attack prompt, for example `message`, `query`, `question`, or `input`. | `message` |
141
+ | `--output-field <field>` | endpoint/rag-url | Response field containing the bot answer, for example `answer`, `response`, `text`, or `choices.0.message.content`. | auto-detect |
142
+ | `--auth-type <type>` | endpoint/rag-url | HTTP auth type: `none`, `bearer`, `basic`, or `api-key`. | `none` |
143
+ | `--username <user>` | endpoint/rag-url basic auth | Basic auth username. | prompt |
144
+ | `--password <pass>` | endpoint/rag-url basic auth | Basic auth password. | prompt |
145
+ | `--token <token>` | endpoint/rag-url bearer auth | Bearer token. | prompt |
146
+ | `--api-key-header <header>` | endpoint/rag-url API-key auth | API key header name, for example `X-API-Key`. | `X-API-Key` |
147
+ | `--endpoint-api-key <key>` | endpoint/rag-url API-key auth | API key value for the scanned endpoint. | prompt |
148
+
149
+ ### MCP
150
+
151
+ | Flag | Applies To | Description | Default |
152
+ |---|---|---|---|
153
+ | `--mcp-command <cmd>` | stdio MCP | Command that starts the MCP server, for example `node`, `python`, or `npx.cmd`. | prompt |
154
+ | `--mcp-args <args>` | stdio MCP | Args passed to `--mcp-command`, for example `.\dist\server.js`. JSON array strings are also supported. | empty |
155
+ | `--mcp-url <url>` | HTTP/SSE MCP | Already-running MCP URL, for example `https://internal.company.com/mcp`. | prompt |
156
+ | `--mcp-transport <t>` | MCP | Transport: `stdio`, `http`, or `sse`. HTTP/SSE can usually be inferred from `--mcp-url`. | inferred |
157
+ | `--mcp-tool <tool>` | MCP | Tool to scan, or `all` to scan every listed tool. | `all` when destination is provided |
158
+ | `--mcp-tool-args <json>` | MCP | Tool args JSON. Use `{{attack}}` anywhere the current attack prompt should be inserted. | `{}` |
159
+ | `--mcp-auth-type <type>` | HTTP/SSE MCP | Auth type: `none`, `bearer`, `basic`, or `api-key`. | `none` |
160
+ | `--mcp-token <token>` | HTTP/SSE MCP bearer auth | Bearer token. | prompt |
161
+ | `--mcp-username <user>` | HTTP/SSE MCP basic auth | Basic auth username. | prompt |
162
+ | `--mcp-password <pass>` | HTTP/SSE MCP basic auth | Basic auth password. | prompt |
163
+ | `--mcp-api-key-header <header>` | HTTP/SSE MCP API-key auth | API key header name. | `X-API-Key` |
164
+ | `--mcp-api-key <key>` | HTTP/SSE MCP API-key auth | API key value. | prompt |
165
+ | `--progress <mode>` | MCP | Console progress: `verbose`, `compact`, or `silent`. | `verbose` |
166
+
167
+ ### RAG
168
+
169
+ | Flag | Applies To | Description | Default |
170
+ |---|---|---|---|
171
+ | `--rag-path <path>` | `--type rag` | Local RAG file or directory to scan as a corpus. Supports `.txt`, `.md`, `.json`, `.csv`, and `.html`. | prompt |
172
+ | `--rag-url <url>` | `--type rag` | Live RAG HTTP endpoint to scan like an app. Uses the same HTTP flags as endpoint scans. | — |
173
+
174
+ ### Output And CI
175
+
176
+ | Flag | Applies To | Description | Default |
177
+ |---|---|---|---|
178
+ | `--mode <mode>` | scan | Hosted: `sync`, `async`. Local: `quick`, `full`, `targeted`, `deep`. | hosted `sync`, local `quick` |
179
+ | `--format <fmt>` | scan | Output: `table`, `summary`, `report`, `full-report`, or `json`. | hosted `table`, local `summary` |
180
+ | `--fail-threshold <n>` | scan | Exit with code 1 if score is below this 0-100 threshold. | `0` |
181
+
182
+ ## Realistic Command Examples
183
+
184
+ ### First-Time Setup
185
+
186
+ Run these on the same machine that can reach the customer's private agent, MCP server, or RAG service:
187
+
188
+ ```powershell
189
+ fullcourtdefense doctor
190
+ fullcourtdefense configure
191
+ fullcourtdefense scan --local
192
+ ```
193
+
194
+ Expected `doctor` output:
195
+
196
+ ```text
197
+ BotGuard outbound diagnostic
198
+ Target: https://api.fullcourtdefense.ai
199
+
200
+ PASS outbound HTTPS open (200, 487ms)
201
+ Checked: https://api.fullcourtdefense.ai/api/health/ping
202
+ ```
203
+
204
+ ### Hosted CI/CD Scan
205
+
206
+ Use hosted scans when the agent endpoint is reachable by FullCourtDefense and you have a CI/CD API key.
207
+
208
+ ```powershell
209
+ $env:BOTGUARD_API_KEY = "bg_live_..."
210
+ fullcourtdefense scan --endpoint "https://support-bot.example.com/chat" --description "Customer support chatbot" --mode sync --format summary --fail-threshold 80
211
+ ```
212
+
213
+ Async hosted scan for a longer job:
214
+
215
+ ```powershell
216
+ fullcourtdefense scan --api-key "bg_live_..." --endpoint "https://agent.example.com/chat" --description "Production sales assistant" --mode async --format report
217
+ ```
218
+
219
+ ### Local Modes
220
+
221
+ Use quick mode first:
222
+
223
+ ```powershell
224
+ fullcourtdefense scan --local --type endpoint --endpoint "http://localhost:3000/chat" --method POST --request-format custom --input-field message --output-field response --mode quick --format report
225
+ ```
226
+
227
+ Use full mode for evidence:
228
+
229
+ ```powershell
230
+ fullcourtdefense scan --local --type endpoint --endpoint "http://localhost:3000/chat" --method POST --request-format custom --input-field message --output-field response --mode full --format report
231
+ ```
232
+
233
+ Use targeted mode when you know the protected domain:
234
+
235
+ ```powershell
236
+ fullcourtdefense scan --local --type endpoint --endpoint "http://localhost:3000/chat" --method POST --request-format custom --input-field message --output-field response --mode targeted --description "Healthcare support bot with patient records and billing data" --format report
237
+ ```
238
+
239
+ Use deep mode for broad regression:
240
+
241
+ ```powershell
242
+ fullcourtdefense scan --local --type endpoint --endpoint "http://localhost:3000/chat" --method POST --request-format custom --input-field message --output-field response --mode deep --format full-report
243
+ ```
244
+
245
+ ### Local API Endpoint Examples
246
+
247
+ Typical Express/FastAPI app:
248
+
249
+ ```powershell
250
+ fullcourtdefense scan --local --type endpoint --endpoint "http://127.0.0.1:8000/chat" --method POST --request-format custom --input-field message --output-field answer --mode full --format report
251
+ ```
252
+
253
+ Query-style endpoint:
254
+
255
+ ```powershell
256
+ fullcourtdefense scan --local --type endpoint --endpoint "http://127.0.0.1:8000/query" --method POST --request-format custom --input-field query --output-field result --mode full --format report
257
+ ```
258
+
259
+ OpenAI-compatible endpoint:
260
+
261
+ ```powershell
262
+ fullcourtdefense scan --local --type endpoint --endpoint "http://127.0.0.1:8000/v1/chat/completions" --method POST --request-format openai --mode full --format report
263
+ ```
264
+
265
+ ### MCP Examples
266
+
267
+ Local stdio MCP server built from your repo:
268
+
269
+ ```powershell
270
+ fullcourtdefense scan --local --type mcp --mcp-command node --mcp-args ".\dist\mcp-server.js" --mcp-tool all --mode full --format report
271
+ ```
272
+
273
+ Filesystem MCP over `npx.cmd` on Windows:
274
+
275
+ ```powershell
276
+ fullcourtdefense scan --local --type mcp --mcp-command npx.cmd --mcp-args "-y @modelcontextprotocol/server-filesystem C:\company\docs" --mcp-tool all --mode full --format report
277
+ ```
278
+
279
+ Single MCP tool with attack inserted into an argument:
280
+
281
+ ```powershell
282
+ fullcourtdefense scan --local --type mcp --mcp-command node --mcp-args ".\dist\mcp-server.js" --mcp-tool search_docs --mcp-tool-args '{ "query": "{{attack}}", "limit": 5 }' --mode quick --format report
283
+ ```
284
+
285
+ Already-running HTTP MCP:
286
+
287
+ ```powershell
288
+ fullcourtdefense scan --local --type mcp --mcp-url "http://127.0.0.1:5066/mcp" --mcp-tool all --mode full --format report
289
+ ```
290
+
291
+ Secured HTTP MCP:
292
+
293
+ ```powershell
294
+ fullcourtdefense scan --local --type mcp --mcp-url "https://mcp.internal.company.com/mcp" --mcp-auth-type bearer --mcp-token "mcp_token_..." --mcp-tool all --mode full --format report
295
+ ```
296
+
297
+ ### RAG Examples
298
+
299
+ Scan local documents before ingestion:
300
+
301
+ ```powershell
302
+ fullcourtdefense scan --local --type rag --rag-path "C:\company\kb-docs" --mode full --format report
303
+ ```
304
+
305
+ Scan one suspicious file:
306
+
307
+ ```powershell
308
+ fullcourtdefense scan --local --type rag --rag-path ".\docs\release-notes.md" --mode quick --format report
309
+ ```
310
+
311
+ Scan a live RAG service:
312
+
313
+ ```powershell
314
+ fullcourtdefense scan --local --type rag --rag-url "http://127.0.0.1:5065/chat" --method POST --request-format custom --input-field message --output-field answer --mode full --format report
315
+ ```
316
+
317
+ Scan an OpenAI-compatible RAG service:
318
+
319
+ ```powershell
320
+ fullcourtdefense scan --local --type rag --rag-url "http://127.0.0.1:5065/v1/chat/completions" --method POST --request-format openai --mode full --format report
321
+ ```
322
+
323
+ ### Auth Examples
324
+
325
+ Bearer auth for an internal agent:
326
+
327
+ ```powershell
328
+ fullcourtdefense scan --local --type endpoint --endpoint "https://agent.internal/chat" --method POST --request-format custom --input-field message --output-field answer --auth-type bearer --token "eyJ..." --mode full --format report
329
+ ```
330
+
331
+ Basic auth:
332
+
333
+ ```powershell
334
+ fullcourtdefense scan --local --type endpoint --endpoint "https://agent.internal/chat" --method POST --request-format custom --input-field message --output-field answer --auth-type basic --username "scanner" --password "scanner-password" --mode full --format report
335
+ ```
336
+
337
+ API key header:
338
+
339
+ ```powershell
340
+ fullcourtdefense scan --local --type endpoint --endpoint "https://agent.internal/chat" --method POST --request-format custom --input-field message --output-field answer --auth-type api-key --api-key-header X-Internal-Key --endpoint-api-key "internal_key_..." --mode full --format report
341
+ ```
342
+
343
+ ### CI Gate Examples
344
+
345
+ Fail the build if score is below 80:
346
+
347
+ ```powershell
348
+ fullcourtdefense scan --api-key "$env:BOTGUARD_API_KEY" --endpoint "https://agent.example.com/chat" --description "Production support agent" --mode sync --format summary --fail-threshold 80
349
+ ```
350
+
351
+ Local CI against a service started earlier in the job:
352
+
353
+ ```powershell
354
+ fullcourtdefense scan --local --type endpoint --endpoint "http://127.0.0.1:3000/chat" --method POST --request-format custom --input-field message --output-field response --mode quick --format summary --fail-threshold 80
355
+ ```
356
+
357
+ ## In-Organization Local Scan
358
+
359
+ Use local scan when the AI endpoint, MCP server, RAG service, or RAG corpus is only reachable from inside your organization. The CLI executes the local target, then sends the captured content outbound to your FullCourtDefense Shield for the real verdict.
360
+
361
+ ```bash
362
+ fullcourtdefense scan --local
363
+ ```
364
+
365
+ On first local scan, the CLI asks for your Shield ID and saves it to `.fullcourtdefense.yml`. You can also pass it directly:
366
+
367
+ ```bash
368
+ fullcourtdefense scan --local --shield-id sh_your_shield_id
369
+ ```
370
+
371
+ The CLI asks what to scan:
372
+
373
+ - `endpoint` — internal HTTP API or OpenAI-compatible endpoint.
374
+ - `mcp` — MCP destination. For stdio MCP, the destination is the command plus args needed to launch the server, for example `node ./mcp-server.js` or `npx.cmd -y @modelcontextprotocol/server-filesystem C:\data`. For an already-running HTTP/HTTPS or legacy SSE MCP server, the destination is `--mcp-url`.
375
+ - `rag` — local file/directory of RAG documents/chunks, or a live RAG HTTP endpoint via `--rag-url`.
376
+
377
+ ### Recommended Flow
378
+
379
+ 1. Run `doctor` first from the customer machine. This confirms outbound HTTPS to FullCourtDefense works before you try a scan.
380
+ 2. Run `configure` once. Paste the Shield ID and Shield key from the web app's Shield Integrate tab.
381
+ 3. Pick the target type: API endpoint, MCP, RAG corpus, or live RAG service.
382
+ 4. Use `--mode quick` for a smoke test, then `--mode full --format report` for evidence and web history.
383
+
384
+ ```powershell
385
+ fullcourtdefense doctor
386
+ fullcourtdefense configure
387
+ ```
388
+
389
+ With a Shield key configured, local scans are saved to the web Reports history automatically.
390
+
391
+ ### API Endpoint Scan
392
+
393
+ Use this when the AI agent is a normal HTTP API, for example `/chat`, `/ask`, `/query`, or an OpenAI-compatible `/v1/chat/completions` route.
394
+
395
+ For custom JSON APIs, tell the CLI which request field receives the attack prompt and which response field contains the bot answer:
396
+
397
+ ```powershell
398
+ fullcourtdefense scan --local --type endpoint --endpoint "http://internal-agent.local/chat" --method POST --request-format custom --input-field message --output-field response --mode quick --format report
399
+ ```
400
+
401
+ Common custom field mappings:
402
+
403
+ ```powershell
404
+ # Request: { "query": "..." }, response: { "answer": "..." }
405
+ fullcourtdefense scan --local --type endpoint --endpoint "http://localhost:8080/query" --method POST --request-format custom --input-field query --output-field answer --mode full --format report
406
+
407
+ # GET endpoint: /ask?q=...
408
+ fullcourtdefense scan --local --type endpoint --endpoint "http://localhost:8080/ask" --method GET --request-format custom --input-field q --output-field answer --mode quick --format report
409
+ ```
410
+
411
+ For OpenAI-compatible APIs:
412
+
413
+ ```powershell
414
+ fullcourtdefense scan --local --type endpoint --endpoint "http://localhost:8080/v1/chat/completions" --method POST --request-format openai --mode full --format report
415
+ ```
416
+
417
+ Authenticated API examples:
418
+
419
+ ```powershell
420
+ # Bearer token
421
+ fullcourtdefense scan --local --type endpoint --endpoint "https://agent.internal/chat" --method POST --request-format custom --input-field message --output-field response --auth-type bearer --token YOUR_TOKEN --mode full --format report
422
+
423
+ # API key header
424
+ fullcourtdefense scan --local --type endpoint --endpoint "https://agent.internal/chat" --method POST --request-format custom --input-field message --output-field response --auth-type api-key --api-key-header X-API-Key --endpoint-api-key YOUR_KEY --mode full --format report
425
+ ```
426
+
427
+ ### MCP Scan
428
+
429
+ Use this when the target exposes tools through the Model Context Protocol. The CLI calls the tool with attack prompts, captures the tool response, sends that response to Shield, and saves the report to history.
430
+
431
+ For stdio MCP servers:
432
+
433
+ ```powershell
434
+ fullcourtdefense scan --local --type mcp --mcp-command node --mcp-args ".\dist\server.js" --mcp-tool all --mode full --format report
435
+ ```
436
+
437
+ For a single stdio tool with fixed args:
438
+
439
+ ```powershell
440
+ fullcourtdefense scan --local --type mcp --mcp-command node --mcp-args ".\dist\server.js" --mcp-tool search_docs --mcp-tool-args '{ "query": "{{attack}}" }' --mode quick --format report
441
+ ```
442
+
443
+ For already-running HTTP MCP servers:
444
+
445
+ ```powershell
446
+ fullcourtdefense scan --local --type mcp --mcp-url "http://mcp.internal.company.com/mcp" --mcp-tool all --mode full --format report
447
+ ```
448
+
449
+ For secured MCP servers:
450
+
451
+ ```powershell
452
+ # Bearer auth
453
+ fullcourtdefense scan --local --type mcp --mcp-url "https://internal.company.com/mcp" --mcp-auth-type bearer --mcp-token YOUR_TOKEN --mcp-tool all --mode full --format report
454
+
455
+ # Basic auth
456
+ fullcourtdefense scan --local --type mcp --mcp-url "https://internal.company.com/mcp" --mcp-auth-type basic --mcp-username USER --mcp-password PASS --mcp-tool all --mode full --format report
457
+
458
+ # API key header
459
+ fullcourtdefense scan --local --type mcp --mcp-url "https://internal.company.com/mcp" --mcp-auth-type api-key --mcp-api-key-header X-API-Key --mcp-api-key YOUR_KEY --mcp-tool all --mode full --format report
460
+ ```
461
+
462
+ For legacy SSE MCP:
463
+
464
+ ```powershell
465
+ fullcourtdefense scan --local --type mcp --mcp-transport sse --mcp-url "https://internal.company.com/sse" --mcp-tool all --mode full --format report
466
+ ```
467
+
468
+ MCP progress controls:
469
+
470
+ ```powershell
471
+ fullcourtdefense scan --local --type mcp --mcp-url "https://internal.company.com/mcp" --mcp-tool all --mode full --progress verbose --format report
472
+ fullcourtdefense scan --local --type mcp --mcp-url "https://internal.company.com/mcp" --mcp-tool all --mode full --progress compact --format summary
473
+ ```
474
+
475
+ ### RAG Corpus Scan
476
+
477
+ Use this when you have local documents or chunks before they are indexed. The CLI reads `.txt`, `.md`, `.json`, `.csv`, and `.html` files, sends chunks to the RAG Shield endpoint, and saves the report as a RAG scan.
478
+
479
+ ```powershell
480
+ fullcourtdefense scan --local --type rag --rag-path ".\docs" --mode quick --format report
481
+ fullcourtdefense scan --local --type rag --rag-path ".\docs" --mode full --format full-report
482
+ ```
483
+
484
+ Use corpus scan to find poisoned files before ingestion. Use live RAG scan when you need to test the actual retrieval service behavior.
485
+
486
+ ### Live RAG Service Scan
487
+
488
+ Use this when RAG is a running service, not just files. This is common for retrieval APIs that accept a question and return an answer with retrieved context.
489
+
490
+ ```powershell
491
+ fullcourtdefense scan --local --type rag --rag-url "http://rag.internal.company.com/chat" --method POST --request-format custom --input-field message --output-field answer --mode quick --format report
492
+ ```
493
+
494
+ Common live RAG shapes:
495
+
496
+ ```powershell
497
+ # Request: { "question": "..." }, response: { "answer": "..." }
498
+ fullcourtdefense scan --local --type rag --rag-url "http://localhost:5065/chat" --method POST --request-format custom --input-field question --output-field answer --mode full --format report
499
+
500
+ # Request: { "query": "..." }, response: { "result": "..." }
501
+ fullcourtdefense scan --local --type rag --rag-url "http://localhost:5065/query" --method POST --request-format custom --input-field query --output-field result --mode full --format report
502
+
503
+ # OpenAI-compatible RAG endpoint
504
+ fullcourtdefense scan --local --type rag --rag-url "http://localhost:5065/v1/chat/completions" --method POST --request-format openai --mode full --format report
505
+ ```
506
+
507
+ The web report will show `Agent Tested: Local full RAG endpoint scan: ...` and is saved with `scanType: rag`.
508
+
509
+ ### Local Demo RAG Server
510
+
511
+ This repository includes a deliberately vulnerable RAG service for testing the CLI flow:
512
+
513
+ ```powershell
514
+ $env:PORT = "5065"
515
+ node samples\rag\rag-server.js
516
+ ```
517
+
518
+ In another terminal:
519
+
520
+ ```powershell
521
+ fullcourtdefense scan --local --type rag --rag-url "http://127.0.0.1:5065/chat" --method POST --request-format custom --input-field message --output-field answer --mode quick --format report
522
+ ```
523
+
524
+ The demo should fail because it echoes raw poisoned retrieved context. That is expected and proves the scanner is catching RAG poisoning.
525
+
526
+ ### Older Compact Examples
527
+
528
+ ```bash
529
+ # Internal web API
530
+ fullcourtdefense scan --local --type endpoint --endpoint http://internal-agent.local/chat --method POST --shield-id sh_your_shield_id
531
+
532
+ # Internal OpenAI-compatible endpoint
533
+ fullcourtdefense scan --local --type endpoint --endpoint http://localhost:8080/v1/chat/completions --webhook-format openai --shield-id sh_your_shield_id
534
+
535
+ # MCP stdio server
536
+ fullcourtdefense scan --local --type mcp --mcp-command node --mcp-args ./dist/index.js --mcp-tool search_docs --mcp-tool-args '{"query":"security policy"}' --shield-id sh_your_shield_id
537
+
538
+ # Already-running HTTP or HTTPS MCP server
539
+ fullcourtdefense scan --local --type mcp --mcp-url http://mcp.internal.company.com/mcp
540
+ fullcourtdefense scan --local --type mcp --mcp-url http://mcp.internal.company.com/mcp --mcp-tool all --mode full --format report --shield-id sh_your_shield_id
541
+ fullcourtdefense scan --local --type mcp --mcp-url https://internal.company.com/mcp --mcp-tool all --mode full --format report --shield-id sh_your_shield_id
542
+
543
+ # Legacy SSE MCP server
544
+ fullcourtdefense scan --local --type mcp --mcp-transport sse --mcp-url https://internal.company.com/sse --mcp-tool all --mode full --format report --shield-id sh_your_shield_id
545
+
546
+ # Secured HTTP MCP server with bearer auth
547
+ fullcourtdefense scan --local --type mcp --mcp-url https://internal.company.com/mcp --mcp-auth-type bearer --mcp-token YOUR_TOKEN --mcp-tool all --mode full --format report --shield-id sh_your_shield_id
548
+
549
+ # Secured HTTP MCP server with basic auth
550
+ fullcourtdefense scan --local --type mcp --mcp-url https://internal.company.com/mcp --mcp-auth-type basic --mcp-username USER --mcp-password PASS --mcp-tool all --mode full --format report --shield-id sh_your_shield_id
551
+
552
+ # Secured HTTP MCP server with API-key auth
553
+ fullcourtdefense scan --local --type mcp --mcp-url https://internal.company.com/mcp --mcp-auth-type api-key --mcp-api-key-header X-API-Key --mcp-api-key YOUR_KEY --mcp-tool all --mode full --format report --shield-id sh_your_shield_id
554
+
555
+ # MCP full scan: all tools x bundled 229+ web attacks
556
+ fullcourtdefense scan --local --type mcp --mcp-command node --mcp-args ./dist/index.js --mcp-tool all --mode full --shield-id sh_your_shield_id
557
+
558
+ # MCP smoke test with same full corpus, limited to 10 attacks per tool
559
+ fullcourtdefense scan --local --type mcp --mcp-command node --mcp-args ./dist/index.js --mcp-tool all --mode full --attack-count 10 --shield-id sh_your_shield_id
560
+
561
+ # MCP evidence report: includes each attack sent, captured tool response, and Shield verdict
562
+ fullcourtdefense scan --local --type mcp --mcp-command node --mcp-args ./dist/index.js --mcp-tool all --mode full --attack-count 10 --format report --shield-id sh_your_shield_id
563
+
564
+ # MCP full scan with per-attack live progress
565
+ fullcourtdefense scan --local --type mcp --mcp-url https://internal.company.com/mcp --mcp-tool all --mode full --progress verbose --format report --shield-id sh_your_shield_id
566
+
567
+ # RAG documents
568
+ fullcourtdefense scan --local --type rag --rag-path ./docs --format table --shield-id sh_your_shield_id
569
+
570
+ # Live RAG HTTP service
571
+ fullcourtdefense scan --local --type rag --rag-url http://rag.internal.company.com/chat --method POST --request-format custom --input-field message --output-field answer --mode full --format report --shield-id sh_your_shield_id
572
+ ```
573
+
574
+ Local scans run from the machine executing the CLI, so they can reach private/VPN/internal targets without opening inbound firewall access. The only required network path is outbound HTTPS to your FullCourtDefense backend. With a Shield key configured, the CLI saves the completed scan into the same web Reports history used by hosted scans. The web report keeps every test row with bounded evidence text; use `--format report` or `--format json` locally for the full raw evidence artifact.
575
+
576
+ When an MCP destination is provided (`--mcp-url` or `--mcp-command`), the CLI defaults to a full all-tools report scan with per-attack live progress. Use `--progress compact` for shorter logs, or `--progress silent` for CI logs.
577
+
578
+ ## Outbound Diagnostic
579
+
580
+ Use `doctor` before local scans to confirm the customer environment can reach the FullCourtDefense backend over outbound HTTPS:
581
+
582
+ ```bash
583
+ fullcourtdefense doctor
584
+ fullcourtdefense doctor --api-url https://api.fullcourtdefense.ai
585
+ ```
586
+
587
+ It checks `GET /api/health/ping` and reports whether outbound TCP 443/HTTPS is open.
588
+
589
+ ## CI/CD Usage
590
+
591
+ The CLI returns exit code 1 when the score is below `--fail-threshold`, making it CI-friendly:
592
+
593
+ ```bash
594
+ fullcourtdefense scan --fail-threshold 80 --format summary
595
+ ```
596
+
597
+ For GitHub Actions, use [botguardai/security-scan](https://github.com/botguardai/security-scan) which wraps this CLI with PR comments and check status.
598
+
599
+ ## Get Your API Key
600
+
601
+ 1. Sign up at [fullcourtdefense.ai](https://fullcourtdefense.ai)
602
+ 2. Go to **Account > API Keys**
603
+ 3. Create a CI/CD key
604
+
605
+ ## Related
606
+
607
+ - [BotGuard](https://fullcourtdefense.ai) — Automated red-teaming & real-time firewall for AI agents
608
+ - [GitHub Action](https://github.com/botguardai/security-scan) — CI/CD security scanning
609
+ - [Attack Library](https://github.com/botguardai/llm-attacks) — 229+ open-source LLM attack templates
610
+
611
+ ## License
612
+
613
+ MIT