Common Owasp
ASecurityπ΄ **P0 β IDOR/BOLA (OWASP API1 / A01):** `req.params.id` is user-controlled and queried without ownership or tenant authorization. β οΈ **API3 β Broken Property Level Authorization:** Returning `user` directly may expose sensitive fields. Use **DTO projection**. ```js const user = await db.findOne({ id: req.params.id, ownerId: req.auth.userId, // or tenantId select: ['id', 'name', 'avatar'] }); if (!user) return res.status(404).json({ error: 'Not found' }); return res.json(user); ``` Also veri...
- 584 stars
- 0 votes
- 0 copies
- 2 views
- Added September 5, 2026
Works with
Security analysis
100/100Pro scans all 11 files and shows the line behind each finding
npx -y skills add HoangNguyen0403/agent-skills-standard --skill common-owasp --agent claude-codeAre you the author of Common Owasp?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/hoangnguyen0403-common-owasp-b4f91a05)π΄ **P0 β IDOR/BOLA (OWASP API1 / A01):** `req.params.id` is user-controlled and queried without ownership or tenant authorization.
β οΈ **API3 β Broken Property Level Authorization:** Returning `user` directly may expose sensitive fields. Use **DTO projection**.
```js
const user = await db.findOne({
id: req.params.id,
ownerId: req.auth.userId, // or tenantId
select: ['id', 'name', 'avatar']
});
if (!user) return res.status(404).json({ error: 'Not found' });
return res.json(user);
```
Also verify the route has authentication, an opaque session or a JWT with expiry, rate limiting, and explicit CORS configuration.
Files in this skill
- eval-1.baseline.md
- eval-1.with-skill.md
- eval-2.baseline.md
- eval-2.with-skill.md
- eval-3.baseline.md
- eval-3.with-skill.md
- trigger-1.md
- trigger-2.md
- trigger-3.md
- trigger-4.md
Attribution
Related skills
View all in development βComments
Loading commentsβ¦
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.