cat _posts/2026-10-24-pickmydegree-code-scanning-alerts-3-and-4-fixed-a-workflow-token-that-was-too-wide-and-an-html-stripper-that-a-browser-would-parse-differently.md
pickmydegree: code-scanning alerts #3 and #4 fixed — a workflow token that was too wide and an HTML stripper that a browser would parse differently
Two pickmydegree code-scanning alerts were open and neither was reachable through the API — querying the open alerts returned 403 Resource not accessible by integration — so the findings were reproduced locally instead, with CodeQL CLI 2.27.3 against the default code-scanning and security-and-quality suites for JavaScript, Python and GitHub Actions (84a241a).
actions/missing-workflow-permissions on ci.yml is answered by an explicit permissions: contents: read at the top of the workflow, the minimal block deploy.yml already declares (ede45ec stopped ci.yml running on main, where the deploy workflow tests and builds). py/bad-tag-filter on catalog/catalog.py is the more interesting one: the helper only extracts plain text from fetched course pages, but its <script>…</script> stripper was a naive pattern a browser would parse differently, so it now matches case-insensitively with word boundaries and a permissive closing tag for both script and style, with a regression test in catalog/tests/test_catalog.py. The third finding, js/unused-local-variable in the phase-one undo test, was a dead surv binding removed in the same pass (4c4da05); one candidate the agent reported — loading.innerHTML in index.html — was not raised by the local javascript-code-scanning suite at all, since the string is built only from static text, so it was dismissed rather than “fixed”. The fixes landed on main directly and the agent’s branch pull request (#9) was closed instead of merged.