Jadpo is experimental and not ready for production. These docs follow the compiler's main branch as of 29 Nov 2026. What's built · Install 0.6.0
jadpo
ReferenceErrors

ErrorsHTTP · rule

route.secret_outside_body

On this page

A route reads a secret value from a URL or a header.

Area 7, HTTP; not declinable; the next step is usually the agent's.

Why Jadpo refuses it

A URL is written to access logs and proxies' logs, kept in a browser's history and passed on in a Referer header. A Password in a path or a query string is read by people it was never meant for, whatever the app does next, so a secret arrives in a request's JSON body.

A header is for credentials sent on every request. A BearerToken, a Jwt and an ApiKey may be read from one; a Password, a TotpSecret, a SecretText and a OneTimeCode are typed once into a form, so they are not. Authorization and cookies are read by sign-in whatever the type (route.header_credential).

What it looks like

main.jadpo:

example
type Handle = Text {    max_length: 40}type LoginAccepted = Bool {}type SignInForm = Input {    handle: Handle    account_password: Password}type SignInAnswer = Output {    accepted: LoginAccepted}action sign_in(login_attempt: SignInForm) -> SignInAnswer {    return SignInAnswer {        accepted: LoginAccepted(login_attempt.account_password == "correct horse battery staple")    }}policy {    actions: {        sign_in: [Access.public]    }}routes Logins {    prefix: /logins    GET / {        authentication: RouteAuthentication.none        input: SignInForm        output: SignInAnswer        run: sign_in(input)    }}
jadpo checkcheck failed: 1 error, 1 file

error SignInForm.account_password reads a Password from the query string

--> main.jadpo:33:16

   |33 |         input: SignInForm   |                ^^^^^^^^^^ a secret, in the query string
reason
A URL is written to access logs and proxies' logs, kept in a browser's history and passed on in a Referer header, so a Password in one is read by people it was never meant for.
next
Take SignInForm.account_password in the JSON body of a POST, PUT or PATCH, in the route's input: (agent)
rule
route.secret_outside_body
help
https://jadpo.dev/docs/errors/route.secret_outside_body

(agent) at the end of the next: line means your coding agent can make the fix itself.

A placeholder is refused the same way:

example
type ResetPassword = Password {}type ResetAnswer = Output {    accepted: Bool}action reset(given: ResetPassword) -> ResetAnswer {    return ResetAnswer {        accepted: given == "correct horse battery staple"    }}policy {    actions: {        reset: [Access.public]    }}routes Resets {    prefix: /resets    POST /{given: ResetPassword} {        authentication: RouteAuthentication.none        output: ResetAnswer        run: reset(given)    }}
jadpo checkcheck failed: 1 error, 1 file

error given reads a Password from a URL

--> main.jadpo:22:19

   |22 |     POST /{given: ResetPassword} {   |                   ^^^^^^^^^^^^^ a secret, in a URL
reason
A URL is written to access logs and proxies' logs, kept in a browser's history and passed on in a Referer header, so a Password in one is read by people it was never meant for.
next
Take given in the JSON body of a POST, PUT or PATCH, in the route's input: (agent)
rule
route.secret_outside_body
help
https://jadpo.dev/docs/errors/route.secret_outside_body

How to fix it

Decide how the secret should arrive.

If the secret is typed once into a form, read it from the body of a POST, PUT or PATCH:

example
    POST / {        authentication: RouteAuthentication.none        input: SignInForm        output: SignInAnswer        run: sign_in(input)    }

A client now posts the password in the request's JSON, so it stays out of the URL.

If it is a key or a token sent on every request, type it ApiKey, BearerToken or Jwt and say header::

example
    partner_key: ApiKey {        header: "X-Partner-Key"    }

The key comes in the header, and the check passes for a key or a token.

Markdown for agents: /docs/errors/route.secret_outside_body.md.Built from Jadpo's main branch at commit 9080dc3.