validin-sdk 0.1.0__tar.gz → 0.2.0__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.
- validin_sdk-0.2.0/PKG-INFO +783 -0
- validin_sdk-0.2.0/README.md +769 -0
- {validin_sdk-0.1.0 → validin_sdk-0.2.0}/pyproject.toml +7 -4
- validin_sdk-0.2.0/setup.cfg +23 -0
- validin_sdk-0.2.0/setup.py +3 -0
- validin_sdk-0.2.0/src/validin/__init__.py +114 -0
- validin_sdk-0.2.0/src/validin/_clock.py +30 -0
- validin_sdk-0.2.0/src/validin/_dates.py +89 -0
- validin_sdk-0.2.0/src/validin/_inputs.py +32 -0
- validin_sdk-0.2.0/src/validin/_pacing.py +28 -0
- validin_sdk-0.2.0/src/validin/_record.py +33 -0
- {validin_sdk-0.1.0 → validin_sdk-0.2.0}/src/validin/annotation_record.py +11 -0
- validin_sdk-0.2.0/src/validin/bulk_api.py +54 -0
- {validin_sdk-0.1.0 → validin_sdk-0.2.0}/src/validin/certificate_record.py +5 -41
- validin_sdk-0.2.0/src/validin/cli/__init__.py +0 -0
- validin_sdk-0.2.0/src/validin/cli/commands/__init__.py +22 -0
- validin_sdk-0.2.0/src/validin/cli/commands/account.py +148 -0
- validin_sdk-0.2.0/src/validin/cli/commands/bulk.py +113 -0
- validin_sdk-0.2.0/src/validin/cli/commands/intel.py +329 -0
- validin_sdk-0.2.0/src/validin/cli/commands/lookups.py +174 -0
- validin_sdk-0.2.0/src/validin/cli/commands/opendirs.py +202 -0
- validin_sdk-0.2.0/src/validin/cli/commands/projects.py +590 -0
- validin_sdk-0.2.0/src/validin/cli/commands/scans.py +111 -0
- validin_sdk-0.2.0/src/validin/cli/commands/setup.py +39 -0
- validin_sdk-0.2.0/src/validin/cli/commands/submit.py +45 -0
- validin_sdk-0.2.0/src/validin/cli/commands/threats.py +132 -0
- validin_sdk-0.2.0/src/validin/cli/commands/yara.py +258 -0
- validin_sdk-0.2.0/src/validin/cli/completion.py +235 -0
- validin_sdk-0.2.0/src/validin/cli/config.py +86 -0
- validin_sdk-0.2.0/src/validin/cli/main.py +93 -0
- validin_sdk-0.2.0/src/validin/cli/onboarding.py +126 -0
- validin_sdk-0.2.0/src/validin/cli/render.py +262 -0
- validin_sdk-0.2.0/src/validin/cli/runner.py +459 -0
- validin_sdk-0.2.0/src/validin/cli/term.py +145 -0
- {validin_sdk-0.1.0 → validin_sdk-0.2.0}/src/validin/client.py +511 -517
- {validin_sdk-0.1.0 → validin_sdk-0.2.0}/src/validin/content.py +63 -14
- {validin_sdk-0.1.0 → validin_sdk-0.2.0}/src/validin/dns_record.py +9 -36
- {validin_sdk-0.1.0 → validin_sdk-0.2.0}/src/validin/enriched_indicator.py +46 -0
- validin_sdk-0.2.0/src/validin/errors.py +122 -0
- {validin_sdk-0.1.0 → validin_sdk-0.2.0}/src/validin/host_response_record.py +11 -52
- validin_sdk-0.2.0/src/validin/indicator.py +163 -0
- {validin_sdk-0.1.0 → validin_sdk-0.2.0}/src/validin/lookalike_record.py +31 -39
- validin_sdk-0.2.0/src/validin/open_directories_api.py +332 -0
- validin_sdk-0.2.0/src/validin/open_directory.py +450 -0
- validin_sdk-0.2.0/src/validin/osint_api.py +151 -0
- validin_sdk-0.2.0/src/validin/osint_record.py +87 -0
- validin_sdk-0.2.0/src/validin/pivot_record.py +119 -0
- validin_sdk-0.2.0/src/validin/pivots_api.py +178 -0
- validin_sdk-0.2.0/src/validin/project.py +232 -0
- validin_sdk-0.2.0/src/validin/projects_api.py +621 -0
- {validin_sdk-0.1.0 → validin_sdk-0.2.0}/src/validin/registration.py +102 -37
- {validin_sdk-0.1.0 → validin_sdk-0.2.0}/src/validin/registration_record.py +54 -37
- {validin_sdk-0.1.0 → validin_sdk-0.2.0}/src/validin/result_set.py +43 -0
- {validin_sdk-0.1.0 → validin_sdk-0.2.0}/src/validin/scan.py +11 -1
- {validin_sdk-0.1.0 → validin_sdk-0.2.0}/src/validin/scan_record.py +3 -4
- validin_sdk-0.2.0/src/validin/subdomain_record.py +49 -0
- validin_sdk-0.2.0/src/validin/threat_record.py +203 -0
- validin_sdk-0.2.0/src/validin/threats_api.py +83 -0
- {validin_sdk-0.1.0 → validin_sdk-0.2.0}/src/validin/yara_match_record.py +28 -52
- validin_sdk-0.2.0/src/validin_sdk.egg-info/PKG-INFO +783 -0
- validin_sdk-0.2.0/src/validin_sdk.egg-info/SOURCES.txt +65 -0
- validin_sdk-0.2.0/src/validin_sdk.egg-info/entry_points.txt +2 -0
- validin_sdk-0.2.0/src/validin_sdk.egg-info/requires.txt +1 -0
- validin_sdk-0.1.0/PKG-INFO +0 -516
- validin_sdk-0.1.0/README.md +0 -500
- validin_sdk-0.1.0/setup.cfg +0 -4
- validin_sdk-0.1.0/src/validin/__init__.py +0 -47
- validin_sdk-0.1.0/src/validin/errors.py +0 -15
- validin_sdk-0.1.0/src/validin/indicator.py +0 -115
- validin_sdk-0.1.0/src/validin_sdk.egg-info/PKG-INFO +0 -516
- validin_sdk-0.1.0/src/validin_sdk.egg-info/SOURCES.txt +0 -25
- validin_sdk-0.1.0/src/validin_sdk.egg-info/requires.txt +0 -4
- {validin_sdk-0.1.0 → validin_sdk-0.2.0}/LICENSE +0 -0
- {validin_sdk-0.1.0 → validin_sdk-0.2.0}/src/validin_sdk.egg-info/dependency_links.txt +0 -0
- {validin_sdk-0.1.0 → validin_sdk-0.2.0}/src/validin_sdk.egg-info/top_level.txt +0 -0
|
@@ -0,0 +1,783 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: validin-sdk
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: A lightweight Python SDK for the Validin API
|
|
5
|
+
Author-email: Elliot Roe <elliot@validin.com>, Sreekar Madabushi <sreekar@validin.com>
|
|
6
|
+
Classifier: Programming Language :: Python :: 3
|
|
7
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
8
|
+
Classifier: Operating System :: OS Independent
|
|
9
|
+
Requires-Python: >=3.9
|
|
10
|
+
Description-Content-Type: text/markdown
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Requires-Dist: requests>=2.31.0
|
|
13
|
+
Dynamic: license-file
|
|
14
|
+
|
|
15
|
+
# Validin Python SDK
|
|
16
|
+
|
|
17
|
+
A Python SDK for the Validin API, designed to enable large-scale monitoring and enrichment workflows.
|
|
18
|
+
|
|
19
|
+
## Requirements
|
|
20
|
+
|
|
21
|
+
- Python 3.9+
|
|
22
|
+
- A Validin API key
|
|
23
|
+
|
|
24
|
+
## Installation
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
pip install validin-sdk
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
```python
|
|
31
|
+
from validin import Client
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Configuration
|
|
35
|
+
|
|
36
|
+
The client requires an API key. The simplest approach is to set environment variables:
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
export VALIDIN_API_KEY="your-api-key"
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Enterprise users must also set their endpoint:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
export VALIDIN_BASE_URL="https://your-enterprise-endpoint.example.com"
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
You can also pass these directly to the client:
|
|
49
|
+
|
|
50
|
+
```python
|
|
51
|
+
from validin import Client
|
|
52
|
+
|
|
53
|
+
client = Client(api_key="your-api-key", base_url="https://your-enterprise-endpoint.example.com")
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
If `base_url` is not provided, the client defaults to `https://app.validin.com`.
|
|
57
|
+
|
|
58
|
+
## Data and Privacy
|
|
59
|
+
|
|
60
|
+
The SDK, the `validin` CLI and the agent skills talk to one server: the Validin API at
|
|
61
|
+
`https://app.validin.com`, or the endpoint set in `VALIDIN_BASE_URL` / `base_url`. Requests use
|
|
62
|
+
HTTPS. Nothing is sent anywhere else, and there is no telemetry or usage reporting.
|
|
63
|
+
|
|
64
|
+
**Sent to the Validin API**, only as part of the request you make:
|
|
65
|
+
|
|
66
|
+
- your API key, in the `Authorization: Bearer` header of every request
|
|
67
|
+
- the indicators and search terms you query: domains, IPs, CIDRs, hashes, free-text strings
|
|
68
|
+
and query expressions
|
|
69
|
+
- what you submit or change: domains sent for a live scan, project names, notes, tags and
|
|
70
|
+
indicators, and YARA rules
|
|
71
|
+
- the client's default `python-requests` User-Agent
|
|
72
|
+
|
|
73
|
+
A live scan asks Validin to fetch the domains you submit. The fetch comes from Validin's
|
|
74
|
+
infrastructure, not your machine. The SDK never contacts the hosts it looks up.
|
|
75
|
+
|
|
76
|
+
**Stored on your machine:**
|
|
77
|
+
|
|
78
|
+
- `validin setup` saves your API key and endpoint to `~/.validin/config.json`. The file is
|
|
79
|
+
readable only by you (mode `0600`) in a directory only you can open (`0700`). Setting
|
|
80
|
+
`VALIDIN_API_KEY` instead keeps the key out of that file.
|
|
81
|
+
- Shell completion, if you enable it, writes a completion script and adds one line to your
|
|
82
|
+
shell's rc file.
|
|
83
|
+
- `validin opendirs get --save` writes a captured file only where you tell it to. Treat those
|
|
84
|
+
files as potentially malicious.
|
|
85
|
+
|
|
86
|
+
How Validin handles the data it receives is covered by the Validin terms and privacy policy:
|
|
87
|
+
<https://validin.com/terms/>.
|
|
88
|
+
|
|
89
|
+
## Quick Start
|
|
90
|
+
|
|
91
|
+
Monitor a DNS TXT record query and add new results to a project:
|
|
92
|
+
|
|
93
|
+
```python
|
|
94
|
+
from validin import Client
|
|
95
|
+
|
|
96
|
+
client = Client()
|
|
97
|
+
|
|
98
|
+
results = client.extra_history("anthropic-domain-verification*", lookback=1)
|
|
99
|
+
client.add_to_project("YOUR_PROJECT_ID", results.values)
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
For more advanced workflows, see the [`examples/`](examples/) directory.
|
|
103
|
+
|
|
104
|
+
## Command-Line Tool
|
|
105
|
+
|
|
106
|
+
Installing the package also installs a `validin` command:
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
validin setup # save your API key
|
|
110
|
+
validin dns example.com
|
|
111
|
+
validin lookalikes acme.com -o list | validin reputation -
|
|
112
|
+
validin pivots example.com # where a value was seen on other hosts (links, certs, redirects...)
|
|
113
|
+
validin threat show sdbot # named threats, their indicators and reports
|
|
114
|
+
validin commands --json # every command, option and output field
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
### Shell completion
|
|
118
|
+
|
|
119
|
+
Tab-complete commands, subcommands, options and option values (`--mode`, `--tag`, `-o`, ...)
|
|
120
|
+
in bash, zsh and fish. `validin setup` offers to turn it on for the shell in `$SHELL`: it saves the
|
|
121
|
+
script (`~/.validin/completion.<shell>`, or fish's completions directory) and adds one `source`
|
|
122
|
+
line to `~/.bashrc` / `~/.zshrc`. Rerun `validin setup` to enable it later or refresh it.
|
|
123
|
+
|
|
124
|
+
Completions are computed by the installed `validin` itself, so they stay current after upgrades.
|
|
125
|
+
|
|
126
|
+
## AI Agent Skills
|
|
127
|
+
|
|
128
|
+
[`skills/`](skills/) teaches AI coding agents to hunt with the `validin` CLI. Each skill is a
|
|
129
|
+
self-contained `SKILL.md`:
|
|
130
|
+
|
|
131
|
+
| Skill | Covers |
|
|
132
|
+
|---|---|
|
|
133
|
+
| `validin-cli` | install, auth, output envelope, exit codes, piping, cost and safety rules |
|
|
134
|
+
| `validin-enrich` | reputation, verdicts and annotations (`reputation` / `enrich`), OSINT history and bulk context |
|
|
135
|
+
| `validin-dns` | passive DNS, extra records, PTR, TXT-token hunts, subdomains |
|
|
136
|
+
| `validin-web` | crawl history, fingerprint pivots (`crawl <hash>`, `pivots`), page content, certificates, live scans |
|
|
137
|
+
| `validin-registration` | WHOIS/RDAP history, live lookups, reverse search on registration fields |
|
|
138
|
+
| `validin-lookalikes` | typosquat and brand-abuse discovery and triage |
|
|
139
|
+
| `validin-opendirs` | open directories, file-hash hosting, safe sample download |
|
|
140
|
+
| `validin-projects` | projects, tags, alerts and YARA rules |
|
|
141
|
+
| `validin-threats` | named threat actors and malware families, their indicators and reports |
|
|
142
|
+
| `validin-investigate` | end-to-end investigation methodology and pivot playbooks |
|
|
143
|
+
|
|
144
|
+
**Claude Code** (this repo is a plugin marketplace):
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
claude plugin marketplace add Validin/validin-python-sdk
|
|
148
|
+
claude plugin install validin@validin
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
**Codex CLI** — Validin has not been published to the public OpenAI plugin directory.
|
|
152
|
+
To install all ten skills from this checkout, run these commands from the repository root
|
|
153
|
+
(tested with Codex CLI 0.173.0).
|
|
154
|
+
|
|
155
|
+
```bash
|
|
156
|
+
codex plugin marketplace add .
|
|
157
|
+
codex plugin add validin@validin
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
**Other agents** (Cursor, Windsurf, Cline, ...): the skills are plain Markdown. Point your
|
|
161
|
+
agent's rules file or `AGENTS.md` at `skills/<name>/SKILL.md`.
|
|
162
|
+
|
|
163
|
+
The skills need the CLI installed (`pip install validin-sdk==0.2.0`) and `VALIDIN_API_KEY` set in the
|
|
164
|
+
agent's environment.
|
|
165
|
+
|
|
166
|
+
## Core Concepts
|
|
167
|
+
|
|
168
|
+
### Indicators
|
|
169
|
+
|
|
170
|
+
An `Indicator` represents a queryable entity: a domain, IP address, hash, or raw string. The SDK automatically infers the type from a string, so you can pass raw strings directly to any client method:
|
|
171
|
+
|
|
172
|
+
```python
|
|
173
|
+
client.dns_history("example.com") # inferred as domain
|
|
174
|
+
client.dns_history("1.1.1.1") # inferred as IP
|
|
175
|
+
client.extra_history("some-txt-value*") # inferred as string (wildcard)
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
### ResultSet
|
|
179
|
+
|
|
180
|
+
A `ResultSet` is the container returned by every query method. It provides:
|
|
181
|
+
|
|
182
|
+
- **Iteration** — loop over individual records (`for record in results`)
|
|
183
|
+
- `.keys` — deduplicated list of `Indicator` objects from each record (the domains/IPs represented)
|
|
184
|
+
- `.keys_str` — string values of `.keys`
|
|
185
|
+
- `.values` — deduplicated list of record values
|
|
186
|
+
- `.to_rows()` — convert all records to a list of dictionaries
|
|
187
|
+
- `.aggregate()` — flatten nested bulk results into a single deduplicated ResultSet
|
|
188
|
+
|
|
189
|
+
### Records
|
|
190
|
+
|
|
191
|
+
Each query method returns a `ResultSet` containing typed record objects. Available record types:
|
|
192
|
+
|
|
193
|
+
- `DNSRecord`
|
|
194
|
+
- `CertificateRecord`
|
|
195
|
+
- `HostResponseRecord`
|
|
196
|
+
- `ScanRecord`
|
|
197
|
+
- `EnrichedIndicator` (from reputation lookups)
|
|
198
|
+
- `AnnotationRecord` (nested inside `EnrichedIndicator`)
|
|
199
|
+
- `LookalikeRecord`
|
|
200
|
+
- `RegistrationRecord`
|
|
201
|
+
- `YaraMatchRecord`
|
|
202
|
+
- `Content`
|
|
203
|
+
|
|
204
|
+
### Enriched Indicators
|
|
205
|
+
|
|
206
|
+
An `EnrichedIndicator` is a subclass of `Indicator` that carries reputation and annotation data directly on the indicator itself. You encounter enriched indicators in two places:
|
|
207
|
+
|
|
208
|
+
**1. Enrichment lookups** — `client.enrich()` returns a `ResultSet` where each record is an `EnrichedIndicator` with `score`, `verdict`, and `annotations`:
|
|
209
|
+
|
|
210
|
+
```python
|
|
211
|
+
results = client.enrich("example.com")
|
|
212
|
+
enriched = results[0]
|
|
213
|
+
|
|
214
|
+
print(enriched.value) # "example.com"
|
|
215
|
+
print(enriched.score) # 0
|
|
216
|
+
print(enriched.verdict) # "benign"
|
|
217
|
+
print(enriched.annotations) # tuple of AnnotationRecord objects
|
|
218
|
+
print(enriched.to_rows()) # annotations flattened to list of dicts
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
For bulk enrichment, use `.keys` to iterate the `EnrichedIndicator` objects:
|
|
222
|
+
|
|
223
|
+
```python
|
|
224
|
+
results = client.enrich(["example.com", "1.1.1.1", "google.com"])
|
|
225
|
+
for enriched in results.keys:
|
|
226
|
+
print(f"{enriched.value}: score={enriched.score}, verdict={enriched.verdict}")
|
|
227
|
+
print(enriched.to_rows())
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
**2. History queries with `annotate=True`** — When you pass `annotate=True` to `dns_history()`, `extra_history()`, `host_responses()`, or `registration_history()`, the `key` and `value` fields on returned records are upgraded from plain `Indicator` to `EnrichedIndicator` when the API provides intel data:
|
|
231
|
+
|
|
232
|
+
```python
|
|
233
|
+
results = client.dns_history("example.com", annotate=True)
|
|
234
|
+
for record in results:
|
|
235
|
+
if isinstance(record.value, EnrichedIndicator):
|
|
236
|
+
print(f"{record.value.value} has {len(record.value.annotations)} annotations")
|
|
237
|
+
print(record.value.informational)
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
Since `EnrichedIndicator` is a subclass of `Indicator`, enriched indicators work everywhere a plain indicator does — you can pass them directly to `add_to_project()`, use them as input to other queries, or access `.value` and `.type` as usual.
|
|
241
|
+
|
|
242
|
+
### Bulk Queries and Aggregation
|
|
243
|
+
|
|
244
|
+
Any method that supports bulk queries can also accept a list of indicators instead of a single value:
|
|
245
|
+
|
|
246
|
+
```python
|
|
247
|
+
results = client.enrich(["example.com", "1.1.1.1", "google.com"])
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
When you pass a list, the SDK:
|
|
251
|
+
|
|
252
|
+
- Rate-limits requests to 5 queries/second
|
|
253
|
+
- Retries transient failures (408, 429, 500, 502, 503, 504) with exponential backoff
|
|
254
|
+
- Keeps going when one indicator fails (not found, rejected, invalid) and records it in
|
|
255
|
+
`results.errors` as `{"indicator", "code", "status", "message"}`
|
|
256
|
+
- Stops and raises `ApiError` on 401 (bad key) and on 429 once retries run out, since every
|
|
257
|
+
remaining query would fail the same way
|
|
258
|
+
|
|
259
|
+
The returned `ResultSet` contains one child `ResultSet` per indicator. To flatten all results into a single deduplicated list, call `.aggregate()`:
|
|
260
|
+
|
|
261
|
+
```python
|
|
262
|
+
results = client.dns_history(["example.com", "google.com", "cloudflare.com"])
|
|
263
|
+
|
|
264
|
+
# Iterate per-indicator results
|
|
265
|
+
for child_result_set in results:
|
|
266
|
+
print(child_result_set.query_key, len(child_result_set))
|
|
267
|
+
|
|
268
|
+
# Or flatten into one deduplicated set
|
|
269
|
+
all_records = results.aggregate()
|
|
270
|
+
print(all_records.to_rows())
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
## Available Methods
|
|
274
|
+
|
|
275
|
+
### `client.dns_history(indicator)`
|
|
276
|
+
|
|
277
|
+
DNS record history for a domain, IP, or string.
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
| Indicator Type | API Route |
|
|
281
|
+
| -------------- | -------------------------------------- |
|
|
282
|
+
| Domain | `/api/axon/domain/dns/history/:domain` |
|
|
283
|
+
| IP | `/api/axon/ip/dns/history/:ip` |
|
|
284
|
+
| String | `/api/axon/string/dns/history` |
|
|
285
|
+
|
|
286
|
+
|
|
287
|
+
Supports bulk queries. Options: `limit`, `first_seen`, `last_seen`, `lookback`, `annotate`, `wildcard`, `categories_include`, `exclude_nx`.
|
|
288
|
+
|
|
289
|
+
---
|
|
290
|
+
|
|
291
|
+
### `client.extra_history(indicator)`
|
|
292
|
+
|
|
293
|
+
Extended DNS record history (TXT, SPF, etc.) for a domain, IP, or string.
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
| Indicator Type | API Route |
|
|
297
|
+
| -------------- | ------------------------------------ |
|
|
298
|
+
| Domain | `/api/axon/domain/dns/extra/:domain` |
|
|
299
|
+
| IP | `/api/axon/ip/dns/extra/:ip` |
|
|
300
|
+
| String | `/api/axon/string/dns/extra2` |
|
|
301
|
+
|
|
302
|
+
|
|
303
|
+
Supports bulk queries. Options: `limit`, `first_seen`, `last_seen`, `lookback`, `annotate`, `wildcard`, `categories_include`, `exclude_nx`.
|
|
304
|
+
|
|
305
|
+
---
|
|
306
|
+
|
|
307
|
+
### `client.host_responses(indicator)`
|
|
308
|
+
|
|
309
|
+
HTTP crawl/response history for a domain, IP, CIDR, or hash. For free-text searches
|
|
310
|
+
of titles, banners, or other response fields, use `client.pivots()` instead.
|
|
311
|
+
|
|
312
|
+
|
|
313
|
+
| Indicator Type | API Route |
|
|
314
|
+
| -------------- | ---------------------------------------- |
|
|
315
|
+
| Domain | `/api/axon/domain/crawl/history/:domain` |
|
|
316
|
+
| IP | `/api/axon/ip/crawl/history/:ip` |
|
|
317
|
+
| Hash | `/api/axon/hash/crawl/history/:hash` |
|
|
318
|
+
| CIDR | `/api/axon/ip/crawl/history/:ip/:cidr` |
|
|
319
|
+
|
|
320
|
+
|
|
321
|
+
Supports bulk queries. Options: `limit`, `lookback`, `annotate`.
|
|
322
|
+
|
|
323
|
+
---
|
|
324
|
+
|
|
325
|
+
### `client.enrich(indicator)`
|
|
326
|
+
|
|
327
|
+
Enrich a domain or IP with reputation score, verdict, and annotations. Returns a `ResultSet` of `EnrichedIndicator` objects (one per queried indicator), each carrying `score`, `verdict`, `annotations`, and `informational` fields.
|
|
328
|
+
|
|
329
|
+
Also available as `client.reputation()` (alias).
|
|
330
|
+
|
|
331
|
+
|
|
332
|
+
| Indicator Type | API Route |
|
|
333
|
+
| -------------- | ------------------------------------------- |
|
|
334
|
+
| Domain | `/api/axon/domain/reputation/quick/:domain` |
|
|
335
|
+
| IP | `/api/axon/ip/reputation/quick/:ip` |
|
|
336
|
+
|
|
337
|
+
|
|
338
|
+
Supports bulk queries. No additional options.
|
|
339
|
+
|
|
340
|
+
---
|
|
341
|
+
|
|
342
|
+
### `client.lookalikes(target)`
|
|
343
|
+
|
|
344
|
+
Find newly registered lookalike domains matching a domain or regex pattern.
|
|
345
|
+
|
|
346
|
+
|
|
347
|
+
| Target Type | API Route |
|
|
348
|
+
| ----------- | ------------------------------- |
|
|
349
|
+
| Domain | `/api/lookalike/domain/:domain` |
|
|
350
|
+
| Regex | `/api/lookalike/regex` |
|
|
351
|
+
|
|
352
|
+
|
|
353
|
+
Does not support bulk queries. Options: `exclude`, `limit` (1–250), `lookback` (1–90 days), `depth` (`labels`, `subdomains`, `fqdns`), `similarity` (0–4, domain targets only).
|
|
354
|
+
|
|
355
|
+
Regex targets can be passed as a compiled `re.Pattern` or a slash-delimited string:
|
|
356
|
+
|
|
357
|
+
```python
|
|
358
|
+
client.lookalikes("/^(t-mobile|att|verizon)\.([a-z]{5,6})\.(icu|cc)$/")
|
|
359
|
+
```
|
|
360
|
+
|
|
361
|
+
---
|
|
362
|
+
|
|
363
|
+
### `client.certificates(indicator)`
|
|
364
|
+
|
|
365
|
+
Historic certificate transparency matches for a domain.
|
|
366
|
+
|
|
367
|
+
|
|
368
|
+
| Indicator Type | API Route |
|
|
369
|
+
| -------------- | -------------------------------------- |
|
|
370
|
+
| Domain | `/api/axon/domain/certificates/:domain` |
|
|
371
|
+
|
|
372
|
+
|
|
373
|
+
Supports bulk queries. Options: `wildcard`, `limit` (1–20000), `first_seen`, `last_seen`, `lookback`, `time_format` (`unix` or `iso`).
|
|
374
|
+
|
|
375
|
+
---
|
|
376
|
+
|
|
377
|
+
### `client.ptr_history(indicator)`
|
|
378
|
+
|
|
379
|
+
Historic PTR/hostname records for a domain or IP.
|
|
380
|
+
|
|
381
|
+
|
|
382
|
+
| Indicator Type | API Route |
|
|
383
|
+
| -------------- | -------------------------------------- |
|
|
384
|
+
| Domain | `/api/axon/domain/dns/hostname/:domain` |
|
|
385
|
+
| IP | `/api/axon/ip/dns/hostname/:ip` |
|
|
386
|
+
|
|
387
|
+
|
|
388
|
+
Supports bulk queries. Options: `limit`, `first_seen`, `last_seen`, `lookback`, `annotate`, `time_format` (`unix` or `iso`), and `wildcard` for domain queries only.
|
|
389
|
+
|
|
390
|
+
---
|
|
391
|
+
|
|
392
|
+
### `client.start_scan(find)`
|
|
393
|
+
|
|
394
|
+
Start an enterprise live HTTP/S scan and return a `ScanJob`.
|
|
395
|
+
|
|
396
|
+
|
|
397
|
+
| API Route |
|
|
398
|
+
| ----------------------------- |
|
|
399
|
+
| `/api/axon/live/scan/start` |
|
|
400
|
+
|
|
401
|
+
|
|
402
|
+
Does not support bulk queries. Options: `countries`, `refer`, `user_agent`.
|
|
403
|
+
|
|
404
|
+
---
|
|
405
|
+
|
|
406
|
+
### `client.get_scan(scan_id)`
|
|
407
|
+
|
|
408
|
+
Fetch live scan status and return a `ScanJob`.
|
|
409
|
+
|
|
410
|
+
|
|
411
|
+
| API Route |
|
|
412
|
+
| ------------------------------------------ |
|
|
413
|
+
| `/api/axon/live/scan/results/:scan_id` |
|
|
414
|
+
|
|
415
|
+
|
|
416
|
+
Does not support bulk queries.
|
|
417
|
+
|
|
418
|
+
---
|
|
419
|
+
|
|
420
|
+
### `client.scan(find)`
|
|
421
|
+
|
|
422
|
+
Convenience wrapper around `start_scan()`. By default it waits for completion and returns a `ResultSet` of `ScanRecord` objects. Pass `wait=False` to get a `ScanJob` immediately.
|
|
423
|
+
|
|
424
|
+
|
|
425
|
+
| API Route |
|
|
426
|
+
| ----------------------------------------------------- |
|
|
427
|
+
| `/api/axon/live/scan/start` -> poll results -> crawl |
|
|
428
|
+
|
|
429
|
+
|
|
430
|
+
Options: `countries`, `refer`, `user_agent`, `wait`, `poll_interval`, `timeout`.
|
|
431
|
+
|
|
432
|
+
---
|
|
433
|
+
|
|
434
|
+
### `client.registration_history(indicator)`
|
|
435
|
+
|
|
436
|
+
WHOIS/RDAP registration history for a domain or string.
|
|
437
|
+
|
|
438
|
+
|
|
439
|
+
| Indicator Type | API Route |
|
|
440
|
+
| -------------- | ----------------------------------------------- |
|
|
441
|
+
| Domain | `/api/axon/domain/registration/history/:domain` |
|
|
442
|
+
| String | `/api/axon/string/registration/history2` |
|
|
443
|
+
|
|
444
|
+
|
|
445
|
+
Supports bulk queries. Options: `limit`, `first_seen`, `last_seen`, `lookback`, `annotate`, `wildcard`, `include_fields`.
|
|
446
|
+
|
|
447
|
+
`field="REGISTRANT_EMAIL"` (or any name in `validin.REGISTRATION_FIELDS`) searches that one field as
|
|
448
|
+
text via `/api/axon/string/registration/history2/:FIELD`, and the result keys are the matching domains.
|
|
449
|
+
Values are sent as typed, even ones that look like domains. An unknown field name gives a warning
|
|
450
|
+
(the API answers it with no records).
|
|
451
|
+
|
|
452
|
+
---
|
|
453
|
+
|
|
454
|
+
### `client.yara_matches(project_id, rule_id)`
|
|
455
|
+
|
|
456
|
+
Fetch YARA rule match results from a project. Auto-paginates all results by default.
|
|
457
|
+
|
|
458
|
+
|
|
459
|
+
| API Route |
|
|
460
|
+
| ------------------------------------------------------ |
|
|
461
|
+
| `/api/project/:project_id/yara/rules/:rule_id/matches` |
|
|
462
|
+
|
|
463
|
+
|
|
464
|
+
Does not support bulk queries. Options: `page`, `page_size` (provide both for manual pagination), `include_html`, `first_seen`, `last_seen`.
|
|
465
|
+
|
|
466
|
+
---
|
|
467
|
+
|
|
468
|
+
### `client.fetch_content(indicator)`
|
|
469
|
+
|
|
470
|
+
Fetch stored HTML content by body hash.
|
|
471
|
+
|
|
472
|
+
|
|
473
|
+
| API Route |
|
|
474
|
+
| ---------------------------------------- |
|
|
475
|
+
| `/api/axon/hash/content/html/sha1/:hash` |
|
|
476
|
+
|
|
477
|
+
|
|
478
|
+
Supports bulk queries. Accepts a hash string, `Indicator`, or `HostResponse` object with a `body_hash`.
|
|
479
|
+
|
|
480
|
+
---
|
|
481
|
+
|
|
482
|
+
### `client.pivots(indicator, category=None)`
|
|
483
|
+
|
|
484
|
+
Where a value was seen on other hosts: the IPs (`relation="ip"`) and hosts (`relation="host"`) whose
|
|
485
|
+
crawled responses contained it, as `PivotRecord` objects. `category` says where it was seen:
|
|
486
|
+
|
|
487
|
+
- **Domain:** pages linking to it (`ANCHORS_LINKS`, `JS_LINKS`...), certificates naming it (`CERT_DOMAIN`),
|
|
488
|
+
redirects to it (`LOCATION_DOMAIN`).
|
|
489
|
+
- **Hash:** hosts that served it (`BODY_SHA1`, `HEADER_HASH`...).
|
|
490
|
+
- **String:** hosts whose server banner, title or certificate fields contain it.
|
|
491
|
+
- **IP or CIDR:** hosts that redirect to it (`LOCATION_IP4`, from the `Location:` header). IPs also get
|
|
492
|
+
rows for what the IP's own responses contained (`relation="observed_on"`: server banner, title,
|
|
493
|
+
hashes...), which you can pivot on next.
|
|
494
|
+
|
|
495
|
+
Feed a row's `value` back in to pivot again.
|
|
496
|
+
|
|
497
|
+
|
|
498
|
+
| Indicator Type | API Route |
|
|
499
|
+
| -------------- | ------------------------------------------------------------------- |
|
|
500
|
+
| Domain | `/api/axon/domain/pivots/:domain[/:category]` |
|
|
501
|
+
| IP | `/api/axon/ip/pivots/:ip`, or `/api/axon/ip/pivots2/:ip/:category` |
|
|
502
|
+
| CIDR | `/api/axon/ip/pivots/:cidr` (no category) |
|
|
503
|
+
| Hash | `/api/axon/hash/pivots/:hash[/:category]` |
|
|
504
|
+
| String | `/api/axon/string/pivots2[/:category]` |
|
|
505
|
+
|
|
506
|
+
|
|
507
|
+
Supports bulk queries. Options: `category`, `limit`, `first_seen`, `last_seen`, `lookback`, `annotate`,
|
|
508
|
+
`wildcard`. Categories are case-insensitive and accept the `HOST-X` / `X-IP` forms. Known names per
|
|
509
|
+
type are in `validin.PIVOT_CATEGORIES`. An IP takes only `LOCATION_IP4` (redirects to it). An unknown category returns
|
|
510
|
+
no records rather than an error. 32/40/64-hex strings are treated as hashes.
|
|
511
|
+
|
|
512
|
+
---
|
|
513
|
+
|
|
514
|
+
### `client.osint_history(indicator)` / `client.osint_context(indicators)`
|
|
515
|
+
|
|
516
|
+
`osint_history` returns the open-source lists and feeds (block lists, popularity rankings, cloud
|
|
517
|
+
ranges...) that included a domain, IP or CIDR, as `OsintRecord` objects with `source`, `url`, `tags`
|
|
518
|
+
and first/last seen. Public suffixes such as `co.uk` are refused by the API (`ApiError`, code
|
|
519
|
+
`bad_request`). Supports bulk queries. Options: `limit`, `first_seen`, `last_seen`, `lookback`,
|
|
520
|
+
`wildcard`.
|
|
521
|
+
|
|
522
|
+
`osint_context` returns reputation annotations for many domains and IPs in one POST per 1,000, as
|
|
523
|
+
`EnrichedIndicator` objects with `annotations` and `reasons`. Unlike `enrich()`, it gives no overall
|
|
524
|
+
`score` or `verdict`.
|
|
525
|
+
|
|
526
|
+
|
|
527
|
+
| Method | API Route |
|
|
528
|
+
| --------------- | -------------------------------------------------------------------- |
|
|
529
|
+
| `osint_history` | `/api/axon/domain/osint/history/:domain`, `/api/axon/ip/osint/history/:ip` |
|
|
530
|
+
| `osint_context` | `POST /api/axon/bulk/osint/context` |
|
|
531
|
+
|
|
532
|
+
---
|
|
533
|
+
|
|
534
|
+
### Threat groups
|
|
535
|
+
|
|
536
|
+
Named threats (actors, groups and malware families). These need the bulk or projects role.
|
|
537
|
+
|
|
538
|
+
|
|
539
|
+
| Method | API Route |
|
|
540
|
+
| ------------------------------------ | ------------------------------------------- |
|
|
541
|
+
| `threat_names(category=None)` | `/api/threat/names` |
|
|
542
|
+
| `threat_group(threat_key)` | `/api/threat/group/:threat_key/summary` |
|
|
543
|
+
| `threat_group_indicators(threat_key)`| `/api/threat/group/:threat_key/indicators` |
|
|
544
|
+
| `threat_group_reports(threat_key)` | `/api/threat/group/:threat_key/reports` |
|
|
545
|
+
|
|
546
|
+
|
|
547
|
+
`threat_names` returns `ThreatGroup` objects (category, aliases, indicator counts). `category` filters
|
|
548
|
+
to `malicious`, `malware` or `suspicious`. `threat_group` adds the name, MITRE techniques and
|
|
549
|
+
`activity` (indicators reported per period). Indicators are `ThreatIndicator` objects whose `key` is
|
|
550
|
+
a typed `Indicator`, and reports are `ThreatReport` objects (`url`, `date`, `source`). The indicator
|
|
551
|
+
and report methods take a list of keys for bulk lookups. An unknown key raises `ApiError` with code
|
|
552
|
+
`not_found`.
|
|
553
|
+
|
|
554
|
+
---
|
|
555
|
+
|
|
556
|
+
### `client.submit_domains(domains)`
|
|
557
|
+
|
|
558
|
+
Submit domains for Validin to start scanning. This can't be undone. Duplicates are dropped, and values
|
|
559
|
+
that aren't domains are returned in `invalid` without being sent. The rest go 10,000 per request.
|
|
560
|
+
Returns `{"requested", "valid", "accepted", "requests", "invalid"}`, where `accepted` is what the API
|
|
561
|
+
took. Needs full API access.
|
|
562
|
+
|
|
563
|
+
|
|
564
|
+
| API Route |
|
|
565
|
+
| ------------------------------------ |
|
|
566
|
+
| `POST /api/axon/submissions/domains` |
|
|
567
|
+
|
|
568
|
+
---
|
|
569
|
+
|
|
570
|
+
### `client.add_to_project(project_id, indicators)`
|
|
571
|
+
|
|
572
|
+
Add indicators to a Validin project.
|
|
573
|
+
|
|
574
|
+
|
|
575
|
+
| API Route |
|
|
576
|
+
| ----------------------------------------- |
|
|
577
|
+
| `/api/project/:project_id/indicators/add` |
|
|
578
|
+
|
|
579
|
+
|
|
580
|
+
Accepts a single indicator or a list. Options: `note`, `tags`.
|
|
581
|
+
|
|
582
|
+
## Examples
|
|
583
|
+
|
|
584
|
+
Example scripts are in the `examples/` directory:
|
|
585
|
+
|
|
586
|
+
- `**lookalike_monitor.py**` — Regex lookalike search for telecom smishing domains, filter by registrar, add to project.
|
|
587
|
+
- `**dns_txt_record_monitor.py**` — Monitor a DNS TXT record wildcard query and add results to a project.
|
|
588
|
+
- `**bulk_indicator_enrichment.py**` — Bulk enrichment lookup across multiple indicators.
|
|
589
|
+
- `**ingest_yara_matches.py**` — Fetch all YARA rule matches for a project and print aggregated results.
|
|
590
|
+
- `**sample_host_responses.py**` — Bulk host response history with HTML content download.
|
|
591
|
+
|
|
592
|
+
## Error Handling
|
|
593
|
+
|
|
594
|
+
The SDK raises `ApiError` for HTTP failures and `ValidinError` as a base exception class:
|
|
595
|
+
|
|
596
|
+
```python
|
|
597
|
+
from validin import Client
|
|
598
|
+
from validin_sdk.errors import ApiError, ValidinError
|
|
599
|
+
|
|
600
|
+
client = Client()
|
|
601
|
+
|
|
602
|
+
try:
|
|
603
|
+
results = client.dns_history("example.com")
|
|
604
|
+
except ApiError as e:
|
|
605
|
+
print(f"HTTP {e.status_code}: {e.message}")
|
|
606
|
+
except ValidinError as e:
|
|
607
|
+
print(f"SDK error: {e}")
|
|
608
|
+
```
|
|
609
|
+
|
|
610
|
+
## API Coverage
|
|
611
|
+
|
|
612
|
+
The SDK currently covers **89 of 100** API endpoints.
|
|
613
|
+
|
|
614
|
+
| Status | Method | Endpoint | Summary | SDK Method |
|
|
615
|
+
|:------:|:------:|----------|---------|------------|
|
|
616
|
+
| | | **Bulk** | | |
|
|
617
|
+
| ✅ | POST | `/api/axon/bulk/osint/context` | Bulk OSINT Context | `osint_context()` |
|
|
618
|
+
| | | **Domain** | | |
|
|
619
|
+
| ✅ | GET | `/api/axon/domain/certificates/{domain}` | Domain Certificates | `certificates()` |
|
|
620
|
+
| ✅ | GET | `/api/axon/domain/crawl/history/{domain}` | Domain Crawl History | `host_responses()` |
|
|
621
|
+
| ✅ | GET | `/api/axon/domain/dns/extra/{domain}` | Domain DNS Extra | `extra_history()` |
|
|
622
|
+
| ✅ | GET | `/api/axon/domain/dns/history/{domain}` | Domain DNS History | `dns_history()` |
|
|
623
|
+
| ❌ | GET | `/api/axon/domain/dns/history/{domain}/A` | Domain DNS History - A | |
|
|
624
|
+
| ❌ | GET | `/api/axon/domain/dns/history/{domain}/AAAA` | Domain DNS History - AAAA | |
|
|
625
|
+
| ❌ | GET | `/api/axon/domain/dns/history/{domain}/NS` | Domain DNS History - NS | |
|
|
626
|
+
| ❌ | GET | `/api/axon/domain/dns/history/{domain}/NS_FOR` | Domain DNS History - NS_FOR | |
|
|
627
|
+
| ✅ | GET | `/api/axon/domain/dns/hostname/{domain}` | Domain DNS Hostname | `ptr_history()` |
|
|
628
|
+
| ✅ | GET | `/api/axon/domain/osint/history/{domain}` | Domain OSINT History | `osint_history()` |
|
|
629
|
+
| ✅ | GET | `/api/axon/domain/pivots/{domain}` | Domain Pivots | `pivots()` |
|
|
630
|
+
| ✅ | GET | `/api/axon/domain/pivots/{domain}/{category}` | Domain Pivots - Category | `pivots(category=...)` |
|
|
631
|
+
| ✅ | GET | `/api/axon/domain/registration/history/{domain}` | Domain Registration History | `registration_history()` |
|
|
632
|
+
| ✅ | GET | `/api/axon/domain/registration/live/{domain}` | Domain Registration Live | `live_registration()` |
|
|
633
|
+
| ✅ | GET | `/api/axon/domain/reputation/quick/{domain}` | Domain Reputation Quick | `enrich()` |
|
|
634
|
+
| ✅ | GET | `/api/axon/domain/subdomains/{domain}` | Domain Subdomains | `subdomains()` |
|
|
635
|
+
| ✅ | GET | `/api/lookalike/domain/{domain}` | Lookalike Domain | `lookalikes()` |
|
|
636
|
+
| ✅ | GET | `/api/lookalike/regex` | Lookalike Regex | `lookalikes()` |
|
|
637
|
+
| ❌ | GET | `/api/v2/domain/combined/connections/{domain}` | V2 Domain Combined Connections | |
|
|
638
|
+
| | | **Hash** | | |
|
|
639
|
+
| ✅ | GET | `/api/axon/hash/content/certificate/sha1/{hash}` | Hash Content Certificate (SHA1) | `fetch_content(kind="cert")` |
|
|
640
|
+
| ✅ | GET | `/api/axon/hash/content/favicon/md5/{hash}` | Hash Content Favicon (MD5) | `fetch_content(kind="favicon")` |
|
|
641
|
+
| ✅ | GET | `/api/axon/hash/content/html/sha1/{hash}` | Hash Content HTML (SHA1) | `fetch_content()` |
|
|
642
|
+
| ✅ | GET | `/api/axon/hash/crawl/history/{hash}` | Hash Crawl History | `host_responses()` |
|
|
643
|
+
| ✅ | GET | `/api/axon/hash/pivots/{hash}` | Hash Pivots | `pivots()` |
|
|
644
|
+
| ✅ | GET | `/api/axon/hash/pivots/{hash}/{category}` | Hash Pivots - Category | `pivots(category=...)` |
|
|
645
|
+
| | | **IP** | | |
|
|
646
|
+
| ✅ | GET | `/api/axon/ip/crawl/history/{ip}` | IP Crawl History | `host_responses()` |
|
|
647
|
+
| ✅ | GET | `/api/axon/ip/crawl/history/{ip}/{cidr}` | IP Crawl History - (CIDR) | `host_responses()` |
|
|
648
|
+
| ✅ | GET | `/api/axon/ip/dns/extra/{ip}` | IP DNS Extra | `extra_history()` |
|
|
649
|
+
| ✅ | GET | `/api/axon/ip/dns/extra/{ip}/{cidr}` | IP DNS Extra - (CIDR) | `extra_history()` |
|
|
650
|
+
| ✅ | GET | `/api/axon/ip/dns/history/{ip}` | IP DNS History | `dns_history()` |
|
|
651
|
+
| ✅ | GET | `/api/axon/ip/dns/history/{ip}/{cidr}` | IP DNS History - (CIDR) | `dns_history()` |
|
|
652
|
+
| ✅ | GET | `/api/axon/ip/dns/hostname/{ip}` | IP DNS Hostname | `ptr_history()` |
|
|
653
|
+
| ✅ | GET | `/api/axon/ip/dns/hostname/{ip}/{cidr}` | IP DNS Hostname - (CIDR) | `ptr_history()` |
|
|
654
|
+
| ✅ | GET | `/api/axon/ip/osint/history/{ip}` | IP OSINT History | `osint_history()` |
|
|
655
|
+
| ✅ | GET | `/api/axon/ip/osint/history/{ip}/{cidr}` | IP OSINT History - (CIDR) | `osint_history()` |
|
|
656
|
+
| ✅ | GET | `/api/axon/ip/pivots/{ip}` | IP Pivots | `pivots()` |
|
|
657
|
+
| ✅ | GET | `/api/axon/ip/pivots/{ip}/{cidr}` | IP Pivots - (CIDR) | `pivots()` |
|
|
658
|
+
| ✅ | GET | `/api/axon/ip/pivots2/{ip}/{category}` | IP Pivots - Category | `pivots(category=...)` |
|
|
659
|
+
| ✅ | GET | `/api/axon/ip/registration/live/{ip}` | IP Registration Live | `live_registration()` |
|
|
660
|
+
| ✅ | GET | `/api/axon/ip/registration/live/{ip}/{cidr}` | CIDR Registration Live | `live_registration()` |
|
|
661
|
+
| ✅ | GET | `/api/axon/ip/reputation/quick/{ip}` | IP Reputation Quick | `enrich()` |
|
|
662
|
+
| | | **Open Directories** (beta) | | |
|
|
663
|
+
| ✅ | GET | `/api/axon/domain/opendirs/{domain}` | Open Directories - Domain | `open_directories()` |
|
|
664
|
+
| ✅ | GET | `/api/axon/ip/opendirs/{ip}` | Open Directories - IP | `open_directories()` |
|
|
665
|
+
| ✅ | GET | `/api/axon/ip/opendirs/{ip}/{cidr}` | Open Directories - CIDR | `open_directories()` |
|
|
666
|
+
| ✅ | GET | `/api/axon/opendirs/url` | Open Directories - URL | `open_directories_by_url()` |
|
|
667
|
+
| ✅ | GET | `/api/axon/opendirs/query` | Open Directories - Query | `query_open_directories()` |
|
|
668
|
+
| ✅ | GET | `/api/axon/opendirs/file/hash/{hash}` | Open Directories - File Hash | `open_directory_files_by_hash()` |
|
|
669
|
+
| ✅ | GET | `/api/axon/opendirs/file/hash/{hash}/content` | Open Directories - File Content by Hash | `open_directory_file_content()` |
|
|
670
|
+
| ✅ | GET | `/api/axon/opendirs/file/{id}/content` | Open Directories - File Content | `open_directory_file_content()` |
|
|
671
|
+
| ✅ | GET | `/api/axon/opendirs/{id}` | Open Directories - Document | `get_open_directory()` |
|
|
672
|
+
| ✅ | GET | `/api/axon/opendirs/{id}/entries` | Open Directories - Entries | `open_directory_entries()` |
|
|
673
|
+
| | | **Projects** | | |
|
|
674
|
+
| ✅ | GET | `/api/project/list` | Project List | `list_projects()` |
|
|
675
|
+
| ✅ | POST | `/api/project/add` | Project - Create Project | `create_project()` |
|
|
676
|
+
| ✅ | GET | `/api/project/{project_id}` | Project Details | `get_project()` |
|
|
677
|
+
| ✅ | POST | `/api/project/{project_id}/edit` | Project - Edit Project | `edit_project()` |
|
|
678
|
+
| ✅ | POST | `/api/project/{project_id}/delete` | Project - Delete Project | `delete_project()` |
|
|
679
|
+
| ✅ | GET | `/api/project/{project_id}/alerts/dates` | Project - List Dates that have Alerts | `project_alert_dates()` |
|
|
680
|
+
| ✅ | GET | `/api/project/{project_id}/alerts/latest` | Project - Latest Alerts | `latest_project_alerts()` |
|
|
681
|
+
| ✅ | GET | `/api/project/{project_id}/alerts/{date}` | Project - Alerts for Date | `project_alerts()` |
|
|
682
|
+
| ✅ | GET | `/api/project/{project_id}/indicators` | Project - List Indicators | `project_indicators()` |
|
|
683
|
+
| ✅ | POST | `/api/project/{project_id}/indicators/add` | Project - Add Indicators | `add_to_project()`, `add_project_indicators()` |
|
|
684
|
+
| ✅ | POST | `/api/project/{project_id}/indicators/add_note` | Project - Add Note to Indicators | `set_indicator_note()` |
|
|
685
|
+
| ✅ | POST | `/api/project/{project_id}/indicators/delete` | Project - Delete Indicators | `remove_from_project()` |
|
|
686
|
+
| ✅ | POST | `/api/project/{project_id}/indicators/tags/add` | Project - Add Tags to Indicators | `add_indicator_tags()` |
|
|
687
|
+
| ✅ | POST | `/api/project/{project_id}/indicators/tags/delete` | Project - Delete Tags from Indicators | `remove_indicator_tags()` |
|
|
688
|
+
| ✅ | GET | `/api/project/{project_id}/scans` | Project - List Scans | `project_scans()` |
|
|
689
|
+
| ✅ | POST | `/api/project/{project_id}/scans/add` | Project - Add Scan | `add_scan_to_project()` |
|
|
690
|
+
| ✅ | POST | `/api/project/{project_id}/scans/delete` | Project - Delete Scan | `remove_scan_from_project()` |
|
|
691
|
+
| ✅ | GET | `/api/project/{project_id}/yara/rules` | Project - List Yara Rules | `yara_rules()` |
|
|
692
|
+
| ✅ | POST | `/api/project/{project_id}/yara/rules/add` | Project - Add YARA Rule | `add_yara_rule()` |
|
|
693
|
+
| ✅ | POST | `/api/project/{project_id}/yara/rules/edit` | Project - Edit YARA Rule | `edit_yara_rule()` |
|
|
694
|
+
| ✅ | GET | `/api/project/{project_id}/yara/rules/{rule_id}` | Project - Get YARA Rule | `get_yara_rule()` |
|
|
695
|
+
| ✅ | GET | `/api/project/{project_id}/yara/rules/{rule_id}/matches` | Project - List Matches for YARA rule | `yara_matches()` |
|
|
696
|
+
| ✅ | POST | `/api/project/{project_id}/yara/rules/{rule_id}/{version}/schedule` | Project - Run Historical YARA Scan | `run_yara_retrohunt()` |
|
|
697
|
+
| ✅ | POST | `/api/project/{project_id}/yara/rules/{rule_id}/cancel` | Project - Cancel Historical YARA Scan | `cancel_yara_retrohunt()` |
|
|
698
|
+
| ✅ | POST | `/api/project/{project_id}/yara/rules/{rule_id}/{version}/track` | Project - Start Live YARA Tracking | `track_yara_rule()` |
|
|
699
|
+
| ✅ | POST | `/api/project/{project_id}/yara/rules/{rule_id}/untrack` | Project - Stop Live YARA Tracking | `untrack_yara_rule()` |
|
|
700
|
+
| | | **Scans** | | |
|
|
701
|
+
| ✅ | GET | `/api/axon/live/scan/results/{scan_id}` | Live Scan Results | `get_scan()` |
|
|
702
|
+
| ✅ | GET | `/api/axon/live/scan/results/{scan_id}/crawl` | Live Scan Results - Crawl | `scan()`, `get_scan_crawl_results()` |
|
|
703
|
+
| ✅ | POST | `/api/axon/live/scan/start` | Live Scan Start | `start_scan()`, `scan()` |
|
|
704
|
+
| | | **String** | | |
|
|
705
|
+
| ✅ | GET | `/api/axon/string/dns/extra2` | String DNS Extra History | `extra_history()` |
|
|
706
|
+
| ✅ | GET | `/api/axon/string/dns/history` | String DNS History | `dns_history()` |
|
|
707
|
+
| ✅ | GET | `/api/axon/string/pivots2` | String Pivots | `pivots()` |
|
|
708
|
+
| ✅ | GET | `/api/axon/string/pivots2/{category}` | String Pivots - Category | `pivots(category=...)` |
|
|
709
|
+
| ✅ | GET | `/api/axon/string/registration/history2` | String Registration History | `registration_history()` |
|
|
710
|
+
| ✅ | GET | `/api/axon/string/registration/history2/{field}` | String Registration History - Category | `registration_history(field=...)` |
|
|
711
|
+
| | | **Threats** | | |
|
|
712
|
+
| ✅ | GET | `/api/threat/group/{threat_key}/indicators` | Threat Group - List Indicators | `threat_group_indicators()` |
|
|
713
|
+
| ✅ | GET | `/api/threat/group/{threat_key}/reports` | Threat Group - List Reports | `threat_group_reports()` |
|
|
714
|
+
| ✅ | GET | `/api/threat/group/{threat_key}/summary` | Threat Group - Summary | `threat_group()` |
|
|
715
|
+
| ❌ | GET | `/api/threat/indicators/recent` | Recent Threat Indicators | |
|
|
716
|
+
| ✅ | GET | `/api/threat/names` | Threat Names | `threat_names()` |
|
|
717
|
+
| ❌ | GET | `/api/threat/reports/recent` | Recent Threat Reports | |
|
|
718
|
+
| | | **Utilities** | | |
|
|
719
|
+
| ❌ | GET | `/api/axon/advanced/query` | Advanced Query | |
|
|
720
|
+
| ✅ | POST | `/api/axon/submissions/domains` | Submissions Domains | `submit_domains()` |
|
|
721
|
+
| ❌ | GET | `/api/paths` | Paths | |
|
|
722
|
+
| ✅ | GET | `/api/ping` | Ping | `ping()` |
|
|
723
|
+
| ❌ | GET | `/api/profile/token` | Profile Token | |
|
|
724
|
+
| ✅ | GET | `/api/profile/usage` | Profile Usage | `usage()` |
|
|
725
|
+
| ❌ | GET | `/api/profile/usage/daily` | Profile Usage Daily | |
|
|
726
|
+
|
|
727
|
+
## Migration notes for the CLI and SDK expansion (unreleased)
|
|
728
|
+
|
|
729
|
+
This update changes several SDK return shapes. Update consumers of `to_dict()`
|
|
730
|
+
and saved JSON fixtures before upgrading:
|
|
731
|
+
|
|
732
|
+
- `YaraMatchRecord.to_dict()` uses lower snake case: for example, `Host` becomes
|
|
733
|
+
`host`, `Bytes Received` becomes `bytes_received`, and `HTML` becomes `html`.
|
|
734
|
+
- `Content.to_dict()` returns fields for its content kind: decoded `html` for
|
|
735
|
+
HTML, `pem` and certificate fields for certificates, or `data_b64` for favicons.
|
|
736
|
+
Code needing the original base64 HTML should read `content.result` directly.
|
|
737
|
+
- `Registration.found` and its serialized field are removed. Handle lookup
|
|
738
|
+
failures through API errors and inspect the returned records and registration
|
|
739
|
+
fields rather than relying on that flag.
|
|
740
|
+
- `ScanRecord.type` is now `SCAN_RESULT`, replacing `scan`.
|
|
741
|
+
- `CertificateObservation.to_dict()` omits `type` and `time`; those attributes
|
|
742
|
+
remain accessible on the object. `HostResponse.to_dict()` omits `type`;
|
|
743
|
+
its `time` field remains. Use the enclosing record's type for record dispatch.
|
|
744
|
+
- `host_responses()` accepts domains, IPs, CIDRs, and explicit hash indicators;
|
|
745
|
+
free-text strings now raise `ValueError`. Use `pivots()` for text searches.
|
|
746
|
+
- Bulk lookups report per-indicator API failures, including 404s, in
|
|
747
|
+
`ResultSet.errors` instead of silently skipping missing indicators.
|
|
748
|
+
Authentication and rate-limit failures still stop the batch.
|
|
749
|
+
- Domain inference now requires a valid multi-label name; single words are
|
|
750
|
+
strings. Internationalized domains normalize to punycode, and network ranges
|
|
751
|
+
use the new `IndicatorType.CIDR` type.
|
|
752
|
+
|
|
753
|
+
The package version remains `0.1.0` on this development branch; these notes
|
|
754
|
+
describe unreleased changes, not a newly published version.
|
|
755
|
+
|
|
756
|
+
## Development
|
|
757
|
+
|
|
758
|
+
Install the checkout using a current pip and the build backend declared in
|
|
759
|
+
`pyproject.toml` (setuptools 64 or newer):
|
|
760
|
+
|
|
761
|
+
```bash
|
|
762
|
+
python -m pip install --upgrade pip
|
|
763
|
+
python -m pip install -e .
|
|
764
|
+
```
|
|
765
|
+
|
|
766
|
+
`pyproject.toml` defines the modern build. `setup.py` and `setup.cfg` retain
|
|
767
|
+
editable-install support for older pip/setuptools versions using `setup.py develop`.
|
|
768
|
+
Keep the compatibility metadata and dependencies in `setup.cfg` in sync with
|
|
769
|
+
`pyproject.toml`; both read the version from `validin.__version__`.
|
|
770
|
+
|
|
771
|
+
The tests are baseline fixtures that run the SDK and the `validin` command against a local
|
|
772
|
+
fake Validin API, then compare their output with saved baselines:
|
|
773
|
+
|
|
774
|
+
```bash
|
|
775
|
+
tests/baseline # run every fixture
|
|
776
|
+
tests/baseline -b PATH # create or update a fixture's baseline
|
|
777
|
+
```
|
|
778
|
+
|
|
779
|
+
See [tests/README.md](tests/README.md) for how fixtures and the fake API work.
|
|
780
|
+
|
|
781
|
+
## License
|
|
782
|
+
|
|
783
|
+
MIT
|