Skip to content

Use ssl.PROTOCOL_TLS_CLIENT for forward-compatible TLS negotiation#86

Merged
DaTiC0 merged 2 commits into
feat/workflow-hardeningfrom
copilot/sub-pr-83-again
Mar 7, 2026
Merged

Use ssl.PROTOCOL_TLS_CLIENT for forward-compatible TLS negotiation#86
DaTiC0 merged 2 commits into
feat/workflow-hardeningfrom
copilot/sub-pr-83-again

Conversation

Copilot AI commented Mar 7, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Replaced ssl.PROTOCOL_TLSv1_2 with ssl.PROTOCOL_TLS_CLIENT in config.py for MQTT TLS configuration
  • PROTOCOL_TLSv1_2 hardcodes TLS 1.2, blocking TLS 1.3 negotiation; PROTOCOL_TLS_CLIENT lets client/server negotiate the highest mutually supported version
# Before
MQTT_TLS_VERSION = ssl.PROTOCOL_TLSv1_2 if MQTT_TLS_ENABLED else None

# After
MQTT_TLS_VERSION = ssl.PROTOCOL_TLS_CLIENT if MQTT_TLS_ENABLED else None

Validation

  • Local checks passed (make test)
  • Runtime check done where relevant (make health)
  • CI checks are green

AI-Assisted Review (if applicable)

  • I used AI assistance for parts of this change
  • I manually reviewed all AI-generated code
  • I verified no secrets/credentials were added

Risk & Rollback

  • Risk level: Low
  • Rollback plan: Revert MQTT_TLS_VERSION assignment to ssl.PROTOCOL_TLSv1_2

🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

…ersion negotiation

Co-authored-by: DaTiC0 <13198638+DaTiC0@users.noreply.github.com>
Copilot AI changed the title [WIP] Update workflow hardening implementation based on feedback Use ssl.PROTOCOL_TLS_CLIENT for forward-compatible TLS negotiation Mar 7, 2026
@DaTiC0
DaTiC0 marked this pull request as ready for review March 7, 2026 14:54
@DaTiC0
DaTiC0 merged commit fee4c78 into feat/workflow-hardening Mar 7, 2026
1 check failed
DaTiC0 added a commit that referenced this pull request Mar 7, 2026
* Add health checks, workflow guards, and secure repo tooling

* Document safe recovery for accidental main commits

* Fix/health endpoint abstraction, conditional TLS config, and git hook guard (#84)

* Initial plan

* Address review feedback: MQTT helper, conditional TLS version, git hook guard

Co-authored-by: DaTiC0 <13198638+DaTiC0@users.noreply.github.com>

* Remove unused mqtt import from routes.py (fixes DeepSource F401)

Co-authored-by: DaTiC0 <13198638+DaTiC0@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: DaTiC0 <13198638+DaTiC0@users.noreply.github.com>

* Fix incorrect exit code 5 handling in Makefile unittest fallback (#87)

* Initial plan

* Fix incorrect exit code 5 handling in unittest block of Makefile

Co-authored-by: DaTiC0 <13198638+DaTiC0@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: DaTiC0 <13198638+DaTiC0@users.noreply.github.com>

* Use ssl.PROTOCOL_TLS_CLIENT for forward-compatible TLS negotiation (#86)

* Initial plan

* Use ssl.PROTOCOL_TLS_CLIENT instead of ssl.PROTOCOL_TLSv1_2 for TLS version negotiation

Co-authored-by: DaTiC0 <13198638+DaTiC0@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: DaTiC0 <13198638+DaTiC0@users.noreply.github.com>

* Defensive parsing of MQTT_BROKER_PORT env var (#85)

* Initial plan

* Add _get_int_env helper for safe MQTT_BROKER_PORT parsing

Co-authored-by: DaTiC0 <13198638+DaTiC0@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: DaTiC0 <13198638+DaTiC0@users.noreply.github.com>

---------

Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: DaTiC0 <13198638+DaTiC0@users.noreply.github.com>
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