From 3cf441f1406fe9a74aa142343819c1d2c0ac29d2 Mon Sep 17 00:00:00 2001 From: Ayush8923 <80516839+Ayush8923@users.noreply.github.com> Date: Tue, 21 Jul 2026 15:23:07 +0530 Subject: [PATCH 1/2] fix(release): update the release script --- .github/workflows/cd-production.yml | 2 +- .github/workflows/cd-staging.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cd-production.yml b/.github/workflows/cd-production.yml index 01970ce..ddb3870 100644 --- a/.github/workflows/cd-production.yml +++ b/.github/workflows/cd-production.yml @@ -31,7 +31,7 @@ jobs: INSTANCE_ID: ${{ secrets.EC2_INSTANCE_ID }} BUILD_DIRECTORY: ${{ secrets.BUILD_DIRECTORY }} run: | - DEPLOY_CMD="cd ${BUILD_DIRECTORY} && git fetch --tags origin && git checkout --force ${{ github.sha }} && docker compose build && docker compose run --rm --entrypoint '' backend uv run --frozen alembic upgrade head && docker compose up -d --remove-orphans && docker image prune -f" + DEPLOY_CMD="cd ${BUILD_DIRECTORY} && git fetch --tags origin && git checkout --force ${{ github.sha }} && docker compose build && docker compose run --rm --entrypoint '' backend uv run --frozen alembic upgrade head && docker compose up -d --remove-orphans && docker image prune -f && docker builder prune -af" CMD_ID=$(aws ssm send-command \ --instance-ids "$INSTANCE_ID" \ diff --git a/.github/workflows/cd-staging.yml b/.github/workflows/cd-staging.yml index 32811a6..875989f 100644 --- a/.github/workflows/cd-staging.yml +++ b/.github/workflows/cd-staging.yml @@ -30,7 +30,7 @@ jobs: INSTANCE_ID: ${{ secrets.STAGING_EC2_INSTANCE_ID }} BUILD_DIRECTORY: ${{ secrets.BUILD_DIRECTORY }} run: | - DEPLOY_CMD='sudo -iu ec2-user bash -lc \"cd '"${BUILD_DIRECTORY}"' && git fetch origin && git reset --hard origin/main && docker compose build && docker compose run --rm --entrypoint \\\"\\\" backend uv run --frozen alembic upgrade head && docker compose up -d --remove-orphans && docker image prune -f\"' + DEPLOY_CMD='sudo -iu ec2-user bash -lc \"cd '"${BUILD_DIRECTORY}"' && git fetch origin && git reset --hard origin/main && docker compose build && docker compose run --rm --entrypoint \\\"\\\" backend uv run --frozen alembic upgrade head && docker compose up -d --remove-orphans && docker image prune -f && docker builder prune -af\"' CMD_ID=$(aws ssm send-command \ --instance-ids "$INSTANCE_ID" \ From 5ebeab2f4846580465d81941e20edba6fb6a65d6 Mon Sep 17 00:00:00 2001 From: Ayush8923 <80516839+Ayush8923@users.noreply.github.com> Date: Mon, 3 Aug 2026 11:46:08 +0530 Subject: [PATCH 2/2] fix(*): remove the nltk disable import security --- .github/workflows/continuous-integration.yml | 2 -- backend/Dockerfile | 2 -- backend/scripts/install_guardrails_from_hub.sh | 2 -- 3 files changed, 6 deletions(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index c9d6c14..8738d11 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -9,8 +9,6 @@ on: jobs: checks: runs-on: ubuntu-latest - env: - NLTK_DISABLE_IMPORT_SECURITY: "1" services: postgres: image: postgres:16 diff --git a/backend/Dockerfile b/backend/Dockerfile index eb0c852..c6f4a36 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -47,8 +47,6 @@ RUN --mount=type=cache,target=/root/.cache/uv \ # Install pinned spaCy model in the final environment used at runtime. RUN python -m pip install --no-deps "${SPACY_MODEL_WHEEL_URL}" -ENV NLTK_DISABLE_IMPORT_SECURITY=1 - # Set HuggingFace cache directory ENV HF_HOME=/app/hf_cache diff --git a/backend/scripts/install_guardrails_from_hub.sh b/backend/scripts/install_guardrails_from_hub.sh index fcc5486..53414d2 100755 --- a/backend/scripts/install_guardrails_from_hub.sh +++ b/backend/scripts/install_guardrails_from_hub.sh @@ -8,8 +8,6 @@ GUARDRAILS_HUB_API_KEY="${GUARDRAILS_HUB_API_KEY:-}" ENABLE_METRICS="${ENABLE_METRICS:-false}" ENABLE_REMOTE_INFERENCING="${ENABLE_REMOTE_INFERENCING:-true}" -export NLTK_DISABLE_IMPORT_SECURITY=1 - BACKEND_DIR="$(cd "$SCRIPT_DIR/.." && pwd)" MANIFEST_FILE="${1:-$BACKEND_DIR/app/core/validators/validators.json}"