Skip to content

fix: set dependency minimums to the CVE fix releases, release 2026.10.26 - #73

Merged
jtroup merged 1 commit into
mainfrom
elmo/safely-legal-troll
Oct 26, 2026
Merged

jtroup merged 1 commit into
mainfrom
elmo/safely-legal-troll

Conversation

@jtroup

@jtroup jtroup commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

ENG-9343

what

Lower each security minimum in [project].dependencies to the
release that fixed its CVEs, and release 2026.10.26.

  • cryptography >=50: CVE-2026-69247 was fixed in 50.0.0.
  • pyjwt >=2.15: CVE-2026-101918 and CVE-2026-102275 were fixed in
    2.15.0.
  • starlette >=1.3.1: CVE-2026-54283 was fixed in 1.3.1.
  • fastmcp >=3.2,<4: 3.2.0 fixes the advisories that affect us.
  • platformdirs: no minimum, because it has no published advisories.

certifi and pip keep their eMudhra minimums.

NEWS.md gets an entry for the fix. The October 23 entries get plainer
wording, and the Windows entry now tells users who created their AI
app configuration before October 23 to create it again. The encoding
fix only reaches new configurations.

why

2026.10.23 set each minimum to the version we happened to lock, not
to the release with the fix. cryptography>=50.0.2 conflicts with
c7n 0.9.53, which pins cryptography==50.0.1, so the two cannot share
an environment. 50.0.2 fixes no security issues.

The advisories come from OSV and cover the versions we locked before
2026.10.23. GHSA-7xgj-8392-5q4r (fastmcp, fixed in 3.4.10) applies
only to fastmcp's component authorization with transforms, which we
do not use. Two pyjwt advisories have no fixed release yet:
CVE-2026-103001 and the disputed CVE-2025-45768.

Fixes: fe4b323 ("fix: security updates for certifi and others, release 2026.10.23 (#72)")

testing

The suite ran in a venv with cryptography 50.0.0, fastmcp 3.2.0,
pyjwt 2.15.0 and starlette 1.3.1, the lowest versions the new
minimums allow. The built wheel installs next to c7n 0.9.53, and
2026.10.23 does not.

docs

NEWS.md has the release notes under October 26, 2026.


🤖 Generated with Claude Code

@jtroup
jtroup requested a review from a team as a code owner October 26, 2026 16:17

@cubic-dev-ai cubic-dev-ai 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.

1 issue found across 4 files

Confidence score: 3/5

  • Removing the platformdirs version floor in pyproject.toml could allow an affected version to be installed through fastmcp-slim. Keep the minimum at 4.11.11 or later.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="pyproject.toml">

<violation number="1" location="pyproject.toml:25">
P2: Custom agent: **Flag Security Vulnerabilities**

This removes the floor despite a path-traversal advisory affecting platformdirs 1.4.4–4.11.10, fixed in 4.11.11; `fastmcp-slim` also depends on platformdirs. Keep a fixed-version floor such as `>=4.11.11` so dependency resolution cannot select a vulnerable release.</violation>
</file>
Architecture diagram
sequenceDiagram
    participant Dev as Developer
    participant PyPI as PyPI / Index
    participant Env as Python Environment
    participant C7N as Cloud Custodian (c7n)
    participant MCP as stacklet-mcp Package

    Note over Dev,Env: NEW: Dependency Resolution Boundary

    Dev->>PyPI: Request install stacklet-mcp 2026.10.26
    PyPI-->>Dev: Package metadata (dependency ranges)
    
    Dev->>Env: pip install stacklet-mcp
    Env->>PyPI: Resolve dependencies
    PyPI-->>Env: Resolved versions (cryptography 50.0.0, pyjwt 2.15.0, etc.)
    
    Env->>Env: Check version conflicts
    alt NEW: cryptography>=50 (no upper bound)
        Env->>C7N: Resolve cryptography==50.0.1
        C7N-->>Env: Compatible (50.0.1 satisfies >=50)
    else OLD: cryptography>=50.0.2
        Env->>C7N: Resolve cryptography==50.0.1
        C7N-->>Env: CONFLICT (50.0.1 < 50.0.2)
    end
    
    alt NEW: pyjwt>=2.15 (no upper bound)
        Env->>PyPI: Fetch pyjwt 2.15.0
        PyPI-->>Env: Installed
    else OLD: pyjwt>=2.15.1
        Env->>PyPI: Fetch pyjwt (min 2.15.1)
        PyPI-->>Env: Installed (higher)
    end
    
    alt NEW: starlette>=1.3.1
        Env->>PyPI: Fetch starlette 1.3.1
        PyPI-->>Env: Installed
    else OLD: starlette>=1.8
        Env->>PyPI: Fetch starlette (min 1.8)
        PyPI-->>Env: Installed (higher)
    end
    
    Env->>MCP: Import stacklet.mcp
    MCP->>Env: Load __version__ = "2026.10.26"
    MCP->>MCP: Set USER_AGENT = "stacklet.mcp/2026.10.26"
    
    Env-->>Dev: Install successful (both packages coexist)
    
    Note over Dev,Env: Runtime Behavior
    
    Env->>MCP: Start MCP server
    MCP->>Env: Init FastMCP (>=3.2.0)
    Env->>Env: Apply CVE-fixed libraries
    Note right of Env: cryptography 50.0.0 (CVE-2026-69247)<br/>pyjwt 2.15.0 (CVE-2026-101918, CVE-2026-102275)<br/>starlette 1.3.1 (CVE-2026-54283)
    
    MCP-->>Env: Server ready
    Env-->>Dev: Running with compatible versions
Loading

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread pyproject.toml
"fastmcp>=3.2,<4", # 3.2.0 fixes the advisories that affect us; fastmcp 4 removes APIs we import
"graphql-core>=3.2",
"httpx>=0.28.1",
"platformdirs>=4.13", # not imported directly; minimum for CVE fixes

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2: Custom agent: Flag Security Vulnerabilities

This removes the floor despite a path-traversal advisory affecting platformdirs 1.4.4–4.11.10, fixed in 4.11.11; fastmcp-slim also depends on platformdirs. Keep a fixed-version floor such as >=4.11.11 so dependency resolution cannot select a vulnerable release.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At pyproject.toml, line 25:

<comment>This removes the floor despite a path-traversal advisory affecting platformdirs 1.4.4–4.11.10, fixed in 4.11.11; `fastmcp-slim` also depends on platformdirs. Keep a fixed-version floor such as `>=4.11.11` so dependency resolution cannot select a vulnerable release.</comment>

<file context>
@@ -18,15 +18,14 @@ classifiers = [
   "graphql-core>=3.2",
   "httpx>=0.28.1",
-  "platformdirs>=4.13",            # not imported directly; minimum for CVE fixes
   "pydantic>=2.11.7",
   "pydantic-settings>=2.13,<2.14",
-  "pyjwt>=2.15.1",                 # not imported directly; minimum for CVE fixes
</file context>

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

No thank you. There's no actual CVE attached to this; it comes from https://intel.aikido.dev/cve/AIKIDO-2026-777134. Raising the floor has a non-zero cost (the whole reason this PR exists) and there has to be a concrete justifiable reason to add one. That doesn't exist here.

@kevin-birkett kevin-birkett 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.

thanks @jtroup

@jtroup
jtroup merged commit 775bd35 into main Oct 26, 2026
6 checks passed
@jtroup
jtroup deleted the elmo/safely-legal-troll branch October 26, 2026 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants