CodeVetter · Repo Unpack · Risk map
keystonejs/keystone
The main sensitive boundaries are privileged context APIs, authentication/session configuration, external storage, and commands that generate files or alter databases. Source inspection also reveals example/API drift and a Cloudinary metadata mapping concern. These findings are source observations or explicitly labeled hypotheses, not confirmed vulnerabilities or executed defect reproductions.
- sudo() constructs an internal context with permission bypass enabled, while internal() only changes schema scope; direct Prisma access is exposed separately and the actions example explicitly uses it to bypass Keystone access checks.
- Admin UI access defaults to allowed when no session strategy exists; server.cors=true becomes reflected origins with credentials=true. These configuration choices must be assessed independently of list API permissions.
- Hypothesis: omitting a stable session secret can invalidate sessions after strategy reconstruction or across independently initialized instances, because statelessSessions() generates a fresh random default secret. (inferred)
- Hypothesis: a successful storage.put() followed by validation or database failure can leave an orphaned asset, because upload occurs during input resolution and the inspected cleanup hook addresses replaced/deleted old filenames after persistence. (inferred)
- CLI operations have filesystem/database side effects: dev defaults to dbPush=true, Prisma helpers spawn the resolved CLI and use temporary directories, and artifact destinations can be configured through resolved paths.
- The magic-link example reads password.extensions.keystoneSecretField and calls generateHash(), whereas current core exports extensions.keystoneKDF with hash()/compare(); the source names disagree on its token redemption path.
- Cloudinary output maps both width and height from _meta.width, and the field implementation explicitly notes no delete support; dimension reporting and remote asset cleanup warrant focused review.
- The document site can build with TypeScript errors ignored; root tsc excludes docs, and the inspected main types job runs recursive check plus root tsc, while docs/package.json has no check script.