界面已本地化;技能介绍与说明文档按所选语言由 AI 自动翻译,代码、命令、路径和专业术语保留原文,以原作者文档为准。
探索技能
部署与运维 · SKILL.md

snyk

snyk

【部署与运维】Find and fix vulnerabilities in code and dependencies with Snyk. Use when a user asks to scan for security vulnerabilities, audit npm packages, check Docker images for CVEs, or integrate security into CI/CD.

独立 GitHub 快照 · 自动分类 · 以原作者文档为准

Tterminalskills / skillsApache-2.0

技能说明

GitHub

name: snyk description: >- Find and fix vulnerabilities in code and dependencies with Snyk. Use when a user asks to scan for security vulnerabilities, audit npm packages, check Docker images for CVEs, or integrate security into CI/CD. license: Apache-2.0 compatibility: 'Node.js, Python, Go, Java, Docker, IaC' metadata: author: terminal-skills version: 1.0.0 category: devops tags: - snyk - vulnerability - dependencies - docker - ci-cd

Snyk

Overview

Snyk finds and fixes vulnerabilities in open-source dependencies, container images, IaC configs, and code. Integrates into CLI, CI/CD, Git repos, and IDEs.

Instructions

Step 1: Setup

npm install -g snyk
snyk auth

Step 2: Scan Dependencies

snyk test                    # test for vulnerabilities
snyk monitor                 # continuous monitoring
snyk fix                     # auto-fix vulnerabilities

Step 3: Container Scanning

snyk container test node:20-alpine
snyk container test my-app:latest --file=Dockerfile

Step 4: IaC Scanning

snyk iac test                # scan Terraform, K8s manifests
snyk iac test --report       # upload to dashboard

Guidelines

  • Free tier: 200 dependency tests/month, unlimited container tests.
  • Use --severity-threshold=high in CI to fail only on critical issues.
  • snyk fix auto-generates PRs with dependency upgrades.
  • Alternatives: npm audit (basic), GitHub Dependabot (free), Socket.dev (supply chain).
我的收藏