{"answers":{"affected":"2 open source packages ship an affected version, including ciguard.","exploited":"There is no known exploitation of GHSA-7ww3-xvf5-cxwm in the wild and no public exploit code.","fix":"Upgrade ciguard to 0.8.2 or later.","what":"GHSA-7ww3-xvf5-cxwm is a vulnerability in ciguard, published on 5 May 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for GHSA-7ww3-xvf5-cxwm and fix it if it is affected.\n\nWhat it is: GHSA-7ww3-xvf5-cxwm is a vulnerability in ciguard, published on 5 May 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of GHSA-7ww3-xvf5-cxwm in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- ciguard (PyPI): affected from 0.1.0; fixed in 0.8.2\n- ciguard (PyPI): affected from 0.1.0; fixed in 0.8.2\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/GHSA-7ww3-xvf5-cxwm/ (Markdown: https://insights.sbomify.com/GHSA-7ww3-xvf5-cxwm/index.md)","id":"GHSA-7ww3-xvf5-cxwm","markdown":"https://insights.sbomify.com/GHSA-7ww3-xvf5-cxwm/index.md","name":"GHSA-7ww3-xvf5-cxwm","record":{"aliases":[],"analysis":{"component_type":"web_application","fix_type":"patch","impacts":["security_bypass"],"network_reachable":"yes","non_default_config":false,"product_category":"Python web application","requires_auth":"none","summary":"Missing HTTP security headers in ciguard's web UI allow clickjacking and reduce XSS defenses, requiring a patch to add defense-in-depth headers.","user_interaction":"required","vuln_class":"security_feature_bypass"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"## Summary\n\nciguard's FastAPI Web UI (`src/ciguard/web/app.py`) does not set HTTP defence-in-depth headers. OWASP ZAP baseline scan flagged 11 alerts: missing Content-Security-Policy (Medium), X-Frame-Options (Medium), Sub-Resource-Integrity on `/api/docs` (Medium), COOP / COEP / CORP (Low), Permissions-Policy (Low), X-Content-Type-Options (Low).\n\n## Threat scenario\n\nFor local-only deployment (current intent): minimal — there's no untrusted browser context, no third-party hosting, no auth surface to protect.\n\nFor public hosting (PRD Slice 9 GitHub App or hosted dashboard, future): each missing header reduces a defence layer:\n\n- Missing CSP → injected XSS would have no second-line defence (first-line Jinja autoescape remains intact)\n- Missing X-Frame-Options → clickjacking against any UI button would be possible\n- Missing SRI on jsdelivr-hosted Swagger UI → if jsdelivr were compromised, attacker JS would run in the docs page context\n\n## Patch\n\n- New `SecurityHeadersMiddleware` at `src/ciguard/web/security_headers.py` injecting: X-Content-Type-Options nosniff, X-Frame-Options DENY, Referrer-Policy no-referrer, Permissions-Policy `interest-cohort=()`, Cross-Origin-Opener-Policy same-origin, Cross-Origin-Resource-Policy same-origin, plus per-path CSP with `/api/docs` + `/api/redoc` carve-out for cdn.jsdelivr.net (Swagger UI / ReDoc dependency).\n- COEP intentionally NOT set: would break Swagger UI's cross-origin assets, and ciguard makes no SharedArrayBuffer use that would benefit.\n- Registered via `app.add_middleware(SecurityHeadersMiddleware)`.\n- 6 regression tests in `tests/test_web.py::TestSecurityHeaders`.\n\n## Discovery\n\nFound by OWASP ZAP baseline scan during ciguard's first self-conducted pentest cycle, 2026-04-26.\n\n## CVSS Scoring\n\n- CVSS v3.1: `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N` — 4.3 (Medium per v3.1 thresholds)\n- CVSS v4.0: `CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N` — first.org calc 4.3 (Low); GitHub's calc 2.1 (Low). All consistent at Low/borderline.\n\n## Verification\n\n```\n$ curl -sI http://127.0.0.1:8080/ | grep -E '^(X-Frame|X-Content|Referrer|Permissions|Cross-Origin|Content-Security):'\n# Pre-fix: empty\n# Post-fix: 7 headers present\n```\n\n## Resources\n\n- Fix released in [v0.8.2](https://github.com/Jo-Jo98/ciguard/releases/tag/v0.8.2)\n- CI regression gate added in [v0.8.3](https://github.com/Jo-Jo98/ciguard/releases/tag/v0.8.3)","ecosystems":["PyPI"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":true,"headline":"ciguard: Web UI is missing HTTP defence-in-depth headers","id":"GHSA-7ww3-xvf5-cxwm","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"security_feature_bypass","year":"2026"},"n_packages":2,"n_references":null,"packages":[{"ecosystem":"PyPI","fixed":["0.8.2"],"introduced":["0.1.0"],"last_affected":[],"package":"ciguard","purl":null,"source":"GHSA-7ww3-xvf5-cxwm"},{"ecosystem":"PyPI","fixed":["0.8.2"],"introduced":["0.1.0"],"last_affected":[],"package":"ciguard","purl":"pkg:pypi/ciguard","source":"GHSA-7ww3-xvf5-cxwm"}],"products":null,"published":"2026-05-05","related":[],"sources":[{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":"Missing HTTP security headers in ciguard's web UI allow clickjacking and reduce XSS defenses, requiring a patch to add defense-in-depth headers.","url":"https://insights.sbomify.com/GHSA-7ww3-xvf5-cxwm/"}