Local-first OpenAPI 3.0/3.1 security audit CLI
Project description
Speculynx CLI
Speculynx is a local-first Python/Typer CLI for auditing OpenAPI 3.0.x and 3.1.x files for API security risks. Swagger 2.0, GraphQL, gRPC, and SOAP are outside the MVP scope.
OpenAPI files are analyzed locally. Speculynx does not send customer OpenAPI documents to the backend. Free scans work without a license and without network access.
Install
Recommended on Debian and Ubuntu
pipx installs Speculynx in an isolated Python environment without changing
the system Python packages:
sudo apt update
sudo apt install -y pipx
pipx ensurepath
pipx install speculynx
speculynx --help
You may need to reopen your terminal after running pipx ensurepath.
For an immediate one-session setup, you can also run:
export PATH="$PATH:$HOME/.local/bin"
The export command is not required for every user or shell. Once pipx is
already installed, the generic installation command is:
pipx install speculynx
Windows PowerShell
py -m pip install --user pipx
py -m pipx ensurepath
pipx install speculynx
speculynx --help
macOS
When pipx is already available on macOS, use:
pipx install speculynx
speculynx --help
This page does not prescribe a macOS package manager setup.
Update or uninstall
pipx upgrade speculynx
pipx uninstall speculynx
Local source checkout
For contributors working from a local checkout, a virtual environment remains the supported development workflow:
python -m venv .venv
.\.venv\Scripts\Activate.ps1
python -m pip install --upgrade pip
python -m pip install -e .
Verify the installation:
speculynx --help
speculynx scan --file openapi.yaml
Free static scans work immediately without a license or backend connection.
For Pro features, run speculynx login: the command prompts interactively for
the license key with hidden input, verifies it with the licensing backend, and
stores a valid key in the operating-system credential store.
After a package build, install the wheel locally:
python -m pip install dist\speculynx-0.1.4-py3-none-any.whl
Commands
speculynx --help
speculynx --version
speculynx scan --file path\to\openapi.yaml
speculynx login
speculynx info
speculynx logout
login verifies a Pro license key with:
POST /v1/verify
Authorization: Bearer <license_key>
The key is stored with the operating-system credential store through keyring.
Legacy ~/.speculynx.json files are ignored.
Installation troubleshooting
speculynxnot found: activate the virtual environment or ensure itsScriptsdirectory is inPATH; for a pipx install, reopen the terminal afterpipx ensurepath.pipxnot found on Debian/Ubuntu: install it withsudo apt install -y pipx, then runpipx ensurepath.- Unsupported Python: install Python 3.10 through 3.13.
- File not found: verify the path passed to
--file. - Swagger 2.0 rejected: convert the document to OpenAPI 3.0 or 3.1.
- Pro feature refused: check the stored license with
speculynx info, then usespeculynx loginagain if needed.
Free Scan
speculynx scan --file path\to\openapi.yaml
Free rules include:
KEY-EXP-01: keys or tokens exposed in query parameters.HTTP-001: insecurehttp://server URLs.AUTH-001: missing documented authentication.KEY-EXP-02: rotation or lifetime undocumented for an API key explicitly described as static or durable.
Free scans are explicitly partial: they run the four rules above and list the Pro rules that were not executed. A Free scan with no finding reports an indeterminate global verdict; it is not a validation that the API is secure. OpenAPI files stay local. License verification sends no OpenAPI content to the licensing service.
JSON and CI/CD
Use --json for a single machine-readable JSON document on stdout:
speculynx scan --file openapi.yaml --json
Schema 1.0 includes the tool and input versions, scan mode, coverage,
executed and skipped rule IDs, severity counts, findings, and verdict.
Compatible fields may be added within schema 1.0; removing or renaming a
field requires a new schema version.
Use --fail-on with critical, high, medium, low, or never (the
backward-compatible default). A threshold blocks on that severity and higher:
speculynx scan --file openapi.yaml --json --fail-on high > speculynx-report.json
Minimal GitHub Actions step:
- name: Audit OpenAPI
run: |
speculynx scan \
--file openapi.yaml \
--json \
--fail-on high \
> speculynx-report.json
Exit codes:
0: scan completed and no finding reached the configured threshold;1: at least one finding reached the threshold;2: invalid argument, missing file, invalid JSON/YAML, or unsupported OpenAPI version;3: unexpected internal rule failure;4: a Pro-only operation was explicitly requested but unavailable.
Exit 0 for a partial Free scan means only that no executed Free finding met
the threshold. Coverage remains partial in both text and JSON.
Pro Scan
With a valid Pro license, scan also runs heuristic checks for patterns such as
BOLA, BFLA, sensitive data exposure, likely secrets in examples, SSRF inputs,
missing rate-limit documentation, and unclear API inventory/versioning.
Pro findings are static analysis signals, not proof of runtime vulnerabilities. They should be manually verified against backend authorization, gateway, and infrastructure controls.
PDF Export
PDF export is Pro-only:
speculynx scan --file path\to\openapi.yaml --export report.pdf
In Free mode the export is refused.
Live Scan / DAST
scan-live is Pro-only and can send real HTTP requests to a target API. It is
safe-by-default:
- only
GETrequests are sent by default; POST,PUT,PATCH, andDELETErequire--allow-unsafe-methods;--yesdoes not unlock unsafe methods by itself;--dry-runprints planned requests without sending HTTP traffic;--insecuremust be explicitly provided to disable TLS verification.
Examples:
speculynx scan-live --file openapi.yaml --target https://api.example.com --dry-run
speculynx scan-live --file openapi.yaml --target https://api.example.com --yes
speculynx scan-live --file openapi.yaml --target https://api.example.com --yes --allow-unsafe-methods
Only run scan-live against systems you own or are explicitly authorized to
test.
Development
python -m unittest discover -s tests -v
python -m build
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file speculynx-0.1.4.tar.gz.
File metadata
- Download URL: speculynx-0.1.4.tar.gz
- Upload date:
- Size: 24.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
004a6707d2932f256344dc4ab7d7ba9a10f71b984802341e41c72137366982db
|
|
| MD5 |
1cda68e8e60a9cedf30f5317a502b747
|
|
| BLAKE2b-256 |
5fab33bd7b14ae7201d11007a1c57298575f27083f4282deebf5c8bc74442250
|
Provenance
The following attestation bundles were made for speculynx-0.1.4.tar.gz:
Publisher:
publish.yml on Sami-BUTRT/speculynx-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
speculynx-0.1.4.tar.gz -
Subject digest:
004a6707d2932f256344dc4ab7d7ba9a10f71b984802341e41c72137366982db - Sigstore transparency entry: 2164969926
- Sigstore integration time:
-
Permalink:
Sami-BUTRT/speculynx-cli@a68fe5db09f9901d7371f15ffe9aae2691a58f05 -
Branch / Tag:
refs/tags/v0.1.4 - Owner: https://github.com/Sami-BUTRT
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a68fe5db09f9901d7371f15ffe9aae2691a58f05 -
Trigger Event:
push
-
Statement type:
File details
Details for the file speculynx-0.1.4-py3-none-any.whl.
File metadata
- Download URL: speculynx-0.1.4-py3-none-any.whl
- Upload date:
- Size: 23.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
134823494e008acd4b769aefb5c5572a871446ec815c8d3c603c16d32cf4ccd5
|
|
| MD5 |
043ec9271090ac8c058f6dfc06b199da
|
|
| BLAKE2b-256 |
931db3932f77318a004ee5405fca266d0d5ba95dde3f29f043b4747e400e9c43
|
Provenance
The following attestation bundles were made for speculynx-0.1.4-py3-none-any.whl:
Publisher:
publish.yml on Sami-BUTRT/speculynx-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
speculynx-0.1.4-py3-none-any.whl -
Subject digest:
134823494e008acd4b769aefb5c5572a871446ec815c8d3c603c16d32cf4ccd5 - Sigstore transparency entry: 2164969958
- Sigstore integration time:
-
Permalink:
Sami-BUTRT/speculynx-cli@a68fe5db09f9901d7371f15ffe9aae2691a58f05 -
Branch / Tag:
refs/tags/v0.1.4 - Owner: https://github.com/Sami-BUTRT
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a68fe5db09f9901d7371f15ffe9aae2691a58f05 -
Trigger Event:
push
-
Statement type: