Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/dependabot.yml
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)"
33 changes: 33 additions & 0 deletions .github/workflows/security-scan.yml
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'
Comment on lines +19 to +23

Copilot AI Apr 22, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actions/setup-node is hardcoded to Node 20 here, while the main CI workflow centralizes the version via env.NODE_VERSION (see .github/workflows/ci.yml). To avoid drift, consider using a consistent mechanism (e.g., define NODE_VERSION in this workflow too and reference it).

Copilot uses AI. Check for mistakes.

- 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

Copilot AI Apr 22, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This workflow runs npx audit-ci ... but audit-ci is not pinned in package.json/package-lock.json, so CI will fetch the latest version at runtime and behavior can change unexpectedly. Add audit-ci as a devDependency (so it’s version-locked) and invoke it via npm exec/a package script, or pin the exact version in the npx call.

Suggested change
npx audit-ci --high --critical --package-manager npm
npx audit-ci@7.1.0 --high --critical --package-manager npm

Copilot uses AI. Check for mistakes.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[![Security](https://github.com/Smartdevs17/SubTrackr/actions/workflows/security-scan.yml/badge.svg)](https://github.com/Smartdevs17/SubTrackr/actions/workflows/security-scan.yml)
[![Dependabot Status](https://img.shields.io/badge/Dependabot-active-brightgreen.svg)](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.
Expand Down Expand Up @@ -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.

Copilot AI Apr 22, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The README states security scans run β€œon every push and pull request”, but the security-scan.yml workflow only triggers for pushes/PRs on main, dev, and develop. Either broaden the workflow triggers (e.g., include feature/* like the main CI) or adjust this wording to match actual coverage.

Suggested change
- **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`.

Copilot uses AI. Check for mistakes.
- **Reporting**: Found a vulnerability? Please see our [Security Policy](docs/security.md) for reporting guidelines.

To run a manual security audit:
```bash
npm run security:audit
```

## License

MIT
33 changes: 33 additions & 0 deletions docs/security-dashboard.md
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**: ![Dependency Status](https://img.shields.io/badge/dependencies-up--to--date-brightgreen)
- **Vulnerabilities**: ![Security Alerts](https://img.shields.io/badge/security-0%20vulnerabilities-brightgreen)
- **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

Copilot AI Apr 22, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This β€œdashboard” hardcodes status (β€œ0 vulnerabilities”) and specific scan dates while also claiming it’s partially updated by CI/CD, but there is no automation in the repo updating this file. As-is it will quickly become inaccurate; either wire up an automated update (and describe the data source), or reword it as a manually maintained example and remove the hardcoded β€˜automated’/status claims.

Suggested change
This dashboard tracks the current security health of the SubTrackr project.
## Current Health Status
- **Dependency Health**: ![Dependency Status](https://img.shields.io/badge/dependencies-up--to--date-brightgreen)
- **Vulnerabilities**: ![Security Alerts](https://img.shields.io/badge/security-0%20vulnerabilities-brightgreen)
- **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.*

Copilot uses AI. Check for mistakes.
44 changes: 44 additions & 0 deletions docs/security.md
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

Copilot AI Apr 22, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The security policy includes a placeholder email address for vulnerability reports. This can misdirect reporters; either replace it with a real monitored address or remove the email option and rely solely on GitHub Security Advisories.

Suggested change
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.

Copilot uses AI. Check for mistakes.

## Vulnerability Severity Levels

We follow the CVSS standard to categorize vulnerabilities:

| Severity | Description | Target Response |
| :--- | :--- | :--- |
| **Critical** | Remote code execution, full database access, etc. | Within 24 hours |
| **High** | Significant data exposure, bypass of security controls. | Within 72 hours |
| **Moderate** | Potential for misuse, limited data exposure. | Next scheduled release |
| **Low** | Minimal impact, hard to exploit. | Best effort |

## Security Monitoring

The repository is monitored using several automated tools:

1. **GitHub Dependabot**: Scans dependencies daily for known vulnerabilities (CVEs).
2. **NPM Audit**: Integrated into CI/CD to prevent merging code with high-risk dependencies.
3. **Audit-CI**: Enforces strict policy-based audits during the build process.

## Patching Workflow

1. **Notification**: Dependabot or CI alert triggers a notification.
2. **Triage**: Maintainers assess the impact and severity.
3. **Draft**: A fix is drafted in a private security fork or branch.
4. **Validation**: CI runs security scans against the proposed fix.
5. **Release**: The fix is merged and a new version is released immediately for Critical/High issues.
6. **Disclosure**: A security advisory is published if necessary.

## Best Practices for Contributors

- Never commit secrets, API keys, or private tokens.
- Use environment variables for sensitive configuration.
- Keep dependencies updated and minimize the use of unverified third-party libraries.
Loading