Guardrails for GitHub Copilot, built from your own rules.
Your company's rules reach GitHub Copilot before every edit, from the first prompt to the final review.
npx -y @cybedefend/vibedefend@latest installGitHub Copilot is writing
billing/refund.ts
export async function refund(req: Request) { const { id, amount } = await req.json(); const invoice = await db.invoices.find({ id, tenant: req.tenant, }); if (amount > 500) await approvals.second(invoice); return payments.refund(invoice, amount); }
Every query is scoped to the tenant.
rules/data-access.mdRefunds above €500 need a second approver.
Approved once by Sofia M.Checked before the commit: clean
Set up in four steps.
- Run one commandIn any terminal, on macOS, Linux or Windows. Node 18.17 or later.
- Choose your region, sign inEU or US. Your browser opens to sign in, no key to paste.
- Tick GitHub CopilotThe installer finds the agents on your machine and ticks them for you.
- Code as usualOpen VS Code 1.110 or later: VibeDefend runs alongside it.
What VibeDefend adds to GitHub Copilot.
Rules served
Your business and security rules reach GitHub Copilot before each edit.
GitHub Copilot is writing
src/billing/cart-checkout.ts
const total = new Decimal128(cart.sum); const rows = await db.query( "SELECT * FROM carts WHERE id = $1", [id] );
Monetary amounts use Decimal128, never Number.
Mined from src/billing.ts:14Parameterise every query that mixes user input.
OWASP Top 10Served before the edit
Live findings
SAST, SCA, secrets, IaC and CI/CD findings, live in the session.
GitHub Copilot
SAST
src/db/users.repo.ts:42SQL injection
SCA
package.jsonlodash 4.17.20, CVE-2021-23337
Secrets
config/prod.ymlAWS access key
IaC
infra/main.tfS3 bucket public-read
CI/CD
.github/workflows/deploy.ymlpull_request_target
In the agent's context, live
Limits in GitHub Copilot
- Secret guardNot available
- Action guardNot available
Your questions.
Does VibeDefend change my GitHub Copilot configuration?
~/.copilot/hooks/cybedefend.json, Code/User/mcp.json. Your own hooks stay: re-running the installer only replaces VibeDefend's entries.What leaves my machine?
Which version of GitHub Copilot do I need?
Do I need to link each repository?
vibedefend link once. It writes .cybedefend/config.json with the project ID.How do I remove it?
vibedefend uninstall: it removes every file VibeDefend installed. If you installed the package globally, then run npm uninstall -g @cybedefend/vibedefend.Can VibeDefend block actions in GitHub Copilot?
Technical details for VS Code Copilot
- MCP server
- Available
Code/User/mcp.json - Rules before each edit
- Available
PreToolUseVS Code ignores hook matchers, so the VibeDefend runner keeps only the edit tools itself. - Dangerous actions blocked
- Not availableNo equivalentNot available in VS Code Copilot yet.
- Rules loaded at start
- Available
SessionStart - End-of-session review
- Available
Stop - Review of long sessions
- Available
PreCompact - Reminder on every prompt
- Not availableNo equivalentNot available in VS Code Copilot.
What it writes for VS Code Copilot
~/.copilot/hooks/cybedefend.jsonCode/User/mcp.json
And the hook runner in ~/.cybedefend/. Your own hooks stay: re-running the installer only replaces VibeDefend's entries.
VS Code 1.110 or later. The installer finds VS Code through the code command: if it is missing, run Shell Command: Install 'code' command in PATH from the Command Palette.
Blocking dangerous actions is not available in Copilot yet. Rules before each edit, at session start, at the end of the session and on long sessions are.
Something off? vibedefend status gives a read-only report, and vibedefend doctor repairs what it can.