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 in real-time and validates them against your organization's security policies through the RepoGate platform.

Enterprise Dependency Governance

RepoGate embeds automated governance directly into your development lifecycle, preventing costly audit failures and accelerating business velocity.

Installation

From VS Code Marketplace

The easiest way to install RepoGate is directly from the VS Code Marketplace:

  1. Open VS Code
  2. Go to Extensions (Ctrl+Shift+X or Cmd+Shift+X)
  3. Search for "RepoGate"
  4. Click Install

Or install directly from the VS Code Marketplace.

From VSIX File

If you have a VSIX file for manual installation:

  1. Download the latest .vsix file
  2. Open VS Code
  3. Go to Extensions (Ctrl+Shift+X or Cmd+Shift+X)
  4. Click the ... menu → Install from VSIX...
  5. Select the downloaded file
  6. Reload VS Code

Quick Start

1. Configure API Token

After installation, you'll be prompted to configure your API token. This token connects your VS Code extension to your organization's RepoGate platform:

  1. Click "Open Settings" when prompted
  2. Or manually navigate: FilePreferencesSettings → Search "RepoGate"
  3. Set your API Token (stored securely in VS Code SecretStorage)
  4. Set your API URL (default: https://api.repogate.io/api/v1)

Secure Token Storage

Your API token is stored using VS Code's SecretStorage API, which provides encrypted, secure storage. Tokens are never stored in plain text.

2. Test Connection

Verify your setup is working correctly:

  1. Open Command Palette (Ctrl+Shift+P or Cmd+Shift+P)
  2. Run: RepoGate: Test Connection
  3. Or click [Test Connection] link in Settings

3. Initial Scan

On first activation, RepoGate automatically performs an initial scan of your workspace. This process:

API Setup

To connect your VS Code extension to the RepoGate platform, you need to configure two essential settings:

API Token

Your API token authenticates your requests to the RepoGate platform. To obtain and configure your token:

  1. Log in to your RepoGate dashboard at app.repogate.io
  2. Navigate to Settings → API Tokens
  3. Generate a new token or copy an existing one
  4. In VS Code, open Command Palette and run RepoGate: Set API Token
  5. Paste your token when prompted

API URL

The API URL points to your RepoGate instance. The default value is https://api.repogate.io/api/v1 for cloud-hosted instances. If you're using a self-hosted or enterprise instance, update this URL to match your deployment.

Settings

Configure RepoGate behavior through VS Code Settings (Ctrl+, or Cmd+,):

Setting Type Default Description
repogate.enabled boolean true Enable or 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 in milliseconds (minimum 3000ms)
repogate.includeDevDependencies boolean true Include devDependencies in scans and validation

Commands

Access these commands via Command Palette (Ctrl+Shift+P or Cmd+Shift+P):

Command Description
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
RepoGate: Set API Token Configure or update your API token
RepoGate: Clear API Token Remove stored API token

How It Works

Initialization Flow

When you first install RepoGate or open a workspace with the extension enabled, the following initialization sequence occurs:

  1. First Install: Extension scans all existing packages and sends them to the /queue endpoint
  2. Baseline Established: The RepoGate platform receives an inventory of current dependencies
  3. Watchers Start: File watchers activate only after a successful scan
  4. Continuous Monitoring: The extension watches for any dependency changes

When You Add a New Dependency

When you add a new dependency to your project, RepoGate follows this workflow:

  1. Detection: Extension detects changes in package.json, pom.xml, or build.gradle
  2. Request: Sends POST /dependencies/request with package information
  3. Polling: Checks status via POST /dependencies/check every 10 seconds
  4. Notification: Shows approval or denial status to the developer
  5. Diagnostics: Adds an entry to the VS Code Problems panel

Non-Blocking Workflow

RepoGate alerts you of denied packages without interrupting your development workflow. You can continue working while awaiting approval decisions.

When You Remove a Denied Package

If you remove a package that was previously denied:

  1. Detection: Extension detects package removal
  2. Notification: Sends POST /dependencies/update with removal information
  3. Confirmation: Shows "Platform has been notified" message
  4. Cleanup: Removes diagnostic from Problems panel

Status Values

RepoGate uses several status values to communicate the approval state of dependencies. Understanding these statuses helps you know what action to take:

Status Icon Meaning Action Required
✓ approved Package is safe to use None required
❌ denied Package is blocked by security policy Remove or revert the package
⏳ pending Awaiting security review Wait for approval decision
🔍 scanning 🔍 Being scanned for vulnerabilities Wait for scan results
❓ not_found Package not in database Request will be submitted automatically

User Interface

Status Bar

The status bar indicator appears in the bottom-right corner of VS Code and shows the current connection status:

When there are pending or denied packages, counts are shown: RepoGate (2 pending, 1 denied)

Click the status bar item to open the Output channel for detailed logs.

Problems Panel

Denied and pending packages appear in the VS Code Problems panel with different severity levels:

Notifications

RepoGate shows notifications for important events:

Supported Package Managers

RepoGate currently monitors the following package ecosystems and their associated files:

Ecosystem Files Monitored Status
npm package.json ✅ Fully Supported
Maven pom.xml 🚧 Planned
Gradle build.gradle, build.gradle.kts 🚧 Planned

Current Limitations

Maven and Gradle watchers are planned but not yet implemented in the current version. Only npm (package.json) is fully supported at this time.

Security & Privacy

Token Storage

RepoGate uses VS Code's SecretStorage API to store your API token securely. This provides:

Logging & Data Sanitization

All sensitive data is automatically redacted from logs, including:

Best Practices

Troubleshooting

"No API token configured"

Solution:

  1. Open Settings → Search "RepoGate"
  2. Run command RepoGate: Set API Token
  3. Enter your API token
  4. Run RepoGate: Test Connection to verify

"Connection failed"

Possible Causes:

Solution:

  1. Verify the RepoGate service is running
  2. Check the API URL in settings
  3. Run RepoGate: Test Connection command
  4. Check the Output channel for detailed error messages

"Bootstrap failed"

Cause: Initial package scan failed

Solution:

  1. Check API connection status
  2. Run RepoGate: Test Connection
  3. Run RepoGate: Scan Now to retry the scan

Packages not being monitored

Solution:

  1. Check that repogate.enabled is set to true
  2. Verify API token is configured
  3. Check Output channel for errors
  4. Ensure the file is not in node_modules or other excluded directories

Requirements

Known Limitations

Support & Resources

Need help? We're here to assist you:

Made with ❤️ for secure software development

RepoGate is committed to helping security teams and developers work together seamlessly to build secure, compliant software.

License

MIT License - See LICENSE file for details.