تخطَّ إلى المحتوى

Missing Authorization (ARCH9120)

هذا المحتوى غير متوفر بلغتك بعد.

Key swift.security.missing-authorization · Severity warning · Category security · CWE CWE-862

Flags Vapor state-changing routes (post / put / delete / patch) registered directly on the application with no authenticator or guard middleware in the file.

app.delete("users", ":id") { req in ... }
let protected = app.grouped(UserToken.authenticator(), User.guardMiddleware())
protected.delete("users", ":id") { ... }

Register mutating routes on a group behind an authenticator and guard middleware.