Find forms and cookies
grep and glob list the forms that change data and the cookie settings in your site folder, file by file.
Armature Webdesk is a Windows agent that does the routine work of CSRF defence on your own site: it finds the forms that change data, checks each one for a token and drafts the fix. Diffs come first. You accept or reject every change, and your own tests give the real result.
grep and glob list the forms that change data and the cookie settings in your site folder, file by file.
edit_file proposes a change, shows the diff and waits for your OK in Ask first mode.
Shell runs your test command and reports the real exit code, so a failure is always visible on the card.
It reads first. The agent opens the relevant files, proposes one change, shows the diff and runs your check, and only after you accept does it move on.
method="post"3 matches./site/templates/settings.htmlreadcsrf_token0 matches./site/templates/settings.htmldiff shownrun-tests.cmdexit 0Open the project folder and ask whether every form that changes data carries a token. The agent runs grep for the post forms in your templates and opens each hit with read_file. For every form it looks for a hidden token field and, in the handler code, for the check that rejects a missing or wrong value. It then fetches the form page of your staging copy with http_get to confirm that the field is present in the page the browser receives. The result is a short findings list with the file name next to each form that has no token. Nothing changes yet. You read the list, decide which form to fix first, and the agent starts the edit from there with the next task.
Take the first form from the findings list. The agent opens the template and the handler with read_file, then uses edit_file to add the hidden field to the template. If your handler does not compare the submitted value with the one stored in the user's session, it proposes that code as a second diff. Ask first pauses before each write, so you see both diffs before the files change. Then Shell runs your test command, and the card shows the real exit code and the failing lines if there are any. A token is a random value tied to the session. Tests come next. Read each diff, accept it and run the test again until the run reports a passing exit code instead of failing lines.
A token is one layer. Cookies and an Origin check add more. The agent uses grep to find where the session cookie is set and reports whether Secure, HttpOnly and SameSite are present. It proposes the missing attribute with edit_file, one attribute per diff, and can add a check of the Origin header to the handler for state-changing requests. Beginners often ask why browser requests fail because of CORS after such a change, and the usual answer is that the server's allow-list does not name that origin yet. The agent reads the allow-list and shows the line to extend. Test on the staging copy before production, and keep the old file as a backup in the working folder so that you can roll back. Review the diff first.
Open a page of your staging copy with http_get, run your header-check command in Shell and ask which security headers are missing. The agent compares the output with a checklist it writes to a text file and proposes one header at a time. Here are the CSP, COOP and COEP headers explained in one line each: CSP limits where content may load from, COOP separates your window from pages that opened it, and COEP asks other origins to opt in before they are embedded. Firewall logs that look like DoS traffic are often one WAF rule matching the same harmless request again and again, so grep the matched rule before you change anything. You decide. The agent only reads and drafts, and every proposed edit waits for your OK in Ask first mode.
Armature Webdesk is not a hosted service. It runs on your PC. It is meant only for your own files, your PC and servers you are authorised to use, and you keep the work within them, because Shell, web and SSH are not folder-bound. There is no guarantee that code, scans or analysis are correct, so you review everything.