Docker
jwtop is published on Docker Hub and GHCR. The entrypoint is the jwtop binary itself, so any CLI command works after the image name.
Quick start
Section titled “Quick start”docker run --rm ghcr.io/cerberauth/jwtop decode $TOKENdocker run --rm cerberauth/jwtop decode $TOKENMounting keys and wordlists
Section titled “Mounting keys and wordlists”Commands that read a PEM key or a wordlist file (verify --key, create --key, crack --wordlist, …) need that file inside the container. Mount the containing directory as a volume and reference the in-container path:
docker run --rm -v "$(pwd)":/data ghcr.io/cerberauth/jwtop \ verify $TOKEN --key /data/public.pemdocker run --rm -v "$(pwd)":/data ghcr.io/cerberauth/jwtop \ crack $TOKEN --wordlist /data/secrets.txtProbing a live server
Section titled “Probing a live server”docker run --rm ghcr.io/cerberauth/jwtop \ crack $TOKEN --url https://api.example.com/protectedWhen probing a server running in another container, join its network:
docker run --rm --network container:api ghcr.io/cerberauth/jwtop \ crack $TOKEN --url http://localhost:8080/protectedDocker Compose
Section titled “Docker Compose”Run jwtop as a one-off step alongside a service under test:
services: api: build: . ports: - '8080:8080'
jwtop: image: ghcr.io/cerberauth/jwtop depends_on: - api volumes: - ./keys:/data command: ['crack', '${TOKEN}', '--url', 'http://api:8080/protected', '--key', '/data/public.pem']docker compose run --rm jwtopBuild from source
Section titled “Build from source”-
Clone the repository:
Terminal window git clone https://github.com/cerberauth/jwtop.gitcd jwtop -
Build the image using the dev Dockerfile:
Terminal window docker build -f .docker/Dockerfile-build -t jwtop . -
Run it:
Terminal window docker run --rm jwtop decode $TOKEN
GitHub Actions
Section titled “GitHub Actions”To run jwtop in CI without pulling the image manually, see the GitHub Actions guide — cerberauth/jwtop-action handles installation for you. To use the container image directly in a workflow step instead:
- name: Scan for JWT vulnerabilities run: docker run --rm ghcr.io/cerberauth/jwtop crack "${{ secrets.TEST_TOKEN }}" --url https://staging.example.com/protected