Skip to content

chore(env): add Cloud Agent environment config - #907

Draft
seonghobae wants to merge 9 commits into
developfrom
cursor/add-cloud-agent-environment-config-441c
Draft

chore(env): add Cloud Agent environment config#907
seonghobae wants to merge 9 commits into
developfrom
cursor/add-cloud-agent-environment-config-441c

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 17, 2026

Copy link
Copy Markdown
Collaborator

Pull Request

Summary

  • Add .cursor/environment.json so the BandScope Cloud Agent development environment follows the checked-out branch.
  • Make the agent dependency bootstrap reproducible: pin the Astral uv installer to the repository CI version (0.8.6), restrict curl transport to HTTPS with a TLS 1.2 minimum, use unmanaged installation, install Node dependencies with npm ci, and sync Python dependencies from uv.lock with --frozen.
  • Add a focused supply-chain regression test for the Cloud Agent bootstrap contract.
  • Start the desktop Vite development server as a managed terminal on port 5173.

Ownership boundary

The dependency-security delta that had been added to this branch was reverted in a990aa8a07d4ade8334b21240339a3730322722d. pdfjs-dist, nanoid, undici, npm-generator and lockfile security remediation remain owned by canonical BandScope PR #783. This PR does not duplicate that authority and does not inherit #783's checks, reviews, or merge evidence.

Protected-base dependency-lifecycle checkout credential hardening is separately owned by canonical BandScope PR #894. Exact-head security-audit evidence for this PR still exercises the protected-base workflow and therefore shows persist-credentials: true; this environment-config lane must not duplicate #894's workflow mutation.

The effective PR diff is .cursor/environment.json plus services/analysis-engine/tests/test_cloud_agent_environment.py.

Verification

  • The focused regression requires the exact versioned Astral installer, --proto '=https', --tlsv1.2, UV_UNMANAGED_INSTALL, npm ci without npm install, and frozen uv sync.
  • The pre-hardening environment lacked the HTTPS-only/TLS assertions' required flags; exact current head b0972c5ad01c506e24566433e8dbf9008c91c4a9 contains the narrow transport fix.
  • On that unchanged head, ci run 32079563512, release 32079563534, build-baseline 32079563482, sbom 32079563524, bandit 32079563536, SAST Semgrep 32079563584, and secret-scan-gate 32079563535 are terminal-success.
  • Exact security-audit run 32079563455, job 95539717817, checks out merge tree 5953062fd569a4824af8a6d2c0684f1b832371dc and fails first at npm audit --workspaces --audit-level=high on protected-base nanoid <3.3.18, pdfjs-dist >=5.6.83 <6.2.108, and undici 7.0.0-7.28.0; later Python/Rust audit stages are skipped and are not counted as success. The same exact log also confirms the inherited security-audit checkout persists credentials, which is fix(security): drop persisted credentials before dependency lifecycle code #894-owned rather than an excuse for a leaf workaround here.
  • Aggregate Security Scan run 32079563607 has successful dependency-review, OSV, and Scorecard jobs; its failed trivy-fs job 95539718743 reports the protected-base HIGH CVE-2026-16633 finding for pdfjs-dist at package-lock.json:6370 and directs remediation to the shared base.
  • There are no unresolved inline review threads at the latest exact-head inspection.
  • Any inherited npm HIGH findings from protected develop remain a fix(security): establish canonical npm, PDF.js, Nanoid, and Undici baseline #783 dependency gate and must not be suppressed here.

Security notes

Attack surface

.cursor/environment.json runs package installation in Cursor's isolated Ubuntu-based Background Agent environment and starts the existing local Vite development server. It introduces no product runtime API, filesystem authority, credential, or production network path.

Trust boundary and mitigations

  • The committed environment setup follows Cursor's documented install/terminals model.
  • The uv installer URL is version-specific and aligned with BandScope CI; curl is restricted to HTTPS and TLS 1.2+ for the installer transfer; UV_UNMANAGED_INSTALL prevents installer-driven shell profile mutation and self-update behavior in the ephemeral agent bootstrap.
  • Node dependencies are installed from the committed npm lock with npm ci; Python dependencies are synced from the committed uv lock with --frozen.
  • The focused regression rejects floating transport/toolchain behavior, npm install, and non-frozen Python sync from returning to this config.
  • No secrets are embedded or referenced.
  • The terminal starts only the existing desktop development command.

i18n impact

No user-visible product string changes.

Merge boundary

Target remains protected develop@acdbea6344fe1231c39535b575f4de35e4c607c9. Keep this PR Draft until canonical #783 and #894 dependencies are integrated/revalidated as applicable and the unchanged then-current head satisfies every required repository and central gate plus a qualifying independent non-author approval. Do not treat queued, skipped, failed inherited-base, predecessor, protected-base, dependency-owner, or model-only evidence as success; do not suppress or duplicate another owner's failure merely to make this leaf green.

Add .cursor/environment.json describing the reproducible Cloud Agent
dev environment for the BandScope monorepo:
- install: install uv, then npm install and uv sync for the Python
  analysis engine (both idempotent)
- terminals: Vite dev server for apps/desktop on port 5173

Validated end-to-end on the VM and in a fresh Cloud Agent build:
toolchains, dependency install, Python engine demo job, and the
full quickcheck harness (lint/typecheck/test/build) all pass.

Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 5ee6b9c6-647d-4323-a8d0-1fa25c7212ac

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

cursoragent and others added 8 commits August 17, 2026 16:47
Resolve the security-audit and trivy-fs CI failures by bumping the
affected Node dependencies to patched versions:
- pdfjs-dist 6.1.200 -> 6.2.108 (CVE-2026-16633 / GHSA-hq66-cqwq-w95j:
  arbitrary JS execution on a malicious PDF; direct dep in apps/desktop)
- nanoid -> 3.3.18 via overrides (GHSA-2v37-7h3g-55p8; transitive via
  vite -> postcss)
- undici -> 7.29.0 via overrides (GHSA-8xcm-r25x-g524 and related;
  transitive via jsdom, dev-only)

npm audit --audit-level=high and a trivy fs vuln scan both report 0
findings; quickcheck (lint/typecheck/test/build) stays green.

Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>
Revert the dependency-only delta from 2515b87 while preserving the unique Cloud Agent environment change.

The pdfjs-dist, nanoid, undici, npm-generator and lockfile security baseline is owned by #783. Duplicating that authority here would create a competing dependency lane and transfer no exact-head evidence from #783.
The 'Analyze (python)' CodeQL run failed in its init step with a
GitHub-side error ('No server is currently available to service your
request') while determining feature enablement — a transient outage,
not a code issue. This empty commit re-triggers the workflows so the
CodeQL analysis can run cleanly.

Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>
The required 'noema-review' gate failed on 66f0ff5 because its GitHub
API call returned HTTP 503 ('No server is currently available to
service your request') during a GitHub-side incident — a transient
outage, not a code or config issue (the gate passed earlier in this
PR). This empty commit re-triggers the pull_request_target review
workflow so it can run cleanly.

Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>
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