Skip to content

fix(iOS): Remove insecure ATS exception for localhost and enforce secure defaults #1205

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 11, 2025

Conversation

subhankarmaiti
Copy link
Contributor

This PR addresses a security issue raised by the Semgrep scan regarding the use of NSExceptionAllowsInsecureHTTPLoads under the NSExceptionDomains configuration for localhost in example/ios/Auth0Example/Info.plist.

Issue

Semgrep reported an Insecure App Transport Security (ATS) exception, allowing unencrypted HTTP traffic for localhost, which violates recommended security practices.

Findings:

  • NSExceptionAllowsInsecureHTTPLoads was set to true
  • No NSExceptionMinimumTLSVersion or NSExceptionRequiresForwardSecrecy was enforced

Mitigation

As per the recommendation:

  • Removed NSExceptionDomains entry for localhost
  • Ensured that NSAllowsArbitraryLoads is explicitly set to false
  • Enabled NSAllowsLocalNetworking to preserve support for local development/test environments

Impact

  • No functional impact expected since local development will still work due to NSAllowsLocalNetworking.
  • Enhances security posture and satisfies Semgrep SAST policy.

@subhankarmaiti subhankarmaiti requested a review from a team as a code owner June 11, 2025 09:37
@subhankarmaiti subhankarmaiti merged commit 03871f6 into master Jun 11, 2025
4 checks passed
@subhankarmaiti subhankarmaiti deleted the SEC-4947-remove-insecure-ats branch June 11, 2025 10:29
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