silentparams
Find HTTP APIs that silently ignore misspelled query parameters.
You call GET /issues?states=closed. The API only knows state. It does not
answer "unknown parameter": it answers 200 with every open issue, and your
code (or your agent) believes it filtered. Nothing failed, so nothing alerts.
silentparams sends a handful of read-only requests with plausible misspellings
of each parameter in your URL and tells you, per name, whether the API rejects
it, accepts it as an alias, or ignores it without a word.
$ silentparams "https://api.github.com/repos/python/cpython/issues?state=closed&per_page=3"
Parameter 'state=closed': removing it changes the response
states HTTP 200 IGNORED silently (2xx, same as without the parameter)
STATE HTTP 200 IGNORED silently (2xx, same as without the parameter)
zzb22fbb9f HTTP 200 IGNORED silently (2xx, same as without the parameter)
...
RESULT: this API silently ignores unknown parameter names. A typo in a filter returns unfiltered data with HTTP 200.
That is not a bug in GitHub. Ignoring unknown parameters is a common design choice. It just means a typo in your client is invisible, so you should know which APIs behave this way before you trust a filtered result.
Install
pip install silentparams # no dependencies, Python 3.10+
# or the latest code: pip install git+https://github.com/novasdiego1/silentparams
How it works
For each query parameter p in the URL:
| Request | Purpose |
|---|---|
| the URL as given, twice | baseline, and a check that the response is stable |
the URL without p |
what the API returns when p is absent |
p renamed (plural/singular, trailing _, case, snake/kebab/camel, doubled letter) and one nonsense name |
the decoys |
Each decoy is classified by comparing normalized response bodies (JSON is canonicalized, so key order does not matter):
| Verdict | Meaning |
|---|---|
IGNORED silently |
2xx and the same response as without p: the name was dropped without a word |
rejected |
4xx: the API refuses unknown names (the safe behaviour) |
alias |
2xx and the same response as the baseline: the variant is accepted |
different |
2xx with some other response: inconclusive |
no-effect |
2xx, but removing p changes nothing either, so an ignored name and an alias look the same: inconclusive |
When removing p changes nothing, p itself may be ignored, or its value may
be the server default (state=open on an API that returns open items by
default). To tell these apart, silentparams also sends p=__silentparams__. If
that invalid value changes the response (usually a 4xx), the name is known, and
each decoy is re-sent with the same invalid value: answering like p makes it an
alias, answering like no parameter at all makes it ignored. If the invalid value
changes nothing either, the decoys stay no-effect.
Options
-H 'Name: value' extra header (repeatable), e.g. an Authorization token
--ignore-key KEY JSON key to ignore when comparing (timestamps, request ids)
--decoys N decoy names per parameter (default 6)
--max-requests N hard cap on requests sent (default 60)
--delay S seconds between requests (default 0.5)
--json machine-readable report
--timeout S seconds for each whole request, connect and body included (default 20)
--connect-timeout S seconds per address when connecting (default 3)
-4, --ipv4 connect over IPv4 only
Exit code: 1 if the API silently ignores unknown names, 0 if it rejects
them, 3 if the result is inconclusive, 2 on usage errors or if the URL
cannot be fetched at all. That makes it
usable as a CI check for an API you own: treat 3 as "look at it", not as a pass.
If the same request returns different bodies (a timestamp, a request id), the
report warns that results are unreliable, lists the fields that changed between
the two reads and suggests the matching --ignore-key flags.
Slow or hanging requests
Before 0.3.0, a host whose IPv6 addresses do not answer from your network could
take about 30 s per request: Python tries each address in turn with the full
timeout. Since 0.3.0 IPv6 and IPv4 addresses alternate, each attempt is capped
by --connect-timeout, and --timeout bounds the whole request. If a request
is still slow, compare with curl on the same URL:
curl -s -o /dev/null -w '%{time_total}\n' 'https://api.example.com/items?status=open'
Fast curl and slow silentparams is worth an issue (include both timings; -4
is a workaround meanwhile). Both slow means the host or the network.
A limit it cannot see: truncated results
silentparams compares responses, so it cannot tell you that a correctly spelled,
honoured parameter returned an incomplete set. Some APIs cap total (at 1000,
for example) and set has_more: false at the cap, even when far more rows
match. A capped answer looks as plausible as an ignored filter. A cheap guard:
query a term you know is large, and treat a round total (1000, 200, 50) as
truncated until paging past it with offset stops returning rows.
Be polite
It only sends GET requests, waits between them, and stops at
--max-requests. Point it at APIs you are allowed to query, and mind their
rate limits.
Why this exists
An auditor reported reaching a wrong conclusion this way. They tried four
spellings of a per-author filter (author, agent, agent_id, pubkey) on an
API that only declared authors. Every request returned 200 with unfiltered
rows, so they wrote that no such filter existed. The same API rejected a bad
limit value with 422: it checked values carefully and never checked names.
License
MIT
Metadata
Release files for silentparams 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| silentparams-0.3.0.tar.gz | 17.1 kB | Without provenance | Details for silentparams-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| silentparams-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for silentparams-0.3.0-py3-none-any.whl |
Total release size: 30.4 kB
Release files / silentparams-0.3.0.tar.gz
| Download URL | silentparams-0.3.0.tar.gz |
|---|---|
| Size | 17.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f8f82091c8d2a589b47b95f1c29988b5088bfd0399513f546ac43e3d8a7ed396
|
|
BLAKE2b-256 checksum How to use checksums |
7ee5d93398c38ab6aebba071c1f067e72ae2e40543f52d0a9187fbf4eb7fdb5e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|
Release files / silentparams-0.3.0-py3-none-any.whl
| Download URL | silentparams-0.3.0-py3-none-any.whl |
|---|---|
| Size | 13.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
820618bc3737e41f49b8f4cac76865870a0c105d30c65ced8796bea6ed8e4f95
|
|
BLAKE2b-256 checksum How to use checksums |
7f28b1e2ca09712cf0f1372b7e6d11708b64da71be20cf5c10ff79e3ec71db2a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|
Security for silentparams 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.