Skip to content

Conversation

Malo87
Copy link

@Malo87 Malo87 commented Sep 17, 2025

Overview

  • Add defensive HTTP handling and optional SSL verification bypass to avoid JSON parsing errors on non-200 responses and to support testing against self-signed certificates or proxies.

  • Expose a --ignore-ssl CLI flag and document it in README.md.

Key changes

Validate HTTP response status codes before attempting json parsing and return gracefully on errors.
Wrap response.json() parsing in try/except to handle empty/invalid JSON.
Log snyk-request-id and response.text for non-200 responses to aid debugging.

Make TLS verification configurable via the CLI flag --ignore-ssl and pass the resulting verify value into verify_org_integrations, get_all_targets, and migrate_targets.
Improve error output in migrate_targets (safe header access and include response body).
Document the new --ignore-ssl flag and its security warning in README.md.

Notes
On non-200 responses the tool now prints debug info and returns safely instead of raising JSONDecodeError.
Default behavior remains secure (TLS verification enabled). --ignore-ssl must be explicitly passed to disable verification.
Pagination logic and existing functionality preserved.

--ignore-ssl is insecure; the README includes a clear warning. Default remains verify=True.

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.

1 participant