Skip to content

docs: add Cursor Cloud environment setup notes - #444

Draft
rrama wants to merge 17 commits into
mainfrom
cursor/cloud-env-setup-notes-ca2c
Draft

rrama wants to merge 17 commits into
mainfrom
cursor/cloud-env-setup-notes-ca2c

Conversation

@rrama

@rrama rrama commented Jul 28, 2026 •

Copy link
Copy Markdown
Contributor

Description

Adds an AGENTS.md for this repo. It points at the existing guidance (README.md,
CONTRIBUTING.md and .cursorrules) rather than restating it, then records the
Cursor Cloud environment notes an agent needs to build and exercise this Maven/Tycho plugin in a
Linux VM. Documentation only — no plugin code changes.

It covers:

  • Build and test with JDK 17, not the VM's default 21 — with the root cause, not just the symptom.
  • Commands — ./mvnw package versus the CI ./mvnw clean verify -DtrimStackTrace=false, and
    that -P sign must not be passed because it needs signing certs.
  • -Declipse.p2.mirrors=false, which stops Tycho following p2 mirror redirects out to arbitrary
    university and ISP mirrors that cannot be enumerated in an egress allowlist.
  • Installing the built feature into a real Eclipse — the p2 director command, and the three
    things that bite when you try it.
  • Authentication, which does not come from the environment.
  • How to probe egress, rather than a list of hosts.

Worth a reviewer's attention

The JDK 17 requirement is currently undocumented anywhere in the repo. A developer whose default
java is 21 gets 187 opaque MockitoException: Mockito cannot mock this class … errors across 20+
test classes, with no hint as to why. tests/pom.xml pins Mockito 4.5.1 and pins the inline mock
maker's agent directly at net.bytebuddy:byte-buddy-agent:1.14.1, which predates JDK 21 — so
bumping Mockito alone would not lift it, both coordinates would have to move. Measured 0 errors on
Temurin 17, and reproduced on macOS rather than only in a cloud VM. This PR only writes the
requirement down for agents; making it discoverable for humans (README, or a fail-fast enforcer
rule) or moving to a JDK-21-capable Mockito/ByteBuddy is a separate change.

Three failure modes when launching a real Eclipse, none of which names its cause. The Snyk view
renders through an SWT Browser widget, so without libwebkit2gtk-4.1-0 it dies as
SWTError: No more handles …, surfacing as a ClassCastException on ErrorViewPart. The
4.34 / 2024-12 IDE the plugin targets is served only from archive.eclipse.org and
www.eclipse.org, which are typically blocked — but the current release is reachable from
download.eclipse.org and the 4.34-built plugin runs on it fine, so this is a non-blocker once you
know it. And on a saved cloud environment the pre-baked ~/eclipse-workspace traps you in a
repeating "Enter Password to Unlock the Secure Storage" dialog, because the plugin reads stored
credentials while the master password was never set — which blocks unattended runs completely.

Deliberately no brittle specifics. No reachable/blocked host list: the egress allowlist changes
between runs, so a fixed map goes stale and gets trusted anyway. Readers are told to probe directly,
and to expect a block to surface as an opaque "Connection reset" during target-platform resolution
rather than as a DNS failure. Likewise no "passes N tests" figure, since that rots as the suite
changes and leaves a reader unable to tell a real problem from a stale doc. The 187-errors-on-21
measurement above is kept, because it is evidence for a diagnosis against named JDK versions rather
than something a reader is expected to match.

Two duplicate cloud-setup PRs had been opened against this repo by successive cloud runs. This one
carries the consolidated content and #443 has been closed as superseded, leaving a single PR per
repo.

Checklist

  • Read and understood the Code of Conduct and Contributing Guidelines.
  • Tests added and all succeed — n/a, no code changes; markdown only
  • Linted — n/a, no Java touched
  • CHANGELOG.md updated — n/a, no user-facing change (contributor/agent documentation)
  • README.md updated, if user-facing — n/a, not user-facing

Screenshots / GIFs

n/a — documentation only.

Co-authored-by: Ben Durrans <Benjamin.Durrans@snyk.io>
@snyk-io

snyk-io Bot commented Jul 28, 2026 •

Copy link
Copy Markdown

✅ Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
✅ Open Source Security 0 0 0 0 0 issues
✅ Licenses 0 0 0 0 0 issues
✅ Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

Consolidates the duplicate cloud-setup notes into a single AGENTS.md, folding in
the useful detail from the parallel branch: the JavaSE-17 target-platform
rationale, the `./mvnw package` vs `clean verify` split, the headless-Tycho note
and the `-P sign` warning.

Adds the verified root cause of the JDK 21 test failures (Mockito 4.5.1 with an
explicitly pinned byte-buddy-agent 1.14.1) and the `-Declipse.p2.mirrors=false`
flag, which avoids p2 mirror redirects to hosts that cannot be allowlisted.

Replaces the fixed reachable/blocked host list with guidance to probe egress
directly, since the allowlist changes between runs.

Co-authored-by: Cursor <cursoragent@cursor.com>
@CLAassistant

CLAassistant commented Jul 30, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

rrama and others added 14 commits July 30, 2026 13:42
Records what it takes to install the built feature into a real Eclipse, which
building and unit tests do not cover: the matching 4.34/2024-12 IDE is served only
from archive.eclipse.org and www.eclipse.org, which are typically blocked, but the
current release is reachable from download.eclipse.org and the 4.34-built plugin
runs on it. Includes the p2 director command.

Documents that the Snyk view renders through an SWT Browser widget and needs
libwebkit2gtk-4.1-0, without which it fails as an opaque ErrorViewPart
ClassCastException, plus the -data workspace lock caveat.

Documents the authentication gotchas: the token comes from the plugin's own
preferences rather than SNYK_TOKEN or the CLI configstore, OAuth2 times out so the
API-token method is required, and the plugin applies its own folder-trust gate.

Co-authored-by: Cursor <cursoragent@cursor.com>
A saved cloud environment carries a pre-baked ~/eclipse-workspace, and launching
against it produces repeated "Enter Password to Unlock the Secure Storage" dialogs:
the plugin reads stored credentials while Eclipse's master password was never set.
It presents as a plugin fault, and it blocks unattended GUI runs completely.

Records the two ways out — dismiss or set a password once when interactive, or use
a fresh -data workspace / clear ~/.eclipse/org.eclipse.equinox.security when
unattended.

Reported by a later cloud run than the one this branch was opened from, so it was
missing from the notes this PR already carries.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
"passes 400 tests" is an expectation that rots: the number changes whenever the
suite does, and a reader who sees a different count cannot tell whether they have
found a real problem or a stale doc. What matters is that the run is clean.

The 187-errors-on-JDK-21 figure above is left alone — that is a recorded measurement
against named JDK versions, evidence for the diagnosis rather than something a reader
is expected to match.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Both archive.eclipse.org and www.eclipse.org were added to the Cursor Cloud egress
allowlist on 2026-08-07, so the 4.34/2024-12 IDE the plugin targets can be fetched
directly rather than substituting the current release. "Typically blocked" is no
longer true and was sending readers to the workaround first.

archive.eclipse.org did return a single TLS reset on one run and then served the
download on retry, so the note asks for one retry before treating it as blocked. The
download.eclipse.org fallback stays, since it does work.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The language server skips paths it does not trust and surfaces nothing in the Snyk
view, so it presents as a hung scan. Meanwhile the CLI scans the same project in
seconds, because it has no trust gate — which makes the plugin look broken.

Three Cursor Cloud runs concluded this was a plugin or LS defect and stopped
investigating; the Eclipse log had "skipping scan of untrusted path path=…" in it
the whole time. Records the tell, and that trust has to go through the plugin: the
view's Trust folder affordance, or the trusted-folders list on the Setup tab of Snyk
preferences, which sits near the bottom and can be invisible until the window is
enlarged. Writing trustedFolders into the LS config file by hand does not work.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Two claims here were stronger than the evidence.

"Almost always an untrusted folder" was built from a single run's log line. An
unanswered Secure Storage prompt produces the same symptom, and a real defect has not
been ruled out — the section now describes how to tell them apart and says that a log
showing neither is a genuine bug report. It also stops asserting a cause that will be
wrong the moment the underlying issue is fixed.

"The allowlist changes between runs" is not true: it changes when someone asks an
admin, not on its own. The reason not to hardcode a host list is that such a request
silently invalidates whatever was written down, which is the point now made.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…roven ones

A cloud run on 2026-08-11 instrumented this end to end and reached a working
language server, authentication, trust and a real 139-finding scan. The causes are
not what these notes claimed.

Secure storage: the blocker is an Equinox JavaEncryption.init() race that surfaces as
NullPointerException: null algorithm name from SecretKeyFactory.getInstance on the
plugin's first encrypted write. Pre-seeding the keyring with cipher and key-factory
metadata avoids that path. Neither gnome-keyring nor DBUS_SESSION_BUS_ADDRESS is
sufficient alone, and neither is needed once the keyring is seeded — the previous
advice to fix this with a fresh workspace or by clearing secure storage did not work.

New, and previously undocumented: the language server shells out to
bash --login -i -c printenv, which takes SIGTTIN and stops indefinitely when there is
no controlling terminal, so no scanner ever starts. SNYK_LS_DISABLE_SHELL_ENV_LOADING=1
avoids it, at the cost of the LS inheriting only the launcher's PATH — which is why
Maven projects then fail dependency extraction with child exit -2.

Also records that the Re-authenticate dialog defaults to OAuth and offers no token at
all, and gives the exact Trust settings path, which only renders once the LS is up.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The whole docs.snyk.io/scm-ide-and-ci-cd-integrations/ tree now 404s, taking the
folder trust, authentication and "secure your Eclipse projects" links with it. All
three verified dead; the developer-tools/integrations/ equivalents verified live.

Note folder trust also changed slug, from folder-trust to eclipse-plugin-folder-trust.

Found by a Cursor Cloud agent following the README to set the plugin up, which is a
decent argument for a link check in CI.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Same dead tree as the previous commit: the supported-versions link and the
troubleshooting link. Both verified 404; both developer-tools/integrations/
equivalents verified live. No scm-ide-and-ci-cd-integrations URLs remain in the repo.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
These two commits fixed dead docs.snyk.io links in README.md. That is unrelated to
the Cursor Cloud AGENTS.md notes this PR carries, and it should not have to wait on
this PR's review. Moved to a dedicated branch and PR.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…obber

Two more findings from the 2026-08-11 cloud run, both cheap to hit and expensive to
diagnose.

Forcing defaultPasswordProvider turns out to be unnecessary — the default is fine once
the keyring is seeded — so this now says to leave it alone rather than implying a
provider needs choosing. Adds the two idempotency rules that bit that run: guard the
keyring write so a non-empty file holding encrypted credentials is never clobbered, and
de-duplicate eclipse.ini arguments because the first occurrence of each wins.

Separately: running the Tycho test suite replaces ~/.snyk/snyk-linux with a small test
artifact, after which the next launch reports the LS protocol as unknown and does not
start. That cost real debugging time and is not obvious from the symptom.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
A setup script that ran `eclipse -version` to read the version blocked on a
full GUI launch instead of printing and exiting. Point contributors at the
install metadata instead.
The Preferences page's trust controls don't render until the snyk-ls
language server is running. This was previously only documented on a
shared cross-repo Confluence setup page as a generic tip, but it's
specific to this plugin's Preferences UI, so it belongs here instead.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…loud-env-setup-notes-ca2c

AGENTS.md add/add conflict: both sides independently created this file.
Resolved by combining, not taking either side wholesale -- kept main's
real repo-specific content (Project Overview through Development
Workflow, added by #451) in full and appended this branch's Cursor
Cloud section after it, rather than letting either replace the other.
@rrama
rrama force-pushed the cursor/cloud-env-setup-notes-ca2c branch from 6bb8455 to 8bfae9c Compare September 4, 2026 13:37
@snyk-io

snyk-io Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

✅ Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
✅ Open Source Security 0 0 0 0 0 issues
✅ Licenses 0 0 0 0 0 issues
✅ Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

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.

3 participants