Connect Codex to Snyk
How to set up Snyk Studio in Codex with the Snyk CLI
Set up Snyk Studio in Codex to scan code and dependencies, evaluate package health, and fix vulnerabilities from your coding assistant.
For enterprise deployment across your development teams, use the Agentic Development Security (ADS) installer. The following procedure is for local developer setup.
Install Snyk Studio with hooks support
Install Codex and the Snyk CLI. Enable the Snyk products you want to scan with. Complete the account and product setup in Getting started with Snyk Studio.
Authenticate with Snyk:
snyk authRun the installer as the developer who uses Codex:
snyk studio install --experimental --ade=codexStart a new session in Codex and open the repository you want to work in. Complete any MCP authentication or folder-trust request.
Approve Snyk hooks when Codex prompts you with Hooks need review. Select Trust all and continue or review the hooks with
/hooks. Codex 0.129.0 and later requires approval. Non-interactivecodex execsessions skip hooks you have not approved.
Verify installation
Run:
snyk studio install --experimental --verify --ade=codexThis checks the installed assets. For merged configuration files, the verifier checks only file existence. It does not confirm that a scan completed.
Ask Codex to scan the repository:
Scan this repository for code and dependency vulnerabilities. Summarize the findings before making changes.Check background hook scanning
Run a coding task in a new assistant session. Studio hooks trigger background scans for supported code and dependency changes. Inspect the activity with:
Check for hook events and scan results. A successful direct MCP scan does not verify that the hooks ran. For scan failures, authentication, or missing activity, visit Troubleshooting.
Use remediation
Codex and GitHub Copilot CLI receive the Snyk Fix skill. Ask the assistant to use that skill for existing vulnerabilities. Other installed assistant components use their command or workflow mechanism. Visit Remediation directives for the differences.
Update or remove Snyk Studio
After updating the Snyk CLI, run the installation command again to refresh the components, then start a new assistant session.
To remove the local setup for Codex, run:
If your company deployed Studio through ADS, use the ADS removal procedure.
Manual MCP configuration
For an MCP-only connection, use the manual configuration instructions with your client's supported configuration format. Manual MCP setup does not install the full Studio components.
Last updated
Was this helpful?

