Skip to content

Potential fix for code scanning alert no. 2: Disabling certificate validation - #1

Closed
ddrayko wants to merge 1 commit into
mainfrom
alert-autofix-2
Closed

Potential fix for code scanning alert no. 2: Disabling certificate validation#1
ddrayko wants to merge 1 commit into
mainfrom
alert-autofix-2

Conversation

@ddrayko

@ddrayko ddrayko commented Jul 26, 2026

Copy link
Copy Markdown
Owner

Potential fix for https://github.com/ddrayko/homy/security/code-scanning/2

The correct fix is to stop disabling TLS certificate validation. For HTTPS requests, either omit rejectUnauthorized entirely (defaults to secure behavior) or set it to true. To preserve existing functionality while removing the vulnerability, the best minimal change is to set it explicitly to true in the existing options object used by mod.get.

In server.js, update the pingUrl function at the options definition (line 80 in the provided snippet):

  • Change rejectUnauthorized: false to rejectUnauthorized: true.
  • No additional imports, methods, or dependencies are required.

This preserves timeout behavior and request flow while enforcing standard TLS authentication.

Suggested fixes powered by Copilot Autofix. Review carefully before merging.

…lidation

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@ddrayko
ddrayko marked this pull request as ready for review July 26, 2026 13:40
@ddrayko ddrayko self-assigned this Jul 26, 2026
@ddrayko ddrayko closed this Jul 26, 2026
@ddrayko
ddrayko deleted the alert-autofix-2 branch July 26, 2026 13:41
@ddrayko

ddrayko commented Jul 26, 2026

Copy link
Copy Markdown
Owner Author

May cause the ping for certain self-signed services to fail

Repository owner locked and limited conversation to collaborators Jul 26, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant