Repository navigation
fix: clear remaining audit failures and fix password-expiry - #363
Conversation
🟢 Tier S · Ready to merge
This PR updates the Go versions used by CI and aligns the affected Node templates’ engine declarations and lockfiles with their dependencies. It also updates password-expiry to use its configured age, email each returned user, and page through all matching users; its README example is corrected as well. Latest changes: The latest commits add cursor-based pagination to password-expiry user lookup and align generate-pdf’s Node engine range with Faker’s supported versions.
📂 Walkthrough · 10
✅ Fixed since the last review · 1
Reviewed the commits since |
|
| | Setting | Value | | ||
| | ----------------- | ------------- | | ||
| | Runtime | Node (18.0) | | ||
| | Runtime | Node (22) | |
There was a problem hiding this comment.
Node 22 requirement lacks minimum The README says this template runs on Node 22, but the new Faker dependency requires Node 22.13.0 or later. Readers choosing an earlier 22.x runtime would reasonably expect it to be supported when it does not meet the dependency’s stated requirement.
Prompt To Fix With AI
This is a comment left during a code review.
Path: node/generate-pdf/README.md
Line: 23
Comment:
**Node 22 requirement lacks minimum** The README says this template runs on Node 22, but the new Faker dependency requires Node 22.13.0 or later. Readers choosing an earlier 22.x runtime would reasonably expect it to be supported when it does not meet the dependency’s stated requirement.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
| "prettier": "^3.2.5" | ||
| }, | ||
| "engines": { | ||
| "node": "^20.19.0 || >=22.13.0" |
There was a problem hiding this comment.
Unsupported Node 23 versions The new engine range accepts Node 23.0–23.4, but the locked Faker dependency requires Node 23.5 or later. Installing on one of those versions produces a dependency engine warning, or fails if engine checks are enforced. The template’s declared range should match the dependency’s supported versions.
| "node": "^20.19.0 || >=22.13.0" | |
| "node": "^20.19.0 || ^22.13.0 || ^23.5.0 || >=24.0.0" |
Prompt To Fix With AI
This is a comment left during a code review.
Path: node/generate-pdf/package.json
Line: 18
Comment:
**Unsupported Node 23 versions** The new engine range accepts Node 23.0–23.4, but the locked Faker dependency requires Node 23.5 or later. Installing on one of those versions produces a dependency engine warning, or fails if engine checks are enforced. The template’s declared range should match the dependency’s supported versions.
```suggestion
"node": "^20.19.0 || ^22.13.0 || ^23.5.0 || >=24.0.0"
```
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.# Conflicts: # node/email-contact-form/package-lock.json # node/email-contact-form/package.json # node/password-expiry/package-lock.json # node/password-expiry/package.json
623b2f6 to
c83778d
Compare
Clears the remaining
Dependency auditfailures onmain, which block open PRs such as #362. #365 already landed the dependency bumps that this PR first carried, so it is now merged withmainand contains only the following changes:audit.ymlandbuild.yml.govulncheckflagged GO-2026-6617 (HPACK encoder race innet/http) in the standard library for both Go templates. It was fixed in 1.26.9.nodemailer10 needs Node 20+ and@faker-js/faker10 needs^20.19.0 || ^22.13.0 || ^23.5.0 || >=24.0.0, soemail-contact-form,password-expiryandgenerate-pdfnow declare matchingengines.password-expiryfixes:usersarray of theusers.list()response, and pages through every expired user 100 at a time instead of stopping at the first 25.MAX_PASSWORD_AGE(days, default 90) as documented, instead of a fixed 1 second.Test
govulncheck ./...reports no vulnerabilities forgo/starterandgo/discord-command-boton Go 1.26.9.npm auditreports 0 vulnerabilities foremail-contact-formandpassword-expiryafter the lockfiles were regenerated.password-expiryhandler against a mocked Appwrite API with 230 expired users. It made 3users.list()calls (100, 100, 30), attempted an email to all 230, and queried with a cutoff 90 days back.