RepoGate VS Code Extension
RepoGate is a powerful VS Code extension that acts as a security gatekeeper for your project's dependencies. It monitors dependency changes and validates them against your organization's security policies through the RepoGate API.
Features
- 📦 Initial Package Scan: Automatically scans all existing dependencies on first install and sends to RepoGate platform
- 🔍 Real-time Dependency Monitoring: Watches
package.json (npm), pom.xml (Maven), and build.gradle (Gradle) files for changes
- ✅ Security Validation: Validates new dependencies against your security policies via RepoGate API
- 🚨 Non-blocking Notifications: Alerts you of denied packages without interrupting your workflow
- 📊 Problems Panel Integration: Shows dependency status directly in VS Code Problems panel
- 🔄 Continuous Status Polling: Polls every 10 seconds for approval status updates
- 🗑️ Removal Detection: Automatically notifies platform when denied packages are removed
- 🔐 Secure Token Storage: Uses VS Code SecretStorage for API token security
- 📈 Status Bar Indicator: Shows real-time connection status and pending/denied counts
- 📝 Output Channel: Detailed logging with sensitive data sanitization
Installation
From VSIX File
- Download the latest
.vsix file
- Open VS Code
- Go to Extensions (
Ctrl+Shift+X or Cmd+Shift+X)
- Click the
... menu → Install from VSIX...
- Select the downloaded file
- Reload VS Code
From Marketplace (Coming Soon)
Search for "RepoGate" in the VS Code Extensions marketplace.
Quick Start
After installation, you'll be prompted to configure your API token:
- Click "Open Settings" when prompted
- Or manually:
File → Preferences → Settings → Search "RepoGate"
- Set your API Token (will be securely stored)
- Set your API URL (default:
https://api.repogate.io/api/v1)
2. Test Connection
Verify your setup:
- Open Command Palette (
Ctrl+Shift+P or Cmd+Shift+P)
- Run:
RepoGate: Test Connection
- Or click [Test Connection] link in Settings
3. Initial Scan
On first activation, RepoGate will:
- Scan all existing dependencies in your workspace
- Send them to
/queue endpoint for baseline review
- Start monitoring for changes
How It Works
Initialization Flow
- First Install: Extension scans all existing packages and sends to
/queue endpoint
- Baseline Established: Platform receives inventory of current dependencies
- Watchers Start: File watchers activate only after successful scan
- Continuous Monitoring: Watches for any dependency changes
When You Add a New Dependency
- Detection: Extension detects change in
package.json, pom.xml, or build.gradle
- Request: Sends
POST /dependencies/request with package info
- Polling: Checks status via
POST /dependencies/check every 10 seconds
- Notification: Shows approval/denial status
- Diagnostics: Adds entry to Problems panel
Status Values
| Status |
Icon |
Meaning |
Action |
| approved |
✓ |
Package is safe to use |
None required |
| denied |
❌ |
Package is blocked |
Remove or revert |
| pending |
⏳ |
Awaiting security review |
Wait for approval |
| scanning |
🔍 |
Being scanned for vulnerabilities |
Wait for results |
| not_found |
❓ |
Package not in database |
Request will be submitted |
When You Remove a Denied Package
- Detection: Extension detects package removal
- Notification: Sends
POST /dependencies/update with removal info
- Confirmation: Shows "Platform has been notified" message
- Cleanup: Removes diagnostic from Problems panel
Commands
Access via Command Palette (Ctrl+Shift+P or Cmd+Shift+P):
- RepoGate: Test Connection - Test API connectivity and authentication
- RepoGate: Scan Now - Manually scan all packages and send to
/queue
- RepoGate: Show Output - Open RepoGate log output channel
- RepoGate: Clear Diagnostics - Clear all diagnostics from Problems panel
Settings
Configure in VS Code Settings (Ctrl+, or Cmd+,):
| Setting |
Type |
Default |
Description |
repogate.enabled |
boolean |
true |
Enable/disable dependency monitoring |
repogate.apiUrl |
string |
https://api.repogate.io/api/v1 |
RepoGate API base URL |
repogate.apiToken |
string |
"" |
API authentication token (migrated to SecretStorage) |
repogate.pollIntervalMs |
number |
10000 |
Status polling interval (minimum 3000ms) |
repogate.includeDevDependencies |
boolean |
true |
Include devDependencies in scans |
User Interface
Status Bar
Bottom-right corner shows:
- $(check) RepoGate - Connected and monitoring
- $(sync~spin) RepoGate - Checking dependencies
- $(error) RepoGate - Connection error
- $(circle-slash) RepoGate - Disabled (no token)
Counts shown: RepoGate (2 pending, 1 denied)
Click to open Output channel.
Problems Panel
Denied/pending packages appear in Problems panel:
- Error (red): Denied packages
- Warning (yellow): Pending/not found packages
- Info (blue): Scanning packages
Notifications
- Approved: Silent (logged only)
- Denied: Error notification with "View Details" button
- Pending: Info notification
- Scanning: Info notification
- Removed: Confirmation notification (for denied packages)
Requirements
- VS Code: 1.85.0 or higher
- RepoGate API: Running instance with valid token
- Network: Access to RepoGate API server
Supported Package Managers
| Ecosystem |
Files Monitored |
| npm |
package.json |
| Maven |
pom.xml |
| Gradle |
build.gradle, build.gradle.kts |
Security
- Token Storage: API tokens are stored in VS Code SecretStorage (encrypted)
- Migration: Tokens in plain settings are automatically migrated to SecretStorage
- Logging: Sensitive data (tokens, passwords) is redacted from logs
- HTTPS: Use HTTPS API URLs in production
Troubleshooting
Solution:
- Open Settings → Search "RepoGate"
- Set API Token
- Run "Test Connection" command
"Connection failed"
Possible Causes:
- RepoGate service not running
- Wrong API URL or port
- Invalid API token
- Network/firewall issues
Solution:
- Verify service is running
- Check API URL in settings
- Run "Test Connection" command
- Check Output channel for details
"Bootstrap failed"
Cause: Initial package scan failed
Solution:
- Check API connection
- Run "Test Connection"
- Run "Scan Now" to retry
Packages not being monitored
Solution:
- Check
repogate.enabled is true
- Verify API token is configured
- Check Output channel for errors
- Ensure file is not in
node_modules
Known Limitations
- Manual Installation: Developers can still install packages via command line (extension monitors but doesn't block)
- Transitive Dependencies: Only direct dependencies are monitored
- Offline Mode: Requires network connection to API
- NPM Only: Maven and Gradle watchers are planned but not yet implemented in v1.6.0
License
MIT License - See LICENSE file.
Support
Made with ❤️ for secure software development