Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,19 @@ $ node print-config.js | npx @ritualdev-lab/agentshield stream
```

<p align="center">
<img src="assets/demo.gif" alt="AgentShield Live Terminal Demo" width="820" />
<img src="assets/demo.gif" alt="AgentShield Live Terminal & Cursor Demo" width="820" />
</p>

> Recorded with [Charm VHS](https://github.com/charmbracelet/vhs) from [`assets/demo.tape`](assets/demo.tape).
> Recorded directly from `npx @ritualdev-lab/agentshield demo` (see [`assets/demo.tape`](assets/demo.tape)): Cursor `.env` exfiltration blocked, Stripe `sk_live_` secret redacted live, and SOC 2 / HIPAA / PCI-DSS / GDPR / EU AI Act control evidence verified.

---

### 🏢 Need Team Rollout or SOC 2 Audit Compliance Setup? ($299–$999/team)

Solo developers use AgentShield CLI free under Apache-2.0. If your engineering team runs **Cursor, Claude Code, Copilot, or MCP servers in production** and needs auditor-ready compliance guarantees:

- **Turnkey Team Rollout & SOC 2 / AI Agent Security Audit Setup ($299–$999 one-time + optional $19/seat/mo Team or $49/seat/mo Enterprise license):** Org-wide Cursor/Claude hooks, GitHub PR Zero-Leak Gate, Datadog/Splunk SIEM streaming, and custom **SOC 2 / HIPAA / PCI-DSS v4.0 / GDPR / EU AI Act PDF attestation bundles**.
- 👉 [**Book Team Rollout / SOC 2 Audit Setup (`security@ritualdev.in`)**](mailto:security@ritualdev.in?subject=AgentShield%20Team%20Rollout%20%26%20SOC%202%20Audit%20Setup) &nbsp;·&nbsp; [**View Team & Enterprise Plans**](https://agentshield.ritualdev.in/#pricing) &nbsp;·&nbsp; [**Team Plan Checkout ($19/seat)**](https://checkout.dodopayments.com/buy/pdt_0NpjONLXnMYR9e2SUlYJt)

---

Expand Down
Binary file modified assets/demo.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 11 additions & 18 deletions assets/demo.tape
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# Charm VHS script — generates a crisp 15-second terminal GIF for AgentShield
# Charm VHS script — AgentShield 45-second real disaster prevented demo
# Install VHS: https://github.com/charmbracelet/vhs
# Run: vhs assets/demo.tape

Output assets/demo.gif

Set Shell "powershell"
Set FontSize 16
Set Width 1100
Set Height 640
Set FontSize 15
Set Width 1160
Set Height 680
Set Padding 24
Set Theme "TokyoNight"
Set TypingSpeed 35ms
Set TypingSpeed 30ms

Hide
Type "function prompt { '$ ' }"
Expand All @@ -19,26 +19,19 @@ Type "function agentshield { node dist/cli.js @args }"
Enter
Type "Clear-Host"
Enter
Sleep 600ms
Sleep 500ms
Show

Type "# 1. Agent attempts to steal .env directly"
Enter
Sleep 400ms
Type 'agentshield exec "cat .env"'
Enter
Sleep 2.5s

Type "# 2. Run 10-second live attack, obfuscation & stream redaction demo"
Type "# Disaster #1: Cursor / Claude Code tries to read .env + obfuscated cat .e""nv"
Enter
Sleep 400ms
Type "agentshield demo"
Enter
Sleep 4.5s
Sleep 5s

Type "# 3. Verify OS sandbox & Ed25519 audit ledger readiness"
Type "# Disaster #2: Export auditor-ready SOC 2 / HIPAA / PCI-DSS / GDPR / EU AI Act evidence"
Enter
Sleep 400ms
Type "agentshield doctor"
Type "agentshield report --compliance soc2 --audit-pdf ./agentshield-soc2.pdf"
Enter
Sleep 3s
Sleep 3.5s
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1677,7 +1677,7 @@ <h2>Enterprise Zero-Leak Security at Any Scale</h2>
</div>

<div class="dodo-secure-badge">
<span>🔒 Commercial payments processed via <strong>Dodo Payments</strong>. Need an enterprise invoice, custom MSA, or vendor security onboarding? Contact <a href="mailto:contact@ritualdev.in?subject=AgentShield%20Enterprise%20Inquiry" style="color: #c7d2fe; text-decoration: underline;">contact@ritualdev.in</a></span>
<span>🔒 Commercial payments processed via <strong>Dodo Payments</strong>. Need a <strong>Team Rollout / SOC 2 Audit Setup ($299–$999/team)</strong>, custom MSA, or vendor security onboarding? Email <a href="mailto:security@ritualdev.in?subject=AgentShield%20Team%20Rollout%20%26%20SOC%202%20Audit%20Setup" style="color: #c7d2fe; text-decoration: underline;">security@ritualdev.in</a></span>
</div>
</section>

Expand Down
40 changes: 29 additions & 11 deletions src/demo.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { ComplianceEngine } from "./compliance.js";
import { AgentShieldEngine } from "./engine.js";
import { AgentCommandSandbox } from "./sandbox.js";
import { AGENTSHIELD_VERSION } from "./version.js";
Expand All @@ -7,12 +8,14 @@ export interface DemoRunResult {
directBlocked: boolean;
redactedCount: number;
sanitizedEnv: string;
complianceFrameworks: string[];
durationMs: number;
}

/**
* Runs a real, self-contained attack simulation using the live AgentShieldEngine
* and AgentCommandSandbox so users can verify secret defense and bypass blocking
* and AgentCommandSandbox so users can verify secret defense, Stripe key redaction,
* obfuscated .env blocking, and SOC 2 / HIPAA / PCI-DSS / GDPR / EU AI Act readiness
* in under 10 seconds with zero risk to real workspace credentials.
*/
export function runAgentShieldDemo(options: { silent?: boolean } = {}): DemoRunResult {
Expand All @@ -31,12 +34,14 @@ export function runAgentShieldDemo(options: { silent?: boolean } = {}): DemoRunR
"fH8jL0",
"aS9dF2gH4k",
].join("");
const fakeStripe = ["sk", "_live_", "99X1aB2c", "3dE4fG5h", "6iJ7kL8mN9"].join("");
const fakeAws = ["AKIA", "7K9X2M4R8Q6W1N3B"].join("");
const fakeGh = ["gh", "p_", "9kLmN3", "pQ7rS2", "tU5vW8", "xY1zA4", "bC6dE8fG0hJ2"].join("");
const fakeDbPass = ["Vault", "Pass99!", "Prod2026"].join("");

const simulatedEnv = [
`OPENAI_API_KEY=${fakeOpenAi}`,
`STRIPE_SECRET_KEY=${fakeStripe}`,
`AWS_ACCESS_KEY_ID=${fakeAws}`,
`GITHUB_TOKEN=${fakeGh}`,
`DB_PASSWORD=${fakeDbPass}`,
Expand All @@ -48,35 +53,47 @@ export function runAgentShieldDemo(options: { silent?: boolean } = {}): DemoRunR
const directCheck = sandbox.inspectCommand(directAttackCmd);
const bypassCheck = sandbox.inspectCommand(bypassAttackCmd);
const scanResult = engine.scanAndRedact(simulatedEnv);
const frameworks = ["soc2", "pci_dss", "hipaa", "gdpr", "eu_ai_act"] as const;
const compliance = new ComplianceEngine([...frameworks]).audit(
[],
(directCheck.isBlocked ? 1 : 0) + (bypassCheck.isBlocked ? 1 : 0),
);
const durationMs = Number((performance.now() - start).toFixed(2));

if (!options.silent) {
console.log(`\n🛡️ AgentShield v${AGENTSHIELD_VERSION} — 10-Second Live Defense Demo`);
console.log(`\n🛡️ AgentShield v${AGENTSHIELD_VERSION} — Real Disaster Prevented Demo`);
console.log("────────────────────────────────────────────────────────────────");
console.log("1️⃣ [Simulating Poisoned Agent Command #1]");
console.log("1️⃣ [Cursor / Claude Code Agent Attempts Credential Exfiltration]");
console.log(` Agent runs: $ ${directAttackCmd}`);
console.log(
` Verdict: ${directCheck.isBlocked ? "🛑 BLOCKED" : "ALLOWED"} (${directCheck.reason || "ok"})`,
);
console.log("\n2️⃣ [Simulating Obfuscation / Quote-Split Evasion #2]");
console.log("\n2️⃣ [Quote-Split & Base64 Bypass Attempt]");
console.log(` Agent runs: $ ${bypassAttackCmd}`);
console.log(
` Verdict: ${bypassCheck.isBlocked ? "🛑 BLOCKED" : "ALLOWED"} (${bypassCheck.reason || "ok"})`,
);
console.log("\n3️⃣ [Streaming Surrogate Redaction (.env Output Before LLM Context)]");
console.log("\n3️⃣ [Live Stream Redaction (.env + Stripe sk_live_ Intercepted)]");
console.log(
` Caught: ✅ ${scanResult.findings.length} secrets neutralized in ${durationMs}ms`,
` Caught: ✅ ${scanResult.findings.length} secrets neutralized in ${durationMs}ms (zero-leak)`,
);
console.log(" LLM Sees:");
console.log(" LLM Context:");
for (const line of scanResult.sanitizedText.split("\n")) {
console.log(` ${line}`);
}
console.log("\n4️⃣ [Compliance Evidence Pack Ready]");
console.log(
` Frameworks: ${frameworks.map((f) => f.toUpperCase()).join(", ")} (${compliance.assessedControlsSummary.totalAssessedPassed}/${compliance.summary.totalAssessed} technical controls verified)`,
);
console.log(
" Export PDF: npx @ritualdev-lab/agentshield report --compliance soc2 --audit-pdf ./audit.pdf",
);
console.log("\n────────────────────────────────────────────────────────────────");
console.log("⚡ Protect Claude Code or Cursor in 1 command:");
console.log(" npx @ritualdev-lab/agentshield init-claude");
console.log("⚡ Protect Cursor or Claude Code in 1 command:");
console.log(" npx @ritualdev-lab/agentshield init-cursor");
console.log("🏢 Need Team CI/CD Gates ($19/seat) or Cloud Relay ($29/mo)?");
console.log(" npx @ritualdev-lab/agentshield upgrade --tier team");
console.log(" npx @ritualdev-lab/agentshield init-claude");
console.log("🏢 Team Rollout / SOC 2 Audit Setup ($299-$999/team):");
console.log(" https://agentshield.ritualdev.in/#pricing | security@ritualdev.in");
console.log("★ Star on GitHub: https://github.com/RitualDev-Lab/AgentShield\n");
}

Expand All @@ -85,6 +102,7 @@ export function runAgentShieldDemo(options: { silent?: boolean } = {}): DemoRunR
directBlocked: directCheck.isBlocked,
redactedCount: scanResult.findings.length,
sanitizedEnv: scanResult.sanitizedText,
complianceFrameworks: [...frameworks],
durationMs,
};
}
5 changes: 4 additions & 1 deletion tests/demo.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@ describe("AgentShield Interactive 10-Second Demo", () => {
const result = runAgentShieldDemo({ silent: true });
assert.equal(result.directBlocked, true);
assert.equal(result.evasionBlocked, true);
assert.ok(result.redactedCount >= 4, `Expected >= 4 findings, got ${result.redactedCount}`);
assert.ok(result.redactedCount >= 5, `Expected >= 5 findings, got ${result.redactedCount}`);
assert.ok(!result.sanitizedEnv.includes("VaultPass99!Prod2026"));
assert.ok(!result.sanitizedEnv.includes("7K9X2M4R8Q6W1N3B"));
assert.ok(result.sanitizedEnv.includes("STRIPE_SECRET_KEY=[AGENT_SHIELD:STRIPE_SECRET_KEY:"));
assert.ok(result.complianceFrameworks.includes("soc2"));
assert.ok(result.complianceFrameworks.includes("eu_ai_act"));
});
});
Loading