infrastructure capa

infrastructure-adapters-shodan

Shodan API client adapter — host/service/cert/vuln lookups, API-key auth

Shodan API client adapter — host/service/cert/vuln lookups, API-key auth

Tierinfrastructure
Roleunclassified (baselined)
Pathcrates/infrastructure/adapters-shodan
Edition2021
Targetsinfrastructure_adapters_shodan
Public items0 across 0 modules
Tests26

What it is for

Shodan API client adapter.

A pure API-client adapter over Shodan's host/DNS/vulnerability lookup endpoints (https://api.shodan.io). API-key auth only — the key rides as a key query parameter on every request, never as a header or bearer token (that's Shodan's own scheme, not a choice made here).

Lifted from plumber/src/collectors/shodan.rs (Gate 4.5 provenance, see CHANGELOG.md). Unlike four of its five sibling files in that source directory, shodan.rs never implemented plumber's Collector trait (renamed SourceIngest on this harvest, foundation-source-ingest) — it has no collect() -> CollectionResult-shaped method, only typed host/DNS/vuln lookups. This crate stays a pure client for the same reason: any SourceIngest implementation (mapping a ShodanHost into whatever domain result type a consumer wants) is a separate, higher-layer "Shodan collector" piece a later sprint can build on top of this one — see CHANGELOG.md for the full reasoning.

# Example

# async fn example() -> Result<(), infrastructure_adapters_shodan::ShodanError> {
let client = infrastructure_adapters_shodan::ShodanClient::from_api_key("YOUR_API_KEY")?;
let host = client.host("8.8.8.8").await?;
println!("{:?}", host.ports);
# Ok(())
# }

Capabilities

No public items.

How to use it

From this crate's own rustdoc:

# async fn example() -> Result<(), infrastructure_adapters_shodan::ShodanError> {
let client = infrastructure_adapters_shodan::ShodanClient::from_api_key("YOUR_API_KEY")?;
let host = client.host("8.8.8.8").await?;
println!("{:?}", host.ports);
# Ok(())
# }

Module structure

No public modules: the crate root is its whole surface.

Public surface

No public items.

Re-exports. Exported here, defined elsewhere.

ExportDefined in
ShodanClientclient::ShodanClient
ShodanConfigauth::ShodanConfig
ShodanErrorerror::ShodanError
{ShodanApiError,ShodanApiInfo,ShodanCert,ShodanCipher,ShodanDnsDomain,ShodanDnsRecord,ShodanHost,ShodanHttp,ShodanRedirect,ShodanService,ShodanSsl,ShodanVuln,}types::{ShodanApiError,ShodanApiInfo,ShodanCert,ShodanCipher,ShodanDnsDomain,ShodanDnsRecord,ShodanHost,ShodanHttp,ShodanRedirect,ShodanService,ShodanSsl,ShodanVuln,}

Boundary

Depends on no other workspace tier.

Shares tier infrastructure with 82 other crates: infrastructure-acquire, infrastructure-adapters-google-calendar, infrastructure-adapters-google-gmail, infrastructure-adapters-google-places, infrastructure-adapters-google-trends, infrastructure-adapters-yelp, infrastructure-agent, infrastructure-ai, … (82 total).

_What this crate deliberately does NOT own is a judgment. No committed registry records one for it, so none is stated here._

Where it sits

Tier (ontology)infrastructure
Architectural role (taxonomy)unclassified (baselined)
Locationcrates/infrastructure/adapters-shodan
Vocabulary in force (lexicon)current

Dependencies

Runtime, in this workspace.

CrateTierOptionalOnly on
`infrastructure-fetcher`infrastructureyesalways

Runtime, from outside the workspace.

CrateRequirementFeaturesOptionalOnly on
reqwest^0.12jsonnoalways
serde^1derivenoalways
serde_json^1noalways
thiserror^2noalways
tokio^1sync, timenoalways
tracing^0.1noalways
urlencoding^2noalways

Development, from outside the workspace.

CrateRequirementFeaturesOptionalOnly on
tokio^1macros, rt-multi-thread, timenoalways
wiremock^0.6noalways

Build. None.

Depended on by. Nothing in this workspace.

Signal flow — what reaches this crate, and what it reaches.

flowchart LR
  SELF["infrastructure-adapters-shodan"]
  SELF -->|runtime| n_infrastructure_fetcher["infrastructure-fetcher"]
  classDef self fill:#1f883d,stroke:#1f883d,color:#fff;
  class SELF self;

Feature flags

FeatureEnablesOn by default
defaultsecure-egressyes
secure-egressdep:infrastructure-fetcheryes
flowchart LR
  n_default["default"] --> n_secure_egress["secure-egress"]
  n_secure_egress["secure-egress"] --> n_dep_infrastructure_fetcher["dep:infrastructure-fetcher"]

Targets

KindNameSource
libinfrastructure_adapters_shodan`src/lib.rs`

Error model

No public error type was detected: no public item declares a type named *Error, and no public signature returns one.

Operational characteristics

PropertyEvidence
async public surfacenone detected
async runtimeyes
database accessnone detected
network I/Oyes
unsafe codenone detected
environment variablesnone detected

No unsafe block, unsafe fn, unsafe impl or unsafe trait was found by the parser anywhere in this crate's source.

Configuration

No environment variable is read with a literal name anywhere in this crate. A variable whose key is computed at run time cannot be listed here, and is not claimed to be absent.

No workspace crate depends on this one.

Verification

KindCount
Unit tests26
Integration tests0
Examples0
Doctests1

What the tests establish, by name:

Documentation coverage

MeasureDocumentedTotal
Public items with rustdoc00
Public modules with a //! block00

Metrics

MetricValue
Rust source files5
Source lines1002
Code lines679
Public API items0
Public modules0
Tests26
Examples0
Cargo features2
Direct runtime dependencies8
Workspace reverse dependencies0
pie showData
    title Rust source composition
    "Code" : 679
    "Blank or comment" : 323

Generation

Rendered by tools-corpus corpus readme from repository evidence alone, renderer schema 2, lexicon current. No model, network service or database was consulted. Regenerate with tools-corpus corpus readme --write; verify with --check.

Todas las infrastructure · Manual