You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The supply-chain firewall is a command-line tool for preventing the installation of malicious PyPI and npm packages. It is intended primarily for use by engineers to protect their development workstations from compromise in a supply-chain attack.
Supply-Chain Firewall is a command-line tool for preventing the installation of malicious PyPI and npm packages. It is intended primarily for use by engineers to protect their development workstations from compromise in a supply-chain attack.
9
11
10
-
The firewall collects all targets that would be installed by a given `pip` or `npm` command and checks them against reputable sources of data on open source malware and vulnerabilities. The command is automatically blocked when any data source finds that any target is malicious. In cases where a data source reports other findings for a target, the findings are presented to the user along with a prompt confirming intent to proceed with the installation.
12
+

13
+
14
+
Supply-Chain Firewall collects all targets that would be installed by a given `pip` or `npm` command and checks them against reputable sources of data on open-source malware and vulnerabilities. The command is automatically blocked when any data source finds that any target is malicious. In cases where a data source reports other findings for a target, they are presented to the user along with a prompt confirming intent to proceed with the installation.
11
15
12
16
Default data sources include:
13
17
@@ -16,7 +20,7 @@ Default data sources include:
16
20
17
21
Users may also implement verifiers for alternative data sources. A template for implementating custom verifiers may be found in `examples/verifier.py`. Details may also be found in the API documentation.
18
22
19
-
The principal goal of the supply-chain firewall is to block 100% of installations of known-malicious packages within the purview of its data sources.
23
+
The principal goal of Supply-Chain Firewall is to block 100% of installations of known-malicious packages within the purview of its data sources.
20
24
21
25
## Getting started
22
26
@@ -33,12 +37,12 @@ make install
33
37
To check whether the installation succeeded, run the following command and verify that you see output similar to the following.
34
38
```bash
35
39
$ scfw --version
36
-
1.0.0
40
+
1.0.1
37
41
```
38
42
39
43
### Post-installation steps
40
44
41
-
To get the most out of the supply-chain firewall, it is recommended to run the `scfw configure` command after installation. This script will walk you through configuring your environment so that all `pip` or `npm` commands are passively run through the firewall as well as enabling Datadog logging, described in more detail below.
45
+
To get the most out of Supply-Chain Firewall, it is recommended to run the `scfw configure` command after installation. This script will walk you through configuring your environment so that all `pip` or `npm` commands are passively run through `scfw` as well as enabling Datadog logging, described in more detail below.
42
46
43
47
```bash
44
48
$ scfw configure
@@ -47,40 +51,45 @@ $ scfw configure
47
51
48
52
### Compatibility
49
53
50
-
The supply-chain firewall is compatible with `pip >= 22.2` and `npm >= 7.0`. In keeping with its goal of blocking 100% of known-malicious package installations, the firewall will refuse to run with an incompatible version of `pip` or `npm`. Please upgrade to or verify that you are running a compatible version of `pip` or `npm` before using this tool.
54
+
| Package manager | Compatible versions |
55
+
| :---------------: | :-------------------: |
56
+
| npm | >= 7.0 |
57
+
| pip | >= 22.2 |
58
+
59
+
In keeping with its goal of blocking 100% of known-malicious package installations, `scfw` will refuse to run with an incompatible version of a supported package manager. Please upgrade to or verify that you are running a compatible version before using this tool.
51
60
52
-
Currently, the supply-chain firewall is only fully supported on macOS systems, though it should run as intended on most common Linux distributions. It is currently not supported on Windows.
61
+
Currently, Supply-Chain Firewall is only fully supported on macOS systems, though it should run as intended on most common Linux distributions. It is currently not supported on Windows.
53
62
54
63
## Usage
55
64
56
-
To use the supply-chain firewall, just prepend `scfw run` to the `pip install` or `npm install` command you want to run.
65
+
To use Supply-Chain Firewall, prepend `scfw run` to the `pip install` or `npm install` command you want to run.
57
66
58
67
```
59
68
$ scfw run npm install react
60
69
$ scfw run pip install -r requirements.txt
61
70
```
62
71
63
-
For `pip install` commands, the firewall will install packages in the same environment (virtual or global) in which the command was run.
72
+
For `pip install` commands, packages will be installed in the same environment (virtual or global) in which the command was run.
64
73
65
-
## Limitations
74
+
###Limitations
66
75
67
-
Unlike `pip`, a variety of `npm` operations beyond `npm install` can end up installing new packages. For now, only `npm install` commands are in scope for analysis with the supply-chain firewall. We are hoping to extend the firewall's purview to other "installish" `npm` commands over time.
76
+
Unlike `pip`, a variety of `npm` operations beyond `npm install` can end up installing new packages. For now, only `npm install` commands are in Supply-Chain Firewall's scope. We are hoping to extend the tool's purview to other "installish" `npm` commands over time.
68
77
69
78
## Datadog Logs integration
70
79
71
-
The supply-chain firewall can optionally send logs of blocked and successful installations to Datadog.
80
+
Supply-Chain Firewall can optionally send logs of blocked and successful installations to Datadog.
72
81
73
82

74
83
75
84
To opt in, set the environment variable `DD_API_KEY` to your Datadog API key, either directly in your shell environment or in a `.env` file in the current working directory. A logging level may also be selected by setting the environment variable `SCFW_DD_LOG_LEVEL` to one of `ALLOW`, `ABORT` or `BLOCK`. The `BLOCK` level only logs blocked installations, `ABORT` logs blocked and aborted installations, and `ALLOW` logs these as well as successful installations. The `BLOCK` level is set by default, i.e., when `SCFW_DD_LOG_LEVEL` is either not set or does not contain a valid log level.
76
85
77
86
You can also use the `scfw configure` command to walk through the steps of configuring your environment for Datadog logging.
78
87
79
-
The firewall can integrate with user-supplied loggers. A template for implementating a custom logger may be found in `examples/logger.py`. Refer to the API documentation for details.
88
+
Supply-Chain Firewall can integrate with user-supplied loggers. A template for implementating a custom logger may be found in `examples/logger.py`. Refer to the API documentation for details.
80
89
81
90
## Development
82
91
83
-
We welcome community contributions to the supply-chain firewall. Refer to the [CONTRIBUTING](./CONTRIBUTING.md) guide for instructions on building the API documentation and setting up for development.
92
+
We welcome community contributions to Supply-Chain Firewall. Refer to the [CONTRIBUTING](./CONTRIBUTING.md) guide for instructions on building the API documentation and setting up for development.
0 commit comments