{"id":45676904,"url":"https://github.com/ubcent/velar","last_synced_at":"2026-02-24T13:03:12.061Z","repository":{"id":340128685,"uuid":"1161650434","full_name":"ubcent/velar","owner":"ubcent","description":"Local Privacy Firewall for AI","archived":false,"fork":false,"pushed_at":"2026-02-23T17:34:15.000Z","size":4401,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-23T19:49:22.574Z","etag":null,"topics":["ai-agents","ai-security","ai-security-tool"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ubcent.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"docs/security.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-19T11:02:33.000Z","updated_at":"2026-02-23T17:33:48.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/ubcent/velar","commit_stats":null,"previous_names":["ubcent/prompt-shield"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/ubcent/velar","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ubcent%2Fvelar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ubcent%2Fvelar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ubcent%2Fvelar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ubcent%2Fvelar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ubcent","download_url":"https://codeload.github.com/ubcent/velar/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ubcent%2Fvelar/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29783615,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-24T10:45:18.109Z","status":"ssl_error","status_checked_at":"2026-02-24T10:45:09.911Z","response_time":75,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-agents","ai-security","ai-security-tool"],"created_at":"2026-02-24T13:03:09.025Z","updated_at":"2026-02-24T13:03:12.046Z","avatar_url":"https://github.com/ubcent.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"⚠️ Experimental: use at your own risk. Behavior and APIs may change without notice.\n\n# Velar\n\nVelar is a local HTTP/HTTPS proxy with MITM support for AI traffic. It helps prevent sensitive data from leaving your machine by detecting and masking PII or secrets before requests reach AI providers. It also restores original values in responses so your tools keep working as expected.\n\n\u003e 🔒 **100% Local Processing**: All detection, masking, and restoration happens entirely on your machine. Nothing is sent to external services for analysis or logging.\n\n## Problem\n\nDevelopers and teams increasingly send prompts, logs, code, and customer data to AI tools. In many setups, there is no local protection layer between apps and external AI APIs. That gap can lead to accidental data leaks, compliance issues, and loss of control over what is shared.\n\n## Solution\n\nVelar runs locally as a proxy between your app and the AI provider. It can inspect outbound payloads, detect sensitive values, replace them with placeholders, and forward only sanitized content upstream. When the response comes back, Velar restores placeholders to original values for a seamless developer experience and can send local notifications about privacy-relevant activity.\n\n```text\nApp → Velar → AI provider\n```\n\n## Features\n\n- PII detection for common sensitive fields (email, phone, names, etc.)\n- Current PII detection relies on local regex-based detectors only\n- Request masking with deterministic placeholders (for example: `[EMAIL_1]`)\n- Response restore to preserve downstream app behavior\n- macOS system notifications for key proxy/sanitization events\n- Streaming-safe behavior (does not break streaming flows)\n- System proxy integration for quick machine-wide routing\n- Performance instrumentation for sanitize, upstream, and total latency\n\n## Demo\n\n![Demo](./assets/demo.gif)\n\n## How it works\n\n1. **Intercept request** from your app via local HTTP/HTTPS proxy.\n2. **Detect sensitive data** using configured rules.\n3. **Mask detected values** with placeholders.\n4. **Send sanitized request upstream** to the AI provider.\n5. **Restore original values in the response** where applicable.\n6. **Notify locally** (macOS) when important events occur.\n\nExample transformation:\n\n```text\nalice@company.com → [EMAIL_1]\n```\n\n## Quick Start\n\n### 1) Clone\n\n```bash\ngit clone https://github.com/ubcent/velar.git\ncd velar\n```\n\n### 2) Build\n\n```bash\nmake build\n```\n\n### 3) Generate local CA certificate\n\nMITM mode requires a local CA certificate.\n\n```bash\n./velar ca init\n```\n\n### 4) Install certificate in your system trust store (macOS)\n\n```bash\nopen ~/.velar/ca/cert.pem\n```\n\nThen in **Keychain Access**:\n\n1. Add the certificate to the login keychain\n2. Open certificate trust settings\n3. Set **When using this certificate** to **Always Trust**\n\n### 5) Start Velar\n\n```bash\n./velar start\n```\n\n### 6) Enable system proxy\n\n```bash\n./velar proxy on\n```\n\n### 7) Test with curl\n\n```bash\ncurl -x http://localhost:8080 https://api.openai.com/v1/chat/completions \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n  -d '{\n    \"model\": \"gpt-4o-mini\",\n    \"messages\": [\n      {\"role\":\"user\",\"content\":\"Contact me at alice@company.com\"}\n    ]\n  }'\n```\n\n## Example\n\nRequest sent by your app:\n\n```json\n{\n  \"messages\": [\n    {\"role\": \"user\", \"content\": \"Contact me at alice@company.com\"}\n  ]\n}\n```\n\nBehavior:\n\n- Velar detects `alice@company.com`\n- It sends `[EMAIL_1]` upstream instead of raw email\n- It restores original values in response content when mapped\n- It emits a local notification if notifications are enabled\n\n## Configuration\n\nExample `config.yaml`:\n\n```yaml\nport: 8080\nlog_file: ~/.velar/audit.log\nmitm:\n  enabled: true\n  domains:\n    - api.openai.com\n    - chatgpt.com\nsanitizer:\n  enabled: true\n  types:\n    - email\n  confidence_threshold: 0.8\n  max_replacements: 10\nnotifications:\n  enabled: true\nrules:\n  - id: mitm-openai\n    match:\n      host_contains: openai.com\n    action: mitm\n  - id: mitm-chatgpt\n    match:\n      host_contains: chatgpt.com\n    action: mitm\n  - id: allow-all\n    action: allow\n```\n\n## Migration from PromptShield\n\n- Default config path changed from `~/.promptshield/config.yaml` to `~/.velar/config.yaml`.\n- Default runtime directory changed from `~/.promptshield` to `~/.velar`.\n- Environment variables were renamed from `PROMPTSHIELD_*` to `VELAR_*`.\n- Backward compatibility is preserved:\n  - if `~/.velar` does not exist but `~/.promptshield` exists, Velar uses the legacy directory and logs:\n    `Deprecated config path ~/.promptshield detected, please migrate to ~/.velar`\n  - legacy `PROMPTSHIELD_PORT` and `PROMPTSHIELD_LOG_FILE` are still read, but Velar warns and prefers `VELAR_PORT` and `VELAR_LOG_FILE`.\n\n## Performance\n\nVelar is designed to keep overhead low:\n\n- sanitizer stage is typically fast (~1–2ms for common payloads)\n- proxy overhead is minimal in local environments\n- most end-to-end latency usually comes from upstream AI providers\n\n## Limitations\n\n- Streaming responses are forwarded but not content-modified\n- Current sanitization focuses on text payloads\n- PII detection is regex-based today; higher-accuracy detection is planned\n- Notifications are currently focused on macOS\n\n## Roadmap\n\n- broader secret detection coverage\n- integrate Microsoft Presidio for advanced PII detection\n- stricter blocking mode with policy controls\n- extensible policy engine\n- local dashboard for visibility and debugging\n\n## Vision\n\nVelar aims to be the default privacy layer between developers and AI systems. The long-term goal is simple: make safe AI usage the path of least resistance.\n\n## Contributing\n\nContributions are welcome. Please open an issue to discuss major changes, and submit a PR with clear scope, tests (when applicable), and updated documentation.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fubcent%2Fvelar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fubcent%2Fvelar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fubcent%2Fvelar/lists"}