-
Notifications
You must be signed in to change notification settings - Fork 176
feat(security): implement automated dependency vulnerability scanning, alerts, and tracking system #255
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(security): implement automated dependency vulnerability scanning, alerts, and tracking system #255
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| version: 2 | ||
| updates: | ||
| - package-ecosystem: "npm" | ||
| directory: "/" | ||
| schedule: | ||
| interval: "daily" | ||
| open-pull-requests-limit: 10 | ||
| reviewers: | ||
| - "Smartdevs17" # Based on the repo URL found in package.json | ||
| groups: | ||
| dependencies: | ||
| patterns: | ||
| - "*" | ||
| update-types: | ||
| - "patch" | ||
| - "minor" | ||
| commit-message: | ||
| prefix: "fix(deps)" | ||
| include: "scope" | ||
| labels: | ||
| - "dependencies" | ||
| - "security" | ||
|
|
||
| - package-ecosystem: "github-actions" | ||
| directory: "/" | ||
| schedule: | ||
| interval: "weekly" | ||
| commit-message: | ||
| prefix: "ci(actions)" |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,33 @@ | ||||||
| name: Security Scan | ||||||
|
|
||||||
| on: | ||||||
| push: | ||||||
| branches: [main, dev, develop] | ||||||
| pull_request: | ||||||
| branches: [main, dev, develop] | ||||||
| schedule: | ||||||
| - cron: '0 0 * * 1' # Run weekly on Mondays | ||||||
|
|
||||||
| jobs: | ||||||
| npm-audit: | ||||||
| name: NPM Audit Check | ||||||
| runs-on: ubuntu-latest | ||||||
| steps: | ||||||
| - name: Checkout code | ||||||
| uses: actions/checkout@v4 | ||||||
|
|
||||||
| - name: Setup Node.js | ||||||
| uses: actions/setup-node@v4 | ||||||
| with: | ||||||
| node-version: '20' | ||||||
| cache: 'npm' | ||||||
|
|
||||||
| - name: Install dependencies | ||||||
| run: npm ci --legacy-peer-deps | ||||||
|
|
||||||
| - name: Run NPM Audit | ||||||
| run: npm audit --audit-level=high | ||||||
|
|
||||||
| - name: Advanced Vulnerability Scan (audit-ci) | ||||||
| run: | | ||||||
| npx audit-ci --high --critical --package-manager npm | ||||||
|
||||||
| npx audit-ci --high --critical --package-manager npm | |
| npx audit-ci@7.1.0 --high --critical --package-manager npm |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,3 +1,6 @@ | ||||||
| [](https://github.com/Smartdevs17/SubTrackr/actions/workflows/security-scan.yml) | ||||||
| [](https://github.com/Smartdevs17/SubTrackr/security/dependabot) | ||||||
|
|
||||||
| # SubTrackr - On-Chain Subscription Management on Stellar | ||||||
|
|
||||||
| SubTrackr is a mobile application for managing recurring payments and subscriptions powered by Soroban smart contracts on the Stellar network. Merchants create subscription plans, users authorize recurring XLM or token payments, and smart contracts handle automated billing cycles. | ||||||
|
|
@@ -230,6 +233,19 @@ Run locally in dry mode: | |||||
| npm run release:dry-run | ||||||
| ``` | ||||||
|
|
||||||
| ## Security | ||||||
|
|
||||||
| SubTrackr prioritizes the security of your subscriptions and on-chain transactions. | ||||||
|
|
||||||
| - **Dependency Scanning**: Powered by GitHub Dependabot and `npm audit`. | ||||||
| - **Security Monitoring**: Automated workflows run high-level vulnerability scans on every push and pull request. | ||||||
|
||||||
| - **Security Monitoring**: Automated workflows run high-level vulnerability scans on every push and pull request. | |
| - **Security Monitoring**: Automated workflows run high-level vulnerability scans for pushes and pull requests on `main`, `dev`, and `develop`. |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,33 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Security Dashboard | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| This dashboard tracks the current security health of the SubTrackr project. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ## Current Health Status | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - **Dependency Health**:  | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - **Vulnerabilities**:  | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - **Last Scan**: 2026-04-22 (Automated) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ## Active Vulnerabilities | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| | Dependency | Severity | CVE / Advisory | Status | Fix Version | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| | :--- | :--- | :--- | :--- | :--- | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| | None | - | - | - | - | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ## Audit History (Recent) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| | Date | Type | Result | Action Taken | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| | :--- | :--- | :--- | :--- | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| | 2026-04-22 | npm audit | PASSED | Initial setup of security suite | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| | 2026-04-15 | npm audit | FIXED | Patched minor ReDoS in dev dependency | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ## Tooling Status | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - [x] Dependabot Enabled | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - [x] Security Workflows Active | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - [x] Automated Patching (Grouped PRs) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - [ ] Snyk/OSS Index (Evaluated for future use) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| --- | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| *Note: This dashboard is partially updated by CI/CD status and manual triage logs.* | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+3
to
+33
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| This dashboard tracks the current security health of the SubTrackr project. | |
| ## Current Health Status | |
| - **Dependency Health**:  | |
| - **Vulnerabilities**:  | |
| - **Last Scan**: 2026-04-22 (Automated) | |
| ## Active Vulnerabilities | |
| | Dependency | Severity | CVE / Advisory | Status | Fix Version | | |
| | :--- | :--- | :--- | :--- | :--- | | |
| | None | - | - | - | - | | |
| ## Audit History (Recent) | |
| | Date | Type | Result | Action Taken | | |
| | :--- | :--- | :--- | :--- | | |
| | 2026-04-22 | npm audit | PASSED | Initial setup of security suite | | |
| | 2026-04-15 | npm audit | FIXED | Patched minor ReDoS in dev dependency | | |
| ## Tooling Status | |
| - [x] Dependabot Enabled | |
| - [x] Security Workflows Active | |
| - [x] Automated Patching (Grouped PRs) | |
| - [ ] Snyk/OSS Index (Evaluated for future use) | |
| --- | |
| *Note: This dashboard is partially updated by CI/CD status and manual triage logs.* | |
| This page is a manually maintained overview of the SubTrackr project's security tooling and review process. | |
| ## Current Health Status | |
| - **Dependency Health**: Review current dependency update status in Dependabot and CI results. | |
| - **Vulnerabilities**: Check the repository's live security alerts and audit tooling for the current status. | |
| - **Last Review**: Update manually when this document is reviewed. | |
| ## Active Vulnerabilities | |
| | Dependency | Severity | CVE / Advisory | Status | Fix Version | | |
| | :--- | :--- | :--- | :--- | :--- | | |
| | Refer to live alerts | See GitHub security tooling | See active advisories | Track in issues/PRs | Record when available | | |
| ## Audit History (Recent) | |
| | Date | Type | Result | Action Taken | | |
| | :--- | :--- | :--- | :--- | | |
| | Manual entry required | npm audit / repository alerts | Record findings at review time | Document remediation in PRs/issues | | |
| ## Tooling Status | |
| - [x] Dependabot Enabled | |
| - [x] Security Workflows Active | |
| - [x] Dependency update PRs are grouped where configured | |
| - [ ] Snyk/OSS Index (Evaluated for future use) | |
| --- | |
| *Note: This document is manually maintained and is not automatically updated by CI/CD. For current security status, use the repository's live security alerts, Dependabot, and workflow results.* |
| Original file line number | Diff line number | Diff line change | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,44 @@ | ||||||||||||||||
| # Security Policy | ||||||||||||||||
|
|
||||||||||||||||
| SubTrackr is committed to maintaining a secure environment for tracking subscriptions. This document outlines our security practices, vulnerability reporting process, and patching workflow. | ||||||||||||||||
|
|
||||||||||||||||
| ## Reporting a Vulnerability | ||||||||||||||||
|
|
||||||||||||||||
| If you've found a security vulnerability, please do NOT create a public issue. Instead, report it via one of the following methods: | ||||||||||||||||
|
|
||||||||||||||||
| 1. **GitHub Security Advisory**: Use the "Report a security vulnerability" button in the Security tab of the repository. | ||||||||||||||||
| 2. **Email**: security@subtrackr.example.com (Placeholder) | ||||||||||||||||
|
Comment on lines
+7
to
+10
|
||||||||||||||||
| If you've found a security vulnerability, please do NOT create a public issue. Instead, report it via one of the following methods: | |
| 1. **GitHub Security Advisory**: Use the "Report a security vulnerability" button in the Security tab of the repository. | |
| 2. **Email**: security@subtrackr.example.com (Placeholder) | |
| If you've found a security vulnerability, please do NOT create a public issue. Instead, report it via the following method: | |
| 1. **GitHub Security Advisory**: Use the "Report a security vulnerability" button in the Security tab of the repository. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actions/setup-nodeis hardcoded to Node 20 here, while the main CI workflow centralizes the version viaenv.NODE_VERSION(see.github/workflows/ci.yml). To avoid drift, consider using a consistent mechanism (e.g., defineNODE_VERSIONin this workflow too and reference it).