Skip to content

feat(security): add Snyk scan, Dependabot, and compliance report (#275)#374

Open
Escelit wants to merge 1 commit intoEDOHWARES:mainfrom
Escelit:feat/snyk-dependency-monitoring
Open

feat(security): add Snyk scan, Dependabot, and compliance report (#275)#374
Escelit wants to merge 1 commit intoEDOHWARES:mainfrom
Escelit:feat/snyk-dependency-monitoring

Conversation

@Escelit
Copy link
Copy Markdown

@Escelit Escelit commented Apr 29, 2026

Closes #275

What changed

.github/workflows/snyk.yml

  • Scans backend/ and root package.json on every push, PR, and daily at 02:00 UTC
  • Fails on high/critical findings; medium/low reported only
  • Uploads SARIF to GitHub Security tab (Code scanning alerts)
  • Stores snyk-report.json as a 90-day CI artifact per run

.github/dependabot.yml

  • Daily PRs for backend patch/minor updates (grouped to reduce noise)
  • Weekly PRs for root dependencies and GitHub Actions
  • Major version bumps skipped — require manual review

backend/src/utils/securityReport.js

  • Parses Snyk --json-file-output into a structured compliance report
  • Includes severity counts and a compliant flag (false if any high/critical exists)

backend/tests/securityReport.test.js

  • 11 unit tests covering classifySeverity, summarize, buildReport
  • All passing with Node's built-in test runner (no extra deps)

docs/security_compliance.md

  • One-step setup (add SNYK_TOKEN secret)
  • Severity policy table, report JSON schema, local usage instructions

Setup required

Add SNYK_TOKEN to repository secrets (Settings → Secrets → Actions).
Get the token from https://app.snyk.io → Account Settings → General.

…HWARES#275)

- .github/workflows/snyk.yml: scan backend + root on push/PR/daily cron,
  upload SARIF to GitHub Security tab, store JSON report as 90-day artifact
- .github/dependabot.yml: daily backend patch/minor updates (grouped),
  weekly root + Actions updates, skip major bumps
- backend/src/utils/securityReport.js: parse Snyk JSON into structured
  compliance report with severity counts and compliant flag
- backend/__tests__/securityReport.test.js: 11 unit tests (all passing)
- docs/security_compliance.md: setup guide, severity policy, report schema,
  local usage instructions
@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented Apr 29, 2026

@Escelit Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Backend: Snyk Scan and Dependency Vulnerability Monitoring

1 participant