Skip to content

Commit bfa66d3

Browse files
committed
security: default HTTP client verify to True (secure)
Both the httpx and requests REST client plugins defaulted to `verify=False`, silently disabling TLS verification for every HTTP call in the framework. Test traffic to production-like endpoints (security tests, API contract tests, LLM-judge calls) went over unverified TLS, defeating the point of the security-tests suite. Flip the default to True. Tests targeting self-signed endpoints must opt out explicitly via `verify=False` or pass a CA bundle path. This matches the same posture change just made in agentic-qa-agent for vsphere_verify_ssl. Tests: 9 httpx + restclient unit tests pass under the new default.
1 parent 9700928 commit bfa66d3

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

src/main/python/taf/foundation/plugins/svc/httpx/httpclient.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,10 @@ def __init__(
4141
**kwargs
4242
):
4343
headers = kwargs.pop('headers', None)
44-
# Caller may override TLS verification; preserve test-friendly default.
45-
verify = kwargs.pop('verify', False)
44+
# TLS verification defaults to True (secure). Tests targeting
45+
# self-signed endpoints must opt out explicitly via verify=False
46+
# or pass a CA bundle path.
47+
verify = kwargs.pop('verify', True)
4648

4749
super().__init__(
4850
base_url, port,

src/main/python/taf/foundation/plugins/svc/requests/restclient.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,10 @@ def __init__(
4444
):
4545
Session.__init__(self)
4646

47-
# Caller may override TLS verification; preserve test-friendly default.
48-
verify = kwargs.pop('verify', False)
47+
# TLS verification defaults to True (secure). Tests targeting
48+
# self-signed endpoints must opt out explicitly via verify=False
49+
# or pass a CA bundle path.
50+
verify = kwargs.pop('verify', True)
4951

5052
Client.__init__(
5153
self, base_url, port,

0 commit comments

Comments
 (0)