Skip to content

Commit f74a3a5

Browse files
author
XYPRO-23\kyle.nahrgang
committed
Merge branch 'main' into support-workspace-folder
2 parents 482e38b + 4355601 commit f74a3a5

File tree

119 files changed

+3398
-1913
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

119 files changed

+3398
-1913
lines changed

.editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,6 @@ indent_size = 2
1919
[*.py]
2020
indent_style = space
2121
indent_size = 4
22+
23+
[*.md]
24+
trim_trailing_whitespace = false

.github/pull_request_template.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ _Provide description of this PR and changes, if linked Jira ticket doesn't cover
44

55
### Checklist
66

7+
- [ ] Read and understood the [Code of Conduct](https://github.com/snyk/vscode-extension/blob/main/CODE_OF_CONDUCT.md) and [Contributing Guidelines](https://github.com/snyk/vscode-extension/blob/main/CONTRIBUTING.md).
78
- [ ] Tests added and all succeed
89
- [ ] Linted
910
- [ ] CHANGELOG.md updated

.github/workflows/ci.yaml

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,10 @@ jobs:
1717
uses: actions/checkout@v2
1818

1919
- name: Setup Node
20-
uses: actions/setup-node@v2
20+
uses: actions/setup-node@v4
2121
with:
22-
node-version: '18'
23-
24-
- name: Cache NPM files
25-
uses: actions/cache@v2
26-
with:
27-
path: ~/.npm
28-
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
29-
restore-keys: |
30-
${{ runner.os }}-node-
22+
node-version-file: '.nvmrc'
23+
cache: 'npm'
3124

3225
- name: Install dependencies
3326
run: npm ci
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Static Resource Checking
2+
on:
3+
push:
4+
branches: [ main, master ]
5+
pull_request:
6+
7+
jobs:
8+
static-resource-checks:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Fetch Sources
12+
uses: actions/checkout@v4
13+
14+
- name: Check Static Resources
15+
run: |
16+
declare -A resources
17+
# Add each resource as a key, value pair, mapping the local resource to the reference file (which should be stored in the language server repository). For example:
18+
# resources["<path_to_local_file>"]="<url_of_reference_file>"
19+
resources["media/views/scanSummary/ScanSummaryInit.html"]="https://raw.githubusercontent.com/snyk/snyk-ls/refs/heads/main/shared_ide_resources/ui/html/ScanSummaryInit.html"
20+
for key in ${!resources[@]}; do
21+
candidate=$(sha512sum $key | awk {'print $1'})
22+
candidate=${candidate:="null"}
23+
reference=$(curl -s ${resources[$key]} | sha512sum | awk {'print $1'})
24+
echo "Candidate file $key has sha512sum $candidate"
25+
echo "Reference file ${resources[$key]} has sha512sum $reference"
26+
[[ $candidate == $reference ]]
27+
done
28+

.windsurfrules

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
** general **
2+
always be concise, direct and don't try to appease me.
3+
DOUBLE CHECK THAT YOUR CHANGES ARE REALLY NEEDED. ALWAYS STICK TO THE GIVEN GOAL, NOT MORE.
4+
I repeat: don't optimize, don't refactor if not needed.
5+
Adhere to the rules, fix linting & test issues that are newly introduced.
6+
don't change old entries in the changelog. it's a history of changes. the current version is the last semantic version tag on origin/main in git
7+
8+
** how to implement **
9+
always write and update test cases. iterate until they pass.
10+
npm build scripts are configured for both unit and integration tests in package.json (test:unit and test:integration).
11+
use existing mocks, don't write new ones.
12+
if you use mocks, use mockk to generate them.
13+
always run the tests after editing.
14+
always use the linter, use npm lint:fix. only fix linting issues in changed files.
15+
don't change code that does not need to be changed. only do the minimum changes.
16+
add a summary of the changes to the changelog for the next version. usually it's a minor semantic version bump.
17+
this is not a library. if files are not used or needed anymore, delete them instead of deprecating them.
18+
if a tool call fails, analyze why it failed and correct your approach. don't prompt the user for help.
19+
if you don't know something, read the code instead of assuming it.
20+
commenting out code to fix errors is not a solution. instead, fix the error.
21+
22+
** security **
23+
determine the absolute path of the project directory. you can do that e.g. by executing pwd on the shell within the directory.
24+
always use snyk for sca and code scanning. scan with both tools. you need to pass the absolute path of the directory we are scanning.
25+
run snyk code tests after each edit. pass the absolute path of the project directory as a parameter
26+
run snyk sca tests after updating package.json and pass the absolute path of the project directory as a parameter.
27+
run snyk sca and code test before committing. if not test data, fix issues before committing.
28+
29+
** fixing issues **
30+
fix security issues if they are fixable. take the snyk scan results and the test results as input.
31+
32+
** committing **
33+
when asked to commit, always use conventional commit messages (Conventional Commit Style (Subject + Body)). be descriptive in the body. if you find a JIRA issue (IDE-XXXX) in the branch name, use it as a postfix to the subject line in the format [IDE-XXXX]
34+
consider all commits in the current branch when committing, to have the context of the current changes.
35+
when asked to push, always use 'git push --set-upstream origin $(git_current_branch)' with git_current_branch being the current branch we are on
36+
never force push
37+
never push without asking
38+
never commit the hashicorp gomod
39+
regularly fetch main branch and offer to merge it into git_current_branch
40+
don't touch the copyright header
41+
after pushing offer to create a PR on github. analyze the changes by comparing the current branch ($(git_current_branch)) with origin/main, and craft a PR description and title.
42+
use the github pr template in this repository

CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,23 @@
11
# Snyk Security Changelog
22

3+
## [2.23.0]
4+
- Removed Snyk Code Quality feature. All related settings, configurations, and UI elements have been removed.
5+
- Removed scanning for vulnerabilities in JavaScript libraries referenced via CDN in HTML files.
6+
7+
## [2.22.0]
8+
- Support early access of Ignores Approval Workflow
9+
- Fix early access Issue View Options not hiding issues in editor
10+
11+
## [2.21.1]
12+
- Gemini Tool fixes
13+
- Ensure default CAs are used when using proxy
14+
- Add scan source to workspace command
15+
16+
## [2.21.0]
17+
- add scan summary
18+
- add ability to enter PATs as Tokens
19+
- add ability to define a reference folder for net-new scanning
20+
321
## [2.20.0]
422
- reduce hover verbosity to only title and description
523
- If $/snyk.hasAuthenticated transmits an API URL, this is saved in the settings.

CODE_OF_CONDUCT.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ representative at an online or offline event.
6060

6161
Instances of abusive, harassing, or otherwise unacceptable behavior may be
6262
reported to the community leaders responsible for enforcement at
63-
`daniel.appelquist <at> snyk.io`.
63+
`oss-conduct-reports@snyk.io`.
6464
All complaints will be reviewed and investigated promptly and fairly.
6565

6666
All community leaders are obligated to respect the privacy and security of the

CONTRIBUTING.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,43 @@
1+
# Contributing to the Snyk IDE Extensions
2+
3+
We welcome contributions, but please read first! To ensure a smooth process and that your valuable work aligns with our roadmap, please keep the following in mind to help manage expectations:
4+
5+
## 1. Planning your changes
6+
7+
Before undertaking any changes or new features, please discuss your plans with us. This helps align on scope, design, technical approach, and priority.
8+
Even bug fixes can have unforeseen impacts or alternative solutions better suited for the codebase, so please ask first, we will be happy to discuss.
9+
Please raise a request with [support](https://support.snyk.io). (Snyk employees, use `#ask-ide`)
10+
11+
## 2. Where changes should be made
12+
13+
Consider whether your proposed change should be implemented within the IDE extension(s) or in the shared Language Server and related stack.
14+
- [Snyk Language Server](https://github.com/snyk/snyk-ls)
15+
- [Go Application Framework](https://github.com/snyk/go-application-framework)
16+
- [Code Client Go](https://github.com/snyk/code-client-go)
17+
18+
## 3. Cross-IDE consistency
19+
20+
If your change is applicable to other Snyk IDE plugins as well, we may expect you to submit similar PRs for the other relevant IDE repositories after your initial PR has been reviewed and approved, as they will _usually_ need to be merged all at once or not at all.
21+
- [Snyk IntelliJ plugin](https://github.com/snyk/snyk-intellij-plugin)
22+
- [Snyk Eclipse plugin](https://github.com/snyk/snyk-eclipse-plugin)
23+
- [Snyk Visual Studio extension](https://github.com/snyk/snyk-visual-studio-plugin)
24+
25+
## 4. Manual testing
26+
27+
All changes must be thoroughly manually tested by you.
28+
For visual changes the PR template asks for screenshots, so this is a good opportunity to snap them.
29+
30+
## 5. Documentation changes
31+
32+
Any user-facing changes will require [documentation](https://docs.snyk.io/) changes, which you will need to prepare.
33+
If you do not have access to our content management system (you are not a Snyk employee), please add the documentation changes required (including new wording and screenshots) to the PR description.
34+
35+
We can instruct you on what to add to the CHANGELOG.md, so please ask.
36+
37+
---
38+
39+
# Making Changes
40+
141
## Run extension and debug
242

343
Clone the repository, then run `npm install && npm run build` in the directory.

Contributor-Agreement.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ This Contributor Licence Agreement (“Agreement”) sets out the terms under wh
22

33
Who the “Contributor” is depends on whether the person submitting the contribution is a private individual acting on their own behalf, or is acting on behalf of someone else (for example, their employer). The “Contributor” in this Agreement is therefore either: (i) if the individual who Submits a Contribution does so on behalf of their employer or another Legal Entity, any Legal Entity on behalf of whom a Contribution has been received by Snyk; or in all other cases (ii) the individual who Submits a Contribution to Snyk. "Legal Entity" means an entity which is not a natural person (for example, a limited company or corporation).
44

5-
** 1. Interpretation**
5+
**1. Interpretation**
66

77
The following definitions and rules of interpretation apply in this Agreement.
88

README.md

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ Integrating security checks early in your development lifecycle helps you pass s
66

77
The Snyk Visual Studio Code extension allows you to analyze your code, open-source dependencies, and Infrastructure as Code (IaC) configurations. With actionable insights directly in your IDE, you can address issues as they arise.
88

9+
10+
The extension also works for other VSCode-based IDEs such as Windsurf, Cursor, and Eclipse Theia.
11+
12+
913
**Key features:**
1014

1115
* **In-line issue highlighting:** Security issues are flagged directly within your code, categorized by type and severity for quick identification and resolution.
@@ -17,6 +21,12 @@ The Snyk Visual Studio Code extension allows you to analyze your code, open-sour
1721

1822
## How to install and set up the extension
1923

24+
25+
For information about the versions of Visual Studio Code supported by the Visual Studio Code extension, see [Snyk IDE plugins and extensions](https://docs.snyk.io/scm-ide-and-ci-cd-integrations/snyk-ide-plugins-and-extensions).
26+
27+
Snyk recommends always using the latest version of the Visual Studio Code extension.
28+
29+
2030
You can use the Snyk Visual Studio Code extension in the following environments:
2131

2232
* Linux: AMD64 and ARM64
@@ -25,24 +35,25 @@ You can use the Snyk Visual Studio Code extension in the following environments:
2535

2636
Snyk Visual Studio Code extension does not support remote and containerized environments:
2737

28-
* [Cloud VS Code IDE](https://code.visualstudio.com/docs/editor/vscode-web)
38+
* [Visual Studio Code for the Web](https://code.visualstudio.com/docs/editor/vscode-web)
2939
* [VS Code Remote Development](https://code.visualstudio.com/docs/remote/remote-overview)
30-
* [Inside a Container](https://code.visualstudio.com/docs/devcontainers/containers)
40+
* [Developing inside a Container](https://code.visualstudio.com/docs/devcontainers/containers)
3141

32-
Install the plugin at any time free of charge from the [Visual Studio Code marketplace](https://marketplace.visualstudio.com/items?itemName=snyk-security.snyk-vulnerability-scanner) and use it with any Snyk account, including a Free account. For more information, see the[VS Code extension installation guide](https://code.visualstudio.com/docs/editor/extension-marketplace#\_install-an-extension).
42+
Install the plugin at any time free of charge from the [Visual Studio Code marketplace](https://marketplace.visualstudio.com/items?itemName=snyk-security.snyk-vulnerability-scanner) and use it with any Snyk account, including a Free account. For more information, see the [VS Code extension installation guide](https://code.visualstudio.com/docs/editor/extension-marketplace#_install-an-extension).
3343

3444
When the extension is installed, it automatically downloads the [Snyk CLI,](https://docs.snyk.io/snyk-cli) which includes the [Language Server](https://docs.snyk.io/scm-ide-and-ci-cd-integrations/snyk-ide-plugins-and-extensions/snyk-language-server).
3545

3646
Continue by following the instructions in the other Visual Studio Code extension docs:
3747

38-
* [Visual Studio Code extension configuration](https://docs.snyk.io/scm-ide-and-ci-cd-integrations/snyk-ide-plugins-and-extensions/visual-studio-code-extension/visual-studio-code-extension-authentication)
39-
* [Visual Studio Code extension authentication](https://docs.snyk.io/scm-ide-and-ci-cd-integrations/snyk-ide-plugins-and-extensions/visual-studio-code-extension/visual-studio-code-extension-authentication)
48+
* [Visual Studio Code extension configuration, environment variables, and proxy](https://docs.snyk.io/scm-ide-and-ci-cd-integrations/snyk-ide-plugins-and-extensions/visual-studio-code-extension/visual-studio-code-extension-configuration-environment-variables-and-proxy)
49+
* [Authentication for Visual Studio Code extension](https://docs.snyk.io/scm-ide-and-ci-cd-integrations/snyk-ide-plugins-and-extensions/visual-studio-code-extension/visual-studio-code-extension-authentication)
4050
* [Visual Studio Code Workspace trust](https://docs.snyk.io/scm-ide-and-ci-cd-integrations/snyk-ide-plugins-and-extensions/visual-studio-code-extension/workspace-trust)
51+
* [Create a .dcignore file](https://docs.snyk.io/scm-ide-and-ci-cd-integrations/snyk-ide-plugins-and-extensions/visual-studio-code-extension/create-a-.dcignore-file)
4152
* [Run an analysis with Visual Studio Code extension](https://docs.snyk.io/integrate-with-snyk/use-snyk-in-your-ide/visual-studio-code-extension/run-an-analysis-with-visual-studio-code-extension)
4253
* [View analysis results from Visual Studio Code extension](https://docs.snyk.io/integrate-with-snyk/use-snyk-in-your-ide/visual-studio-code-extension/view-analysis-results-from-visual-studio-code-extension)
4354

4455
## Support
4556

4657
For troubleshooting and known issues, see [Troubleshooting for Visual Studio Code extension](https://docs.snyk.io/scm-ide-and-ci-cd-integrations/snyk-ide-plugins-and-extensions/visual-studio-code-extension/troubleshooting-for-visual-studio-code-extension).
4758

48-
If you need help, submit a request to [Snyk Support](https://support.snyk.io/hc/en-us/requests/new).
59+
If you need help, submit a request to [Snyk Support](https://support.snyk.io).

0 commit comments

Comments
 (0)