Skip to content

fix(ingestion): resolve nltk and langchain-core to fixed versions (#2061) - #2083

Merged
Gregory91G merged 2 commits into
security-hardeningfrom
fix/nltk-langchain-critical-cves
Aug 3, 2026
Merged

fix(ingestion): resolve nltk and langchain-core to fixed versions (#2061)#2083
Gregory91G merged 2 commits into
security-hardeningfrom
fix/nltk-langchain-critical-cves

Conversation

@Gregory91G

@Gregory91G Gregory91G commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Closes #2061, closes #2102.

airbyte-cdk pins nltk==3.9.1 in all seven CDK connectors and, in the 6.60.x line the nocode harness runs on, langchain-core==0.1.42. Both have a released fix for a CRITICAL. An exact upstream pin cannot be moved by declaring a floor downstream — a resolver reports the conflict and fails — so the version is stated as [tool.uv] override-dependencies.

Package Was Now CVE
nltk 3.9.1 3.10.0 CVE-2025-14009
langchain-core 0.1.42 1.5.x CVE-2025-68664

The connector images were already clean: their Dockerfiles install nltk==3.10.0 with --no-deps, which skips resolution entirely, so the fixed version lived only inside the image while the declared dependencies still resolved to 3.9.1. Scanners and uv sync read the declared side. This makes the two agree.

exclude-newer = "7 days" accompanies each override: an override that only sets a floor would otherwise resolve straight into a release published minutes ago, which is where a compromised maintainer account surfaces first.

Raising the harness to CDK 7 was measured and rejected: 7 failures in the zoom parent-child substream suite, because CDK 7 emits a different parent request. Details in #2061.

Test plan

  • uv pip compile + trivy fs --scanners vuln --severity CRITICAL on each of the 8 projects — 0 CRITICAL (was 8), resolving nltk==3.10.0 and a fixed langchain-core
  • Re-verified after adding the cooldown: resolution still succeeds and still lands above both fixes; the cooldown demonstrably held the newest langchain-core back one patch, as intended
  • Harness suites with the overrides resolved by uv: pytest --suites-only → 42 passed, 1 skipped — identical to the pre-change baseline
  • Connector runtime unchanged: source-gitlab emits a valid SPEC, and the image already carried 3.10.0
  • trivy-fs on this branch reports 8 fewer CRITICAL than the base

@Gregory91G
Gregory91G requested a review from a team as a code owner July 31, 2026 02:25
@Gregory91G Gregory91G self-assigned this Jul 31, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Regenerate the connectors-ddl snapshot

This PR changes src/ingestion/**. If your change affects any
bronze / silver / gold schema, regenerate the committed DDL snapshot
and include it in this PR.

Prerequisites (details: src/ingestion/scripts/bootstrap-db/README.md):

  • docker + a fresh throwaway ClickHouse 25.7.5 (README "Local ClickHouse for testing")
  • .env from .env.bootstrap.example pointing at it; use the host LAN IP,
    reachable from both the host and connector containers
    (host.docker.internal does not resolve on the macOS host itself)
  • python3.12 or python3.11 on PATH (pinned dbt venv)
  • HubSpot + Salesforce credentials in .env — their discover calls the
    live APIs; without them, apply ../connectors-ddl/{hubspot,salesforce}.sql
    (relative to bootstrap-db/) to seed their bronze, then run the dbt step
cd src/ingestion/scripts/bootstrap-db
set -a; source pins.env; source .env; set +a
./bootstrap-db.sh connectors-config.yaml   # fresh ClickHouse 25.7.5
./dump-ddl.sh                              # writes scripts/connectors-ddl/*.sql

Commit the resulting scripts/connectors-ddl/*.sql diff. If nothing
changed, no snapshot update is needed. (Regeneration is manual for now.)

@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Added uv dependency overrides to seven connector projects and the connector test harness. The overrides raise NLTK minimum versions and raise the harness langchain-core minimum version.

Changes

Python dependency overrides

Layer / File(s) Summary
Connector and harness dependency floors
src/ingestion/connectors/{ai/github-copilot,crm/{hubspot,salesforce},git/{bitbucket-cloud,github-v2,gitlab},hr-directory/active-directory}/pyproject.toml, src/ingestion/tests/connectors/pyproject.toml
Connector projects override NLTK to >=3.10.0. The test harness overrides NLTK to >=3.9.3 and langchain-core to >=0.3.81.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested reviewers: cyberantonz

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The PR adds dependency overrides to all eight projects and targets the fixed nltk and langchain-core versions required by issue #2061.
Out of Scope Changes check ✅ Passed All changes modify dependency configuration in the seven connectors and harness covered by issue #2061.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the ingestion dependency fixes for nltk and langchain-core, which matches the pull request's main change.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/nltk-langchain-critical-cves

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Comment on lines +24 to +27
[tool.uv]
# airbyte-cdk pins nltk==3.9.1 (fixed CRITICAL CVE-2025-14009); the image installs 3.10.0
# over it (see Dockerfile), so keep the resolved dependency graph on the same version.
override-dependencies = ["nltk>=3.10.0"]
Comment on lines +25 to +28
[tool.uv]
# airbyte-cdk pins nltk==3.9.1 (fixed CRITICAL CVE-2025-14009); the image installs 3.10.0
# over it (see Dockerfile), so keep the resolved dependency graph on the same version.
override-dependencies = ["nltk>=3.10.0"]
Comment on lines +24 to +27
[tool.uv]
# airbyte-cdk pins nltk==3.9.1 (fixed CRITICAL CVE-2025-14009); the image installs 3.10.0
# over it (see Dockerfile), so keep the resolved dependency graph on the same version.
override-dependencies = ["nltk>=3.10.0"]
Comment on lines +23 to +26
[tool.uv]
# airbyte-cdk pins nltk==3.9.1 (fixed CRITICAL CVE-2025-14009); the image installs 3.10.0
# over it (see Dockerfile), so keep the resolved dependency graph on the same version.
override-dependencies = ["nltk>=3.10.0"]
Comment on lines +23 to +26
[tool.uv]
# airbyte-cdk pins nltk==3.9.1 (fixed CRITICAL CVE-2025-14009); the image installs 3.10.0
# over it (see Dockerfile), so keep the resolved dependency graph on the same version.
override-dependencies = ["nltk>=3.10.0"]
Comment on lines +26 to +29
[tool.uv]
# airbyte-cdk pins nltk==3.9.1 (fixed CRITICAL CVE-2025-14009); the image installs 3.10.0
# over it (see Dockerfile), so keep the resolved dependency graph on the same version.
override-dependencies = ["nltk>=3.10.0"]
Comment on lines +20 to +23
[tool.uv]
# airbyte-cdk pins nltk==3.9.1 (fixed CRITICAL CVE-2025-14009); the image installs 3.10.0
# over it (see Dockerfile), so keep the resolved dependency graph on the same version.
override-dependencies = ["nltk>=3.10.0"]
Comment on lines +30 to +35
[tool.uv]
# airbyte-cdk 6.60.x pins nltk and langchain-core to exact versions carrying fixed
# CRITICALs (CVE-2025-14009, CVE-2025-68664). Neither is reachable from the mock
# harness: nltk serves the file-based unstructured parser and langchain-core the
# vector-db sink, and no nocode manifest uses either.
override-dependencies = [

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🧹 Nitpick comments (1)
src/backend/services/identity/src/Insight.Identity.Api/obj/Insight.Identity.Api.csproj.nuget.dgspec.json (1)

10-18: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Remove generated NuGet obj/ artifacts from source control.

These files embed machine-specific paths and restore state. NuGet must regenerate them during restore. Remove the tracked artifacts. If the repository does not already ignore this directory, add an obj/ ignore rule.

  • src/backend/services/identity/src/Insight.Identity.Api/obj/Insight.Identity.Api.csproj.nuget.dgspec.json#L10-L18: remove the generated restore specification.
  • src/backend/services/identity/src/Insight.Identity.Api/obj/Insight.Identity.Api.csproj.nuget.g.props#L6-L13: remove the generated restore properties.
  • src/backend/services/identity/src/Insight.Identity.Api/obj/Insight.Identity.Api.csproj.nuget.g.targets#L3-L6: remove the generated restore targets.
  • src/backend/services/identity/src/Insight.Identity.Domain/obj/Insight.Identity.Domain.csproj.nuget.dgspec.json#L10-L18: remove the generated restore specification.
  • src/backend/services/identity/src/Insight.Identity.Domain/obj/project.nuget.cache#L3-L6: remove the generated restore cache.
  • src/backend/services/identity/src/Insight.Identity.Infrastructure/obj/project.assets.json#L423-L468: remove the generated dependency graph.
  • src/backend/services/identity/src/Insight.Identity.Infrastructure/obj/project.nuget.cache#L3-L16: remove the generated restore cache.
  • src/backend/services/identity/tests/Insight.Identity.Tests.Unit/obj/project.nuget.cache#L3-L68: remove the generated restore cache.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@src/backend/services/identity/src/Insight.Identity.Api/obj/Insight.Identity.Api.csproj.nuget.dgspec.json`
around lines 10 - 18, Remove all listed generated NuGet artifacts from source
control:
src/backend/services/identity/src/Insight.Identity.Api/obj/Insight.Identity.Api.csproj.nuget.dgspec.json
(lines 10-18),
src/backend/services/identity/src/Insight.Identity.Api/obj/Insight.Identity.Api.csproj.nuget.g.props
(lines 6-13),
src/backend/services/identity/src/Insight.Identity.Api/obj/Insight.Identity.Api.csproj.nuget.g.targets
(lines 3-6),
src/backend/services/identity/src/Insight.Identity.Domain/obj/Insight.Identity.Domain.csproj.nuget.dgspec.json
(lines 10-18),
src/backend/services/identity/src/Insight.Identity.Domain/obj/project.nuget.cache
(lines 3-6),
src/backend/services/identity/src/Insight.Identity.Infrastructure/obj/project.assets.json
(lines 423-468),
src/backend/services/identity/src/Insight.Identity.Infrastructure/obj/project.nuget.cache
(lines 3-16), and
src/backend/services/identity/tests/Insight.Identity.Tests.Unit/obj/project.nuget.cache
(lines 3-68); add an obj/ ignore rule if the repository does not already ignore
these generated directories.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@src/backend/services/identity/src/Insight.Identity.Api/obj/project.nuget.cache`:
- Around line 1-6: Remove all tracked generated restore artifacts under
src/backend/services/identity/src/Insight.Identity.Api/obj,
Insight.Identity.Infrastructure/obj, and Insight.Identity.Domain/obj, including
the listed cache, assets, dgspec, props, and targets files; add an obj/ and bin/
ignore pattern for the Identity service. Keep any packages.lock.json tracked,
and move required restore settings from generated metadata into the relevant
tracked *.csproj or Directory.Build.props/.targets files.

In
`@src/backend/services/identity/src/Insight.Identity.Infrastructure/obj/Insight.Identity.Infrastructure.csproj.nuget.dgspec.json`:
- Around line 37-39: Commit the generated packages.lock.json files for the
Insight.Identity.Domain and Insight.Identity.Infrastructure projects alongside
their respective csproj files under the identity service. Generate them using
the existing restorePackagesWithLockFile setting, and ensure both lock files are
added to version control without changing the restore configuration.

In
`@src/backend/services/identity/tests/Insight.Identity.Tests.Integration/obj/Insight.Identity.Tests.Integration.csproj.nuget.dgspec.json`:
- Around line 1-5: Generated .NET restore artifacts are tracked and must be
removed. Add [Oo]bj/ and [Bb]in/ to .gitignore, untrack all obj contents with
git rm -r --cached "src/backend/services/identity/**/obj", and remove the listed
generated files from both integration and unit test projects:
src/backend/services/identity/tests/Insight.Identity.Tests.Integration/obj/Insight.Identity.Tests.Integration.csproj.nuget.dgspec.json
(1-5), Insight.Identity.Tests.Integration.csproj.nuget.g.props (1-26),
Insight.Identity.Tests.Integration.csproj.nuget.g.targets (1-14),
project.assets.json (1-4), project.nuget.cache (1-6), and
src/backend/services/identity/tests/Insight.Identity.Tests.Unit/obj/Insight.Identity.Tests.Unit.csproj.nuget.dgspec.json
(1-5), Insight.Identity.Tests.Unit.csproj.nuget.g.props (1-25),
Insight.Identity.Tests.Unit.csproj.nuget.g.targets (1-12), project.assets.json
(1-4).

---

Nitpick comments:
In
`@src/backend/services/identity/src/Insight.Identity.Api/obj/Insight.Identity.Api.csproj.nuget.dgspec.json`:
- Around line 10-18: Remove all listed generated NuGet artifacts from source
control:
src/backend/services/identity/src/Insight.Identity.Api/obj/Insight.Identity.Api.csproj.nuget.dgspec.json
(lines 10-18),
src/backend/services/identity/src/Insight.Identity.Api/obj/Insight.Identity.Api.csproj.nuget.g.props
(lines 6-13),
src/backend/services/identity/src/Insight.Identity.Api/obj/Insight.Identity.Api.csproj.nuget.g.targets
(lines 3-6),
src/backend/services/identity/src/Insight.Identity.Domain/obj/Insight.Identity.Domain.csproj.nuget.dgspec.json
(lines 10-18),
src/backend/services/identity/src/Insight.Identity.Domain/obj/project.nuget.cache
(lines 3-6),
src/backend/services/identity/src/Insight.Identity.Infrastructure/obj/project.assets.json
(lines 423-468),
src/backend/services/identity/src/Insight.Identity.Infrastructure/obj/project.nuget.cache
(lines 3-16), and
src/backend/services/identity/tests/Insight.Identity.Tests.Unit/obj/project.nuget.cache
(lines 3-68); add an obj/ ignore rule if the repository does not already ignore
these generated directories.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: bd53f47c-b04f-4531-9abb-979c0fa7077f

📥 Commits

Reviewing files that changed from the base of the PR and between db65ea1 and 4a6b454709173d80ff085d94657c5a32d4c2b5b3.

📒 Files selected for processing (33)
  • src/backend/services/identity/src/Insight.Identity.Api/obj/Insight.Identity.Api.csproj.nuget.dgspec.json
  • src/backend/services/identity/src/Insight.Identity.Api/obj/Insight.Identity.Api.csproj.nuget.g.props
  • src/backend/services/identity/src/Insight.Identity.Api/obj/Insight.Identity.Api.csproj.nuget.g.targets
  • src/backend/services/identity/src/Insight.Identity.Api/obj/project.assets.json
  • src/backend/services/identity/src/Insight.Identity.Api/obj/project.nuget.cache
  • src/backend/services/identity/src/Insight.Identity.Domain/obj/Insight.Identity.Domain.csproj.nuget.dgspec.json
  • src/backend/services/identity/src/Insight.Identity.Domain/obj/Insight.Identity.Domain.csproj.nuget.g.props
  • src/backend/services/identity/src/Insight.Identity.Domain/obj/Insight.Identity.Domain.csproj.nuget.g.targets
  • src/backend/services/identity/src/Insight.Identity.Domain/obj/project.assets.json
  • src/backend/services/identity/src/Insight.Identity.Domain/obj/project.nuget.cache
  • src/backend/services/identity/src/Insight.Identity.Infrastructure/obj/Insight.Identity.Infrastructure.csproj.nuget.dgspec.json
  • src/backend/services/identity/src/Insight.Identity.Infrastructure/obj/Insight.Identity.Infrastructure.csproj.nuget.g.props
  • src/backend/services/identity/src/Insight.Identity.Infrastructure/obj/Insight.Identity.Infrastructure.csproj.nuget.g.targets
  • src/backend/services/identity/src/Insight.Identity.Infrastructure/obj/project.assets.json
  • src/backend/services/identity/src/Insight.Identity.Infrastructure/obj/project.nuget.cache
  • src/backend/services/identity/tests/Insight.Identity.Tests.Integration/obj/Insight.Identity.Tests.Integration.csproj.nuget.dgspec.json
  • src/backend/services/identity/tests/Insight.Identity.Tests.Integration/obj/Insight.Identity.Tests.Integration.csproj.nuget.g.props
  • src/backend/services/identity/tests/Insight.Identity.Tests.Integration/obj/Insight.Identity.Tests.Integration.csproj.nuget.g.targets
  • src/backend/services/identity/tests/Insight.Identity.Tests.Integration/obj/project.assets.json
  • src/backend/services/identity/tests/Insight.Identity.Tests.Integration/obj/project.nuget.cache
  • src/backend/services/identity/tests/Insight.Identity.Tests.Unit/obj/Insight.Identity.Tests.Unit.csproj.nuget.dgspec.json
  • src/backend/services/identity/tests/Insight.Identity.Tests.Unit/obj/Insight.Identity.Tests.Unit.csproj.nuget.g.props
  • src/backend/services/identity/tests/Insight.Identity.Tests.Unit/obj/Insight.Identity.Tests.Unit.csproj.nuget.g.targets
  • src/backend/services/identity/tests/Insight.Identity.Tests.Unit/obj/project.assets.json
  • src/backend/services/identity/tests/Insight.Identity.Tests.Unit/obj/project.nuget.cache
  • src/ingestion/connectors/ai/github-copilot/pyproject.toml
  • src/ingestion/connectors/crm/hubspot/pyproject.toml
  • src/ingestion/connectors/crm/salesforce/pyproject.toml
  • src/ingestion/connectors/git/bitbucket-cloud/pyproject.toml
  • src/ingestion/connectors/git/github-v2/pyproject.toml
  • src/ingestion/connectors/git/gitlab/pyproject.toml
  • src/ingestion/connectors/hr-directory/active-directory/pyproject.toml
  • src/ingestion/tests/connectors/pyproject.toml

Comment on lines +1 to +6
{
"version": 2,
"dgSpecHash": "v0dND2Djyn4=",
"success": true,
"projectFilePath": "/repo/src/backend/services/identity/src/Insight.Identity.Api/Insight.Identity.Api.csproj",
"expectedPackageFiles": [

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

# Untrack the generated restore output.
git rm -r --cached 'src/backend/services/identity/**/obj'

Repository: constructorfabric/insight

Length of output: 246


🏁 Script executed:

#!/bin/bash
# Description: Check existing .NET ignore rules and list all tracked bin/obj artifacts.
set -uo pipefail

echo "=== .gitignore files in the repository ==="
fd -H '^\.gitignore$' . --exec echo "--- {} ---" \; --exec cat {} \;

echo "=== Tracked files under any obj/ or bin/ directory ==="
git ls-files | rg -n '/(obj|bin)/' | head -100

echo "=== Count of tracked obj/bin files ==="
git ls-files | rg -c '/(obj|bin)/' || echo 0

echo "=== Are the Identity obj paths currently ignored? ==="
git check-ignore -v \
  src/backend/services/identity/src/Insight.Identity.Api/obj/project.nuget.cache \
  src/backend/services/identity/src/Insight.Identity.Domain/obj/project.assets.json \
  || echo "NOT ignored"

Repository: constructorfabric/insight

Length of output: 22683


🏁 Script executed:

#!/bin/bash
set -uo pipefail

echo "=== Files in the PR diff stat ==="
git diff --stat

echo "=== Identity service lock files under src/backend/services/identity ==="
git ls-files 'src/backend/services/identity/**/packages.lock.json' | sort

echo "=== Root commit hash, if available ==="
git rev-parse HEAD 2>/dev/null || true

echo "=== Content snippets for referenced Identity obj files ==="
for f in \
  src/backend/services/identity/src/Insight.Identity.Api/obj/project.nuget.cache \
  src/backend/services/identity/src/Insight.Identity.Infrastructure/obj/Insight.Identity.Infrastructure.csproj.nuget.dgspec.json \
  src/backend/services/identity/src/Insight.Identity.Api/obj/project.assets.json \
  src/backend/services/identity/src/Insight.Identity.Domain/obj/project.assets.json \
  src/backend/services/identity/src/Insight.Identity.Domain/obj/Insight.Identity.Domain.csproj.nuget.g.props \
  src/backend/services/identity/src/Insight.Identity.Domain/obj/Insight.Identity.Domain.csproj.nuget.g.targets \
  src/backend/services/identity/src/Insight.Identity.Infrastructure/obj/Insight.Identity.Infrastructure.csproj.nuget.g.props \
  src/backend/services/identity/src/Insight.Identity.Infrastructure/obj/Insight.Identity.Infrastructure.csproj.nuget.g.targets
do
  echo "--- $f ---"
  wc -l "$f"
  case "$f" in
    *.nuget.dgspec.json|project.assets.json|project.nuget.cache)
      sed -n '1,80p' "$f"
      ;;
    *.csproj.nuget.g.props|*.csproj.nuget.g.targets)
      sed -n '1,40p' "$f"
      ;;
  esac
done

echo "=== Search for RestoreSettings in Identity CSProj / props files ==="
rg -n "RestoreSettings|Audit|packages\.lock\.json|RestoreLockedMode" src/backend/services/identity -g '*.csproj' -g '*.props' -g '*.targets' || true

Repository: constructorfabric/insight

Length of output: 8391


🌐 Web query:

dotnet restore generated obj project.assets.json project.nuget.cache NuGet lock File NuGet.lock packages.lock.json

💡 Result:

The files you mentioned are part of the NuGet package restore process in.NET, which ensures that all project dependencies are identified, resolved, and made available for the build [1][2][3]. project.assets.json Located in the obj folder (or the configured intermediate output path), this file is generated by the NuGet restore process [2][4]. It contains the complete dependency graph—including direct and transitive dependencies—for your project [2][5]. It is essential for the build process; the.NET SDK uses it to resolve reference assemblies and identify package locations [6][7]. It is a temporary, generated file and should not be added to source control [2]. packages.lock.json This is an optional project lock file that enables repeatable, deterministic restores [8][9]. When enabled (by setting the MSBuild property RestorePackagesWithLockFile), it records the exact versions of all packages in your dependency graph [8][9]. Unlike project.assets.json, this file is intended to be committed to source control to ensure that every build of the project uses the exact same package versions [8][9]. You can use the --locked-mode flag with dotnet restore to enforce that the restore operation strictly follows the versions defined in this file [3][10]. Other mentioned items - project.nuget.cache: While not explicitly detailed as a primary documentation artifact in the latest docs, NuGet uses various local cache locations (such as the http-cache or global-packages folder) to speed up restore operations [1][3][11]. - NuGet lock File: This generally refers to the packages.lock.json mechanism described above [8]. - obj: This is the default directory where MSBuild and NuGet place temporary build outputs and generated files, such as project.assets.json [2][4]. In summary, project.assets.json is a transient, required file for the build system to understand dependencies, while packages.lock.json is an optional, persistent file used to lock dependencies to specific versions for consistent, repeatable builds [2][6][8].

Citations:


Do not commit generated obj/ restore artifacts.

All referenced files are generated .NET/NuGet restore output and should be ignored, not committed. The committed state embeds machine-local absolute restore paths such as /root/.nuget/packages/, /repo/..., and SDK paths, so these do not work outside that generated environment. Keep packages.lock.json under version control if you need reproducible restores, and move any restore settings from generated .nupkg metadata into tracked *.csproj or Directory.Build.props/.targets.

Untrack the Identity obj/ contents and add an obj//bin/ ignore pattern for this service.

📍 Affects 8 files
  • src/backend/services/identity/src/Insight.Identity.Api/obj/project.nuget.cache#L1-L6 (this comment)
  • src/backend/services/identity/src/Insight.Identity.Infrastructure/obj/Insight.Identity.Infrastructure.csproj.nuget.dgspec.json#L1-L5
  • src/backend/services/identity/src/Insight.Identity.Api/obj/project.assets.json#L1529-L1536
  • src/backend/services/identity/src/Insight.Identity.Domain/obj/project.assets.json#L13-L20
  • src/backend/services/identity/src/Insight.Identity.Domain/obj/Insight.Identity.Domain.csproj.nuget.g.props#L1-L15
  • src/backend/services/identity/src/Insight.Identity.Domain/obj/Insight.Identity.Domain.csproj.nuget.g.targets#L1-L2
  • src/backend/services/identity/src/Insight.Identity.Infrastructure/obj/Insight.Identity.Infrastructure.csproj.nuget.g.props#L1-L15
  • src/backend/services/identity/src/Insight.Identity.Infrastructure/obj/Insight.Identity.Infrastructure.csproj.nuget.g.targets#L1-L7
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@src/backend/services/identity/src/Insight.Identity.Api/obj/project.nuget.cache`
around lines 1 - 6, Remove all tracked generated restore artifacts under
src/backend/services/identity/src/Insight.Identity.Api/obj,
Insight.Identity.Infrastructure/obj, and Insight.Identity.Domain/obj, including
the listed cache, assets, dgspec, props, and targets files; add an obj/ and bin/
ignore pattern for the Identity service. Keep any packages.lock.json tracked,
and move required restore settings from generated metadata into the relevant
tracked *.csproj or Directory.Build.props/.targets files.

Comment on lines +37 to +39
"restoreLockProperties": {
"restorePackagesWithLockFile": "true"
},

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Check whether packages.lock.json files exist and are tracked for the Identity projects.
set -uo pipefail

echo "=== packages.lock.json files present in the working tree ==="
fd 'packages.lock.json' src/backend/services/identity || echo "none found"

echo "=== packages.lock.json files tracked by git ==="
git ls-files 'src/backend/services/identity/**/packages.lock.json' || echo "none tracked"

echo "=== csproj files for comparison ==="
fd -e csproj . src/backend/services/identity

Repository: constructorfabric/insight

Length of output: 308


🏁 Script executed:

#!/bin/bash
set -uo pipefail

echo "=== restore spec around lock settings ==="
sed -n '1,90p' src/backend/services/identity/src/Insight.Identity.Infrastructure/obj/Insight.Identity.Infrastructure.csproj.nuget.dgspec.json 2>/dev/null || true

echo "=== Identity csproj files and lock files (case-sensitive) ==="
git ls-files 'src/backend/services/identity/*/*.csproj' 'src/backend/services/identity/*/*/*.csproj' 'src/backend/services/identity/**/packages.lock.json' | sort

echo "=== all packages.lock.json in repository ==="
git ls-files 'packages.lock.json' '**/packages.lock.json' | sort | sed -n '1,120p'

Repository: constructorfabric/insight

Length of output: 3540


Commit the packages.lock.json files for the Identity projects.

The restore spec enables restorePackagesWithLockFile for Insight.Identity.Domain and Insight.Identity.Infrastructure, but no git-tracked packages.lock.json files exist under src/backend/services/identity. Without committed lock files next to the csproj files, NuGet regenerates them on restore and reproducible package resolution is lost.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@src/backend/services/identity/src/Insight.Identity.Infrastructure/obj/Insight.Identity.Infrastructure.csproj.nuget.dgspec.json`
around lines 37 - 39, Commit the generated packages.lock.json files for the
Insight.Identity.Domain and Insight.Identity.Infrastructure projects alongside
their respective csproj files under the identity service. Generate them using
the existing restorePackagesWithLockFile setting, and ensure both lock files are
added to version control without changing the restore configuration.

Comment on lines +1 to +5
{
"format": 1,
"restore": {
"/repo/src/backend/services/identity/tests/Insight.Identity.Tests.Integration/Insight.Identity.Tests.Integration.csproj": {}
},

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win

Generated obj/ restore artifacts are committed across all 9 files. The shared root cause is that the obj/ intermediate output directory is tracked in version control. Every file here is regenerated by dotnet restore and embeds environment-specific values: the container path /repo/..., the home path /root/.nuget/packages/, and the exact SDK patch /usr/share/dotnet/sdk/9.0.316/. A developer or CI agent with a different path or SDK patch regenerates different content, so each restore causes diff churn and merge conflicts. The projects already set restorePackagesWithLockFile to true, so packages.lock.json is the correct committed artifact for reproducible restore.

Apply one fix: add [Oo]bj/ and [Bb]in/ to .gitignore, then run git rm -r --cached "src/backend/services/identity/**/obj". Remove each file below from the pull request.

  • src/backend/services/identity/tests/Insight.Identity.Tests.Integration/obj/Insight.Identity.Tests.Integration.csproj.nuget.dgspec.json#L1-L5: remove this generated dependency-graph spec; it hardcodes /repo/... project paths and the 9.0.316 SDK path.
  • src/backend/services/identity/tests/Insight.Identity.Tests.Integration/obj/Insight.Identity.Tests.Integration.csproj.nuget.g.props#L1-L26: remove this generated props file; it hardcodes NuGetPackageRoot as /root/.nuget/packages/.
  • src/backend/services/identity/tests/Insight.Identity.Tests.Integration/obj/Insight.Identity.Tests.Integration.csproj.nuget.g.targets#L1-L14: remove this generated targets file; its imports resolve through the hardcoded NuGetPackageRoot.
  • src/backend/services/identity/tests/Insight.Identity.Tests.Integration/obj/project.assets.json#L1-L4: remove this 3597-line resolved asset manifest; it also inflates repository size.
  • src/backend/services/identity/tests/Insight.Identity.Tests.Integration/obj/project.nuget.cache#L1-L6: remove this local restore cache; its dgSpecHash invalidates on any path difference.
  • src/backend/services/identity/tests/Insight.Identity.Tests.Unit/obj/Insight.Identity.Tests.Unit.csproj.nuget.dgspec.json#L1-L5: remove this generated dependency-graph spec for the same reason.
  • src/backend/services/identity/tests/Insight.Identity.Tests.Unit/obj/Insight.Identity.Tests.Unit.csproj.nuget.g.props#L1-L25: remove this generated props file for the same reason.
  • src/backend/services/identity/tests/Insight.Identity.Tests.Unit/obj/Insight.Identity.Tests.Unit.csproj.nuget.g.targets#L1-L12: remove this generated targets file for the same reason.
  • src/backend/services/identity/tests/Insight.Identity.Tests.Unit/obj/project.assets.json#L1-L4: remove this 2691-line resolved asset manifest for the same reason.
📍 Affects 9 files
  • src/backend/services/identity/tests/Insight.Identity.Tests.Integration/obj/Insight.Identity.Tests.Integration.csproj.nuget.dgspec.json#L1-L5 (this comment)
  • src/backend/services/identity/tests/Insight.Identity.Tests.Integration/obj/Insight.Identity.Tests.Integration.csproj.nuget.g.props#L1-L26
  • src/backend/services/identity/tests/Insight.Identity.Tests.Integration/obj/Insight.Identity.Tests.Integration.csproj.nuget.g.targets#L1-L14
  • src/backend/services/identity/tests/Insight.Identity.Tests.Integration/obj/project.assets.json#L1-L4
  • src/backend/services/identity/tests/Insight.Identity.Tests.Integration/obj/project.nuget.cache#L1-L6
  • src/backend/services/identity/tests/Insight.Identity.Tests.Unit/obj/Insight.Identity.Tests.Unit.csproj.nuget.dgspec.json#L1-L5
  • src/backend/services/identity/tests/Insight.Identity.Tests.Unit/obj/Insight.Identity.Tests.Unit.csproj.nuget.g.props#L1-L25
  • src/backend/services/identity/tests/Insight.Identity.Tests.Unit/obj/Insight.Identity.Tests.Unit.csproj.nuget.g.targets#L1-L12
  • src/backend/services/identity/tests/Insight.Identity.Tests.Unit/obj/project.assets.json#L1-L4
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@src/backend/services/identity/tests/Insight.Identity.Tests.Integration/obj/Insight.Identity.Tests.Integration.csproj.nuget.dgspec.json`
around lines 1 - 5, Generated .NET restore artifacts are tracked and must be
removed. Add [Oo]bj/ and [Bb]in/ to .gitignore, untrack all obj contents with
git rm -r --cached "src/backend/services/identity/**/obj", and remove the listed
generated files from both integration and unit test projects:
src/backend/services/identity/tests/Insight.Identity.Tests.Integration/obj/Insight.Identity.Tests.Integration.csproj.nuget.dgspec.json
(1-5), Insight.Identity.Tests.Integration.csproj.nuget.g.props (1-26),
Insight.Identity.Tests.Integration.csproj.nuget.g.targets (1-14),
project.assets.json (1-4), project.nuget.cache (1-6), and
src/backend/services/identity/tests/Insight.Identity.Tests.Unit/obj/Insight.Identity.Tests.Unit.csproj.nuget.dgspec.json
(1-5), Insight.Identity.Tests.Unit.csproj.nuget.g.props (1-25),
Insight.Identity.Tests.Unit.csproj.nuget.g.targets (1-12), project.assets.json
(1-4).

@cyberantonz

Copy link
Copy Markdown
Contributor

Why you change removed .NET insight?

@cyberantonz

Copy link
Copy Markdown
Contributor

By the way, how the python can get old nltk if the installed version is already 3.10 ?

@Gregory91G

Copy link
Copy Markdown
Contributor Author

Why you change removed .NET insight?

fixed

@Gregory91G

Copy link
Copy Markdown
Contributor Author

By the way, how the python can get old nltk if the installed version is already 3.10 ?

trivy fs is checking pyproject.toml, not an actual image. So the fix fixes dependency graph in pyproject.toml.

And nltk>=3.10.0 under [project.dependencies] cannot be used it because it contradicts with strict nltk==3.9.1 from airbyte-cdk

Comment thread .gitignore Outdated
@@ -423,3 +423,8 @@ trivy-fs.sarif
trivy-image.json
trivy-image.sarif
trufflehog-findings.jsonl

# .NET build output. No .csproj is tracked today, but a working copy predating the

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.

useless comment and ignored files

@Gregory91G
Gregory91G force-pushed the fix/nltk-langchain-critical-cves branch from f566521 to ca4a423 Compare July 31, 2026 12:35
)

airbyte-cdk pins nltk==3.9.1 in every CDK connector, and additionally
langchain-core==0.1.42 in the 6.60.x line the nocode test harness runs on.
Both pins have a released fix for a CRITICAL (CVE-2025-14009,
CVE-2025-68664), and no downstream project can move them by declaring a
version floor.

Declare uv override-dependencies so a resolved graph lands on the fixed
versions. For the connectors this also makes the declared graph agree with
the image, which already installs nltk 3.10.0 over the pin with --no-deps.

Signed-off-by: Gregory Gogin <grigoriy.gogin@constructor.tech>
A version pushed in the last few days is where a compromised maintainer account
surfaces first, and an override that only sets a floor would resolve straight to it.

Verified the cooldown does not undo the point of the override: resolution still
lands on nltk 3.10.0 and a langchain-core above the fix, with the newest release
held back as intended.

Signed-off-by: Gregory Gogin <grigoriy.gogin@constructor.tech>
@Gregory91G
Gregory91G merged commit c1bddaf into security-hardening Aug 3, 2026
3 checks passed
@Gregory91G
Gregory91G deleted the fix/nltk-langchain-critical-cves branch August 3, 2026 07:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Connector and harness dependency graphs resolve to CRITICAL nltk and langchain-core

3 participants