Skip to content

Commit fda69d7

Browse files
committed
add: csv and json feeds example
1 parent a097f4e commit fda69d7

1 file changed

Lines changed: 69 additions & 15 deletions

File tree

tutorial/tutorial.md

Lines changed: 69 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -134,41 +134,95 @@ Click **Select from defaults** to browse the curated list of well-known public f
134134

135135
### Option B — configure manually
136136

137-
**1. Pick a format.** For a public MISP feed, choose the **MISP Format** card.
137+
Let's ingest a real CSV feed: [Cloudflare's published IPv4 ranges](https://www.cloudflare.com/ips-v4/). It's a plain list of CIDR blocks, one per line, with no header row and no delimiter — a good example of the CSV format's simplest shape.
138138

139-
![MISP feed form](../docs/screenshots/feeds/misp-workbench-2_misp-feed.png)
139+
**1. Pick a format.** Choose the **CSV Format** card.
140+
141+
![CSV feed form](../docs/screenshots/feeds/misp-workbench-1_csv-feed.png)
140142

141143
**2. Feed Settings** (shared across all formats):
142144

143145
| Field | Value | Notes |
144146
|---|---|---|
145-
| **Name** | `CIRCL OSINT Feed` | |
147+
| **Name** | `Cloudflare IPv4 ranges` | |
146148
| **Enabled** || Feed is active |
147-
| **Provider** | `CIRCL` | Source/organisation name |
149+
| **Provider** | `Cloudflare` | Source/organisation name |
148150
| **Distribution** | *Your choice* | MISP distribution level for ingested attributes |
149151
| **Input source** | **Network (fetch from URL)** | Or *Upload file* to ingest a local file once |
150-
| **URI** | `https://.../feed/` | The remote feed URL (Network mode) |
151-
| **Fixed Event** | on/off | On = append every fetch to one event; off = new event per fetch |
152+
| **URI** | `https://www.cloudflare.com/ips-v4/` | The remote feed URL (Network mode) |
153+
| **Fixed Event** | on | Append every fetch to one event — a single "Cloudflare IPv4 ranges" event that stays current |
152154
| **Update interval** | **Daily** | Hourly / Daily / Weekly / No automatic updates |
153155
| **Fetch immediately after creation** || Also runs one fetch right away |
154156

155-
For authenticated feeds set **Authentication → Auth Header** (header name + secret).
157+
For authenticated feeds set **Authentication → Auth Header** (header name + secret). Cloudflare's list is public, so leave it off.
158+
159+
**3. CSV config.** Because the file is a bare list of CIDRs:
160+
161+
- **First row is header****off** (the first line is already data).
162+
- **Delimiter**`,` (there's only one column, so this doesn't matter here).
163+
164+
Click **Preview** to load the table — you'll see a single column of CIDR values.
165+
166+
![CSV feed preview](../docs/screenshots/feeds/misp-workbench-2_csv-feed-preview.png)
167+
168+
Then map the rows to attributes:
169+
170+
- Choose **Row → Attribute** (each line becomes one attribute; use **Row → Object** only for multi-field rows).
171+
- Set the **value column** to the (only) column.
172+
- Set the **type** to a **fixed** value of `ip-dst` — MISP's IP types accept CIDR notation.
173+
174+
![CSV value mapping](../docs/screenshots/feeds/misp-workbench-3_csv-feed-value-mapping.png)
175+
176+
For richer feeds you can instead derive the **type** from a column and remap raw column values to MISP types under **Advanced** — for example mapping a `category` column's values onto different attribute types.
177+
178+
![CSV advanced value mapping](../docs/screenshots/feeds/misp-workbench-4_csv-feed-advanced-value-mapping.png)
179+
180+
**4. Preview & create.** Confirm the previewed table and mapping look right, then click **Add Feed**.
156181

157-
**3. Format-specific config.**
182+
### Option C — a JSON feed
183+
184+
Cloudflare also publishes the same ranges through its API as JSON: [`https://api.cloudflare.com/client/v4/ips`](https://api.cloudflare.com/client/v4/ips). The response nests the IPv4 ranges inside a `result` object, so it's a good example of the JSON format's **Items path** mapping:
185+
186+
```json
187+
{
188+
"result": {
189+
"ipv4_cidrs": ["173.245.48.0/20", "103.21.244.0/22", "..."],
190+
"ipv6_cidrs": ["2400:cb00::/32", "..."],
191+
"etag": "38f79d050aa027e3be3865e495dcc9bc"
192+
},
193+
"success": true,
194+
"errors": [],
195+
"messages": []
196+
}
197+
```
198+
199+
**1. Pick a format.** Choose the **JSON Format** card.
200+
201+
![JSON feed form](../docs/screenshots/feeds/misp-workbench-1_json-feed.png)
202+
203+
**2. Feed Settings** — same as above, but with:
204+
205+
| Field | Value |
206+
|---|---|
207+
| **Name** | `Cloudflare IPv4 ranges (JSON)` |
208+
| **Provider** | `Cloudflare` |
209+
| **URI** | `https://api.cloudflare.com/client/v4/ips` |
158210

159-
- **MISP** → a *MISP Feed Rules* card, identical Basic/Advanced pattern to server pull rules (filter by published-after time, tags, orgs). Defaults to the last 30 days.
211+
**3. JSON config.**
160212

161-
![MISP feed rules](../docs/screenshots/feeds/misp-workbench-3_misp-feed-rules.png)
213+
- **Structure****array** (once you point the items path at the CIDR list below, each element is a plain string).
214+
- **Items path**`result.ipv4_cidrs` — dot-notation to the array you want to ingest. Click **Preview** to fetch the response and confirm the path resolves to the list of CIDRs.
162215

163-
- **CSV** → set *First row is header* and *Delimiter*, preview the table, choose **Row → Attribute** or **Row → Object**, then map the **value column** and **type** (fixed or from a column, with optional type-value remapping).
216+
![JSON feed preview](../docs/screenshots/feeds/misp-workbench-2_json-feed-preview.png)
164217

165-
- **JSON** → choose *array / object / NDJSON*, set an *Items path*, then map the **value field** and **attribute type**.
218+
![JSON feed preview with items path](../docs/screenshots/feeds/misp-workbench-3_json-feed-preview-with-json-path.png)
166219

167-
- **Freetext** → choose **Automatic** type detection or a **Fixed type**, and preview the detected indicators.
220+
- **Value field** → leave empty / `.` — each item *is* the value (a bare string), not an object with fields. For object items you'd put the field name here (e.g. `ip`).
221+
- **Attribute type** → fixed `ip-dst`.
168222

169-
**4. Preview & create.** For MISP feeds, **Preview** (`test-connection`) confirms the URL is reachable and returns a valid manifest, and shows how many events survive your rules. Click **Add Feed**.
223+
![JSON attribute mapping](../docs/screenshots/feeds/misp-workbench-4_json-feed-attribute-mapping.png)
170224

171-
![MISP feed preview](../docs/screenshots/feeds/misp-workbench-4_misp-feed-preview.png)
225+
**4. Preview & create.** Confirm the resolved items and mapping, then click **Add Feed**.
172226

173227
### Fetch & manage
174228

0 commit comments

Comments
 (0)