# Chef Supermarket

Point Berkshelf and knife at the Package Firewall's Supermarket API.

| | |
|---|---|
| Supermarket URL | `https://packages.vulnes.is/chef` |
| Ecosystem ID | `chef` |
| Plan | Add-on |
| Mode | filter: `/api/v1/cookbooks/<name>` is filtered by version; cookbook downloads are checked |
| Cooldown | yes |
| Default mirror | `https://supermarket.chef.io` |
| Automatic setup | none: `vulnetix package-firewall chef` exits 1 |

## Configuration

The firewall needs Basic auth on every request. Both tools take it as URL userinfo.

Berkshelf, `Berksfile`:

```ruby
source "https://YOUR_ORG_UUID:YOUR_API_KEY@packages.vulnes.is/chef"
```

knife, `~/.chef/config.rb`:

```ruby
knife[:supermarket_site] = "https://YOUR_ORG_UUID:YOUR_API_KEY@packages.vulnes.is/chef"
```

Read the key from the environment rather than committing it:

```ruby
source "https://#{ENV.fetch('VULNESIS_ORG_ID')}:#{ENV.fetch('VULNESIS_API_KEY')}@packages.vulnes.is/chef"
```

## Use

```bash
berks install
knife supermarket download apt
```

No CLI writer exists for Chef, so this configuration has not been exercised by `vulnetix package-firewall`. Confirm requests appear as `chef` in the [decision log](/package-firewall/operations/decision-log.md).
