Commit graph

6 commits

Author SHA1 Message Date
Adam Moussa
e60774a65c Apply ruff formatting to web UI handlers 2026-05-12 15:05:27 -04:00
Adam Moussa
57bcec5a2e Harden WO web UI and fix JS-context XSS in both dashboards
- Use json.dumps for onclick URLs to prevent JS string breakout
- Add .lower() to WO render_badge color lookup matching PO pattern
- Add pagination to get_comments query
- Cap get_work_orders to 500 results matching PO pattern
2026-05-12 15:03:05 -04:00
Adam Moussa
4ba5c37f47 Fix WO render_badge None guard, updated_at slice, and backfill path
Add null guard to WO render_badge matching the PO version. Use
`or ""` before slicing updated_at to handle explicit None values.
Fix backfill_sites.py sys.path to use new lambdas/po/site_extractor.
2026-05-12 14:53:42 -04:00
Adam Moussa
afcd0eabe2 Add pagination to WO web UI scan
get_work_orders() only fetched the first 1MB page from DynamoDB.
Loop on LastEvaluatedKey to match the PO web UI pattern.
2026-05-12 14:32:41 -04:00
Adam Moussa
78eb8de067 Escape HTML in both web UI dashboards to prevent XSS
Both Function URLs are public (auth_type=NONE) and render
email-derived content via f-strings. Attacker-crafted emails
could inject scripts. Added html.escape() on all interpolated
values in both PO and WO dashboards.
2026-05-12 14:32:01 -04:00
Adam Moussa
5a1e774b7c Merge workorder-ingest pipeline into unified repo
Move PO lambdas under lambdas/po/, add WO pipeline under lambdas/wo/.
Two independent CloudFormation stacks in one CDK app. Fix WO stack
compliance: ARM64 architecture, 60-day log retention, aarch64 bundling,
RETAIN on Anthropic secret. Remove stale CodePipeline buildspec.
2026-05-12 14:12:17 -04:00