Security Hub
A secret scanner, CVE scanner and security toolkit inside VS Code
Catch the hard-coded key and the vulnerable dependency before they reach a release. Security Hub puts four scans in one panel, and two dependency scanners check every package version you install against OSV.dev for known CVEs. Every finding shows its evidence, severity and fix.
Install · v11.88.0VS CodeInstall · v1.2.0JetBrainsRead the docs
On this page 7 sections

Four scans in one panel
Workspace audit
Hard-coded API keys, tokens and passwords (values are masked in the results), injection risks, weak cryptography and unsafe configuration.
Cloud & containers
Terraform, Kubernetes, Docker Compose, Dockerfiles and GitHub Actions. To generate those files in the first place, see the DevOps tools and the guide to converting docker run commands to Docker Compose.
Dependencies & config
Lockfiles, unbounded version ranges, abandoned or compromised packages, registry credentials and . hygiene. For known CVEs in the versions you install, see the scanners below.
Endpoint scan
For a URL you are authorised to test: TLS, HSTS, security headers, CSP, CORS, cookies, auth behaviour and rate limiting. Active checks are off until you turn them on. Fix what it finds and re-test the endpoint in the REST API client.
Everything runs locally except the endpoint scan, which only contacts the URL you enter, and the dependency scanners below, which send only package names, versions and CVE ids.
Known CVEs in your dependencies
The OSV Vulnerability Scanner reads your lockfiles, manifests and Maven or Gradle builds and checks every resolved package version against OSV.dev, which includes the GitHub Advisory Database, PyPA, Go and RustSec.
- 12 ecosystems: npm, PyPI, Maven/Gradle, Go, Cargo, RubyGems, NuGet, Composer, pub, Hex, SwiftPM and CRAN.
- Transitive dependencies: npm, pnpm, Yarn, Poetry, uv and Cargo workspaces and monorepos, with the path that brings each package in.
- Spring Boot and other Maven or Gradle projects are resolved to their full dependency tree, with Maven or Gradle itself when you allow it, or a built-in resolver.
- Verified fixes: the fixed version is checked against OSV, with the upgrade command for the package manager that wrote your lockfile. A command runs only after you confirm it.
- Honest about gaps: a range-only dependency is Potential, never confirmed by guesswork, and Scan incomplete always lists its reasons.
- Export a self-contained HTML report or the full JSON result.
SCA Scanner
Software composition analysis on the same engine, so both scanners agree on every dependency and advisory. It adds:
- Known exploited: CVEs in CISA’s KEV catalog are marked and sorted first.
- Dependency health: deprecated, yanked, abandoned and outdated packages, kept apart from vulnerabilities.
- CVSS from NVD where the advisory has none, with the source named.
- Spring Boot-aware fixes: the lowest Boot release, or the Boot property override, that fixes each CVE. Every edit is previewed as a diff and applied only after you confirm.
- Projects, exports and diagnostics: pick the projects to scan, export CSV or JSON, and see what was found, resolved, checked and skipped.
Dependency lists were verified against Maven, Gradle, npm, pnpm, uv, Pipenv, Cargo, NuGet, Poetry and Go on real projects. Full reference: OSV & SCA scanners.
Example: what a fix looks like
A key committed in source is readable by anyone with the repository, and stays in its history after you delete it:
const stripe = new Stripe("sk_live_…redacted…");Read it from the environment instead, keep the real value out of Git, and rotate the key that was exposed:
const stripe = new Stripe(process.env.STRIPE_SECRET_KEY!);Auth and header tools
- JWT Decoder & Signer: read claims, check expiry, verify or sign test tokens.
- OAuth 2.0 & PKCE Helper and Hash, HMAC & Webhook Signatures.
- CSP & Security Headers: build a Content-Security-Policy and the full header set for nginx, Express, Next.js, Vercel or Netlify, or audit the ones you send.
- Cookie Inspector & Builder and Certificate & SSL Pinning.
Good to know
- Each scan reads up to
devsnip.files (2,000 by default) and skips dependency, build and cache folders. Raise the setting for a large repository.securityAudit. maxFiles - It is a fast check while you work. Keep secret scanning in CI and a proper security review for anything that matters.
Tools in this area
Security & Auth 12 tools
- Workspace Security Audit
- SCA Scanner
- OSV Vulnerability Scanner
- Dependency & Config Check
- Endpoint Security Scan
- Cloud & Container Audit
- JWT Decoder & Signer
- OAuth 2.0 & PKCE
- Hash, HMAC & Webhooks
- CSP & Security Headers
- Cookie Inspector & Builder
- Certificate & SSL Pinning
Questions
- Does the scanner upload my code?
- No. The workspace, container and config scans run locally, and the endpoint scan only contacts the URL you enter. The OSV and SCA scanners send only package names, versions and CVE ids (to OSV.dev, the package registries and NVD) — never source code, file contents or paths.
- Does it find vulnerabilities in Spring Boot transitive dependencies?
- Yes. Maven and Gradle projects are resolved to their full dependency tree, so libraries that starters, parents and BOMs bring in, such as Tomcat, Jackson and SnakeYAML, are checked too. The SCA Scanner then proposes the lowest Spring Boot release or Boot property override that fixes each CVE.
- Does it replace npm audit or osv-scanner?
- It uses the same OSV.dev data as osv-scanner, across 12 ecosystems in one dashboard. Keep a dependency scan in CI as well; the scanners here are for checking while you work.
- Can I export the findings?
- Yes. Security Hub exports Markdown or JSON, the OSV Vulnerability Scanner an HTML report or JSON, and the SCA Scanner JSON or CSV.