Skip to content

Remove sprintf-js path and backport Forge/Braces security fixes - #13

Merged
tsilva merged 9 commits into
mainfrom
agent/fix-critical-transitive-dependencies
Oct 10, 2026
Merged

tsilva merged 9 commits into
mainfrom
agent/fix-critical-transitive-dependencies

Conversation

@tsilva

@tsilva tsilva commented Oct 10, 2026 •

Copy link
Copy Markdown
Owner

Thunkd still resolves a vulnerable sprintf-js chain and unreleased Forge/Braces advisories. This change removes the old Istanbul YAML chain, backports the nested RSA DigestInfo validation from digitalbazaar/forge#1152 at ceba34402e329f0365134f23fe19898756527d65, and bounds brace parsing/AST walks before recursion.

Normal Expo signing, valid RSA AlgorithmIdentifier forms, NYC YAML/JSON configuration with inheritance, globs, ranges and escapes continue to work. Malformed nested DigestInfo fields, 4,000-level patterns, 10,000-level direct ASTs and cyclic ASTs are rejected. The configured brace limit is 128 levels. No new package versions or dependency sources are introduced.

Validation: frozen pnpm install, malicious-input and legitimate-control regression suite, Expo lint, TypeScript and Expo web export pass locally. Existing security controls and action pins remain unchanged. The existing security branch was merged with current main without rewriting history; its older fixes are already superseded by main, and the final source diff contains only this remediation.

Audit evidence: pnpm audit still reports the unchanged package versions for two existing patched image-size advisories, GHSA-86w9-cpqp-85rv (Forge) and GHSA-vfj7-8cjw-p6xm (Braces). The repository owner approved publishing and merging these tested source backports despite those version-based findings, subject to all normal CI/security checks passing. No audit threshold, advisory allowlist, branch protection or alert state is changed. Dependabot alerts remain tracked until upstream releases or the published dependency graph establish a fix.

@tsilva
tsilva marked this pull request as ready for review October 10, 2026 16:38
@tsilva
tsilva merged commit 8a841ea into main Oct 10, 2026
9 checks passed
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-10T16:41:53.342816Z 8573304 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8573304fac

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +27 to +29
+ if (Array.isArray(node.nodes)) {
+ for (const child of node.nodes) pending.push([child, depth + 1]);
+ }

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 Badge Guard parent-chain cycles during expansion

When a caller uses the public AST overload with a cyclic parent pointer, this validation passes because it traverses only nodes, but the patched package's expand.js still follows block.parent in an unbounded while loop. For example, a root containing a paren node whose parent points to itself makes braces.expand(root) hang indefinitely, so the new cyclic-AST protection and regression test do not cover every AST link that the walker follows; add cycle/depth protection to the parent-chain climbs as well.

Useful? React with 👍 / 👎.

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.

1 participant