Secure at Inception with Snyk Studio
To prevent the introduction of security issues during code generation, Snyk outlines a set of directives that enable you to scale custom rules at the company level for securing code at inception. Snyk also provides an Execution Frequency setting in the IDE that supports issue prevention in AI-generated code.
Prerequisites
An active Snyk user account
Access to an Endpoint Management tool, such as JAMF
Validated environments
The functionality documented here has been validated on:
OS: macOS
MDM: JAMF
IDEs: Cursor, VSCode, and Windsurf
Custom rules at scale
Snyk provides the following directives which enable issue prevention and remediation at scale:
Run the Snyk Code scanning tool for new first-party code generated.
Run the Snyk SCA scanning tool for new dependencies or dependency updates.
Run the Snyk IaC scanning tool for new Infrastructure as Code updates.
Fix security issues from new or modified code or dependencies using the results context from Snyk.
Rescan the code after fixing issues to verify they are resolved and no new issues are introduced.
Repeat this process until no issues are found.
Snyk offers reference scripts for deploying the IDE extension on developer machines with default settings. You can customize these scripts as needed.
Execution frequency setting
Set the frequency of scanning and initiation of fixes for AI-generated code in the VS Code Snyk IDE extension.

Configuration at scale
To configure using JAMF, separate targeting for groups and configurations:
For machines with Windsurf installed, target the Snyk Windsurf MCP scripts.
For machines with Cursor installed, target the Snyk Cursor MCP scripts.
For machines where neither is installed, deploy the desired .pkg and configure matching scripts to run after installation.
Configure the MDM to reapply the desired custom rules across all endpoints.
Sample scripts
To configure the IDE and MCP:
Ensure that the MCP server shows in the application. In Windsurf, navigate to Windsurf > Settings > Advanced settings > Cascade > MCP Servers > Manage MCPs.
Ensure that the user is prompted to trust Snyk. The code scan does not work if trust is not provided.
If the Snyk directives are configured, ensure that the rules file snyk_rules.md includes the rules and that Activation Mode is set to Always On.
Install the extension and configure the Snyk MCP server
Enable Snyk directives by applying the rules in the Project
Here is an example of the Windsurf.pkg and both Snyk scripts ready to be deployed on devices using JAMF:

In order for the IDE and the MCP to be properly configured:
Check that the MCP server is present. In Windsurf, navigate to Windsurf > Settings > Advanced settings > Cascade > MCP Servers > Manage MCPs.

Check that the user is prompted to trust Snyk. The code scan does not work if trust is not provided.
If Secure at Inception is configured, ensure that the rules file
snyk_rules.mdincludes the rules and that Activation Mode is set to Always On.

To learn more, visit Troubleshooting for the Snyk MCP.
Last updated
Was this helpful?

