Skip to content

fix(deps): patch frontend audit security floors - #1623

Draft
seonghobae wants to merge 10 commits into
developfrom
autoresearch/frontend-sec-bump
Draft

fix(deps): patch frontend audit security floors#1623
seonghobae wants to merge 10 commits into
developfrom
autoresearch/frontend-sec-bump

Conversation

@seonghobae

@seonghobae seonghobae commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Current authority — 2026-09-10

  • protected base: develop@042b0c70531b229af3acbd0421a2f23098d848b3
  • exact head: 17a7618eda2b212b691f08fa936e042b34258fc9
  • exact tree: dc33619263b554650a5d4cd4718a8f72480afea6
  • lifecycle: Draft / canonical frontend dependency-security owner / required evidence not fully GREEN / do not merge
  • owned scope: frontend/package.json, frontend/pnpm-workspace.yaml, generated frontend/pnpm-lock.yaml, and the Naruon security-floor regression tests. Descendant product lanes consume this ancestry rather than copying dependency source.

Reality RED → causal repair succession

The predecessor Vitest missing-resolution repair remains valid: RED a6715c9c845ed5ad48929fd3261bb07ce4b802e5 proved the test could pass vacuously when all vitest or @vitest/coverage-v8 keys disappeared from a lock section; GREEN 21897d8ccd11ee4a2d7a3df5551db12c92c9ec71 requires matching keys to be non-empty before checking every resolution against the floor.

A later CodeRabbit finding was also valid: the Vitest check still did not bind the root pnpm importer to package.json or prove that the importer-referenced peer-qualified snapshot exists. Reality RED 15fecaaeabe6faaedf7e4c3f8991eb3add1dd0c5 added specifier/version drift and missing-snapshot regressions for both vitest and @vitest/coverage-v8; Application CI 34399983768 failed on that new contract. Current repair 17a7618... binds importers["."]["devDependencies"] specifier and resolved version to the manifest and requires the exact peer-qualified snapshot key. The review thread is resolved and non-outdated.

The separate js-yaml security test already fails closed on missing js-yaml@ resolutions in both packages and snapshots and binds workspace/lock overrides plus the ESLint consumer, so no duplicate repair was added.

Exact-head evidence

Current 17a7618... has terminal GREEN repository/direct evidence for Application CI 34400279071, Bandit 34400279107, Security Scan 34400279125, Semgrep 34400279105, Docker 34400279411, direct GHAS CodeQL, Required OpenCode, coverage-source-tree, coverage-evidence, and Required Noema (noema-review job 102630634220).

Central required CodeQL PR 34400279027 is RED: compatibility jobs Python 102630567766, JavaScript/TypeScript 102630567259, and Actions 102630567189 all failed enforcement, while dispatcher 102631310883 subsequently succeeded. The same exact head has direct CodeQL GREEN, so this is a fresh central publication/wake ordering reproduction, not a Naruon leaf-source defect. It is already recorded on canonical .github#1929 as comment 5608208285; no dummy requeue, synthetic status, copied workflow, or gate exception was added.

Required Strix run 34400277194 / job 102630455606 is now terminal FAILURE on this exact head. Admission, exact-head materialization, contextual-orchestrator sidecar provisioning, Strix installation and report upload all succeeded; Run Strix (quick) executed for about five hours before failing. Artifact 10132525908 (strix-reports, SHA-256 199d0d51031727ce9732d3093b46235d48546a29c6be4cdf707e2da8db7e9e53) records a failed Strix run after 298 LLM requests / 25,238,305 input tokens / 62,911 output tokens. Caido bootstrap attempts 1–4 failed but recovered before the scan (Caido project selected), so this is not a terminal sandbox-bootstrap failure. The terminal request through orchestrator/free reached meta/llama-3.2-11b-vision-instruct / nvidia_nim_meta_llama_3_2_11b_vision_instruct and received HTTP 400 invalid_request_error, request id f335dc663fe0451b84a1585bedb91cf4, retryable=false, transport=passthrough; the gate failed closed as STRIX_PROVIDER_UNAVAILABLE. SARIF has zero results, but a failed partial scan is not clean-security evidence. Fresh owner evidence is recorded on contextual-orchestrator#1106 as comment 5611406984; do not add a Naruon retry, model/provider pin, paid fallback, guessed timeout or leaf capability heuristic.

Review state: all currently surfaced inline findings are resolved; the latest CodeRabbit activity confirms the importer-contract fix but there is still no qualifying post-last-push APPROVED review bound to exact 17a7618....

Merge boundary

Keep Draft until every live required context on the exact head is terminal-success, current-head review has no valid unresolved findings and a qualifying independent approval exists. Central CodeQL and Strix are currently terminal RED. After this owner is actually integrated, descendants must ordinary-restack on the integrated security owner and must not inherit predecessor checks/reviews as current-head evidence.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 9, 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-09-09T03:59:35.531464Z e8a54fc 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.

@coderabbitai

coderabbitai Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

📝 Walkthrough

Walkthrough

The frontend updates Next.js, eslint-config-next, Vitest, js-yaml, and sharp versions. New tests validate manifest values, workspace overrides, lockfile consistency, and dependency security floors.

Changes

Frontend security floor enforcement

Layer / File(s) Summary
Update frontend dependency versions
frontend/package.json, frontend/pnpm-workspace.yaml
Next.js and eslint-config-next update to 16.3.4. Vitest packages update to 4.1.11. The workspace pins js-yaml to 4.3.2 and sharp to 0.35.4.
Enforce frontend framework and image floors
backend/tests/test_frontend_framework_security_floor.py
Tests parse dependency and lockfile versions, validate importer and snapshot entries, enforce Next.js and sharp floors, and reject below-floor drift.
Validate js-yaml and Vitest floors
backend/tests/test_frontend_framework_security_floor.py, backend/tests/test_js_yaml_dependency_security.py
Tests validate js-yaml overrides and resolutions, Vitest manifest and lockfile versions, and the js-yaml dependency used by @eslint/eslintrc.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: 🟡 Moderate · up to 21897

The frontend dependency update raises Vitest security floors, but its validation can still accept a mismatched root lockfile resolution or missing referenced snapshot. This can allow future dependency drift to bypass the intended security-floor contract and should be corrected before merge.

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the primary change: updating frontend dependency security floors and related validation.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch autoresearch/frontend-sec-bump

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@seonghobae
seonghobae marked this pull request as draft September 9, 2026 02:55

Copy link
Copy Markdown
Contributor Author

@codex review

Please review only the current exact head d76f7b450888d42040ca090ed9b9924e08f01881. The predecessor review at a3421f3... predates the security-floor regression test and is not current-head evidence. Focus on the Next.js/sharp security-floor contract, generated lock consistency, and whether the regression can fail closed without introducing false GREENs.

@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: d76f7b4508

ℹ️ 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 thread backend/tests/test_frontend_framework_security_floor.py Outdated
Comment thread backend/tests/test_frontend_framework_security_floor.py Outdated

Copy link
Copy Markdown
Contributor Author

@codex review

Please review exact head e8a54fc5156ac3ffbb79bc8418c5125d7dcdea60 only. Focus on the structural pnpm-lock.yaml security-floor validation added after the two P2 findings on predecessor d76f7b...: root importer/specifier/resolution/snapshot identity, eslint-config-next parity, lock/workspace sharp override identity, and rejection of every below-floor next@ / sharp@ key in both packages and snapshots. Do not transfer predecessor check or review evidence.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Nice work!

Reviewed commit: e8a54fc515

ℹ️ 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".

@seonghobae
seonghobae marked this pull request as ready for review September 9, 2026 03:55
coderabbitai[bot]
coderabbitai Bot previously approved these changes Sep 9, 2026
@seonghobae

Copy link
Copy Markdown
Contributor Author

exact-head validation receipt

Head: e8a54fc5156ac3ffbb79bc8418c5125d7dcdea60; base: develop@042b0c70531b229af3acbd0421a2f23098d848b3.

  • Official patch floors verified: Next.js >=16.3.3 for GHSA-2xp9-vwfh-vxw4 and CVE-2026-75604; sharp >=0.35.4 for GHSA-rgj7-g3m4-5g8c. This head uses Next.js 16.3.4 and sharp 0.35.4.
  • corepack pnpm install --frozen-lockfile: exit 0, 490 packages, pnpm 11.5.3.
  • focused backend security-floor contract: 5 passed, terminal exit 0.
  • next build --webpack: exit 0; 16 routes generated under Next.js 16.3.4.
  • first broad frontend run overlapped the production build and failed 10 tests, mostly at the unchanged 5-second limit. This is not counted as a pass. After the build completed, each failed file was rerun without widening its timeout: Dashboard 5/5, Data 12/12, Projects 4/4, Prompt Studio 7/7, total 28/28, terminal exit 0.

Visual Inspection: directly inspected the production build in a real browser at 1280×720, locale ko, on /, /data, and /projects, with backend-unavailable empty/error states. Main content remained readable without overlap or clipping. A pre-existing top-header horizontal scrollbar still pushes later workspace destinations outside the initial viewport; that customer-facing responsive gap is outside this dependency-only delta and must not be treated as passed responsive coverage. Browser verification ended before stopping the local server; server exit 130 is the expected operator stop, while the logged proxy-target configuration failures reflect the intentionally absent backend.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Exact-head dependency repair — 2026-09-09

Current head: b97f42f16f2dfedccc1e98812c88117132ef8126

The prior clean audit became stale when GitHub published new js-yaml and Vitest advisories. This head repairs the canonical dependency owner:

  • js-yaml is pinned to 4.3.2 through the existing pnpm workspace override, clearing GHSA-5p4m-2wfm-xmqj and GHSA-2883-xcg3-v3hh.
  • Vitest and @vitest/coverage-v8 are pinned to 4.1.11, clearing GHSA-82fw-gwwq-j7x9.
  • ESLint 10 was evaluated and rejected because the current latest import, JSX accessibility, and React plugins do not declare ESLint 10 support. No peer-range suppression was added.
  • Security-floor tests now reject future lock entries below the reviewed js-yaml and Vitest floors.

Exact-head local evidence:

  • frozen pnpm install: terminal success, no warnings
  • pnpm peers check: no peer dependency issues
  • pnpm audit: no known vulnerabilities
  • security-floor pytest: 7 passed
  • frontend Vitest: 51 files / 437 tests passed
  • frontend ESLint: terminal success, no warnings
  • production build: 16 routes, terminal success
  • Trivy HIGH/CRITICAL fixable-only, source/lock/config scope: 0 vulnerabilities, 0 misconfigurations, 0 secrets

The lockfile-generation commands that emitted deprecation or peer warnings are retained as failed investigative evidence and are not counted as verification. Required hosted Checks and a fresh current-head independent review still govern merge.

Copy link
Copy Markdown
Contributor Author

@codex review

Please review only current exact head 17a7618eda2b212b691f08fa936e042b34258fc9. Verify the resolved Vitest importer-contract repair against package.json and pnpm v9 importers["."]["devDependencies"], including peer-qualified snapshot identity, and check the five-file dependency/security scope for any remaining false-negative or lock-integrity gap. Treat predecessor approvals and findings as historical evidence only.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

seonghobae added a commit that referenced this pull request Sep 9, 2026
Preserve the repository-entry guidance delta as first-parent history while adopting #1623's current Vitest importer-contract repair.

Signed-off-by: Seongho Bae <me@seonghobae.me>
seonghobae added a commit that referenced this pull request Sep 9, 2026
Preserve the five-file Naruon governance delta as first-parent history while adopting #1528's current #1623 security ancestry.

Signed-off-by: Seongho Bae <me@seonghobae.me>

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

현재 exact head 17a7618eda2b212b691f08fa936e042b34258fc9만 다시 검토해 주세요. 이전 두 finding의 수정 여부를 predecessor 상태로 승계하지 말고, 특히 root importer specifier/peer-qualified version/exact snapshot 결속, Vitest·coverage 각 packages/snapshots non-empty 및 security floor, Next.js/sharp/js-yaml floor와 generated pnpm-lock 일관성을 current head 기준으로 확인해 주세요.

@coderabbitai

coderabbitai Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

expected='17a7618eda2b212b691f08fa936e042b34258fc9'
printf 'HEAD=%s\n' "$(git rev-parse HEAD)"
git show -s --format='commit=%H%nparents=%P%nsubject=%s' "$expected"
printf '\nChanged files in exact commit:\n'
git diff-tree --no-commit-id --name-status -r "$expected"

printf '\nSecurity-test outline:\n'
ast-grep outline backend/tests/test_frontend_framework_security_floor.py --items all || true
ast-grep outline backend/tests/test_js_yaml_dependency_security.py --items all || true

printf '\nExact security-test patch:\n'
git diff --no-ext-diff --unified=100 "${expected}^" "$expected" -- \
  backend/tests/test_frontend_framework_security_floor.py \
  backend/tests/test_js_yaml_dependency_security.py

printf '\nRelevant security-test code:\n'
rg -n -C5 'vitest|coverage-v8|importers|snapshots|specifier|resolved|next|sharp|js-yaml|override' \
  backend/tests/test_frontend_framework_security_floor.py \
  backend/tests/test_js_yaml_dependency_security.py

printf '\nManifest/workspace values:\n'
rg -n -C2 '"(?:next|eslint-config-next|vitest|`@vitest/coverage-v8`)"|(?:sharp|js-yaml):' \
  frontend/package.json frontend/pnpm-workspace.yaml

printf '\nParsed lockfile contract and resolution floor scan:\n'
python3 - <<'PY'
from pathlib import Path
import re
import yaml

root = Path("frontend")
manifest = yaml.safe_load((root / "package.json").read_text())  # JSON is valid YAML
workspace = yaml.safe_load((root / "pnpm-workspace.yaml").read_text())
lock = yaml.safe_load((root / "pnpm-lock.yaml").read_text())

print("lockVersion:", lock.get("lockfileVersion"))
print("workspace overrides:", {k: workspace.get("overrides", {}).get(k) for k in ("sharp", "js-yaml")})
imp = lock["importers"]["."]["devDependencies"]
snapshots = lock["snapshots"]
for package in ("vitest", "`@vitest/coverage-v8`"):
    entry = imp.get(package)
    print(f"importer {package}: {entry!r}")
    if isinstance(entry, dict):
        version = str(entry.get("version"))
        print("  manifest:", manifest.get("devDependencies", {}).get(package))
        print("  exact snapshot:", f"{package}@{version}", f"{package}@{version}" in snapshots)

floors = {"next": (16,3,3), "sharp": (0,35,4), "js-yaml": (4,3,2),
          "vitest": (4,1,11), "`@vitest/coverage-v8`": (4,1,11)}
for section in ("packages", "snapshots"):
    found = {p: [] for p in floors}
    for key in lock.get(section, {}):
        normalized = str(key).strip("'\"")
        for package, floor in floors.items():
            match = re.match(rf"^{re.escape(package)}@(\d+(?:\.\d+){{1,2}}(?:[-+][^(\s]+)?)", normalized)
            if match:
                raw = match.group(1)
                nums = tuple(map(int, re.match(r"(\d+)\.(\d+)\.(\d+)", raw).groups()))
                found[package].append((normalized, nums, nums < floor))
    print(section)
    for package, entries in found.items():
        print(" ", package, "count=", len(entries), "below=", [key for key, _, bad in entries if bad])
PY

Length of output: 48089


I need one additional read-only inspection because the previous lockfile parser could not load PyYAML.


🧠 Learnings used
Learnt from: seonghobae
Repo: ContextualWisdomLab/naruon PR: 1623
File: backend/tests/test_frontend_framework_security_floor.py:183-187
Timestamp: 2026-09-09T20:22:07.409Z
Learning: For pnpm v9 lockfiles in the frontend workspace, root package dependency records are stored at `importers["."]["devDependencies"]`, not `packages["."]`. Root importer `version` values can include peer-qualified suffixes, so tests must remove the suffix before comparing the resolved semantic version, while snapshot existence checks must use the exact peer-qualified version key.

You are interacting with an AI system.

seonghobae added a commit that referenced this pull request Sep 10, 2026
Preserve #1570's 16-file Today availability/recovery delta while adopting #162317a7618 as the current security parent. Keep release-note and dependency-security ownership in their canonical lanes.

Signed-off-by: Seongho Bae <me@seonghobae.me>
seonghobae added a commit that referenced this pull request Sep 10, 2026
Preserve Dependabot's 16.3.3 proposal as first-parent provenance while adopting #162317a7618, which already carries Next.js 16.3.4 and the reviewed dependency-security invariants. No downgrade delta remains.

Signed-off-by: Seongho Bae <me@seonghobae.me>
seonghobae added a commit that referenced this pull request Sep 10, 2026
Preserve #1630's five-file proposed Keyverse consumer seam while adopting #162317a7618 as the current security parent. The transport adapter remains blocked on an immutable Keyverse release.

Signed-off-by: Seongho Bae <me@seonghobae.me>

Copy link
Copy Markdown
Contributor Author

@codex review

Please review only current exact head 17a7618eda2b212b691f08fa936e042b34258fc9. Re-verify the five-file frontend dependency-security scope and especially the repaired pnpm v9 root importer/snapshot contract. Treat predecessor reviews as historical. Do not treat the terminal central CodeQL/Strix owner-path failures as leaf source findings unless this exact diff causally introduces them.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

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