Skip to content

Fix/security advisories - #48

Merged
godronus merged 5 commits into
mainfrom
fix/security-advisories
Sep 9, 2026
Merged

godronus merged 5 commits into
mainfrom
fix/security-advisories

Conversation

@godronus

@godronus godronus commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI lite review requested due to automatic review settings September 9, 2026 07:56

This comment was marked as outdated.

Comment thread .github/workflows/pr-tests.yaml Fixed
Comment thread src/tools/local/workspace/compiler/utils.ts Dismissed
godronus and others added 3 commits September 9, 2026 10:08
- Strip API key from process.env after capture so build subprocesses
  (cargo build.rs, npm lifecycle scripts, proc-macros) cannot read it
- Add buildSubprocessEnv() allowlist for all spawn sites; thread
  gcoreApiKey explicitly to gcore_api and batch_execute tools
- Add timeout (180s JS/AS, 300s Rust) and 10MB output cap to all
  compiler spawn paths to prevent unbounded hang/memory DoS
- Fix normalizePath to resolve symlinks via realpathSync so a workspace
  symlink cannot escape the workspace root
- Pin create-fastedge-app to an exact version; force registry and
  userconfig for scaffold invocations to block .npmrc redirect attacks
- Replace world-writable chmod 777 walk with chownSync to workspace
  owner; bound directory walk to workspaceRoot (not cwd)
- Add baked fastedge user (UID 10001) to base image; redirect root
  fallback in entrypoint to that user instead of staying root
- Remove unused qs direct dependency; add pnpm overrides for all
  vulnerable transitive deps (zero prod advisories after)

security audit of mcp-server

add pr-test CI/CD

remove internal security advisory context from public repo

Audit docs moved to fastedge-coordinator/context/security-advisories/
so they do not ship to users of this public package.
…ntain permissions'

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

This comment was marked as resolved.

This comment was marked as resolved.

This comment was marked as resolved.

This comment was marked as resolved.

This comment was marked as resolved.

Copilot AI left a comment •

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.

🔵 Needs a closer look

normalizePath() returning a realpath-rooted prefix can break callers that compare against the original workspaceRoot string (notably build-root discovery) when workspaceRoot is a symlink.

Review details

Files not reviewed (1)

  • pnpm-lock.yaml: Generated file

Suppressed comments (1)

Previously missed (1) — in code that hasn't changed since the last review.

src/utils/index.ts:34

  • normalizePath currently returns paths rooted at realpathSync(workspaceRoot) (via candidate = path.join(rootReal, ...)). If workspaceRoot itself is a symlink, callers that compare against the original workspaceRoot string (e.g. deriveBuildDirectory’s dir.startsWith(path.resolve(workspaceRoot)) in src/tools/local/workspace/compiler/index.ts) will stop working because entryFilePath no longer shares the same lexical prefix. Consider using real paths only for the confinement checks, but returning a path rooted at the caller-provided workspaceRoot.
  • Files reviewed: 28/29 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

NOT AN ISSUE: Not worth a fix: — The threat model is "malicious workspace must not escape confinement." Here, the confinement check inside normalizePath is still correct (rootReal vs probeReal). The only thing that breaks is that callers like deriveBuildDirectory get back a realpath-rooted string that doesn't match their workspaceRoot prefix — so a build might fail or misroute, not escape the workspace.

pr-test yaml fixed
align action versions
npm_config
@godronus
godronus force-pushed the fix/security-advisories branch from fe4f1de to e31a32b Compare September 9, 2026 12:18
@godronus
godronus requested a review from qrdl September 9, 2026 12:40
@godronus
godronus merged commit 7ec5dde into main Sep 9, 2026
4 checks passed
@godronus
godronus deleted the fix/security-advisories branch September 9, 2026 13:15
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.

4 participants