CI/CD integration
LIVEFail a build on vulnerable dependencies or known-exploited findings, with one CLI step or a short SDK script.
- One step: npx @cyberspec/sdk deps --yes --fail-on high (CLI from 0.2.0, not yet on npm)
- Works in any CI that runs Node.js 20, including GitHub Actions and GitLab CI
- Exit 1 when this upload finds a vulnerability at or above your threshold; exit 2 when nothing was checked
- SDK recipe, on npm today: start a scan, wait for it, fail on known-exploited or critical findings
- Store the API key as a CI secret; scans only run against assets already verified in the portal

Two checks fit in a pipeline. The dependency CLI reads the lockfiles in the checkout and exits 1 when that upload contains a vulnerability at or above your chosen severity. The SDK can start a network scan of a verified asset, wait for it and fail the job on known-exploited or critical findings, for example after a deploy. The SDK recipe works with 0.1.0 from npm; the CLI needs 0.2.0, which is not published yet.
GitHub Actions (CLI from 0.2.0, not yet on npm)
Add CYBERSPEC_API_KEY as a repository secret. The first --yes belongs to npx and skips its install prompt; the second tells the CLI to send without asking, because a pipeline cannot answer the prompt. Secrets are not passed to workflows triggered from forks, so the step fails there with exit code 2.
# .github/workflows/dependencies.yml
name: dependencies
on: [push, pull_request]
jobs:
cyberspec:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npx --yes @cyberspec/sdk deps --name acme/web --yes --fail-on high
env:
CYBERSPEC_API_KEY: ${{ secrets.CYBERSPEC_API_KEY }}GitLab CI
Any job on a Node.js 20 image works. Set CYBERSPEC_API_KEY as a masked CI/CD variable. The CLI needs an Owner or Admin key, because the first run for a codebase adds it as an asset on your plan.
# .gitlab-ci.yml
dependencies:
image: node:20
script:
- npx --yes @cyberspec/sdk deps --name acme/web --yes --fail-on high
# CYBERSPEC_API_KEY: a masked CI/CD variable in Settings → CI/CD → VariablesExit codes
--fail-on counts every vulnerable package found in this upload, including ones someone has marked as risk accepted in the portal. To let the build pass, upgrade the package or raise the threshold. A repository with no supported lockfile exits 2, so leave the step out of those pipelines.
0 Sent and checked; nothing at or above --fail-on in this upload
(also: no --fail-on given, --help, or you answered N at the prompt)
1 --fail-on was set and this upload found a vulnerability at or above it
2 Nothing checked: bad arguments, CYBERSPEC_API_KEY missing, an unusable
--name, a lockfile that failed to parse, no lockfiles found, no terminal
and no --yes, or the API refused the requestFail on known-exploited findings after a deploy
This uses the SDK on npm today (0.1.0). It scans an asset you have already verified in the portal, waits for the scan, and fails the job on any open finding that is on CISA’s Known Exploited Vulnerabilities catalog or rated critical. scans.wait polls every 10 seconds and gives up after an hour by default. A full scan covers every port and takes longer than a quick one.
import { CyberSpec } from '@cyberspec/sdk';
const cs = new CyberSpec({ apiKey: process.env.CYBERSPEC_API_KEY });
const scan = await cs.scans.create({ assetIds: ['<asset id>'], type: 'quick' });
const done = await cs.scans.wait(scan._id);
if (done.status !== 'completed') throw new Error(`Scan ${done.status}: ${done.error}`);
for await (const f of cs.findings.all({ scanId: done._id, status: 'open' })) {
if (f.kev || f.severity === 'critical') {
console.error(`${f.cve ?? f.checkKey} on ${f.hostPort}: ${f.remediation}`);
process.exitCode = 1;
}
}Vulnerability handling under NIS2 and GDPR
NIS2 Art. 21 lists vulnerability handling among the risk-management measures an in-scope entity takes, and managed service providers are a named sector. GDPR Art. 32 asks for security appropriate to the risk. A pipeline check gives you a dated record of what was found and when it was fixed. It does not by itself meet either law.
The parts of CyberSpec that do this
Dependency scanning LIVE
A CLI reads your lockfiles locally and checks package names and versions against OSV.dev; source code never leaves your machine.
Network scanning LIVE
On-demand and scheduled scans against domains, IPs, and CIDR ranges, with live progress and CVE correlation.
Triage: fix order LIVE
Known-exploited issues first, ransomware-linked at the top, and a suggested next step that a person accepts.
API and SDK LIVE
Automate the scans, findings and reports you already use in the portal, from CI or your own tools, with a REST API and the @cyberspec/sdk npm package.
For teams in Netherlands
In the Netherlands, the security duties buyers ask about are GDPR Article 32 and NIS2 Article 21, which includes vulnerability handling. CyberSpec gives dated external-scan evidence for both and maps findings to ISO 27001. A personal data breach goes to the Autoriteit Persoonsgegevens within 72 hours where feasible, unless it is unlikely to put people at risk (Article 33). The national cyber agency is NCSC-NL.
CyberSpec is €17 per client a month for up to 5 assets, a €119 one-off report, or free for one asset.
See your own exposure in minutes
Free for one asset, no card. Add a domain, prove you own it, and run your first scan.
More in Developers
Node.js SDK reference
Constructor options, methods, errors and versions for @cyberspec/sdk, the typed Node.js client for the CyberSpec API.
Dependency scan CLI
npx @cyberspec/sdk deps reads your lockfiles and checks every package against OSV.dev; source code never leaves your machine. The CLI is from 0.2.0, not yet on npm.
REST API
The JSON API behind the portal and the SDK: assets, scans, findings, AI agents, reports and code scans.
API keys
Keys scoped to your organisation, with the creator’s role at creation time, shown once and refused on the next request after revocation.
Pricing
Free for one asset, per-client pricing for MSPs, custom at volume.