# Quickstart

Point npm at the Package Firewall, turn on malware and KEV blocking, and confirm a decision in the log.

This walks through npm. Every other ecosystem follows the same three steps; see its [client page](/package-firewall.md#ecosystems).

## 1. Sign in

```bash
vulnetix auth login
vulnetix auth status
```

npm needs the Package Firewall add-on, or the Enterprise plan, which includes it. The pkg.go.dev API (`go-dev`) and the AUR (`aur`) are free on every plan. See [Billing](https://www.vulnes.is/resolve/billing#addons).

## 2. Configure npm

Preview, then write:

```bash
vulnetix package-firewall npm --dry-run
vulnetix package-firewall npm
```

This writes `~/.netrc`, `~/.npmrc` and `~/.yarnrc.yml`. Check it took:

```bash
npm config get registry
# https://packages.vulnes.is/npm/
npm cache clean --force
npm install lodash
```

## 3. Set a policy

```bash
vulnetix config set package-firewall \
  --block-malware true \
  --block-kev true \
  --cvss-threshold 9.0 \
  --cooldown-days 7
vulnetix config get package-firewall
```

Changes reach the proxy within 60 seconds.

## 4. See a decision

Request a package directly and read the firewall headers:

```bash
AUTH=$(printf '%s:%s' "$VULNESIS_ORG_ID" "$VULNESIS_API_KEY" | base64 -w0)
curl -s -o /dev/null -D - -H "Authorization: Basic $AUTH" https://packages.vulnes.is/npm/lodash | grep -i '^x-vulnetix'
```

An allowed request prints nothing here, or only `X-Vulnetix-Firewall-Mode` when the org is not in `enforce` mode. A blocked request carries `X-Vulnetix-Firewall: blocked` and a reason; see [Block responses](/package-firewall/reference/responses.md). Every decision is listed in the Resolve Platform at [www.vulnes.is/resolve/logs#package](https://www.vulnes.is/resolve/logs#package).

## Next

- [Policy settings](/package-firewall/policy/settings.md)
- [Allow and deny lists](/package-firewall/curation/lists.md), including namespace entries for packages you publish yourself
- [Troubleshooting](/package-firewall/reference/troubleshooting.md)
