Overview
ShorSighted is a read-only CLI that finds the TLS and SSH endpoints that will break, or are already exposed, as the Web PKI and SSH move to post-quantum cryptography. Give it hostnames, a file of targets, a cloud account or your AI clients’ MCP configs, and for each endpoint it reports:
- whether the key exchange is post-quantum (
X25519MLKEM768for TLS,mlkem768x25519-sha256for SSH), which protects against “harvest now, decrypt later”; - whether the certificate chain will stay trusted (Chrome and Edge distrust ECDSA P-256 CA certificates on 2027-03-15, the same day CA/Browser Forum lifetimes drop to 100 days);
- how far authentication is from post-quantum (RSA/ECDSA vs ML-DSA, SHA-1, weak keys, legacy TLS).
Each finding is tied to a dated, sourced deadline, and its severity rises as the deadline approaches.
Install
Requires Python 3.11+ on Linux, macOS or Windows.
The TLS key-exchange probe builds its own ClientHello and the SSH probe parses the server’s KEXINIT itself, so results don’t depend on the local OpenSSL and are the same on every platform.
Usage
The same commands work in PowerShell, for example
Get-Content .\targets.txt | shorsighted scan file -, then check
$LASTEXITCODE.
docs/cli.md lists every command and flag. Run
shorsighted explain SSD-KEX (or any check ID) for a check’s details.
Checks
| Check | Looks at |
|---|---|
SSD-KEX | TLS 1.3 key exchange on every resolved IP: ML-KEM hybrids, the legacy Kyber draft, or classical only |
SSD-CHAIN | Key and signature algorithm of every certificate, P-256 CA distrust, chain verification |
SSD-LIFE | Expiry, SAN coverage, CA/B Forum SC-081 lifetime limits |
SSD-TLS | TLS 1.3 support, TLS 1.0/1.1, SNI, and whether STARTTLS services offer TLS at all |
SSD-SSH | SSH key exchange, host keys and ciphers from the server’s KEXINIT (no login) |
SSD-AWS-CONFIG | ELB, CloudFront and API Gateway TLS policies, ACM certificates, EC2 SSH exposure |
SSD-CLOUD-CONFIG | Azure and GCP TLS minimums, self-managed certificates, SSH exposure |
SSD-MCP | Remote MCP servers and the OAuth servers they advertise |
STARTTLS and mail
ShorSighted runs the protocol’s own plaintext upgrade, then sends the same raw ClientHello it uses on port 443. It never logs in or sends mail.
| Protocol | Scheme | Default port |
|---|---|---|
| SMTP | smtp://, submission:// | 25, 587 |
| IMAP | imap:// | 143 |
| POP3 | pop3:// | 110 |
| FTP | ftp:// | 21 |
| LDAP | ldap:// | 389 |
| PostgreSQL | postgres:// | 5432 |
| XMPP | xmpp://, xmpp-server:// | 5222, 5269 |
Well-known ports imply the protocol (mx.example.com:25), and protocol: in a
csv or yaml file overrides it. Implicit-TLS ports (465, 993, 995, 636, 990) are
probed like 443.
scan mail DOMAIN reads the domain’s MX records (SMTP on port 25, null MX
honoured) and, unless --mx-only is given, the RFC 6186 SRV records for
submission, IMAP and POP3. scan aws turns Route53 MX records into SMTP
targets.
Most home networks and cloud providers block outbound port 25, so MX probes from a laptop or a default VPC usually time out. The timeout is reported with a hint, not as a verdict.
Tested against real daemons (Alpine 3.24, OpenSSL 3.5):
| Server | Default | Fix |
|---|---|---|
| Postfix 3.11 | X25519MLKEM768 (tls_eecdh_auto_curves = ?X25519MLKEM768:DEFAULT) | leave tls_eecdh_auto_curves at its default, or include X25519MLKEM768 |
| Postfix 3.10 and older | classical: tls_eecdh_auto_curves has no ML-KEM group | postconf -e 'tls_eecdh_auto_curves = X25519MLKEM768 X25519 prime256v1 secp384r1' |
| Dovecot 2.4 | X25519MLKEM768 on IMAP, POP3 and IMAPS | leave ssl_curve_list empty, or include X25519MLKEM768 |
Deadlines
Every date is in deadlines.yaml with
its source URL and a verified flag.
Severity rises one level at 180, 90 and 30 days before a deadline and reaches
its final level on the date. Unverified deadlines are labelled and don’t count
toward --fail-on unless you pass --include-unverified.
Target files and config
| Format | Content |
|---|---|
| txt | one target per line, # comments |
| csv | a host column, optionally port, sni, tags, owner, protocol |
| yaml / json | a list, or {targets: [...], groups: {name: {owner, tags, file, targets}}} |
Targets are lowercased, IDNA-encoded and de-duplicated on protocol, host, port
and SNI. Invalid lines are reported with file:line and skipped (--strict
makes them fail the run). Runs over 5,000 targets print a warning, and runs
over 50,000 need --yes or --max-targets.
A config file (--config on scan) has four top-level keys:
defaults:ports,timeout,concurrency,per_host,rate,format,fail_on,trust_store,ca_bundle,resolver,expiry_warn_days,deadlines,remediations. Flags override them; file paths are relative to the config file.targetsandgroups: same as a yaml target file. Groupfile:paths are relative to the config file.sources: inventories to collect.aws:profiles,regions,services(route53,elb,cloudfront,apigw,acm,ec2),assume_role,accounts_file,include_private,no_probeazure:subscriptions,services(dns,frontdoor,appgw,appservice,nsg),include_private,no_probegcp:projects,services(dns,lb,certs,firewall),include_private,no_probemcp:files,project,use_defaults,follow_oauth,no_probe
Unknown keys and service names are errors. sources is only read by
shorsighted scan --config FILE with no subcommand; scan --config FILE url ... uses the file’s defaults and targets but not its sources. See
examples/shorsighted.yaml.
Output
-f selects table (the default; plain text when piped), json (schema:
docs/report.schema.json), jsonl (one line per
target as it finishes), sarif, csv, markdown or html. Without -f, the
--output extension picks the format (.json, .jsonl, .sarif, .csv,
.md, .html); anything else is a table. --sarif-output FILE also writes
SARIF from the same scan.
The HTML report is one self-contained file with no scripts or external requests. It color-codes each target’s A-F grade and each finding’s severity, lists fixes ranked by severity and by how many targets each would raise a grade, and has Auto / Light / Dark themes:
Remediations
Every finding has a stable rule id (kex.classical-only, life.expired, …).
The bundled remediation catalog adds how-to steps, config snippets (nginx,
Apache, HAProxy, sshd, AWS, …) and references for each one, shown in the
HTML report’s “How to fix” dropdowns and by shorsighted explain <rule>
(explain --rules lists them). It also splits the report into fixes, planning
items, and scan notes (such as TLS interception on the scanning network).
--remediations FILE overrides or extends entries, for example to replace the
fix text with your runbook link. The override reaches every output format. See
docs/remediations.md and
examples/remediations.yaml.
Exit codes: 0 no findings at or above --fail-on, 1 findings at or above it,
2 usage, config, input or credential error, 3 internal error (a bug; please
report it). Unreachable hosts are reported, not
fatal. Color follows --no-color and the NO_COLOR environment variable.
Cloud inventories
Discovery is read-only, then ShorSighted probes the public endpoints it found.
Internal load balancers and private DNS zones are skipped unless
--include-private is given (they are then reported config-only), and
--no-probe reports configuration without connecting to anything. A service
the credential can’t read becomes a warning and the scan continues.
AWS
Every boto3 client refuses operations that aren’t Describe*, List* or
Get* (plus sts:AssumeRole and sts:GetCallerIdentity). The scanned
identity needs only docs/iam-policy.json.
Credentials come from the standard boto3 chain (AWS_PROFILE,
AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY/AWS_SESSION_TOKEN, SSO, instance
or container roles) or --profile (repeatable). --assume-role assumes a role
from each profile; the calling identity needs sts:AssumeRole on it. An
accounts file lists name, role_arn or profile, and optional
external_id and regions per account (see
examples/accounts.yaml). An account whose role
or profile can’t be used is skipped with a warning; the others are still
scanned.
Without --regions, every region enabled for the account is scanned
(ec2:DescribeRegions). CloudFront’s ACM certificates are always read from
us-east-1. GovCloud and China partitions get correct ARNs.
Azure
The Azure collector calls the ARM REST API directly through an HTTPS client
that only sends GET and doesn’t follow redirects. Grant the built-in
Reader role on the subscriptions to scan. Credentials, first match wins:
| Source | Variables |
|---|---|
| Access token | AZURE_ACCESS_TOKEN |
| Service principal | AZURE_TENANT_ID, AZURE_CLIENT_ID, AZURE_CLIENT_SECRET, optional AZURE_AUTHORITY_HOST for sovereign clouds |
| Azure CLI | az login |
| Managed identity | IDENTITY_ENDPOINT and IDENTITY_HEADER (App Service, Functions); on a VM, AZURE_USE_MANAGED_IDENTITY or MSI_ENDPOINT selects the instance metadata service at 169.254.169.254 |
The CLI is used whenever az is on PATH, even if it isn’t logged in, so on a
VM with managed identity either remove az from PATH or set
AZURE_ACCESS_TOKEN.
GCP
The same GET-only client calls the Cloud Resource Manager, Compute, Cloud DNS
and Certificate Manager APIs. roles/viewer is enough. Narrower:
roles/browser (to list projects; not needed with --projects),
roles/compute.viewer, roles/dns.reader and
roles/certificatemanager.viewer. Credentials, first match wins:
| Source | Variables |
|---|---|
| Access token | GOOGLE_OAUTH_ACCESS_TOKEN |
| Credentials file | GOOGLE_APPLICATION_CREDENTIALS (service-account key or authorized-user file) |
| Application default credentials | gcloud auth application-default login, read from $CLOUDSDK_CONFIG (default ~/.config/gcloud) |
| gcloud CLI | gcloud auth login |
Service-account keys request the cloud-platform.read-only scope. User
credentials and the gcloud CLI carry whatever scopes they were granted, so
rely on the IAM role to limit access.
Post-quantum key exchange on Azure and GCP is decided by the provider’s edge, not by a setting, so the SSD-KEX probe of each discovered hostname is the verdict.
MCP
Remote MCP servers carry prompts, tool results and bearer tokens over TLS, so
they have the same exposure as any other endpoint. scan mcp reads the
user-level Cursor, Claude Desktop, Claude Code, VS Code, Windsurf and Gemini
CLI configs, then probes each remote server and the OAuth authorization
servers it advertises.
Only scheme, host and port are taken from server URLs. Paths, query strings,
headers, env and stdio arguments are never recorded. Behind a
TLS-inspecting proxy, targets are reported as “not measured” rather than graded
against the proxy’s certificate.
ShorSighted is also an MCP server, with the tools scan_endpoints,
explain_check, list_deadlines and audit_mcp_configs:
Every address the probe connects to is checked at connect time, so a host
that resolves (or later re-resolves) to a private, loopback, link-local or
cloud-metadata address is refused unless --allow-private is set or the
address is in an allowed CIDR. Only TLS, SSH and STARTTLS ports are probed
(--allow-port adds more), and each server session has a target budget, so a
prompt-injected agent can’t use it to scan an internal network or sweep ports.
Cloud scans are not exposed.
GitHub Action
All inputs and outputs are in action.yml.
Scope and safety
Each TLS target gets a few handshakes per IP (key exchange, certificate chain,
and legacy-version checks unless --skip-legacy-tls), and each SSH target one
banner and KEXINIT read. There are no logins or exploits, and no HTTP requests
except scan mcp’s one GET of /.well-known/oauth-protected-resource per
remote server (--no-oauth skips it).
Concurrency defaults to 20 targets and 2 connections per host and per IP;
--rate caps new connections per second. Cipher-suite enumeration and
vulnerability checks are out of scope (use testssl.sh or sslyze). Only scan
systems you own or are authorized to test.
Development
See CONTRIBUTING.md,
docs/architecture.md,
docs/threat-model.md,
GOVERNANCE.md and, for cutting a release,
RELEASING.md. Report vulnerabilities as described in
SECURITY.md.
The documentation site (Hugo + the Relearn theme, deployed to GitHub Pages by
.github/workflows/docs.yml) is generated from this README, docs/ and the
bundled rule and deadline data. To preview it:
Brand assets in docs/assets/ come from python .hugo/scripts/make_brand.py.
License
Apache-2.0