Skip to content

Document CodeQL alert #7 as a false positive#9

Draft
hali-coding with Copilot wants to merge 1 commit into
mainfrom
copilot/fix-code-scanning-alerts
Draft

Document CodeQL alert #7 as a false positive#9
hali-coding with Copilot wants to merge 1 commit into
mainfrom
copilot/fix-code-scanning-alerts

Conversation

Copilot AI commented Jul 21, 2026

Copy link
Copy Markdown

This PR addresses code scanning alert #7 (py/path-injection). After tracing the flagged path construction in ssltui/ca.py, the alert was determined to be a false positive; no source changes were required.

  • Assessment

    • The flagged sink is csr_path.unlink(missing_ok=True).
    • The path is not attacker-controlled in a way that allows traversal outside the CA store.
  • Why the alert does not apply

    • config.validate_cn(cn) constrains the common name to valid hostname-style input.
    • config.cert_dir(root, cn) re-validates cn, resolves the resulting path, and enforces that it remains directly under root / "certs".
    • The deleted file is the fixed child cert.csr under that validated certificate directory.
  • Change scope

    • No code changes.
    • PR description records the alert as a false positive for reviewer visibility.
cert_dir = config.cert_dir(root, cn)
csr_path = cert_dir / "cert.csr"
csr_path.unlink(missing_ok=True)

Copilot AI changed the title [WIP] Fix code scanning alert #7 Document CodeQL alert #7 as a false positive Jul 21, 2026
Copilot AI requested a review from hali-coding July 21, 2026 07:01
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