Skip to content
This repository was archived by the owner on Aug 19, 2026. It is now read-only.

Harden query-runner compose exposure - #640

Open
dnviti wants to merge 1 commit into
mainfrom
codex/fix-unauthenticated-query-runner-vulnerability
Open

Harden query-runner compose exposure#640
dnviti wants to merge 1 commit into
mainfrom
codex/fix-unauthenticated-query-runner-vulnerability

Conversation

@dnviti

@dnviti dnviti commented May 26, 2026

Copy link
Copy Markdown
Owner

Motivation

  • The production Podman Compose template published the query-runner service on host port 18093 (bound via arsenale_service_bind_host defaulting to 0.0.0.0), which exposed an unauthenticated internal SQL execution API to external networks and allowed arbitrary SQL against the application database.

Description

  • Removed the host ports mapping for the query-runner service in deployment/ansible/roles/deploy/templates/compose.yml.j2 so the service is no longer published on host interfaces and remains reachable only via internal compose networks, while keeping its environment, secrets, healthcheck, and internal networking intact.

Testing

  • Ran go test ./tools/arsenale-cli/... which completed successfully.

Codex Task

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Hardens the production Podman Compose deployment by preventing the internal query-runner SQL execution API from being published on host network interfaces, keeping it reachable only from other services on the internal compose networks.

Changes:

  • Removed the ports mapping for the production query-runner service so it is no longer exposed on host port 18093.
  • Kept query-runner configuration (env, secrets, healthcheck, networks, dependencies) otherwise unchanged.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 418 to 424
PORT: "8093"
ARSENALE_VERSION: "{{ arsenale_image_tag }}"
DATABASE_URL_FILE: /run/secrets/database_url
DATABASE_SSL_ROOT_CERT: /certs/postgres/ca.pem
ports:
- "{{ arsenale_service_bind_host | default('0.0.0.0') }}:{{ arsenale_query_runner_port | default(18093) }}:8093"
depends_on:
postgres:
condition: {{ _compose_dependency_condition }}
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants