Skip to content

[dependabot-agent] Fix smol-toml denial-of-service advisory (GHSA-7w5x-hrqm-74c2) via npm override #8386

Description

Caution

Protected files were modified in this change.
This pull request is in request-review mode and requires explicit human scrutiny before merge.

Protected files: package-lock.json, package.json

Dependency Release Train Summary

What changed

  • Package/ecosystem: npm (root manifest)
  • Manifest(s): package.json, package-lock.json
  • Old version: smol-toml@1.7.0 (transitive, via markdownlint-cli2@0.23.2)
  • New version: smol-toml@1.8.0 (pinned via overrides)
  • Update type: security (patch-level transitive override)

Why now

  • npm audit reports a high-severity Denial of Service advisory
    (GHSA-7w5x-hrqm-74c2) affecting
    smol-toml <=1.7.0 via malformed TOML documents. markdownlint-cli2@0.23.2 (the latest
    release) still pins the vulnerable smol-toml@1.7.0; no newer markdownlint-cli2 release
    exists yet that bumps it. An npm overrides entry forces the patched 1.8.0 release without
    downgrading markdownlint-cli2 (the only available "fix" per npm audit is a major
    downgrade to 0.21.0, which is worse).

Risk assessment

  • Runtime/dev/build/CI scope: dev-only (markdownlint-cli2 is a devDependency used for
    npm run lint:md); no production runtime path.
  • Direct/transitive: transitive (via markdownlint-cli2 -> smol-toml).
  • Reachability: smol-toml has zero own dependencies; only used internally by
    markdownlint-cli2 to parse its own TOML config, if any. No direct imports of smol-toml
    found in this repo's source.

Validation

  • Commands run:
    • npm audit --registry=https://registry.npmjs.org/ --package-lock-only --json (before): 1 high
      (smol-toml/markdownlint-cli2).
    • npm install --registry=https://registry.npmjs.org/ --package-lock-only --ignore-scripts
      to regenerate the lockfile with the override applied.
    • npm audit --registry=https://registry.npmjs.org/ --package-lock-only --json (after):
      0 vulnerabilities.
    • Verified valid JSON (python3 json.load) and a minimal diff (only the single
      node_modules/smol-toml lockfile entry changed: version/resolved/integrity).
  • Result: audit clean; diff is exactly 2 files, 5 insertions / 4 deletions.
  • Remaining gaps: npm ci/full lifecycle-script install could not be run in this sandbox
    (the repo's .npmrc points at an internal Azure DevOps npm mirror
    ms-feed-25.pkgs.visualstudio.com that returns 403 here); validated instead via
    --registry=https://registry.npmjs.org/ --package-lock-only --ignore-scripts, which is
    sufficient to prove correct resolution and the audit outcome. CI should confirm a full
    install succeeds against the real internal registry.

Control Plane

Reviewer checklist

  • CI passes
  • CODEOWNERS or service owners reviewed
  • Security-sensitive areas approved, if applicable
  • Deployment/canary owner confirms runtime health, if needed

Rollback guidance

  • Revert this PR (remove the smol-toml override) or pin smol-toml back to 1.7.0 if an
    incompatibility surfaces. package.json and package-lock.json must be reverted together.

Note

This was originally intended as a pull request, but the git push operation failed.

Original error: The process '/usr/bin/git' failed with exit code 128

Workflow Run: View run details and download bundle artifact

The bundle file is available in the agent artifact in the workflow run linked above.

Create the pull request manually
# Download the artifact from the workflow run
gh run download '34460791967' -n agent -D '/tmp/agent-34460791967'

# Resolve the bundle source ref, fetch it into a temporary ref, then create the local branch
bundle_path='/tmp/agent-34460791967/aw-github-gh-aw-firewall-dependabot-agent-smol-toml-security-fix-20260910093930.bundle'
temp_ref='refs/bundles/create-pr-dependabot-agent-smol-toml-security-fix-20260910093930-e5bf3b74'
target_ref='refs/heads/dependabot-agent/smol-toml-security-fix-20260910093930'
bundle_source_ref=$(git bundle list-heads "$bundle_path" | awk '$2 ~ /^refs\/heads\// { print $2 }')
if [ -z "$bundle_source_ref" ]; then
  bundle_source_ref=$(git bundle list-heads "$bundle_path" | awk '$2 == "HEAD" { print $2 }')
fi
if [ "$(printf '%s\n' "$bundle_source_ref" | sed '/^$/d' | wc -l | tr -d ' ')" != "1" ]; then
  echo "Expected exactly one bundle source ref, found: $bundle_source_ref" >&2
  exit 1
fi
git fetch "$bundle_path" "${bundle_source_ref}:${temp_ref}"
git update-ref "$target_ref" "$temp_ref"
git checkout 'dependabot-agent/smol-toml-security-fix-20260910093930'
# Ensure the working tree matches the updated branch
git reset --hard
# Remove the temporary bundle ref
git update-ref -d "$temp_ref"

# Push the branch to the target remote
git push 'origin' 'dependabot-agent/smol-toml-security-fix-20260910093930'

# Create the pull request
gh pr create --title '[dependabot-agent] Fix smol-toml denial-of-service advisory (GHSA-7w5x-hrqm-74c2) via npm override' --base 'main' --head 'dependabot-agent/smol-toml-security-fix-20260910093930' --repo 'github/gh-aw-firewall'

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • msfeed25.pkgs.visualstudio.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "msfeed25.pkgs.visualstudio.com"

See Network Configuration for more information.

Generated by :dependabot: Dependabot / Release Trains · copilot · auto · 150.6 AIC · ⌖ 22.9 AIC · ⊞ 18.6K ·

Add this agentic workflow to your repo

To install this agentic workflow, run

gh aw add githubnext/gh-aw-cao/.github/workflows/dependabot-release-train-updater.md@main

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions