Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/pr-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,8 @@ jobs:
IMAGE_TAG=test \
INTEGRATION_TESTS_MODE=true \
CHECK_TTL_MANAGEMENT_TASK_FREQUENCY_IN_HOURS=0.001 \
API_PORT=8080:8080 \
POSTGRES_PORT=5432:5432 \
docker compose up \
relational_db \
index \
Expand Down Expand Up @@ -428,6 +430,8 @@ jobs:
DISABLE_TELEMETRY=true \
IMAGE_TAG=test \
DEV_MODE=true \
API_PORT=8080:8080 \
POSTGRES_PORT=5432:5432 \
docker compose -f docker-compose.multitenant-dev.yml up \
relational_db \
index \
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/pr-mit-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,8 @@ jobs:
DISABLE_TELEMETRY=true \
IMAGE_TAG=test \
INTEGRATION_TESTS_MODE=true \
API_PORT=8080:8080 \
POSTGRES_PORT=5432:5432 \
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Sep 25, 2025

Choose a reason for hiding this comment

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

Unnecessary host port exposure for Postgres; tests use the Docker network (relational_db) and do not require binding 5432 on the host. This can cause port conflicts and increases attack surface in CI.

Prompt for AI agents
Address the following comment on .github/workflows/pr-mit-integration-tests.yml at line 262:

<comment>Unnecessary host port exposure for Postgres; tests use the Docker network (relational_db) and do not require binding 5432 on the host. This can cause port conflicts and increases attack surface in CI.</comment>

<file context>
@@ -258,6 +258,8 @@ jobs:
           IMAGE_TAG=test \
           INTEGRATION_TESTS_MODE=true \
+          API_PORT=8080:8080 \
+          POSTGRES_PORT=5432:5432 \
           docker compose up \
             relational_db \
</file context>

✅ Addressed in 2fea661

docker compose up \
relational_db \
index \
Expand Down
8 changes: 4 additions & 4 deletions deployment/docker_compose/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ services:
- inference_model_server
- minio
restart: unless-stopped
# ports:
# - "8080:8080"
ports:
- "${API_PORT:-}"
Copy link
Contributor

Choose a reason for hiding this comment

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

logic: Empty environment variable expansion may cause Docker Compose parsing issues. Consider using a default empty string or conditional port mapping.

Suggested change
- "${API_PORT:-}"
- "${API_PORT:-8080:8080}"

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Sep 25, 2025

Choose a reason for hiding this comment

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

Interpolating an empty value for API_PORT results in an invalid ports entry and docker-compose parsing failure. Provide a valid default mapping or remove the ports block when not mapping ports.

Prompt for AI agents
Address the following comment on deployment/docker_compose/docker-compose.yml at line 57:

<comment>Interpolating an empty value for API_PORT results in an invalid ports entry and docker-compose parsing failure. Provide a valid default mapping or remove the ports block when not mapping ports.</comment>

<file context>
@@ -53,8 +53,8 @@ services:
-    # ports:
-    #   - &quot;8080:8080&quot;
+    ports:
+      - &quot;${API_PORT:-}&quot;
     environment:
       # Auth Settings
</file context>
Suggested change
- "${API_PORT:-}"
- "${API_PORT:-8080:8080}"

✅ Addressed in 2fea661

environment:
# Auth Settings
- AUTH_TYPE=${AUTH_TYPE:-basic}
Expand Down Expand Up @@ -228,8 +228,8 @@ services:
environment:
- POSTGRES_USER=${POSTGRES_USER:-postgres}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-password}
# ports:
# - "5432:5432"
ports:
- "${POSTGRES_PORT:-}"
Copy link
Contributor

Choose a reason for hiding this comment

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

logic: Same issue with empty environment variable expansion for Postgres port.

Suggested change
- "${POSTGRES_PORT:-}"
- "${POSTGRES_PORT:-5432:5432}"

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Sep 25, 2025

Choose a reason for hiding this comment

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

Interpolating an empty value for POSTGRES_PORT results in an invalid ports entry and docker-compose parsing failure. Provide a valid default mapping or remove the ports block when not mapping ports.

Prompt for AI agents
Address the following comment on deployment/docker_compose/docker-compose.yml at line 232:

<comment>Interpolating an empty value for POSTGRES_PORT results in an invalid ports entry and docker-compose parsing failure. Provide a valid default mapping or remove the ports block when not mapping ports.</comment>

<file context>
@@ -228,8 +228,8 @@ services:
-    # ports:
-    #   - &quot;5432:5432&quot;
+    ports:
+      - &quot;${POSTGRES_PORT:-}&quot;
     volumes:
       - db_volume:/var/lib/postgresql/data
</file context>
Suggested change
- "${POSTGRES_PORT:-}"
- "${POSTGRES_PORT:-5432:5432}"

✅ Addressed in 2fea661

volumes:
- db_volume:/var/lib/postgresql/data

Expand Down
Loading