Skip to content

fix: security fixes based on findings#6

Merged
hali-coding merged 2 commits into
mainfrom
fix/security-fixes
Jun 17, 2026
Merged

fix: security fixes based on findings#6
hali-coding merged 2 commits into
mainfrom
fix/security-fixes

Conversation

@hali-coding

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings June 17, 2026 16:05
Comment thread ssltui/config.py Dismissed

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR hardens certificate common-name (CN) handling so untrusted CN inputs can’t be used for path traversal or for redirecting downloads via tampered stored paths, and documents the updated storage/input-validation behavior.

Changes:

  • Added strict CN validation (validate_cn) and strengthened cert_dir() with resolve + containment checks.
  • Enforced CN validation in CA issuance and across API endpoints; download endpoints now re-derive file paths from certs/<cn>/ instead of trusting DB path strings.
  • Updated README directory layout and added API input-validation documentation.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
ssltui/config.py Adds CN allow-list validation and containment-checked certificate directory derivation.
ssltui/ca.py Validates CN during issuance and converts invalid CNs into CAError.
ssltui/api.py Validates CN route/body inputs and confines downloads to certs/<cn>/ paths instead of DB-provided paths.
README.md Documents SQLite-backed ca.db, CRL/token files, and CN validation / download confinement behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread ssltui/api.py
Comment thread ssltui/config.py
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@hali-coding
hali-coding merged commit a63dbd2 into main Jun 17, 2026
5 checks passed
@hali-coding
hali-coding deleted the fix/security-fixes branch June 17, 2026 16:15
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.

3 participants