{"agent":"claude","input":"A Linear issue labelled security says this Flask and htmx app has no CSRF protection. Read requirements.txt, app.py, contacts_model.py and every file under templates first, and list every route that accepts POST, PUT, PATCH or DELETE together with each place in the templates that calls it: plain forms, hx-post, hx-put and hx-delete attributes, and any htmx.ajax call in inline script. Add Flask-WTF at a version that installs with the pinned Flask and enable CSRFProtect. Put a hidden csrf_token input in every form so it works without JavaScript. Send the token on every htmx request with one hx-headers attribute; the body tag has hx-boost, so put the attribute on an element that each response renders again, not on the body tag, and explain why in the pull request. Handle CSRFError: a short page for a normal request, and an HX-Refresh response header for an htmx request. Decide for the JSON routes under /api/v1 whether to exempt them, say what you decided and why, and report their missing authentication as a separate finding without fixing it. Read the secret key from a SECRET_KEY environment variable. Add pytest tests with the Flask test client, run against a temporary copy of contacts.json: every protected route refuses a request with no token, accepts one with the field or the header, and refuses a token from another session, and any exempt route still works without one. Start the app, open it in the browser, perform create, edit, row delete, bulk delete and the archive buttons, and record the request headers of each. Open a pull request that links the issue.","resources":[{"url":"https://github.com/your-org/your-app"}]}