Turn shared threat intelligence into something a web team can act on: TLP 2.0 sharing rules, STIX 2.1 objects and patterns, TAXII 2.1 and MISP feeds, and a Django app that ingests, deduplicates, expires and matches indicators against your own access logs.
Threat intelligence is only useful to a web team when it changes a decision: block this address, review that login burst, quarantine this upload. This tutorial builds a small Django app that ingests indicators in STIX 2.1, pulls them from TAXII 2.1 and MISP, deduplicates and expires them, matches them against your own access logs and raises alerts. Everything is defensive and stays inside your own infrastructure and logs.
This tutorial belongs to an OSINT series for defenders: an organisation examining its own exposure and its own traffic, with authorisation. Indicators describe infrastructure and artefacts (addresses, domains, URLs, file hashes, attacker techniques). They are not a tool for investigating, locating or profiling people, and nothing here covers that.
Under the GDPR (AVG in the Netherlands), IP addresses in your logs are personal data. Matching them against threat feeds for security is generally covered by legitimate interest, but write that down in your processing register, keep sightings only as long as the investigation needs them, and do not enrich a match with lookups about the person behind an address. If a match looks like a real person rather than infrastructure, the correct action is to record a false positive, not to dig further.
| Indicator | Where you match it | Useful lifetime |
|---|---|---|
| IPv4/IPv6 address | Access logs, login failures, WAF events | Days to weeks; addresses are reassigned |
| Domain | Referer headers, outbound webhooks, user-supplied links | Weeks to months |
| URL | Request paths of known exploit probes, referers | Weeks |
| File hash (SHA-256) | Uploads, dependencies, build artefacts | Long; a hash never changes meaning |
| TTP (technique) | Detection rules, threat models, hardening backlog | Months to years |
Atomic indicators are cheap for attackers to change, so they decay quickly. TTPs, such as credential stuffing against /accounts/login/ or probing for exposed .env files, change slowly and should feed your rate limits and hardening work rather than a blocklist.
The Traffic Light Protocol tells you who may see a piece of intelligence. TLP 2.0 (FIRST, 2022) has five labels:
Store the label with every indicator and carry it into every alert. When the same indicator arrives from two sources, keep the stricter label. The stix2 library still ships the TLP 1.0 marking definitions (TLP_WHITE, TLP_GREEN, TLP_AMBER, TLP_RED), so the code below maps those to TLP 2.0 labels on ingest.
Tested on Python 3.13 (3.12+ required) with Django 5.2.20, stix2 3.0.2 (which pulls in stix2-patterns 2.1.2), taxii2-client 2.3.0 and pymisp 3.0.0, the latest stable releases at the time of writing.
# requirements.txt
Django>=5.2,<6.0
stix2>=3.0.2,<4.0
taxii2-client>=2.3.0,<3.0
pymisp>=3.0.0,<4.0
One practical note: pymisp 3.0.0 requires python-dateutil>=3.0.0, while current botocore still requires python-dateutil<3.0.0. If the same project also uses boto3, run the MISP sync in a separate virtual environment or worker image instead of fighting the resolver.
STIX 2.1 is a JSON format for threat intelligence. Four object types cover most of what a web team exchanges:
valid_from, optional valid_until and a confidence from 0 to 100.ipv4-addr.The script below describes a credential-stuffing source that hit your own login page and marks it TLP:AMBER:
from datetime import datetime, timedelta, timezone
import stix2
now = datetime.now(timezone.utc)
identity = stix2.Identity(name="myproject web team", identity_class="organization")
indicator = stix2.Indicator(
name="Credential-stuffing source",
pattern="[ipv4-addr:value = '198.51.100.7']",
pattern_type="stix",
valid_from=now,
valid_until=now + timedelta(days=14),
confidence=80,
indicator_types=["malicious-activity"],
created_by_ref=identity,
object_marking_refs=[stix2.TLP_AMBER],
)
ip = stix2.IPv4Address(value="198.51.100.7")
observed = stix2.ObservedData(
first_observed=now - timedelta(minutes=30),
last_observed=now,
number_observed=412,
object_refs=[ip],
created_by_ref=identity,
)
rel = stix2.Relationship(observed, "based-on", indicator)
bundle = stix2.Bundle(identity, indicator, ip, observed, rel, stix2.TLP_AMBER)
with open("bundle.json", "w") as fh:
fh.write(bundle.serialize(pretty=True))
print(indicator.serialize(pretty=True))
parsed = stix2.parse(open("bundle.json").read())
print([o.type for o in parsed.objects])
Real output (the identifiers are random UUIDs):
{
"type": "indicator",
"spec_version": "2.1",
"id": "indicator--aa805b51-06e5-4d3a-bc92-adfb49de2a4d",
"created_by_ref": "identity--ad9d6f57-95ae-4fae-a55f-118ccb51fc98",
...
"pattern": "[ipv4-addr:value = '198.51.100.7']",
"pattern_type": "stix",
"pattern_version": "2.1",
"valid_from": "2026-12-05T16:26:02.279662Z",
"valid_until": "2026-12-19T16:26:02.279662Z",
"confidence": 80,
"object_marking_refs": [
"marking-definition--f88d31f6-486f-44da-b317-01333bde0b82"
]
}
['identity', 'indicator', 'ipv4-addr', 'observed-data', 'relationship', 'marking-definition']
The constructors validate as they build: a missing valid_from, an unknown property or a malformed pattern raises an exception, which is what you want before sharing anything with partners.
A STIX pattern is a small query language: [ipv4-addr:value = '198.51.100.7'], joined with AND/OR, and optionally with temporal qualifiers. Feeds also use operators such as ISSUBSET for CIDR ranges and MATCHES for regular expressions. Rather than parsing patterns with regular expressions of your own, use stix2-patterns: its validator reports syntax errors, and Pattern(...).inspect() lists the comparisons. The helper simple_comparisons (shown in the ingest module below) keeps only plain equality on the four types we match:
>>> p = "[ipv4-addr:value = '198.51.100.7'] OR [file:hashes.'SHA-256' = 'E3B0C442...']"
>>> run_validator(p)
[]
>>> run_validator("[ipv4-addr:value = '198.51.100.7'")
["FAIL: Error found at line 1:33. missing ']' at '<EOF>'"]
>>> [(str(k), v[:20]) for k, v in simple_comparisons(p)]
[('ipv4-addr', '198.51.100.7'), ('file:sha256', 'e3b0c44298fc1c149afb')]
>>> list(simple_comparisons("[ipv4-addr:value ISSUBSET '198.51.100.0/24']"))
[]
Skipping what you cannot evaluate is deliberate. An AND pattern flattened into separate equality checks is broader than the author intended and produces false positives; log skipped patterns and handle them when a real feed needs them.
One row per (kind, value) enforces deduplication in the database, not only in Python. valid_from/valid_until come from the feed; last_reported drives decay; false_positive lets an analyst silence an indicator without deleting the evidence.
from django.db import models
from django.db.models import Q
from django.utils import timezone
class IndicatorQuerySet(models.QuerySet):
def active(self, at=None):
at = at or timezone.now()
return self.filter(valid_from__lte=at).filter(
Q(valid_until__isnull=True) | Q(valid_until__gt=at)
)
class Indicator(models.Model):
class Kind(models.TextChoices):
IPV4 = "ipv4-addr", "IPv4 address"
DOMAIN = "domain-name", "Domain"
URL = "url", "URL"
SHA256 = "file:sha256", "SHA-256"
kind = models.CharField(max_length=20, choices=Kind.choices)
value = models.CharField(max_length=2048)
stix_id = models.CharField(max_length=100, blank=True)
source = models.CharField(max_length=100)
tlp = models.CharField(max_length=20, default="TLP:AMBER")
confidence = models.PositiveSmallIntegerField(default=50) # STIX 0-100
valid_from = models.DateTimeField()
valid_until = models.DateTimeField(null=True, blank=True)
last_reported = models.DateTimeField(default=timezone.now)
false_positive = models.BooleanField(default=False)
objects = IndicatorQuerySet.as_manager()
class Meta:
constraints = [
models.UniqueConstraint(fields=["kind", "value"], name="uniq_kind_value")
]
def __str__(self):
return f"{self.kind}:{self.value}"
class Sighting(models.Model):
indicator = models.ForeignKey(Indicator, on_delete=models.CASCADE)
log_line = models.TextField()
seen_at = models.DateTimeField()
alerted = models.BooleanField(default=False)
class Meta:
constraints = [
models.UniqueConstraint(
fields=["indicator", "seen_at"], name="uniq_sighting"
)
]
import stix2
from django.utils import timezone
from stix2patterns.pattern import Pattern
from .models import Indicator
# stix2 ships the TLP 1.0 marking definitions; we store TLP 2.0 labels.
TLP_BY_MARKING = {
stix2.TLP_WHITE.id: "TLP:CLEAR",
stix2.TLP_GREEN.id: "TLP:GREEN",
stix2.TLP_AMBER.id: "TLP:AMBER",
stix2.TLP_RED.id: "TLP:RED",
}
TLP_ORDER = ["TLP:CLEAR", "TLP:GREEN", "TLP:AMBER", "TLP:AMBER+STRICT", "TLP:RED"]
SUPPORTED = {
("ipv4-addr", "value"): Indicator.Kind.IPV4,
("domain-name", "value"): Indicator.Kind.DOMAIN,
("url", "value"): Indicator.Kind.URL,
("file", "hashes.SHA-256"): Indicator.Kind.SHA256,
}
def simple_comparisons(pattern):
"""Yield (kind, value) for each '=' comparison we know how to match."""
inspected = Pattern(pattern).inspect()
for obj_type, comparisons in inspected.comparisons.items():
for path, op, raw in comparisons:
key = (obj_type, ".".join(map(str, path)))
if op == "=" and key in SUPPORTED:
yield SUPPORTED[key], raw.strip("'").lower()
def ingest_bundle(data, source, default_tlp="TLP:AMBER"):
bundle = stix2.parse(data, allow_custom=False)
created = updated = skipped = 0
for obj in bundle.objects:
if obj.type != "indicator" or obj.pattern_type != "stix":
continue
if obj.get("revoked"):
skipped += 1
continue
tlp = next((TLP_BY_MARKING[m] for m in obj.get("object_marking_refs", [])
if m in TLP_BY_MARKING), default_tlp)
for kind, value in simple_comparisons(obj.pattern):
ind, was_created = Indicator.objects.get_or_create(
kind=kind,
value=value,
defaults=dict(
stix_id=obj.id,
source=source,
tlp=tlp,
confidence=obj.get("confidence", 50),
valid_from=obj.valid_from,
valid_until=obj.get("valid_until"),
),
)
if was_created:
created += 1
continue
# Dedupe: strongest claim, longest validity, strictest TLP.
ind.confidence = max(ind.confidence, obj.get("confidence", 50))
new_until = obj.get("valid_until")
if ind.valid_until and (new_until is None or new_until > ind.valid_until):
ind.valid_until = new_until
ind.tlp = max(ind.tlp, tlp, key=TLP_ORDER.index)
ind.last_reported = timezone.now()
ind.save(update_fields=["confidence", "valid_until", "tlp", "last_reported"])
updated += 1
return created, updated, skipped
Three rules govern merging. Confidence takes the maximum, because a second independent report raises rather than lowers belief. valid_until is extended, never shortened, and an open-ended report removes the expiry only if one was already set. TLP takes the stricter label. Revoked indicators are counted and skipped; extend this to deactivate an existing row when a producer revokes it. A management command wraps the function:
$ python manage.py ingest_stix bundle.json --source internal
created=1 updated=0 skipped=0
$ python manage.py ingest_stix bundle2.json --source partner-feed
created=1 updated=1 skipped=0
The second file contained the same address at confidence 60 plus a domain; the address was merged and kept confidence 80.
TAXII 2.1 is the HTTPS API for exchanging STIX. A server exposes a discovery endpoint, one or more API roots, and collections inside each root. You read a collection with GET .../collections/{id}/objects/, filter with added_after, and page with limit and next. The client below targets a placeholder URL; replace it with the collection URL and credentials your sharing community gives you, kept in environment variables.
import uuid
from taxii2client.v21 import Collection, as_pages
from .ingest import ingest_bundle
def pull_collection(url, user, password, source, added_after=None):
collection = Collection(url, user=user, password=password)
totals = [0, 0, 0]
for envelope in as_pages(
collection.get_objects, per_request=500, added_after=added_after
):
objects = envelope.get("objects", [])
if not objects:
continue
bundle = {"type": "bundle", "id": f"bundle--{uuid.uuid4()}", "objects": objects}
for i, n in enumerate(ingest_bundle(bundle, source)):
totals[i] += n
return tuple(totals)
# Placeholder only: no live server is used in this tutorial.
pull_collection(
"https://taxii.example.org/api1/collections/91a7b528-80eb-42ed-a74d-c6fbd5a26116/",
os.environ["TAXII_USER"], os.environ["TAXII_PASSWORD"],
source="isac-feed", added_after="2026-12-01T00:00:00Z",
)
as_pages follows the more/next fields of each envelope. Store the newest date_added you processed and pass it as added_after on the next run, so a scheduled job fetches only new objects. The test section mocks the Collection class, so the suite never needs a server.
MISP is an open-source sharing platform organised around events (an incident or report) that contain attributes (the indicators). Each attribute has a type such as ip-dst or sha256 and a to_ids flag that says whether the producer considers it suitable for detection. Warninglists flag values that are known to be benign, such as public resolvers or large CDN ranges. The code below assumes your own MISP instance (or one your community operates and has given you an API key for); it was not run against a server for this tutorial, only the mapping function is tested.
from datetime import timedelta
from django.utils import timezone
from .models import Indicator
MISP_TYPES = {
"ip-src": Indicator.Kind.IPV4,
"ip-dst": Indicator.Kind.IPV4,
"domain": Indicator.Kind.DOMAIN,
"hostname": Indicator.Kind.DOMAIN,
"url": Indicator.Kind.URL,
"sha256": Indicator.Kind.SHA256,
}
def fetch_attributes(misp):
"""misp is a PyMISP instance connected to YOUR OWN MISP server."""
return misp.search(
controller="attributes",
type_attribute=list(MISP_TYPES),
to_ids=True,
last="7d",
enforce_warninglist=True,
)["Attribute"]
def upsert_misp_attribute(attr, source="misp", ttl_days=30):
kind = MISP_TYPES.get(attr["type"])
if kind is None:
return None
now = timezone.now()
ind, _ = Indicator.objects.update_or_create(
kind=kind,
value=attr["value"].lower(),
defaults=dict(
source=source,
stix_id=f"indicator--{attr['uuid']}",
confidence=70 if attr.get("to_ids") else 30,
valid_from=now,
valid_until=now + timedelta(days=ttl_days),
),
)
return ind
# Requires your own MISP instance; PyMISP contacts the server on construction.
from pymisp import PyMISP
misp = PyMISP("https://misp.example.org", os.environ["MISP_KEY"], ssl=True)
for attr in fetch_attributes(misp):
upsert_misp_attribute(attr)
to_ids=True and enforce_warninglist=True remove most of the noise before it reaches your database. MISP attributes do not carry a STIX valid_until, so the mapper assigns a 30-day TTL. MISP can also export STIX 2.1 directly through restSearch with return_format="stix2", which lets you reuse ingest_bundle unchanged.
The matcher reads combined-format access log lines, extracts the client address, request URL and referer, and looks them up in a dictionary of active, non-false-positive indicators. It only processes logs you already collect for your own sites.
import hashlib
import math
import re
from datetime import datetime
from urllib.parse import urlsplit
from django.core.mail import mail_admins
from django.utils import timezone
from .models import Indicator, Sighting
LOG_RE = re.compile(
r'(?P<ip>\S+) \S+ \S+ \[(?P<ts>[^\]]+)\] "(?P<method>\S+) (?P<path>\S+) [^"]*" '
r'(?P<status>\d{3}) \S+ "(?P<referer>[^"]*)" "(?P<ua>[^"]*)"'
)
HALF_LIFE_DAYS = {"ipv4-addr": 14, "domain-name": 60, "url": 30, "file:sha256": None}
def effective_confidence(ind, now=None):
"""Halve confidence every half-life since the last report."""
half_life = HALF_LIFE_DAYS[ind.kind]
if half_life is None:
return ind.confidence
age = ((now or timezone.now()) - ind.last_reported).total_seconds() / 86400
return round(ind.confidence * math.pow(0.5, max(age, 0) / half_life))
def candidates(entry, host):
yield Indicator.Kind.IPV4, entry["ip"]
yield Indicator.Kind.URL, f"https://{host}{entry['path']}".lower()
if entry["referer"] not in ("", "-"):
yield Indicator.Kind.URL, entry["referer"].lower()
yield Indicator.Kind.DOMAIN, (urlsplit(entry["referer"]).hostname or "")
def match_lines(lines, host, min_confidence=60):
active = {
(i.kind, i.value): i
for i in Indicator.objects.active().filter(false_positive=False)
}
new = []
for line in lines:
m = LOG_RE.match(line)
if not m:
continue
entry = m.groupdict()
seen_at = datetime.strptime(entry["ts"], "%d/%b/%Y:%H:%M:%S %z")
for key in candidates(entry, host):
ind = active.get(key)
if ind is None or effective_confidence(ind) < min_confidence:
continue
sighting, created = Sighting.objects.get_or_create(
indicator=ind, seen_at=seen_at, defaults={"log_line": line.strip()}
)
if created:
new.append(sighting)
send_pending_alerts()
return new
def send_pending_alerts():
# Query unalerted rows, so a failed mail is retried on the next run.
pending = list(Sighting.objects.filter(alerted=False).select_related("indicator"))
if not pending:
return
body = "\n".join(
f"{s.seen_at:%Y-%m-%d %H:%M} {s.indicator} "
f"(conf {effective_confidence(s.indicator)}, {s.indicator.tlp})"
for s in pending
)
mail_admins(f"{len(pending)} threat-intel sighting(s)", body)
Sighting.objects.filter(pk__in=[s.pk for s in pending]).update(alerted=True)
def known_bad_upload(uploaded_file):
digest = hashlib.sha256()
for chunk in uploaded_file.chunks():
digest.update(chunk)
return Indicator.objects.active().filter(
kind=Indicator.Kind.SHA256, value=digest.hexdigest(), false_positive=False
).first()
Alerts are sent from rows with alerted=False, not from the list built in memory. If the mail server is down, the next run retries; if a run crashes halfway, nothing is lost. Uploads are checked with known_bad_upload from a form's clean() method. A generated sample log (documentation addresses only) and a run with the console mail backend:
192.0.2.10 - - [05/Dec/2026:16:20:50 +0000] "GET / HTTP/1.1" 200 1024 "-" "Mozilla/5.0"
198.51.100.7 - - [05/Dec/2026:16:20:51 +0000] "POST /accounts/login/ HTTP/1.1" 200 1024 "-" "Mozilla/5.0"
198.51.100.7 - - [05/Dec/2026:16:20:52 +0000] "POST /accounts/login/ HTTP/1.1" 200 1024 "-" "Mozilla/5.0"
203.0.113.50 - - [05/Dec/2026:16:20:53 +0000] "GET /pricing/ HTTP/1.1" 200 1024 "https://bad.example.net/offer" "Mozilla/5.0"
192.0.2.11 - - [05/Dec/2026:16:20:54 +0000] "GET /static/app.css HTTP/1.1" 200 1024 "https://www.example.com/" "Mozilla/5.0"
$ python manage.py match_logs access.log --host www.example.com
Subject: [Django] 3 threat-intel sighting(s)
From: root@localhost
To: security@example.com
...
2026-12-05 16:20 ipv4-addr:198.51.100.7 (conf 80, TLP:AMBER)
2026-12-05 16:20 ipv4-addr:198.51.100.7 (conf 80, TLP:AMBER)
2026-12-05 16:20 domain-name:bad.example.net (conf 70, TLP:AMBER)
...
3 new sighting(s)
$ python manage.py match_logs access.log --host www.example.com
0 new sighting(s)
The second run is idempotent because of the unique constraint on (indicator, seen_at). That constraint has one-second resolution, so two hits from one address in the same second count once; add a line hash to the key if you need exact counts. The alert carries the TLP label: an AMBER alert may go to your security mailbox, but not to a public chat channel or an external ticketing tool.
Most feed noise falls into a few classes, and each has a structural fix:
effective_confidence handles this: an IP reported at confidence 80 drops to 40 after 14 days and 20 after 28, below the default alert threshold of 60. Domains decay over 60 days; hashes do not decay.AND.Analysts mark a false positive with the false_positive flag rather than deleting the row, so the next feed import does not resurrect it. Review the false-positive rate per source monthly; a source that is mostly noise should lose trust, for example by capping its confidence on ingest.
Match in detection mode first. Automatic blocking on a decayed, low-confidence indicator locks out customers and teaches nobody anything. Once a source has proved reliable, block only on high confidence, short TTLs and an expiry on the block itself.
The suite uses Django's locmem mail backend (automatic in tests), real STIX objects, and a mocked TAXII collection. Excerpt:
NOW = timezone.now()
def indicator(value, confidence=80, **kw):
return stix2.Indicator(
pattern=f"[ipv4-addr:value = '{value}']", pattern_type="stix",
valid_from=kw.pop("valid_from", NOW - timedelta(hours=1)),
confidence=confidence, **kw,
)
def log_line(ip, path="/login/", when=None, referer="-"):
ts = (when or timezone.now()).strftime("%d/%b/%Y:%H:%M:%S +0000")
return f'{ip} - - [{ts}] "POST {path} HTTP/1.1" 403 512 "{referer}" "curl/8.5.0"'
class IngestTests(TestCase):
def test_duplicates_collapse_to_strongest_claim(self):
bundle = stix2.Bundle(indicator("198.51.100.7", 40), indicator("198.51.100.7", 85))
self.assertEqual(ingest_bundle(bundle.serialize(), "feed-a"), (1, 1, 0))
self.assertEqual(Indicator.objects.get().confidence, 85)
def test_revoked_indicators_are_skipped(self):
bundle = stix2.Bundle(indicator("198.51.100.8", revoked=True))
self.assertEqual(ingest_bundle(bundle.serialize(), "feed-a"), (0, 0, 1))
def test_tlp_white_is_stored_as_clear(self):
bundle = stix2.Bundle(indicator("198.51.100.9", object_marking_refs=[stix2.TLP_WHITE]))
ingest_bundle(bundle.serialize(), "feed-a")
self.assertEqual(Indicator.objects.get().tlp, "TLP:CLEAR")
class MatchTests(TestCase):
def setUp(self):
ingest_bundle(stix2.Bundle(
indicator("198.51.100.7"),
indicator("203.0.113.9", valid_until=NOW - timedelta(minutes=1),
valid_from=NOW - timedelta(days=2)),
).serialize(), "feed-a")
def test_match_alerts_once(self):
lines = [log_line("198.51.100.7"), log_line("203.0.113.9"),
log_line("192.0.2.44")]
self.assertEqual(len(match_lines(lines, "www.example.com")), 1)
self.assertEqual(len(mail.outbox), 1)
self.assertEqual(match_lines(lines, "www.example.com"), []) # idempotent
self.assertEqual(len(mail.outbox), 1)
def test_false_positive_flag_suppresses(self):
Indicator.objects.filter(value="198.51.100.7").update(false_positive=True)
self.assertEqual(match_lines([log_line("198.51.100.7")], "www.example.com"), [])
def test_ip_confidence_decays(self):
ind = Indicator.objects.get(value="198.51.100.7")
self.assertEqual(effective_confidence(ind, NOW + timedelta(days=28)), 20)
class FeedTests(TestCase):
@mock.patch("threatintel.taxii.Collection")
def test_taxii_pull_follows_pages(self, collection_cls):
page = lambda ip: json.loads(indicator(ip).serialize())
collection_cls.return_value.get_objects.side_effect = [
{"more": True, "next": "p2", "objects": [page("198.51.100.20")]},
{"more": False, "objects": [page("198.51.100.21")]},
]
totals = pull_collection("https://taxii.example.org/api1/collections/x/",
"user", "secret", "taxii-demo")
self.assertEqual(totals, (2, 0, 0))
last_call = collection_cls.return_value.get_objects.call_args
self.assertEqual(last_call.kwargs["next"], "p2")
$ python manage.py test threatintel -v 2
...
test_misp_attribute_mapping (threatintel.tests.FeedTests.test_misp_attribute_mapping) ... ok
test_taxii_pull_follows_pages (threatintel.tests.FeedTests.test_taxii_pull_follows_pages) ... [taxii2client.v21] [WARNING ] [2026-12-05 17:32:28,595] TAXII Server Response with different amount of objects! Setting limit=1
ok
test_duplicates_collapse_to_strongest_claim (threatintel.tests.IngestTests.test_duplicates_collapse_to_strongest_claim) ... ok
test_revoked_indicators_are_skipped (threatintel.tests.IngestTests.test_revoked_indicators_are_skipped) ... ok
test_tlp_white_is_stored_as_clear (threatintel.tests.IngestTests.test_tlp_white_is_stored_as_clear) ... ok
test_false_positive_flag_suppresses (threatintel.tests.MatchTests.test_false_positive_flag_suppresses) ... ok
test_ip_confidence_decays (threatintel.tests.MatchTests.test_ip_confidence_decays) ... ok
test_match_alerts_once (threatintel.tests.MatchTests.test_match_alerts_once) ... ok
test_upload_hash_lookup (threatintel.tests.UploadTests.test_upload_hash_lookup) ... ok
----------------------------------------------------------------------
Ran 9 tests in 0.044s
OK
The warning comes from taxii2-client: the mock returned one object per page while 500 were requested, so the client lowered its page size. A real server that caps page size triggers the same message.
valid_until and revocation, and decay confidence by indicator type.ISSUBSET patterns using ipaddress, with a test that an address outside the range does not match.Found a mistake in this tutorial? Let us know and we will fix it.