Skip to content

Commit 7bad8a6

Browse files
authored
Merge pull request #26 from werther41/security-and-bugs
Security and bugs
2 parents 82b57d0 + a957c05 commit 7bad8a6

File tree

8 files changed

+959
-78
lines changed

8 files changed

+959
-78
lines changed
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
---
2+
name: Bug Report
3+
about: Report a bug or issue
4+
title: "[BUG] "
5+
labels: bug
6+
assignees: ""
7+
---
8+
9+
## 🐛 Bug Description
10+
11+
A clear and concise description of what the bug is.
12+
13+
## 🔄 Steps to Reproduce
14+
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
## ✅ Expected Behavior
21+
22+
A clear and concise description of what you expected to happen.
23+
24+
## ❌ Actual Behavior
25+
26+
A clear and concise description of what actually happened.
27+
28+
## 📸 Screenshots
29+
30+
If applicable, add screenshots to help explain your problem.
31+
32+
## 🖥️ Environment
33+
34+
- **OS**: [e.g. Windows 10, macOS 12, Ubuntu 20.04]
35+
- **Browser**: [e.g. Chrome 96, Firefox 95, Safari 15]
36+
- **Node.js Version**: [e.g. 18.17.0]
37+
- **App Version**: [e.g. 1.0.0]
38+
39+
## 📋 Additional Context
40+
41+
Add any other context about the problem here.
42+
43+
## 🔍 Console Logs
44+
45+
If applicable, include relevant console logs or error messages.
46+
47+
## 🧪 Testing
48+
49+
- [ ] I have tested this on the latest version
50+
- [ ] I have checked for similar issues
51+
- [ ] I have provided all required information
52+
53+
## 🚨 Security Impact
54+
55+
- [ ] This bug does not expose sensitive data
56+
- [ ] This bug does not allow unauthorized access
57+
- [ ] This bug does not compromise user privacy
58+
59+
---
60+
61+
**Note**: Please ensure this bug report is complete and doesn't contain sensitive information.
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
name: Feature Request
3+
about: Suggest a new feature or enhancement
4+
title: "[FEATURE] "
5+
labels: enhancement
6+
assignees: ""
7+
---
8+
9+
## 🚀 Feature Description
10+
11+
A clear and concise description of the feature you'd like to see implemented.
12+
13+
## 💡 Motivation
14+
15+
Why is this feature needed? What problem does it solve?
16+
17+
## 📋 Detailed Requirements
18+
19+
- [ ] Requirement 1
20+
- [ ] Requirement 2
21+
- [ ] Requirement 3
22+
23+
## 🎯 Acceptance Criteria
24+
25+
- [ ] Criterion 1
26+
- [ ] Criterion 2
27+
- [ ] Criterion 3
28+
29+
## 🎨 Mockups/Examples
30+
31+
If applicable, add mockups, screenshots, or examples to help explain the feature.
32+
33+
## 🔧 Technical Considerations
34+
35+
Any technical considerations or implementation notes.
36+
37+
## 📚 Documentation
38+
39+
What documentation updates would be needed?
40+
41+
## 🧪 Testing
42+
43+
How should this feature be tested?
44+
45+
## 📅 Timeline
46+
47+
When would you like this feature to be completed?
48+
49+
## 🔗 Related Issues
50+
51+
Link any related issues or discussions.
52+
53+
---
54+
55+
**Note**: Please ensure this feature aligns with the project's goals and doesn't introduce security vulnerabilities.

.github/pull_request_template.md

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# Pull Request
2+
3+
## 📝 Description
4+
5+
A clear and concise description of what this PR does.
6+
7+
## 🔗 Related Issue
8+
9+
Closes #(issue number)
10+
11+
## 🧪 Type of Change
12+
13+
- [ ] Bug fix (non-breaking change which fixes an issue)
14+
- [ ] New feature (non-breaking change which adds functionality)
15+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
16+
- [ ] Documentation update
17+
- [ ] Performance improvement
18+
- [ ] Code refactoring
19+
- [ ] Security enhancement
20+
21+
## 🎯 Changes Made
22+
23+
- [ ] Change 1
24+
- [ ] Change 2
25+
- [ ] Change 3
26+
27+
## 🧪 Testing
28+
29+
- [ ] I have tested these changes locally
30+
- [ ] I have added tests that prove my fix is effective or that my feature works
31+
- [ ] New and existing unit tests pass locally with my changes
32+
- [ ] I have tested the changes in different browsers/environments
33+
34+
## 📸 Screenshots
35+
36+
If applicable, add screenshots to help explain your changes.
37+
38+
## 🔒 Security Checklist
39+
40+
- [ ] No hardcoded secrets or API keys
41+
- [ ] No sensitive data in code or comments
42+
- [ ] Proper input validation and sanitization
43+
- [ ] No SQL injection vulnerabilities
44+
- [ ] No XSS vulnerabilities
45+
- [ ] Proper error handling without information disclosure
46+
- [ ] Authentication and authorization checks
47+
- [ ] Rate limiting considerations
48+
49+
## 📚 Documentation
50+
51+
- [ ] I have updated the README.md if needed
52+
- [ ] I have updated the API documentation if needed
53+
- [ ] I have added JSDoc comments for new functions
54+
- [ ] I have updated the CHANGELOG.md if needed
55+
56+
## 🚀 Deployment
57+
58+
- [ ] These changes are backward compatible
59+
- [ ] These changes don't require database migrations
60+
- [ ] These changes don't require environment variable updates
61+
- [ ] These changes don't break existing functionality
62+
63+
## 🔍 Code Quality
64+
65+
- [ ] My code follows the project's style guidelines
66+
- [ ] I have performed a self-review of my own code
67+
- [ ] I have commented my code, particularly in hard-to-understand areas
68+
- [ ] I have made corresponding changes to the documentation
69+
- [ ] My changes generate no new warnings
70+
- [ ] I have added tests that prove my fix is effective or that my feature works
71+
72+
## 📋 Additional Notes
73+
74+
Any additional information that reviewers should know.
75+
76+
## 🎯 Reviewers
77+
78+
@werther41 - Please review this PR
79+
80+
---
81+
82+
**Note**: Please ensure all checkboxes are completed before requesting review.
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: Production Protection
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
security-check:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Check for sensitive data
14+
run: |
15+
echo "Checking for potential security issues..."
16+
17+
# Check for hardcoded secrets
18+
if grep -r "password\|secret\|key\|token" --include="*.ts" --include="*.js" --include="*.tsx" --include="*.jsx" . | grep -v "process.env" | grep -v "your-" | grep -v "example"; then
19+
echo "❌ Potential hardcoded secrets found!"
20+
exit 1
21+
fi
22+
23+
# Check for environment variable usage
24+
if ! grep -r "process.env" --include="*.ts" --include="*.js" --include="*.tsx" --include="*.jsx" . > /dev/null; then
25+
echo "⚠️ No environment variables found - ensure secrets are properly configured"
26+
fi
27+
28+
echo "✅ Security check passed"
29+
30+
build-check:
31+
runs-on: ubuntu-latest
32+
steps:
33+
- uses: actions/checkout@v4
34+
35+
- name: Setup Node.js
36+
uses: actions/setup-node@v4
37+
with:
38+
node-version: "22"
39+
cache: "npm"
40+
41+
- name: Install dependencies
42+
run: npm ci
43+
44+
- name: Type check
45+
run: npm run typecheck
46+
47+
- name: Lint check
48+
run: npm run lint
49+
50+
- name: Build check
51+
run: npm run build
52+
env:
53+
# Use dummy values for build check
54+
TURSO_DATABASE_URL: "libsql://dummy.turso.io"
55+
TURSO_AUTH_TOKEN: "dummy-token"
56+
GOOGLE_API_KEY: "dummy-key"
57+
ADMIN_SECRET: "dummy-secret"
58+
CRON_SECRET: "dummy-cron-secret"
59+
60+
deployment-check:
61+
runs-on: ubuntu-latest
62+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
63+
steps:
64+
- name: Notify deployment
65+
run: |
66+
echo "🚀 Production deployment triggered"
67+
echo "Branch: ${{ github.ref }}"
68+
echo "Commit: ${{ github.sha }}"
69+
echo "Author: ${{ github.actor }}"

0 commit comments

Comments
 (0)