Skip to content

Conversation

@acke
Copy link
Contributor

@acke acke commented Dec 3, 2025

Description

When a user opens a code repository in an untrusted location in VS Code, the extension prompts for folder trust before running scans, providing an
additional trust layer on top of VS Code's built-in Workspace Trust feature. After the user trusts the project folder, the extension stores the folder path in the snyk.trustedFolders property in VS Code's global user settings. The Snyk Language Server then conducts a path prefix check of the project folder
against folders specified in the snyk.trustedFolders property.

Praetorian identified that the extension's default configuration scope allowed workspace-level settings to override global security settings. When a project folder contained a .vscode/settings.json file with a specially crafted snyk.trustedFolders property, the extension used the local workspace setting
instead of the global user setting, thereby overriding the trusted folders list on the machine.

Recommendation:

Configure the snyk.trustedFolders property to either the application or machine scope in the extension's package.json file. This change would prevent workspace-level settings from overriding the global trust configuration.

https://snyksec.atlassian.net/browse/PRODSEC-9471

Checklist

Screenshots / GIFs

Visuals that may help the reviewer. Please add screenshots for any UI change. GIFs are most welcome!

@snyk-io
Copy link

snyk-io bot commented Dec 3, 2025

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

Status Scanner 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.

2 participants