You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add owner intelligence panel and reporting functionality
- Implemented the Owner Intelligence Panel in `gui_owner.py` for user interaction regarding PII lookups.
- Created reporting utilities in `report_owner.py` for exporting owner intelligence data in JSON and CSV formats, and generating PDF summaries.
- Introduced owner intelligence helpers in `owner/__init__.py`, including classification and interface definitions.
- Developed classification logic in `classify.py` to determine ownership types based on associations and PII.
- Established interfaces for owner intelligence in `interface.py`, defining data structures for owner associations, PII, and audit records.
- Implemented signal extraction and confidence scoring in `signals.py`, including functions to analyze evidence and score ownership confidence.
- Added a stub implementation of the Truecaller adapter in `truecaller_adapter.py` for future integration.
- Created unit tests in `test_owner.py` to validate classification, signal extraction, confidence scoring, and adapter behavior.
This tool parses and enriches phone numbers (offline via `phonenumbers`) and can run **pluggable, async** reputation checks (optional) to produce an **auditable** risk score and report.
4
+
`phoneint`parses and enriches phone numbers offline (via `phonenumbers`) and runs optional, pluggable async reputation checks to produce an auditable risk score and report. It is designed to be transparent, explainable, and safe-by-default.
5
5
6
6
## Disclaimer (Read First)
7
7
8
-
**This tool is for lawful, ethical OSINT research only.**
8
+
**This tool is for lawful, ethical OSINT research only.**
9
9
Do not use it to harass, stalk, dox, or violate privacy. Always comply with applicable laws and third-party Terms of Service.
10
10
11
+
## What This Tool Does (At a Glance)
12
+
13
+
- Normalizes numbers to E.164 and common formats
14
+
- Enriches with deterministic metadata (carrier when available, region, time zones, number type)
15
+
- Optionally queries public OSINT sources via adapters
16
+
- Produces explainable risk scoring and owner intelligence
17
+
- Exports JSON, CSV, and optional PDF reports
18
+
- Provides a CLI and a minimal non-blocking GUI
19
+
20
+
## How It Works
21
+
22
+
1.**Parse + Normalize**: `phonenumbers` parses the input to E.164 and standard formats.
23
+
2.**Deterministic Enrichment**: carrier, time zone, number type, and region are derived offline.
24
+
3.**Adapter Checks (Optional)**: adapters query public sources and return evidence items.
25
+
4.**Scoring**: risk score is calculated from explicit signals with a breakdown.
26
+
5.**Owner Intelligence (Optional)**: evidence is converted into associations and confidence scores.
27
+
6.**Reporting**: a full JSON report is built and can be exported to CSV/PDF.
28
+
11
29
## Features
12
30
13
31
- E.164 parsing + normalization (`phonenumbers`)
14
-
- Deterministic enrichment: carrier (if available), country/region, time zones, number type, ISO code
15
-
- Async adapters (`httpx`): DuckDuckGo Instant Answer (ToS-friendly), Google Custom Search (requires your key), public dataset checks
16
-
- Explainable risk scoring with configurable weights (YAML)
32
+
- Deterministic enrichment: carrier (when available), region/country name, time zones, number type, ISO code
33
+
- Async adapters (`httpx`): DuckDuckGo Instant Answer, Google Custom Search, public dataset checks
34
+
- Explainable risk scoring with configurable weights (YAML/JSON)
35
+
- Owner Intelligence with audit trail for PII-capable adapters
17
36
- Reports: JSON + CSV; optional PDF (extra dependency)
-**Evidence list**: populated as adapters complete.
108
+
-**Non-blocking**: UI remains responsive during async checks.
109
+
110
+
## Example Numbers
111
+
These example numbers are reserved test ranges, fictional examples, or public-format demonstrations intended for documentation and testing only. Do not use them to query private services or to target real individuals.
112
+
113
+
### 1. Reserved Test Numbers (RFC / NANP)
114
+
115
+
These numbers are explicitly reserved for testing and documentation and are never assigned to real users.
116
+
117
+
```text
118
+
+1 202-555-0100
119
+
+1 202-555-0101
120
+
+1 202-555-0147
121
+
+1 202-555-0199
122
+
```
123
+
124
+
Expected behavior (when running in example/test mode or when marked in harnesses):
125
+
126
+
-`number_classification`: `reserved_test_number`
127
+
-`example_mode`: `true`
128
+
-`risk_score`: `0`
129
+
- No live OSINT checks performed; adapters should be mocked or skipped.
130
+
131
+
### 2. Toll-Free Number Examples
132
+
133
+
Useful for testing toll-free detection, multi-timezone handling, and business vs scam ambiguity.
134
+
135
+
```text
136
+
+1 800-356-9377
137
+
+1 888-555-0000
138
+
+1 877-555-1212
139
+
```
140
+
141
+
Expected behavior:
142
+
143
+
-`line_type`: `toll_free`
144
+
- Timezone coverage may be broad or absent depending on enrichment metadata
145
+
- Neutral or low risk in example mode unless synthetic signals are injected
-`ENABLE_TRUECALLER` / `TRUECALLER_API_KEY`: required only for PII-capable Truecaller adapter
104
244
105
245
YAML config (recommended for score weights and non-secret defaults):
106
246
@@ -132,22 +272,84 @@ Or set `PHONEINT_CONFIG=config.yaml` in `.env`.
132
272
133
273
No private-service scraping is included or encouraged.
134
274
135
-
### Google Custom Search — costs & free alternatives
275
+
### Google Custom Search - Costs and Free Alternatives
276
+
277
+
Setting up a Google Programmable Search Engine (the Search Engine ID / `CX`) is free. The Google Custom Search API (`GCS_API_KEY`) provides a small free quota and then is billed per request (typically per 1,000 requests). Some accounts require billing to access even the free quota.
278
+
279
+
Free alternatives:
280
+
281
+
-`duckduckgo`: requires no API key
282
+
-`public`: checks bundled/public datasets
283
+
284
+
## Owner Intelligence (Ethical Use Only)
285
+
286
+
`phoneint` includes an Owner Intelligence layer that produces evidence-based owner-related intelligence while remaining privacy-preserving by default.
287
+
288
+
What it does:
289
+
290
+
- Infers a coarse `ownership_type` (`business` | `individual` | `voip` | `unknown`) using deterministic rules
291
+
- Extracts auditable signals and associations from public evidence
292
+
- Produces an explainable confidence score with a breakdown
293
+
294
+
What it does not do:
295
+
296
+
- It does not claim to identify a private individual by default
297
+
- It does not scrape private services or bypass authentication
298
+
299
+
### PII-Capable Adapters (Gated)
136
300
137
-
Setting up a Google Programmable Search Engine (the Search Engine ID / `CX`) is free — you get a CX at no cost. The Google Custom Search API (the API key used by this tool, `GCS_API_KEY`) is not completely free: Google provides a small free quota (varies by account/region) but after that the API is billed per-requests (typically per 1,000 requests). In some cases you may need to enable billing in Google Cloud to activate the API key even to access the free quota.
301
+
PII-capable adapters (e.g., Truecaller) are disabled by default and will only run when:
138
302
139
-
In short: you can get started for free, but heavy or programmatic use may incur small charges.
303
+
1. You provide official credentials via `.env` (never commit secrets)
304
+
2. You explicitly enable the adapter in config/environment
305
+
3. You explicitly confirm lawful purpose plus explicit consent (`--enable-pii` in CLI, checkbox in GUI)
306
+
4. An audit trail is recorded in the report (`owner_audit_trail`)
140
307
141
-
If you prefer fully free options, consider these alternatives:
308
+
Enable (example):
142
309
143
-
-`duckduckgo`: uses DuckDuckGo Instant Answer and requires no API key.
144
-
-`public`: checks bundled/public datasets (ships with `phoneint/data/scam_list.json`) and is free to use.
310
+
-`.env`: set `ENABLE_TRUECALLER=1`and `TRUECALLER_API_KEY=...`
311
+
-CLI: pass `--enable-pii` and `--legal-purpose "..."`
145
312
146
-
Quick recap:
313
+
### CLI Examples
147
314
148
-
-**CX (Search Engine ID)**: Free ✅
149
-
-**Custom Search API key usage**: Free tier then paid ⚠️
150
-
-**Free alternatives**: DuckDuckGo adapter, public datasets ✅
0 commit comments