data-breach-detector 0.2.2__tar.gz → 0.3.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data_breach_detector-0.3.1/.github/workflows/registry-publish.yml +52 -0
- data_breach_detector-0.3.1/.github/workflows/tests.yml +30 -0
- {data_breach_detector-0.2.2 → data_breach_detector-0.3.1}/PKG-INFO +24 -13
- {data_breach_detector-0.2.2 → data_breach_detector-0.3.1}/README.md +23 -12
- data_breach_detector-0.3.1/glama.json +4 -0
- {data_breach_detector-0.2.2 → data_breach_detector-0.3.1}/pyproject.toml +8 -1
- {data_breach_detector-0.2.2 → data_breach_detector-0.3.1}/server.json +2 -2
- {data_breach_detector-0.2.2 → data_breach_detector-0.3.1}/src/data_breach_detector/__init__.py +2 -1
- data_breach_detector-0.3.1/src/data_breach_detector/_version.py +16 -0
- {data_breach_detector-0.2.2 → data_breach_detector-0.3.1}/src/data_breach_detector/server.py +401 -60
- data_breach_detector-0.3.1/tests/test_offline.py +568 -0
- data_breach_detector-0.2.2/tests/test_offline.py +0 -216
- {data_breach_detector-0.2.2 → data_breach_detector-0.3.1}/.github/workflows/publish-pypi.yml +0 -0
- {data_breach_detector-0.2.2 → data_breach_detector-0.3.1}/.gitignore +0 -0
- {data_breach_detector-0.2.2 → data_breach_detector-0.3.1}/LICENSE +0 -0
- {data_breach_detector-0.2.2 → data_breach_detector-0.3.1}/src/data_breach_detector/__main__.py +0 -0
- {data_breach_detector-0.2.2 → data_breach_detector-0.3.1}/src/data_breach_detector/classifier.py +0 -0
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
name: Publish to MCP Registry
|
|
2
|
+
|
|
3
|
+
# The official MCP Registry authenticates this repo's identity through
|
|
4
|
+
# GitHub's OIDC token (mcp-publisher login github-oidc), so no secret is
|
|
5
|
+
# created, stored or pasted anywhere. Publishes whatever version the
|
|
6
|
+
# committed server.json carries. PulseMCP re-ingests the official registry
|
|
7
|
+
# weekly and Glama syncs connectors from it, so landing here propagates to
|
|
8
|
+
# those directories for free.
|
|
9
|
+
#
|
|
10
|
+
# The publisher binary is version-pinned and sha256-verified: this job
|
|
11
|
+
# holds an OIDC id-token, so executing an unpinned "latest" download here
|
|
12
|
+
# would hand namespace publish rights to whoever controls the next
|
|
13
|
+
# release. Bump the version and hash together, from
|
|
14
|
+
# registry_<ver>_checksums.txt on the release.
|
|
15
|
+
#
|
|
16
|
+
# Run it with: gh workflow run registry-publish.yml
|
|
17
|
+
|
|
18
|
+
on:
|
|
19
|
+
workflow_dispatch: {}
|
|
20
|
+
|
|
21
|
+
permissions:
|
|
22
|
+
contents: read
|
|
23
|
+
|
|
24
|
+
env:
|
|
25
|
+
MCP_PUBLISHER_VERSION: "1.8.0"
|
|
26
|
+
MCP_PUBLISHER_SHA256: "1370446bbe74d562608e8005a6ccce02d146a661fbd78674e11cc70b9618d6cf"
|
|
27
|
+
|
|
28
|
+
jobs:
|
|
29
|
+
mcp-registry:
|
|
30
|
+
runs-on: ubuntu-latest
|
|
31
|
+
permissions:
|
|
32
|
+
id-token: write
|
|
33
|
+
contents: read
|
|
34
|
+
steps:
|
|
35
|
+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
36
|
+
|
|
37
|
+
- name: Install mcp-publisher (pinned + checksum-verified)
|
|
38
|
+
run: |
|
|
39
|
+
# -f so an HTTP error is an HTTP error. Without it curl writes the
|
|
40
|
+
# error page to the file and the job fails at sha256sum instead,
|
|
41
|
+
# which reads like the release was tampered with rather than like
|
|
42
|
+
# the version or the URL is simply wrong.
|
|
43
|
+
curl -fsSLo mcp-publisher.tar.gz \
|
|
44
|
+
"https://github.com/modelcontextprotocol/registry/releases/download/v${MCP_PUBLISHER_VERSION}/mcp-publisher_linux_amd64.tar.gz"
|
|
45
|
+
echo "${MCP_PUBLISHER_SHA256} mcp-publisher.tar.gz" | sha256sum -c -
|
|
46
|
+
tar xzf mcp-publisher.tar.gz mcp-publisher
|
|
47
|
+
chmod +x mcp-publisher
|
|
48
|
+
|
|
49
|
+
- name: Authenticate by OIDC and publish
|
|
50
|
+
run: |
|
|
51
|
+
./mcp-publisher login github-oidc
|
|
52
|
+
./mcp-publisher publish
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
name: tests
|
|
2
|
+
|
|
3
|
+
# Nothing gated a merge before this: the only workflows in the repo published
|
|
4
|
+
# to PyPI and to the MCP registry, both tag or dispatch driven, so broken code
|
|
5
|
+
# reached the release path unopposed. This runs on every push and PR instead.
|
|
6
|
+
|
|
7
|
+
on:
|
|
8
|
+
push:
|
|
9
|
+
pull_request:
|
|
10
|
+
|
|
11
|
+
permissions:
|
|
12
|
+
contents: read
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
pytest:
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
strategy:
|
|
18
|
+
fail-fast: false
|
|
19
|
+
matrix:
|
|
20
|
+
# The floor from requires-python and the version the publish job builds
|
|
21
|
+
# with: the redaction and pagination code is version sensitive enough
|
|
22
|
+
# (datetime.fromisoformat gained ISO forms in 3.11) to test both ends.
|
|
23
|
+
python-version: ["3.10", "3.12"]
|
|
24
|
+
steps:
|
|
25
|
+
- uses: actions/checkout@v4
|
|
26
|
+
- uses: actions/setup-python@v5
|
|
27
|
+
with:
|
|
28
|
+
python-version: ${{ matrix.python-version }}
|
|
29
|
+
- run: python -m pip install --quiet -e . pytest
|
|
30
|
+
- run: python -m pytest -q
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: data-breach-detector
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.1
|
|
4
4
|
Summary: Read-only breach-intelligence MCP: reports THAT an organization was breached and which data types leaked, across full history from public feeds (HaveIBeenPwned, RansomLook, ransomwatch archive, SEC 8-K 1.05). Never the leaked data.
|
|
5
5
|
Project-URL: Homepage, https://github.com/beepboop2025/data-breach-detector
|
|
6
6
|
Project-URL: Repository, https://github.com/beepboop2025/data-breach-detector
|
|
@@ -54,10 +54,16 @@ This server takes a fourth position:
|
|
|
54
54
|
of 2013, an organization's full incident chronology, repeat-victim
|
|
55
55
|
flagging, per-year and per-actor aggregates.
|
|
56
56
|
3. **The ethical boundary is in the code, not the terms of service.** No
|
|
57
|
-
fetch/crawl/proxy primitives, no `.onion` access, and
|
|
58
|
-
|
|
59
|
-
from
|
|
60
|
-
|
|
57
|
+
fetch/crawl/proxy primitives, no `.onion` access, and every feed-authored
|
|
58
|
+
string is sanitized *where the record is built*, before any field is
|
|
59
|
+
assembled from it: emails, hashes, IPs, crypto addresses and
|
|
60
|
+
credential-shaped tokens are redacted, and the invisible channels used to
|
|
61
|
+
hide instructions from a human reader (Unicode Tags, zero-widths, bidi
|
|
62
|
+
overrides, variation selectors, terminal control codes) are stripped. That
|
|
63
|
+
matters because leak-site titles are written by ransomware crews and read
|
|
64
|
+
by agents: the same field is both intelligence and an injection surface.
|
|
65
|
+
Redacting only the two fields a human looks at is not enough, because ids,
|
|
66
|
+
actor names and statistic bucket keys are built from the same strings.
|
|
61
67
|
4. **Honesty is instrumented.** `feed_sources` reports each feed's newest
|
|
62
68
|
item, a staleness flag and the last fetch error — a dead upstream is a
|
|
63
69
|
served fact, not a silent hole. (The ransomwatch project itself froze in
|
|
@@ -69,9 +75,10 @@ This server takes a fourth position:
|
|
|
69
75
|
|
|
70
76
|
- No arbitrary URL fetch, no crawl, no proxy — no general scraping primitives.
|
|
71
77
|
- No `.onion` marketplace access, no transactions.
|
|
72
|
-
- Never returns the raw text of a dump, paste or leak.
|
|
73
|
-
|
|
74
|
-
|
|
78
|
+
- Never returns the raw text of a dump, paste or leak. Feed-authored strings are
|
|
79
|
+
redacted and stripped of hidden-instruction characters at the point each
|
|
80
|
+
record is constructed, so ids, actor names, entity names, dates, source URLs
|
|
81
|
+
and aggregation keys are built from sanitized values rather than raw ones.
|
|
75
82
|
|
|
76
83
|
## Sources (public, no key)
|
|
77
84
|
|
|
@@ -87,14 +94,18 @@ This server takes a fourth position:
|
|
|
87
94
|
|
|
88
95
|
| tool | what it returns |
|
|
89
96
|
|------|-----------------|
|
|
90
|
-
| `breach_news(since_days, sector, source, limit)` | recent disclosures — entity, date, scale, exposed data types, severity |
|
|
91
|
-
| `check_exposure(query)` | does a domain/company appear anywhere in breach data — yes/no + metadata |
|
|
92
|
-
| `breach_history(query, year_from, year_to, sector, data_type, min_accounts, order, limit)` | search the full archive back to 2007 |
|
|
93
|
-
| `breach_timeline(entity)` | one organization's incident-by-incident chronology + repeat-victim assessment |
|
|
94
|
-
| `breach_stats(group_by, sector)` | aggregates per year / source / data type / threat level / ransomware actor |
|
|
97
|
+
| `breach_news(since_days, sector, source, limit, offset)` | recent disclosures — entity, date, scale, exposed data types, severity |
|
|
98
|
+
| `check_exposure(query, since_days, limit, offset)` | does a domain/company appear anywhere in breach data — yes/no + metadata |
|
|
99
|
+
| `breach_history(query, year_from, year_to, sector, data_type, min_accounts, order, limit, offset)` | search the full archive back to 2007 |
|
|
100
|
+
| `breach_timeline(entity, limit, offset)` | one organization's incident-by-incident chronology + repeat-victim assessment |
|
|
101
|
+
| `breach_stats(group_by, sector, limit)` | aggregates per year / source / data type / threat level / ransomware actor |
|
|
95
102
|
| `assess_threat(text)` | classify a piece of security text — level, categories, action (no network) |
|
|
96
103
|
| `feed_sources()` | feeds, per-source freshness, staleness flags, last fetch errors |
|
|
97
104
|
|
|
105
|
+
Every list tool reports `count`, `limit`, `offset` and `returned`, and
|
|
106
|
+
`breach_stats` reports `buckets_total`, so a truncated answer is visible as
|
|
107
|
+
truncated and the tail is reachable by paging rather than lost.
|
|
108
|
+
|
|
98
109
|
## Run
|
|
99
110
|
|
|
100
111
|
```bash
|
|
@@ -36,10 +36,16 @@ This server takes a fourth position:
|
|
|
36
36
|
of 2013, an organization's full incident chronology, repeat-victim
|
|
37
37
|
flagging, per-year and per-actor aggregates.
|
|
38
38
|
3. **The ethical boundary is in the code, not the terms of service.** No
|
|
39
|
-
fetch/crawl/proxy primitives, no `.onion` access, and
|
|
40
|
-
|
|
41
|
-
from
|
|
42
|
-
|
|
39
|
+
fetch/crawl/proxy primitives, no `.onion` access, and every feed-authored
|
|
40
|
+
string is sanitized *where the record is built*, before any field is
|
|
41
|
+
assembled from it: emails, hashes, IPs, crypto addresses and
|
|
42
|
+
credential-shaped tokens are redacted, and the invisible channels used to
|
|
43
|
+
hide instructions from a human reader (Unicode Tags, zero-widths, bidi
|
|
44
|
+
overrides, variation selectors, terminal control codes) are stripped. That
|
|
45
|
+
matters because leak-site titles are written by ransomware crews and read
|
|
46
|
+
by agents: the same field is both intelligence and an injection surface.
|
|
47
|
+
Redacting only the two fields a human looks at is not enough, because ids,
|
|
48
|
+
actor names and statistic bucket keys are built from the same strings.
|
|
43
49
|
4. **Honesty is instrumented.** `feed_sources` reports each feed's newest
|
|
44
50
|
item, a staleness flag and the last fetch error — a dead upstream is a
|
|
45
51
|
served fact, not a silent hole. (The ransomwatch project itself froze in
|
|
@@ -51,9 +57,10 @@ This server takes a fourth position:
|
|
|
51
57
|
|
|
52
58
|
- No arbitrary URL fetch, no crawl, no proxy — no general scraping primitives.
|
|
53
59
|
- No `.onion` marketplace access, no transactions.
|
|
54
|
-
- Never returns the raw text of a dump, paste or leak.
|
|
55
|
-
|
|
56
|
-
|
|
60
|
+
- Never returns the raw text of a dump, paste or leak. Feed-authored strings are
|
|
61
|
+
redacted and stripped of hidden-instruction characters at the point each
|
|
62
|
+
record is constructed, so ids, actor names, entity names, dates, source URLs
|
|
63
|
+
and aggregation keys are built from sanitized values rather than raw ones.
|
|
57
64
|
|
|
58
65
|
## Sources (public, no key)
|
|
59
66
|
|
|
@@ -69,14 +76,18 @@ This server takes a fourth position:
|
|
|
69
76
|
|
|
70
77
|
| tool | what it returns |
|
|
71
78
|
|------|-----------------|
|
|
72
|
-
| `breach_news(since_days, sector, source, limit)` | recent disclosures — entity, date, scale, exposed data types, severity |
|
|
73
|
-
| `check_exposure(query)` | does a domain/company appear anywhere in breach data — yes/no + metadata |
|
|
74
|
-
| `breach_history(query, year_from, year_to, sector, data_type, min_accounts, order, limit)` | search the full archive back to 2007 |
|
|
75
|
-
| `breach_timeline(entity)` | one organization's incident-by-incident chronology + repeat-victim assessment |
|
|
76
|
-
| `breach_stats(group_by, sector)` | aggregates per year / source / data type / threat level / ransomware actor |
|
|
79
|
+
| `breach_news(since_days, sector, source, limit, offset)` | recent disclosures — entity, date, scale, exposed data types, severity |
|
|
80
|
+
| `check_exposure(query, since_days, limit, offset)` | does a domain/company appear anywhere in breach data — yes/no + metadata |
|
|
81
|
+
| `breach_history(query, year_from, year_to, sector, data_type, min_accounts, order, limit, offset)` | search the full archive back to 2007 |
|
|
82
|
+
| `breach_timeline(entity, limit, offset)` | one organization's incident-by-incident chronology + repeat-victim assessment |
|
|
83
|
+
| `breach_stats(group_by, sector, limit)` | aggregates per year / source / data type / threat level / ransomware actor |
|
|
77
84
|
| `assess_threat(text)` | classify a piece of security text — level, categories, action (no network) |
|
|
78
85
|
| `feed_sources()` | feeds, per-source freshness, staleness flags, last fetch errors |
|
|
79
86
|
|
|
87
|
+
Every list tool reports `count`, `limit`, `offset` and `returned`, and
|
|
88
|
+
`breach_stats` reports `buckets_total`, so a truncated answer is visible as
|
|
89
|
+
truncated and the tail is reachable by paging rather than lost.
|
|
90
|
+
|
|
80
91
|
## Run
|
|
81
92
|
|
|
82
93
|
```bash
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "data-breach-detector"
|
|
7
|
-
version = "0.
|
|
7
|
+
version = "0.3.1"
|
|
8
8
|
description = "Read-only breach-intelligence MCP: reports THAT an organization was breached and which data types leaked, across full history from public feeds (HaveIBeenPwned, RansomLook, ransomwatch archive, SEC 8-K 1.05). Never the leaked data."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.10"
|
|
@@ -30,3 +30,10 @@ data-breach-detector = "data_breach_detector.__main__:main"
|
|
|
30
30
|
|
|
31
31
|
[tool.hatch.build.targets.wheel]
|
|
32
32
|
packages = ["src/data_breach_detector"]
|
|
33
|
+
|
|
34
|
+
# Without this a plain "pytest -q" from the repo root dies at collection with
|
|
35
|
+
# ModuleNotFoundError, so the suite only ran for whoever remembered to export
|
|
36
|
+
# PYTHONPATH. A test nobody can run by accident is a test nobody runs.
|
|
37
|
+
[tool.pytest.ini_options]
|
|
38
|
+
pythonpath = ["src"]
|
|
39
|
+
testpaths = ["tests"]
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"name": "io.github.beepboop2025/data-breach-detector",
|
|
4
4
|
"title": "data-breach-detector",
|
|
5
5
|
"description": "Read-only breach intel, full history 2007-today: reports THAT an org was breached, never the data.",
|
|
6
|
-
"version": "0.
|
|
6
|
+
"version": "0.3.1",
|
|
7
7
|
"repository": {
|
|
8
8
|
"url": "https://github.com/beepboop2025/data-breach-detector",
|
|
9
9
|
"source": "github"
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
{
|
|
13
13
|
"registryType": "pypi",
|
|
14
14
|
"identifier": "data-breach-detector",
|
|
15
|
-
"version": "0.
|
|
15
|
+
"version": "0.3.1",
|
|
16
16
|
"transport": {
|
|
17
17
|
"type": "stdio"
|
|
18
18
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"""Single source of truth for the version this build reports.
|
|
2
|
+
|
|
3
|
+
server.py used to resolve its wire version from INSTALLED DIST METADATA. On a
|
|
4
|
+
box whose source tree is updated in place over a venv still holding the older
|
|
5
|
+
wheel, that reports the old version while running the new code, which is the
|
|
6
|
+
one situation where an operator most needs the number to be right. A literal
|
|
7
|
+
in the tree cannot drift from the tree.
|
|
8
|
+
|
|
9
|
+
Three consumers read it: __init__.__version__, the serverInfo version on the
|
|
10
|
+
wire, and the outbound User-Agent (which sat at a hand-written "0.2" through
|
|
11
|
+
two releases). pyproject.toml and server.json cannot import Python, so a test
|
|
12
|
+
asserts all of them agree rather than trusting the next bump to touch every
|
|
13
|
+
file.
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
SERVER_VERSION = "0.3.1"
|