Skip to content

Wrapper Mode

github-actions[bot] edited this page Oct 22, 2025 · 7 revisions

Socket Firewall Wrapper Mode

Socket Firewall's wrapper mode provides the simplest way to run package manager commands through the security proxy. In this mode, the CLI automatically handles proxy setup, certificate generation, environment configuration, and cleanup - requiring minimal configuration from the user.

Installation

There is not currently a formal installation mechanism. Simply download the latest sfw binaries from the releases page, rename to sfw or sfw.exe, set as executable (on Linux/Mac), and place it somewhere in your PATH.

Note: Our application binaries are not currently signed. On MacOS, you may need to configure the OS to allow execution of sfw. You can accomplish like so:

xattr -dr com.apple.quarantine ./path/to/sfw

Once the sfw binaries are signed, this step will no longer be necessary.

Basic Usage

Run any package manager command through the proxy:

# Basic usage
sfw npm install lodash
sfw pip install requests

The CLI automatically:

  • Starts the proxy server
  • Generates or uses existing CA certificates
  • Sets appropriate environment variables for package managers
  • Runs the specified command with proxy configuration
  • Shuts down the proxy when the command completes

Configuration

API Token (Required)

The only required configuration is your Socket API token, which can be set in one of two ways:

Environment Variable

# Required scopes: packages, entitlements:list
export SOCKET_API_KEY=sktsec_your_api_key_here_api
sfw npm install lodash

Configuration

Create a .sfw.config file in your project directory or home directory:

# Required scopes: packages, entitlements:list
SOCKET_API_KEY=sktsec_your_api_key_here_api

Per-Repository Configuration: Using configuration files allows you to set different API tokens for different repositories, enabling you to use different Socket organizations with distinct security policies on a per-project basis.

For detailed information about all configuration options (including telemetry, custom registries, and more), see the Configuration documentation.

Clone this wiki locally