Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
466 commits
Select commit Hold shift + click to select a range
6298735
optimize Model part of Ingredient Substitution API
zeyu-linn May 2, 2025
60af898
Update: user profile controller improvements
May 2, 2025
5f13c42
Resolved conflict in routes/index.js: finalized upload route
May 2, 2025
d01f824
Enhanced Cost Estimation - Exclude unwanted ingredients (#89)
TUT888 May 2, 2025
b5c8fed
Implemented input validation for login, signup, appointments and cont…
madhavi2809 May 2, 2025
b3ebb48
Merge branch 'master' into feature/update-user-profile
justinkkk626 May 2, 2025
a69b327
Merge branch 'master' into feature/healtharticle-api
xsc224387468 May 2, 2025
3e1f729
Merge pull request #91 from Gopher-Industries/Tanya_CyberTeam_FileVal…
valenLIU0214 May 2, 2025
4824d8b
Merge branch 'master' into nutritionlog
valenLIU0214 May 2, 2025
5702f6c
Merge pull request #92 from Gopher-Industries/nutritionlog
justinkkk626 May 2, 2025
e917e41
Merge pull request #95 from zeyu-linn/zeyu_ingrendient_substitution
justinkkk626 May 2, 2025
9a3d47a
Merge branch 'master' into feature/healtharticle-api
justinkkk626 May 2, 2025
6296e8f
Merge pull request #94 from xsc224387468/feature/healtharticle-api
justinkkk626 May 2, 2025
30a82d5
Merge branch 'master' into feature/update-user-profile
valenLIU0214 May 2, 2025
967e134
Merge pull request #96 from Gopher-Industries/feature/update-user-pro…
valenLIU0214 May 2, 2025
70771c7
fixing the bug in index.yaml file
valenLIU0214 May 6, 2025
083f43a
Added global and route-specific rate limiting
kundanr2 May 6, 2025
5c4f4e6
Merge pull request #97 from Gopher-Industries/fixing-yaml-file
justinkkk626 May 6, 2025
8d0d747
feat: implement brute-force protection
kundanr2 May 6, 2025
a3df97a
Merge pull request #98 from kundanr2/Rate_limiting
valenLIU0214 May 6, 2025
fbcd43c
Merge pull request #99 from kundanr2/Brute_Force
valenLIU0214 May 6, 2025
6fdf4dd
RateLimiter
Tanya2209 May 8, 2025
adfed29
preferences
madhavi2809 May 8, 2025
7ab7ecc
pull lastest update and resolve conflict in index.yaml and routes.js
TUT888 May 9, 2025
07af733
commits removed
madhavi2809 May 9, 2025
943441e
Merge pull request #101 from madhavi2809/Security
valenLIU0214 May 9, 2025
60f62d4
Merge pull request #100 from Gopher-Industries/Tanya_CyberTeam_RateLi…
valenLIU0214 May 9, 2025
3c4a843
Resolved merge conflicts in routes/index.js
May 9, 2025
820012d
Added water intake tracker endpoint with increment and decrement logic
May 9, 2025
a9449c0
Create Health News API
zeyu-linn May 10, 2025
08ad9fb
input validation completed for 11 endpoints
madhavi2809 May 10, 2025
8f7c588
Created paths and schemas for the AI models
madhavi2809 May 10, 2025
6ddc893
Restructure and optimize Recipe Image Classification API
yuwei-zhui May 10, 2025
10fc5f1
complete testing for basic recipe scaling
TUT888 May 11, 2025
acf9153
Merge branch 'Gopher-Industries:master' into recipe-scaling
TUT888 May 11, 2025
3ea3a7f
Add chatbot error handling logic and middleware
xsc224387468 May 11, 2025
27412a3
Merge pull request #102 from Gopher-Industries/feature/water-intake-t…
valenLIU0214 May 11, 2025
a41fa32
Merge branch 'master' into zeyu_Health_News_API
zeyu-linn May 12, 2025
cfbf289
complete AI integration with AI API call
TUT888 May 14, 2025
d3d92fa
Merge branch 'Gopher-Industries:master' into feature/ai-api-integration
TUT888 May 14, 2025
fe52894
fix route issue, remove obesity endpoint
TUT888 May 15, 2025
d490c3b
Merge pull request #108 from TUT888/feature/ai-api-integration
justinkkk626 May 15, 2025
2637cfb
Merge branch 'master' into recipe-scaling
justinkkk626 May 15, 2025
c82ba33
Merge pull request #106 from TUT888/recipe-scaling
justinkkk626 May 15, 2025
ad012d0
Merge pull request #105 from yuwei-zhui/yuwei/image-identification
justinkkk626 May 15, 2025
bcd4e64
Merge branch 'master' into zeyu_Health_News_API
zeyu-linn May 15, 2025
a228c6c
Merge branch 'master' into feature/chatbot-error-handling
justinkkk626 May 15, 2025
8ba1933
Merge pull request #107 from xsc224387468/feature/chatbot-error-handling
justinkkk626 May 15, 2025
ec8eae5
Merge branch 'master' into validation
justinkkk626 May 15, 2025
4d2a963
Merge pull request #104 from madhavi2809/validation
justinkkk626 May 15, 2025
9f30039
Merge branch 'master' into zeyu_Health_News_API
justinkkk626 May 15, 2025
d9bbdd6
Merge pull request #103 from zeyu-linn/zeyu_Health_News_API
justinkkk626 May 15, 2025
ef4b0ef
Update configuration file of Image Classification API
yuwei-zhui May 15, 2025
612da17
Undo Revert
yuwei-zhui May 17, 2025
875eace
Revert "Undo Revert"
yuwei-zhui May 17, 2025
f1ab637
Fix the error in newest pull request
yuwei-zhui May 17, 2025
7ca9256
Fix syntax error in Recipe Image Classification API
yuwei-zhui May 17, 2025
2b7fbbd
Merge pull request #110 from yuwei-zhui/yuwei-pr-branch
justinkkk626 May 24, 2025
3597d2d
feat: fix the water intake tracker error
May 24, 2025
ebd59d1
Merge pull request #111 from Gopher-Industries/fix/water-intake-error
DishaChahal May 24, 2025
cd4b1da
fixed requirements.txt
madhavi2809 Jul 27, 2025
2b1c96d
fixed requirements.txt
madhavi2809 Jul 27, 2025
4adcdb3
fixed requirements.txt
madhavi2809 Jul 27, 2025
769cc6a
Update README.md
madhavi2809 Jul 27, 2025
4c18a76
Merge pull request #112 from madhavi2809/Cyber-branch
TUT888 Jul 27, 2025
0cc4ed9
Merge pull request #113 from madhavi2809/master
TUT888 Jul 27, 2025
5560a52
Support functions Separated
Jul 29, 2025
9abcb21
All Support Functions in separate file
Jul 29, 2025
3aad825
Finally done with the Separate function
Jul 29, 2025
c4a78f8
Created new Model for functionality
Jul 29, 2025
d2bf169
added audit-logs for user logins
madhavi2809 Aug 2, 2025
80ff52d
Merge branch 'master' into Feature
TUT888 Aug 2, 2025
a66c4bb
Merge pull request #115 from Abhimanyu2016019/Feature
TUT888 Aug 2, 2025
9409d9d
fix incorrect error response of recipe cost estimation api
TUT888 Aug 2, 2025
bca4704
fix endpoint /recipe/cost in SwaggerUI
TUT888 Aug 2, 2025
8a5d43c
added audit-logs for user logins and account creation
madhavi2809 Aug 2, 2025
6063dc5
EmailAlerts
Tanya2209 Aug 2, 2025
016ad17
edited code
madhavi2809 Aug 2, 2025
56fd546
minor change
madhavi2809 Aug 2, 2025
61c3398
update cost estimation with flexibility in measurement
TUT888 Aug 3, 2025
ba107a1
update flexible ingredients quantity calculation (original or scaled)…
TUT888 Aug 3, 2025
6d6201f
implement cost estimation for scaled recipe
TUT888 Aug 3, 2025
f52d383
merge full and partial cost estimation into 1 route with optional que…
TUT888 Aug 3, 2025
8666edc
update unit testing for new unified cost estimation route
TUT888 Aug 3, 2025
1ac6e76
updated logger
madhavi2809 Aug 4, 2025
f48abac
Merge pull request #116 from madhavi2809/Audit-logs
TUT888 Aug 5, 2025
93db9f0
Merge pull request #117 from TUT888/t2-enhanced-cost-estimation
madhavi2809 Aug 6, 2025
1a5603a
Merge branch 'master' into Tanya_Cyber_Failed_Login_Email
madhavi2809 Aug 6, 2025
cf9f2b2
RBAC: add authorizeRoles middleware and protect /upload route
kundanr2 Aug 10, 2025
5df5cb3
FileIntegrity
Tanya2209 Aug 10, 2025
ace8813
Remove au.env
ChaohuiLi0321 Aug 10, 2025
320bc53
Added six APIs: /auth/register, /auth/login, /auth/refresh, /auth/log…
ChaohuiLi0321 Aug 10, 2025
aa068d1
Create the testAuthAPI.js test script,API integration test script - t…
ChaohuiLi0321 Aug 10, 2025
978dd08
Environment variable validation script
ChaohuiLi0321 Aug 10, 2025
6bb8904
Database verification and health check scripts
ChaohuiLi0321 Aug 10, 2025
1439df9
Merge pull request #118 from Gopher-Industries/Tanya_Cyber_Failed_Log…
TUT888 Aug 11, 2025
2dd483d
Merge pull request #119 from kundanr2/feat/rbac-upload-protection
madhavi2809 Aug 13, 2025
fc841da
SignupFunctionality
chaya221071557 Aug 19, 2025
7bfd1f0
Merge pull request #121 from Gopher-Industries/chaya_signupfunctional…
TUT888 Aug 20, 2025
d333d3e
Fix login & MFA with RLS, updated SendGrid API key, refactored userPr…
kundanr2 Aug 21, 2025
4439669
Merge pull request #120 from Gopher-Industries/Tanya_Cyber_FileIntegr…
madhavi2809 Aug 21, 2025
bc657e7
Merge pull request #123 from kundanr2/fix-login-mfa-rls
TUT888 Aug 21, 2025
935ac3f
Update signup, adding user in Supabase's public table
TUT888 Aug 21, 2025
249fd45
Init route for barcode scanning feature
TUT888 Aug 22, 2025
6a7c703
add user registration, login, token refresh, logout, and profile retr…
ChaohuiLi0321 Aug 23, 2025
88f9393
chore(server): enhance startup logs with launch banner and Swagger UI…
ChaohuiLi0321 Aug 23, 2025
2f34998
feat(auth): expand auth routes with registration, login, token manage…
ChaohuiLi0321 Aug 24, 2025
c68e106
Merge remote-tracking branch 'origin/master' into Chaohuili_Refresh_T…
ChaohuiLi0321 Aug 25, 2025
228656a
fix audit logging for successful signup
TUT888 Aug 28, 2025
a08ad24
Merge pull request #124 from TUT888/maintain/signup
madhavi2809 Aug 30, 2025
d97317f
Merge pull request #126 from ChaohuiLi0321/Chaohuili_Refresh_Token_Me…
madhavi2809 Aug 30, 2025
3bc2604
Resolved errors in the API routes
madhavi2809 Aug 30, 2025
969f33e
Merge pull request #128 from madhavi2809/API-issue-solved
TUT888 Aug 30, 2025
5069a50
LoginDashboard
Tanya2209 Aug 30, 2025
096d0f4
complete barcode scanning with user allergen matching
TUT888 Aug 31, 2025
54d626b
download required packages
Sep 4, 2025
bcbbd91
Cost Estimation testing added
Sep 4, 2025
8211548
Extend RBAC to mealplan, notifications, and userprofile routes with u…
kundanr2 Sep 7, 2025
22bd6bc
Merge pull request #131 from Abhimanyu2016019/TestCost
TUT888 Sep 8, 2025
ea6313d
Merge pull request #132 from kundanr2/feature/rbac-extension
madhavi2809 Sep 8, 2025
f49baad
change to post method, allowing request body to include user_id
TUT888 Sep 8, 2025
53d062a
update optional user_id in request body
TUT888 Sep 8, 2025
299323d
update barcode scanning result schema of SwaggerUI
TUT888 Sep 8, 2025
4c4d51b
Merge branch 'master' into feature/barcode-scanning-for-allergen
TUT888 Sep 8, 2025
c471df1
add new endpoint to generate health plan
ntp111 Sep 10, 2025
77575aa
Merge pull request #135 from Gopher-Industries/phil-ai-integration
TUT888 Sep 11, 2025
844ebbf
Merge branch 'Gopher-Industries:master' into feature/barcode-scanning…
TUT888 Sep 11, 2025
dfe2af9
Shopping list apis code
Yui-000 Sep 11, 2025
b3e486d
shopping list apis
Yui-000 Sep 11, 2025
0e2bcd3
Added automated test cases using Jest for food data and health news e…
madhavi2809 Sep 13, 2025
554183a
Updated Readme file
madhavi2809 Sep 13, 2025
606ea55
Merge pull request #129 from Gopher-Industries/Tanya_Cyber_LoginDashb…
madhavi2809 Sep 13, 2025
f715931
minor bug fixes for error handling
TUT888 Sep 13, 2025
06590e7
Merge pull request #141 from madhavi2809/testCases
TUT888 Sep 13, 2025
1dfcfb8
fix(barcode): database query change from recipe ingredient to user al…
TUT888 Sep 13, 2025
7db5e39
CI/CD Optimization
Tanya2209 Sep 13, 2025
f667471
ci: trigger second run
Tanya2209 Sep 13, 2025
d131059
chore: ignore Vulnerability_Tool_V2 virtualenvs and caches
ChaohuiLi0321 Sep 13, 2025
7c0ff1c
chore: add Python cache/compiled file ignores
ChaohuiLi0321 Sep 13, 2025
b6736d5
feat: integrate recent Swagger fixes, routes, and security hardening
garyzhang75 Sep 14, 2025
29d170e
feat(auth): improve login controller (validation, errors, responses)
garyzhang75 Sep 14, 2025
a259704
feat(auth): improve login controller (validation, errors, responses)
garyzhang75 Sep 14, 2025
2c462e0
Merge pull request #143 from garyzhang75/feat/all-recent-updates
TUT888 Sep 14, 2025
5a7a662
Merge branch 'Gopher-Industries:master' into feature/barcode-scanning…
TUT888 Sep 14, 2025
267e689
Merge pull request #142 from Gopher-Industries/Tanya_CI/CD_Optimizati…
madhavi2809 Sep 14, 2025
e33ffab
Merge pull request #134 from TUT888/feature/barcode-scanning-for-alle…
madhavi2809 Sep 16, 2025
a458d1f
feat(security): Implement comprehensive security assessment tool
ChaohuiLi0321 Sep 17, 2025
17d5deb
chore: add dotenv configuration for environment variable management
ChaohuiLi0321 Sep 17, 2025
d797c2f
Merge remote-tracking branch 'upstream/master' into Automated-Securit…
ChaohuiLi0321 Sep 17, 2025
21cb8af
gitignore: ignore security/reports generated assessment reports
ChaohuiLi0321 Sep 17, 2025
b206242
feat(security): enhance security checks for bcrypt usage and dynamic …
ChaohuiLi0321 Sep 17, 2025
c3a8a1a
feat(security): add Supabase client and test security assessments table
ChaohuiLi0321 Sep 17, 2025
51ab9a0
Merge pull request #2 from ChaohuiLi0321/Automated-Security-Assessmen…
ChaohuiLi0321 Sep 17, 2025
eff58a4
feat(security): add background server startup and readiness check in …
ChaohuiLi0321 Sep 17, 2025
6c17b92
feat(security): update GitHub Actions output handling in security ass…
ChaohuiLi0321 Sep 17, 2025
e2e8fcd
Merge branch 'master' into feature/shopping-list-apis
Yui-000 Sep 17, 2025
0029bb4
Merge pull request #3 from ChaohuiLi0321/Automated-Security-Assessmen…
ChaohuiLi0321 Sep 18, 2025
49c0345
fix(security): update report download link in GitHub Actions summary
ChaohuiLi0321 Sep 18, 2025
7f0f3f7
feat(security): skip security headers check in CI environments
ChaohuiLi0321 Sep 18, 2025
ffa8d0c
Merge branch 'Automated-Security-Assessment-Tool'
ChaohuiLi0321 Sep 18, 2025
9f77f85
Merge branch 'Automated-Security-Assessment-Tool'
ChaohuiLi0321 Sep 18, 2025
3bf4900
Update authController.js
Yui-000 Sep 18, 2025
474afc2
Delete TRANSLATION_SUMMARY.md
Yui-000 Sep 18, 2025
0ca0a86
Delete Nutrihelp-api-master.code-workspace
Yui-000 Sep 18, 2025
5be68c1
Update authController.js
Yui-000 Sep 18, 2025
d762e14
Update signupController.js
Yui-000 Sep 18, 2025
36bd284
feat(security): enhance CI workflow with debug info and improved repo…
ChaohuiLi0321 Sep 18, 2025
9fc9751
Update userProfileController.js
Yui-000 Sep 18, 2025
522ee5a
Delete env.template
Yui-000 Sep 18, 2025
8729761
Update costEstimationTest.js
Yui-000 Sep 18, 2025
b7cac98
Update auth.js
Yui-000 Sep 18, 2025
3c875ca
Update mealplan.js
Yui-000 Sep 18, 2025
8b9e2f0
Update medicalPrediction.js
Yui-000 Sep 18, 2025
2c3019a
Update notifications.js
Yui-000 Sep 18, 2025
91bae1e
Update uploadRoutes.js
Yui-000 Sep 18, 2025
1004bac
Update userPreferences.js
Yui-000 Sep 18, 2025
571f1b9
Update userprofile.js
Yui-000 Sep 18, 2025
e0395c9
Update package.json
Yui-000 Sep 18, 2025
a488901
Update package.json
Yui-000 Sep 18, 2025
f829028
Update addUser.js
Yui-000 Sep 18, 2025
53a5e4f
Update authorizeRoles.js
Yui-000 Sep 18, 2025
a0e7341
Update authenticateToken.js
Yui-000 Sep 18, 2025
7446f87
Update authenticateToken.js
Yui-000 Sep 18, 2025
cc70cc7
fix medical report and weekly plan generation logic
ntp111 Sep 18, 2025
2adc1a8
Merge branch 'master' of https://github.com/Gopher-Industries/Nutrihe…
ntp111 Sep 18, 2025
95edf50
Update jwt routes.js
Yui-000 Sep 18, 2025
6dc72f2
Update jwt routes.js
Yui-000 Sep 18, 2025
7116f04
Update auth.js
Yui-000 Sep 18, 2025
1bcd989
Update index.yaml
Yui-000 Sep 18, 2025
6ecfcf8
Update index.yaml
Yui-000 Sep 18, 2025
e32d7e3
refactor(security): translate comments and documentation to English
ChaohuiLi0321 Sep 18, 2025
ae7fc37
update db integration for nutribot
ntp111 Sep 18, 2025
c6b8e05
Merge pull request #146 from Gopher-Industries/phil-ai-integration
TUT888 Sep 18, 2025
dd610dc
created service/errorLogService.js and middleware/errorLogger.js
ChaohuiLi0321 Sep 7, 2025
6cdcc33
feat: add file upload endpoint and error simulation for testing logging
ChaohuiLi0321 Sep 13, 2025
0312bc6
fix: update path for test error trigger endpoint
ChaohuiLi0321 Sep 18, 2025
e510ce3
V2: add password strength validation and SMS verification
YUQILIU123456 Sep 19, 2025
217d056
Merge branch 'master' into feature/shopping-list-apis
Yui-000 Sep 19, 2025
4f1010b
rbac logging
kundanr2 Sep 21, 2025
68e9742
Update index.yaml
Yui-000 Sep 21, 2025
11d08f5
Update index.yaml
Yui-000 Sep 21, 2025
a1f9d4f
Update index.yaml
Yui-000 Sep 21, 2025
d176e40
fix ai integration for health plan generation
ntp111 Sep 23, 2025
4e46c4f
feat(logging): implement unified error logging with support for datab…
ChaohuiLi0321 Sep 23, 2025
95db738
feat: enhance error logging service with dynamic Supabase integration…
ChaohuiLi0321 Sep 23, 2025
2bda83e
Merge pull request #154 from Gopher-Industries/phil-ai-integration
TUT888 Sep 25, 2025
2d8db9c
Merge pull request #137 from Yui-000/feature/shopping-list-apis
TUT888 Sep 25, 2025
5012b02
Merge branch 'master' into feature/password-strength-sms-v2
TUT888 Sep 25, 2025
21eeab2
Merge pull request #148 from YUQILIU123456/feature/password-strength-…
TUT888 Sep 25, 2025
692a658
Merge pull request #145 from ChaohuiLi0321/Automated-Security-Assessm…
madhavi2809 Sep 25, 2025
9bd74a5
Merge pull request #147 from ChaohuiLi0321/Chaohui/Extended_Middlewar…
madhavi2809 Sep 25, 2025
f266dfb
ci: add parallel lint/test/openapi jobs
Tanya2209 Sep 25, 2025
db92475
ci: add parallel lint/test/openapi jobs
Tanya2209 Sep 25, 2025
21b5574
ci: add parallel lint/test/openapi jobs
Tanya2209 Sep 25, 2025
3f7d991
ci: add parallel lint/test/openapi jobs
Tanya2209 Sep 25, 2025
1f6657a
ci: add parallel lint/test/openapi jobs
Tanya2209 Sep 25, 2025
e62f158
Merge branch 'master' into feature/rbac-extension
kundanr2 Sep 25, 2025
e1bf59e
Merge pull request #153 from kundanr2/feature/rbac-extension
madhavi2809 Sep 26, 2025
9903202
Merge pull request #155 from Gopher-Industries/Tanya_Cyber_CI/CDPart2
madhavi2809 Sep 26, 2025
18cd0eb
added test cases for 5 more endpoints
madhavi2809 Sep 26, 2025
595245f
Merge pull request #157 from madhavi2809/testCases
TUT888 Sep 27, 2025
4ab90c6
home service integration
wenyupeng Dec 7, 2025
93b7d3f
Revert "home service integration"
wenyupeng Dec 7, 2025
da5246d
home service integration
wenyupeng Dec 7, 2025
42b3acf
The unecessary files have been remove and have been combined to a sin…
harshkanojiya69-ux Dec 16, 2025
55f099b
the token expiry time has been increased from 15 minutes to 10 minutes
harshkanojiya69-ux Dec 16, 2025
2e39244
appointment api update
wenyupeng Jan 3, 2026
204c4b8
feat: implement user authentication service with registration, login,…
harshkanojiya69-ux Jan 6, 2026
e98bcb7
test: add comprehensive integration tests for health news API endpoints
harshkanojiya69-ux Jan 6, 2026
bef8cf6
feat: Implement user authentication service for registration, login, …
harshkanojiya69-ux Jan 6, 2026
df3f487
feat: Implement mock AI server for various AI services and an image c…
harshkanojiya69-ux Jan 6, 2026
e648641
Updated login, signup controllers and authentication middleware
brijesh-palta Jan 11, 2026
69e701a
Merge pull request #169 from wenyupeng/chris_dev_optimize
Bubblegumb Jan 12, 2026
0c15c2a
Merge pull request #168 from brijesh-palta/master
Bubblegumb Jan 12, 2026
bd124a7
health tools
wenyupeng Jan 16, 2026
4620035
fix the error for image classification
wenyupeng Jan 16, 2026
a1100c5
Logging in nutri help (#170) - Himanshi
Himanshi-TL Jan 18, 2026
eab0c03
appointment api update.
wenyupeng Jan 20, 2026
27d64d4
Merge pull request #171 from wenyupeng/chris_dev_optimize
Bubblegumb Jan 20, 2026
f9f06ee
feat: implement medical data breach detection module with HIBP integr…
harshkanojiya69-ux Jan 22, 2026
f522041
Merge branch 'master' into Medial-Data-Breach-Checker
harshkanojiya69-ux Jan 22, 2026
d01d0c0
feat: Implement image classification script to predict food items and…
harshkanojiya69-ux Jan 22, 2026
3fd3623
Merge branch 'Medial-Data-Breach-Checker' of https://github.com/harsh…
harshkanojiya69-ux Jan 22, 2026
ff46074
recipe api fix error
wenyupeng Jan 23, 2026
aa50356
Merge pull request #176 from wenyupeng/chris_dev_optimize
Bubblegumb Jan 23, 2026
6794c41
Fix CI/CD pipeline: Add scanner script and update workflow
harshkanojiya69-ux Jan 25, 2026
f4a146a
Fix CI pipeline: Add scanner, eslint config, and optimize workflow
harshkanojiya69-ux Jan 25, 2026
0340b08
Debug CI: verbose logging for security scan
harshkanojiya69-ux Jan 25, 2026
3a3b194
Merge branch 'Medial-Data-Breach-Checker' into master
harshkanojiya69-ux Jan 25, 2026
4731ede
feat: Expose Medical Breach Checker API endpoint
harshkanojiya69-ux Jan 25, 2026
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
Binary file added .DS_Store
Binary file not shown.
17 changes: 17 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"env": {
"browser": true,
"commonjs": true,
"es2021": true,
"node": true
},
"extends": "eslint:recommended",
"parserOptions": {
"ecmaVersion": "latest"
},
"rules": {
"no-unused-vars": "warn",
"no-console": "off",
"no-await-in-loop": "warn"
}
}
238 changes: 238 additions & 0 deletions .github/workflows/security-assessment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,238 @@
name: Monthly Security Assessment

on:
schedule:
# Run at 2:00 AM on the 1st of every month
- cron: '0 2 1 * *'
workflow_dispatch: # Allow manual triggering
push:
branches: [ main ]
paths:
- 'security/**'
- '.github/workflows/security-assessment.yml'

jobs:
security-assessment:
runs-on: ubuntu-latest
permissions:
issues: write
contents: read
actions: read

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
# fetch full history to avoid git errors in CI that rely on tags/refs
fetch-depth: 0
# ensure actions has permission to access the repository (needed for forks and some git ops)
token: ${{ secrets.GITHUB_TOKEN }}

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Start server in background
run: |
npm start &
sleep 15
echo "Server started, waiting for it to be ready..."

# Check whether the server is started successfully
for i in {1..10}; do
if curl -f http://localhost:80/api-docs > /dev/null 2>&1; then
echo "Server is ready!"
break
elif curl -f http://localhost:3000/ > /dev/null 2>&1; then
echo "Server is ready on port 3000!"
break
else
echo "Waiting for server... (attempt $i)"
sleep 3
fi
done

- name: Create reports directory
run: mkdir -p security/reports

- name: Debug git state (CI helper)
if: ${{ github.event_name != 'schedule' }}
run: |
echo "Git version: $(git --version)"
echo "Current dir: $(pwd)"
echo "Git status:" || true
git status --porcelain || true
echo "Show remote info:" || true
git remote -v || true
echo "List refs (limited):" || true
git show-ref --heads --tags | head -n 50 || true

- name: Run security assessment
id: security-assessment
env:
NODE_ENV: production
SUPABASE_URL: ${{ secrets.SUPABASE_URL }}
SUPABASE_ANON_KEY: ${{ secrets.SUPABASE_ANON_KEY }}
JWT_SECRET: ${{ secrets.JWT_SECRET }}
GITHUB_ACTIONS: true
continue-on-error: true
run: |
echo "Starting security assessment..."

# Run the assessment
node security/runAssessment.js

# Find the latest generated JSON report
LATEST_REPORT=$(ls -t security/reports/security-report-*.json 2>/dev/null | head -1)

if [ -f "$LATEST_REPORT" ]; then
echo "Found report: $LATEST_REPORT"

# Extract key metrics from the report
CRITICAL_ISSUES=$(node -e "
try {
const fs = require('fs');
const report = JSON.parse(fs.readFileSync('$LATEST_REPORT', 'utf8'));
console.log(report.critical_issues || 0);
} catch(e) {
console.log('0');
}
")

OVERALL_SCORE=$(node -e "
try {
const fs = require('fs');
const report = JSON.parse(fs.readFileSync('$LATEST_REPORT', 'utf8'));
console.log(report.overall_score || 0);
} catch(e) {
console.log('0');
}
")

FAILED_CHECKS=$(node -e "
try {
const fs = require('fs');
const report = JSON.parse(fs.readFileSync('$LATEST_REPORT', 'utf8'));
console.log(report.failed_checks || 0);
} catch(e) {
console.log('0');
}
")

# Set outputs
echo "has_critical=$([ $CRITICAL_ISSUES -gt 0 ] && echo 'true' || echo 'false')" >> $GITHUB_OUTPUT
echo "report_path=$LATEST_REPORT" >> $GITHUB_OUTPUT
echo "critical_issues=$CRITICAL_ISSUES" >> $GITHUB_OUTPUT
echo "overall_score=$OVERALL_SCORE" >> $GITHUB_OUTPUT
echo "failed_checks=$FAILED_CHECKS" >> $GITHUB_OUTPUT

# Create a summary for GitHub
echo "## Security Assessment Summary" >> $GITHUB_STEP_SUMMARY
echo "- **Overall Score:** ${OVERALL_SCORE}%" >> $GITHUB_STEP_SUMMARY
echo "- **Critical Issues:** $CRITICAL_ISSUES" >> $GITHUB_STEP_SUMMARY
echo "- **Failed Checks:** $FAILED_CHECKS" >> $GITHUB_STEP_SUMMARY
# Prefer linking directly to the artifacts tab for this run so users can download reports
echo "- **Report (artifacts):** [Download Reports](https://github.com/${{ github.repository }}/runs/${{ github.run_id }}/artifacts)" >> $GITHUB_STEP_SUMMARY
echo "- **Or open Actions run:** [Run details](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})" >> $GITHUB_STEP_SUMMARY

else
echo "No report file found"
echo "has_critical=false" >> $GITHUB_OUTPUT
echo "report_path=" >> $GITHUB_OUTPUT
echo "critical_issues=0" >> $GITHUB_OUTPUT
echo "overall_score=0" >> $GITHUB_OUTPUT
echo "failed_checks=0" >> $GITHUB_OUTPUT
fi

- name: Upload security reports
uses: actions/upload-artifact@v4
if: always()
with:
name: security-reports-${{ github.run_number }}
path: security/reports/
retention-days: 90

- name: Comment on commit with results
if: github.event_name == 'push'
uses: actions/github-script@v7
with:
script: |
const critical = '${{ steps.security-assessment.outputs.critical_issues }}';
const score = '${{ steps.security-assessment.outputs.overall_score }}';
const failed = '${{ steps.security-assessment.outputs.failed_checks }}';
const runId = '${{ github.run_id }}';

const criticalNum = parseInt(critical) || 0;
const scoreNum = parseInt(score) || 0;

const status = criticalNum > 0 ? '🚨 CRITICAL' :
scoreNum < 70 ? '⚠️ WARNING' : '✅ GOOD';

let actionMessage = '';
if (criticalNum > 0) {
actionMessage = '⚠️ **Action Required:** Critical security issues detected!';
} else if (scoreNum < 70) {
actionMessage = '⚠️ **Review Recommended:** Security score below threshold.';
} else {
actionMessage = '✅ **All Good:** Security assessment passed.';
}

const comment = '## Security Assessment Results ' + status + '\n\n' +
'**Overall Score:** ' + score + '%\n' +
'**Critical Issues:** ' + critical + '\n' +
'**Failed Checks:** ' + failed + '\n\n' +
actionMessage + '\n\n' +
'[View Full Reports](https://github.com/' + context.repo.owner + '/' + context.repo.repo + '/actions/runs/' + runId + ')';

github.rest.repos.createCommitComment({
owner: context.repo.owner,
repo: context.repo.repo,
commit_sha: context.sha,
body: comment
});

- name: Create issue for critical findings
if: steps.security-assessment.outputs.has_critical == 'true'
uses: actions/github-script@v7
with:
script: |
const critical = '${{ steps.security-assessment.outputs.critical_issues }}';
const score = '${{ steps.security-assessment.outputs.overall_score }}';
const failed = '${{ steps.security-assessment.outputs.failed_checks }}';
const runId = '${{ github.run_id }}';

const body = '## 🚨 Critical Security Issues Detected\n\n' +
'**Assessment Results:**\n' +
'- **Critical Issues:** ' + critical + '\n' +
'- **Overall Score:** ' + score + '%\n' +
'- **Failed Checks:** ' + failed + '\n' +
'- **Run ID:** ' + runId + '\n\n' +
'**Immediate Actions Required:**\n' +
'1. Review the detailed security report in the workflow artifacts\n' +
'2. Address all critical security issues immediately\n' +
'3. Re-run the security assessment after fixes\n' +
'4. Close this issue once all critical issues are resolved\n\n' +
'**Report Files:**\n' +
'- JSON Report: security-report-*.json\n' +
'- HTML Report: security-report-*.html\n' +
'- Markdown Report: security-report-*.md\n\n' +
'This issue was automatically created by the Monthly Security Assessment workflow.';

github.rest.issues.create({
owner: context.repo.owner,
repo: context.repo.repo,
title: '🚨 Critical Security Issues Detected (Score: ' + score + '%)',
body: body,
labels: ['security', 'critical', 'automated']
});

- name: Set exit code based on results
if: steps.security-assessment.outputs.has_critical == 'true'
run: |
echo "Critical security issues detected. Failing the workflow."
exit 1
Loading