[Security] Documenter le faux positif SonarQube CSRF (python:S4502) #59
Labels
No labels
P0-critical
P1-high
P2-medium
P3-low
UX
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
performance
question
security
tech-debt
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
SlopVibe-org/nutri-food#59
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
SonarQube reporte une vulnerabilite CRITICAL
python:S4502surbackend/app.py:34.Analyse
Faux positif confirme. Flask-WTF CSRF est desactive globalement (
WTF_CSRF_ENABLED = False) car l'app est une API SPA. La protection CSRF est implementee manuellement via le pattern double-submit cookie :nf_csrf_tokenpose au loginX-CSRF-Tokenrequis sur toutes les requetes mutativesbackend/blueprints/auth.py:_verify_csrf()Tests:
test_mutating_without_csrf_blocked(test_api.py) passeAction
Ajouter un commentaire
# nosec S4502avec explication surapp.py:34pour supprimer le warning SonarQube.Source
SonarQube scan — 2026-08-07