Snyk is the developer-first security platform that scans dependencies, containers, and IaC for vulnerabilities. When Snyk is your security gate, its availability is as business-critical as your CI runner itself—a Snyk API outage silently turns every pull request into an unscanned deployment waiting to happen.
This tutorial shows how to monitor Snyk scan job health, webhook delivery, API rate-limit headroom, and vulnerability database freshness using Vigilmon, so you know the moment your developer security gate degrades.
Why Snyk needs external monitoring
Snyk is a SaaS dependency with its own availability profile, rate limits, and webhook infrastructure. Even when Snyk's status page is green, your specific integration can silently fail:
- Snyk CLI exits non-zero in CI — network timeouts, token expiry, or org permission changes cause scan jobs to fail; the pipeline may swallow the error and continue
- Webhooks stop delivering — Snyk pushes vulnerability notifications to your chat and ticketing tools via webhooks; a failed delivery means engineers never see the alert
- API rate limit exhaustion — large monorepos with many projects can hit per-minute rate limits; scans skip rather than queue
- Vulnerability database staleness — if Snyk cannot sync its vuln DB, scans run against stale data and miss newly published CVEs
None of these are visible on Snyk's own dashboard without active polling.
What you'll need
- A Snyk account with at least one project connected
- A Snyk API token (Settings → General → API Token)
- Access to your CI pipeline (GitHub Actions, GitLab CI, CircleCI, etc.)
- A free Vigilmon account
Step 1: Add a Snyk scan health wrapper in CI
Wrap your Snyk scan step to push a heartbeat to Vigilmon only on success:
# .github/workflows/security.yml
name: Security Scan
on:
push:
branches: [main]
pull_request:
jobs:
snyk:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Snyk CLI
run: npm install -g snyk
- name: Authenticate Snyk
run: snyk auth ${{ secrets.SNYK_TOKEN }}
- name: Run Snyk scan
id: snyk_scan
run: snyk test --json --all-projects > snyk-report.json
continue-on-error: true
- name: Evaluate scan result
run: |
EXIT_CODE=${{ steps.snyk_scan.outputs.exit-code || '0' }}
if [ -f snyk-report.json ]; then
# Push heartbeat — scan completed (even with findings)
curl -s "https://vigilmon.online/heartbeat/${{ secrets.VIGILMON_SNYK_HEARTBEAT }}"
echo "Heartbeat pushed"
else
echo "Snyk report not generated — skipping heartbeat"
fi
# Re-fail on critical vulnerabilities
if grep -q '"severity":"critical"' snyk-report.json 2>/dev/null; then
echo "Critical vulnerabilities found"
exit 1
fi
The key distinction: the heartbeat fires when snyk test produces a report (scan ran), not just when it exits 0 (no findings). This way Vigilmon tracks pipeline liveness, not security posture.
Step 2: Monitor Snyk API availability
Snyk exposes an authenticated health check endpoint. Monitor it directly to know if Snyk API is reachable from your network:
# Test the endpoint manually
curl -H "Authorization: token YOUR_SNYK_TOKEN" \
"https://api.snyk.io/v1/org/YOUR_ORG_ID/projects" \
-o /dev/null -w "%{http_code}\n"
# 200 = API reachable, projects accessible
In Vigilmon:
- Monitors → New Monitor → HTTP
- URL:
https://api.snyk.io/v1/org/YOUR_ORG_ID/projects - Headers:
Authorization: token YOUR_SNYK_TOKEN - Expected status:
200 - Check interval:
5 minutes
This catches Snyk API outages before your next CI run discovers them.
Step 3: Track API rate-limit headroom
Build a small probe that checks your remaining Snyk API quota and returns 503 when headroom is low:
# snyk-quota-probe.py
import os, requests
from flask import Flask, jsonify
app = Flask(__name__)
SNYK_TOKEN = os.environ["SNYK_TOKEN"]
ORG_ID = os.environ["SNYK_ORG_ID"]
WARN_REMAINING = int(os.environ.get("WARN_REMAINING", "100"))
@app.get("/health")
def health():
resp = requests.get(
f"https://api.snyk.io/v1/org/{ORG_ID}/projects",
headers={"Authorization": f"token {SNYK_TOKEN}"},
timeout=10,
)
remaining = int(resp.headers.get("X-RateLimit-Remaining", 9999))
limit = int(resp.headers.get("X-RateLimit-Limit", 9999))
if resp.status_code != 200:
return jsonify({"status": "api_error", "code": resp.status_code}), 503
if remaining < WARN_REMAINING:
return jsonify({
"status": "rate_limit_low",
"remaining": remaining,
"limit": limit,
}), 503
return jsonify({
"status": "ok",
"remaining": remaining,
"limit": limit,
}), 200
if __name__ == "__main__":
app.run(host="0.0.0.0", port=8080)
Deploy this as a small service (AWS Lambda, Fly.io, or a container) and add a Vigilmon HTTP monitor pointing to its /health endpoint.
Step 4: Validate webhook delivery
Snyk can push vulnerability notifications to Slack, Jira, or custom webhooks. Test webhook reachability by registering a Vigilmon webhook URL as a Snyk notification target:
# Register a webhook in Snyk
curl -X POST "https://api.snyk.io/v1/org/YOUR_ORG_ID/webhooks" \
-H "Authorization: token YOUR_SNYK_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"url": "https://vigilmon.online/incoming/YOUR_WEBHOOK_TOKEN",
"secret": "your-webhook-secret"
}'
Snyk sends a ping event when the webhook is registered. In Vigilmon, view the incoming webhook log to confirm the delivery succeeded.
For ongoing validation, schedule a weekly cron that triggers a Snyk rescan and verifies the webhook fires:
#!/bin/bash
# weekly-webhook-test.sh
snyk test --project-id="$SNYK_PROJECT_ID" 2>&1
sleep 30
# Check Vigilmon incoming webhook log via API
LAST_DELIVERY=$(curl -s \
"https://vigilmon.online/api/webhook-deliveries/$VIGILMON_WEBHOOK_ID/last" \
-H "Authorization: Bearer $VIGILMON_API_KEY")
echo "$LAST_DELIVERY"
Step 5: Heartbeat monitor for scheduled scans
If you run nightly Snyk scans (e.g., snyk monitor to persist snapshot), add a dedicated heartbeat monitor for that pipeline:
- Monitors → New Monitor → Heartbeat
- Expected interval:
25h - Add the heartbeat URL to your nightly scan script
#!/bin/bash
# nightly-snyk-monitor.sh
snyk monitor --all-projects --org="$SNYK_ORG_ID"
if [ $? -eq 0 ]; then
curl -s "https://vigilmon.online/heartbeat/$VIGILMON_NIGHTLY_TOKEN"
fi
Vigilmon integration summary
| Signal | Monitor type | Alert condition | |--------|-------------|-----------------| | Scan ran in CI | Heartbeat | No ping per commit / day | | Snyk API reachable | HTTP | Status != 200 | | Rate limit headroom | HTTP (probe) | HTTP 503 | | Webhook delivery | Incoming webhook | No delivery in 25h | | Nightly snapshot | Heartbeat | No ping in 25h |
Next steps
- Wire Vigilmon alerts into the same Slack channel as your Snyk vulnerability notifications so the security team sees both scan findings and pipeline health in one place
- Add a Vigilmon status page for your internal developer portal showing Snyk scan pipeline health
- Use Vigilmon's incident timeline to correlate Snyk API degradation events with missed vulnerability detections in post-mortems