fix: harden Zscaler containment and API handling - #46
Open
phantom-jacob wants to merge 11 commits into
Open
Conversation
Update Ruff, djLint, and dev-cicd-tools to the current configured versions. The Docker-backed baseline passed every hook except the release-notes hook, which rejects the intentionally empty unreleased file before functional work is added. Tracks PAPP-38310. Written by Codex.
Refuse denylist additions that the ZIA allowlist would override and report lookup entries as blocked only when they are effectively denied. Tracks PSAAS-32519 (VULN-95242, FS-4082). Source: https://help.zscaler.com/zia/adding-urls-denylist Written by Codex.
Fetch the user after the group lookup and compare embedded memberships by ID before sending the full user update required by the ZIA API. Tracks PSAAS-33768 (VULN-100507, FS-6813). Source: https://help.zscaler.com/zia/user-management Written by Codex.
Convert non-ASCII hostname labels with IDNA2008 and UTS-46 before block, unblock, allow, unallow, and lookup requests reach ZIA. Tracks PSAAS-33816 (VULN-100556, FS-6861). Sources: https://help.zscaler.com/legacy-apis/configuring-url-categories-using-api and https://github.com/kjd/idna Written by Codex.
Send only requested URL and IP list deltas while retaining the custom-category identity, super-category, and keyword fields required by the ZIA API. Tracks PSAAS-33898 and PSAAS-35091 (VULN-100638, VULN-103712; FS-6943, FS-8645). Source: https://help.zscaler.com/legacy-apis/configuring-url-categories-using-api Written by Codex.
Pass search and pagination values through the Requests query-parameter API so reserved characters cannot alter the authenticated departments request. Tracks PSAAS-33954 (VULN-100696, FS-6999). Source: https://requests.readthedocs.io/en/latest/user/quickstart/ Written by Codex.
Handle a successful authentication response without Set-Cookie as a controlled action error instead of indexing the optional header and raising. Tracks PSAAS-34202 (VULN-101726, FS-7710). Source: https://requests.readthedocs.io/en/latest/user/quickstart/ Written by Codex.
Record entries added by the current connector asset and refuse unblock or unallow requests that would remove only entries created by another tenant writer. Tracks PSAAS-34297 and PSAAS-34786 (VULN-101821, VULN-102310; FS-7805, FS-8293). Source: https://help.zscaler.com/zia/security-policy-settings Written by Codex.
Reject scalar success bodies before handlers consume them and handle missing or malformed Retry-After JSON without raising from the shared REST helper. Tracks PSAAS-34869 (VULN-102393, FS-8376). Source: https://requests.readthedocs.io/en/latest/user/quickstart/ Written by Codex.
Return the original failed status whenever the ZIA Retry-After value cannot be parsed so arbitrary response text cannot become a truthy connector status. Tracks PSAAS-35035 (VULN-103656, FS-8589). Source: https://help.zscaler.com/legacy-apis/understanding-rate-limiting Written by Codex.
Let URL-category updates and user pagination inherit the shared 30-second timeout instead of explicitly disabling client-side recovery. Tracks PSAAS-35134 (VULN-104261, FS-9011). Source: https://requests.readthedocs.io/en/latest/user/quickstart/#timeouts Written by Codex.
|
Merging this PR will release 3.0.5 (2026-08-04)Connector release changes
|
phantom-jacob
marked this pull request as ready for review
August 4, 2026 15:19
Contributor
Author
|
Blocking upgrade path: installation_added_entries is new and starts empty. Existing URLs added by this same asset before upgrade are indistinguishable from foreign entries, and rerunning block or allow cannot seed the ledger because the existing-entry path returns before the ownership ledger update. The connector can therefore never unblock or unallow those pre-upgrade entries. Please add a safe migration or reconciliation path, or an explicit administrator-controlled claim or override. If this restriction remains, the functional commit should declare a breaking change because existing action capability is removed. — Written by Codex. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Written by Codex.
Bug Fixes
This is the refreshed N-Z remediation wave under PAPP-38310 and ESPM-5228. PAPP-38310 was reconciled and expanded because PRs #41 and #44 are merged historical work and do not cover these later findings. PSAAS-33953 remains excluded as platform work, and PSAAS-34406 remains excluded for human review; this PR does not change Jira labels.
Finding provenance
Sources and implementation decisions
ADD_TO_LISTandREMOVE_FROM_LISTcategory updates, required category identity fields, keyword fields, and rejection of non-ASCII URLs: https://help.zscaler.com/legacy-apis/configuring-url-categories-using-apiPUToperations, so this change narrows but cannot eliminate the external lost-update window: https://help.zscaler.com/zia/user-managementRetry-Afterhandling: https://help.zscaler.com/legacy-apis/understanding-rate-limitingidnaimplementation: https://www.rfc-editor.org/info/rfc5890/ and https://github.com/kjd/idnaThe cached patches were treated as recommendations. The category fix uses the vendor's delta API instead of replaying a fetched category, and the shared-list fix uses an asset-local ownership ledger rather than a caller-controlled force parameter. Entries created before this version cannot be inferred as owned and are intentionally protected from removal.
Checks
pre-commit autoupdatepre-commit run --all-filesafter all functional commits: passed, including app lint, compile/static checks, Semgrep, secrets, packaging, NOTICE, and release-note validation.zscaler_connector.pyandzscaler_consts.py: passed.Breaking changes: none. No action parameters, outputs, asset configuration, defaults, or actions were removed or made required.
Merge strategy: merge commit only; do not squash
Manual Documentation
Have you made any changes that should be documented in manual_readme_content.md?
The following changes require documentation in
manual_readme_content.md:Other information
Please refer to our Contribution Guide for any questions on submitting a pull request.
Thanks for contributing!