Skip to content

SECFOO-22: Fix filter dropdowns blocked by the portal CSP - #35

Merged
vsn411 merged 1 commit into
secfoo-com:mainfrom
AmirNCI:fix/secfoo-22-filter-dropdowns
Nov 1, 2026
Merged

vsn411 merged 1 commit into
secfoo-com:mainfrom
AmirNCI:fix/secfoo-22-filter-dropdowns

Conversation

@AmirNCI

@AmirNCI AmirNCI commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

What does this change, and why?

Part of SECFOO-22 (Initiative 3: Dashboard usability). Independent of the other SECFOO-22 PRs, with no conflicts with #34.

The enterprise portal serves this same dashboard with Content-Security-Policy: default-src 'self' (no 'unsafe-inline'), which blocks every inline event handler, not just onclick. Five filter dropdowns still used onchange="this.form.submit()", so on app.secfoo.com choosing a value silently did nothing. secfoo serve sends no CSP, so it only ever looked fine locally.

Affected: Assessments list (status), SAST / SCA / Secret Scanning findings lists (project), Activity detail (diagram project).

  • The dropdowns use a data-autosubmit attribute, handled by a delegated change listener in static/js/interactive.js (same pattern as data-href / data-confirm).
  • test_no_inline_scripts.py now flags any inline on...= handler, not only onclick. That's why these were missed; the widened test fails on current main.

Testing

🤖 Generated with Claude Code

The portal's Content-Security-Policy (default-src 'self', no
'unsafe-inline') blocks every inline event handler, not just onclick.
Five filter dropdowns still used onchange="this.form.submit()", so on
app.secfoo.com choosing a status/project silently did nothing (local
`secfoo serve` sends no CSP, so it only looked fine there):

- assessments/list.html (status)
- sast_findings_list.html, sca_vulnerabilities_list.html,
  secret_scanning_findings_list.html (project)
- activities/detail.html (diagram project)

Replace them with a data-autosubmit attribute handled by a delegated
"change" listener in static/js/interactive.js, the same pattern used
for data-href/data-confirm. Widen the regression test from onclick to
any inline on...= handler, which is why these were missed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@vsn411
vsn411 merged commit 1b03c78 into secfoo-com:main Nov 1, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants