snyk
/snyk
Snyk is a developer security scanner that finds known vulnerabilities in open-source dependencies, container images, infrastructure-as-code files and source code. Use when a user asks to scan for vulnerabilities, audit npm or pip packages, check a Docker image for CVEs, scan Terraform or Kubernetes files, or add a security gate to CI/CD.
- Author
- TerminalSkills ↗
- Repository
- skills ↗
- Licence
- Apache-2.0
- Last repository change
- 25.10.2026
Assessment and security
- Files in this package
- 2
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 2
No signals detected. Repository changed on 25.10.2026, without references to retired models or APIs.
Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.
What it does and when to use it
Snyk is a developer security scanner that finds known vulnerabilities in open-source dependencies, container images, infrastructure-as-code files and source code. Use when a user asks to scan for vulnerabilities, audit npm or pip packages, check a Docker image for CVEs, scan Terraform or Kubernetes files, or add a security gate to CI/CD.
Original author description
Snyk is a developer security scanner that finds known vulnerabilities in open-source dependencies, container images, infrastructure-as-code files and source code. Use when a user asks to scan for vulnerabilities, audit npm or pip packages, check a Docker image for CVEs, scan Terraform or Kubernetes files, or add a security gate to CI/CD.
How it works
- Overview
- Instructions
- Examples
- Guidelines
SKILL.md preview
---
name: snyk
description: >-
Snyk is a developer security scanner that finds known vulnerabilities in
open-source dependencies, container images, infrastructure-as-code files and
source code. Use when a user asks to scan for vulnerabilities, audit npm or
pip packages, check a Docker image for CVEs, scan Terraform or Kubernetes
files, or add a security gate to CI/CD.
license: Apache-2.0
compatibility: 'Snyk CLI 1.1308 (npm, Homebrew, Scoop or Docker); a free Snyk account'
metadata:
author: terminal-skills
version: "1.1.0"
repository: https://github.com/snyk/cli
category: devops
tags: "snyk, vulnerability, dependencies, docker, ci-cd"
---
# Snyk
## Overview
Snyk scans four things from one CLI: open-source dependencies (`snyk test`), container images (`snyk container test`), IaC files (`snyk iac test`) and your own source code (`snyk code test`, static analysis). Results can also be sent to the Snyk web app for continuous monitoring (`snyk monitor`). Every scan needs a Snyk account and token, because vulnerability data lives on Snyk's servers. Dependency scans send the dependency tree, not your source; `snyk code test` uploads source for analysis.
## Instructions
### Step 1: Install and authenticate
```bash
npm install -g snyk # or: brew tap snyk/tap && brew install snyk/tap/snyk
# or: scoop bucket add snyk https://github.com/snyk/scoop-snyk && scoop install snyk
snyk --version
snyk auth # opens a browser to log in (local machine)
```
In CI there is no browser: create an API token (or a service account token) in the Snyk web app, store it as a CI secret and expose it as the `SNYK_TOKEN` environment variable. The CLI picks it up automatically. A Docker image (`snyk/snyk`) is also published; pass the token with `-e SNYK_TOKEN`.
### Step 2: Scan dependencies
```bash
snyk test # reads the lockfile of the current project
snyk test --all-projects # monorepo: every manifest found below this directory
snyk test --severity-threshold=high # report (and fail on) high and critical only
snyk test --json-file-output=snyk.json # machine-readable report, human output stays on screen
snyk monitor # snapshot to the web app; re-tested daily by default
```
Install dependencies first (`npm ci`, `pip install -r requirements.txt`) so the lockfile or environment exists. Exit codes: `0` nothing found, `1` vulnerabilities found, `2` the run failed, `3` no supported project found. `--fail-on=upgradable` fails only when a fix exists.
### Step 3: Scan containers
```bash
snyk container test node:20-alpine
snyk container test ghcr.io/shopline/api:2.4.1 --file=Dockerfile # adds base-image upgrade advice
snyk container test node:20-alpine --exclude-base-image-vulns
```
### Step 4: Scan IaC and source code
```bash
snyk iac test infra/ # Terraform, CloudFormation, Kubernetes, ARM
snyk iac test infra/ --severity-threshold=medium --sarif-file-output=iac.sarif
snyk iac test infra/ --report --target-name=shop-infra # also publish the result to the web app
snyk code test src/ # SAST on your own code
```
`snyk monitor` does not support Snyk Code; use `snyk code test --report --project-name=shop-api` to publish code results.
### Step 5: Fixing
Upgrade the dependency named in the `snyk test` output ("Fixed in" / "Upgrade ... to"), re-run the lockfile install and test again. The old deterministic `snyk fix` command is deprecated; the new `snyk fix --agentic --experimental --sca|--sast` needs an LLM provider key and is experimental, so prefer a manual upgrade or a fix pull request opened from the web app.
## Examples
### Example 1: Fail a pull request on serious dependency issues
**User request:**
```
Add a Snyk check to our GitHub Actions workflow so builds fail on high or critical vulnerabilities.
```
The agent adds a step after `npm ci`:
```yaml
- name: Snyk dependency scan
run: npx --yes snyk@1 test --severity-threshold=high
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
```
and tells the user to create the `SNYK_TOKEN` repository secret. Result: the job exits `1` and prints each vulnerable path (for example `lodash@4.17.15 > Prototype Pollution`) when a high or critical issue exists, and exits `0` otherwise.
### Example 2: Check a base image before upgrading
**User request:**
```
Is node:20-alpine safe to keep using, or should I move to something newer?
```
The agent runs `snyk container test node:20-alpine --file=Dockerfile` from the project, reads the "Base Image" table at the end (current image, vulnerability counts, recommended upgrade tags) and reports which tag removes the most issues. Result: a short list of the recommended tags with the number of high and critical findings removed by each.
### Example 3: Scan Terraform before apply
**User request:**
```
Scan the terraform folder for misconfigurations and give me a SARIF file for the code scanning tab.
```
The agent runs `snyk iac test terraform/ --sarif-file-output=iac.sarif` and summarises issues by severity (for example an S3 bucket without encryption); exit code `1` means issues were found.
## Guidelines
- The free plan limits tests per month (Open Source 200, Code 100, IaC 300, Container 100) and 5 projects; CI scans on every push can use that up, so scan on pull requests and merges to main.
- Use `--severity-threshold` to set what fails a build; without it every severity, including low, returns exit code 1.
- Never commit `SNYK_TOKEN` or paste it into a command line that lands in shell history; keep it in CI secrets.
- `snyk code test` uploads source files to Snyk; check company policy before running it on private code.
- Scans only cover known, published vulnerabilities; they do not replace code review or secret scanning.
- Free alternatives for part of the job: `npm audit`, GitHub Dependabot, `pip-audit`.
Files in this package (2)
- SKILL.md 6 KB
- _scores.json 2 KB
Versions
| Repository | Score | Licence |
|---|---|---|
| This page · TerminalSkills/skills | 100 | Apache-2.0 |
| G1Joshi/Agent-Skills | 100 | MIT |
| zcaceres/skills | 100 | MIT |
| poly-gents/syncolab-skills | 100 | Apache-2.0 |
Database snapshot: 13.11.2026 · package version 9f0e43b141a3 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100snyk-vulnerability-and-license-scanning
Configures Snyk as a unified scanner across open-source dependencies (Snyk Open Source/SCA), container images (Snyk Container), and Infrastructure-as-Code (Snyk IaC) from one CLI/token/policy surface, plus Snyk's license-compliance policy engine, which is a distinct enforcement… - 100snyk-test
Configures and runs Snyk, a commercial multi-mode scanner: snyk test for SCA (dependency scanning), snyk code test for SAST (code security scanning), snyk container test for container images, snyk iac test for IaC (infrastructure-as-code), snyk monitor for continuous new-vuln… - 100dependency-audit
Analyzes project dependencies for known security vulnerabilities using npm audit, pip-audit, or similar tools. Use when auditing packages, checking for CVEs, or updating vulnerable dependencies. - 100dependency-audit
Scan all dependencies for outdated versions and known security vulnerabilities. Uses npm audit / pip-audit / cargo audit / bundler-audit with grep-based fallbacks when dedicated tools are unavailable. Produces a prioritised, read-only report. Use when the user asks to "audit… - 95snyk-fix
Complete security remediation workflow. Scans code for vulnerabilities using Snyk, fixes them, validates the fix, and optionally creates a PR. Supports both single-issue and batch mode for multiple vulnerabilities. Use this skill when: - User asks to fix security vulnerabilities… - 100software-composition-analysis-sca
Guides scanning third-party and transitive dependencies for known vulnerabilities and license issues using tools such as Grype, Trivy, OWASP Dependency-Check, npm audit/pip-audit, or GitHub Dependabot/Snyk, and building a remediation workflow around the results. Use when the…