Check for tokens availability before using them

Context

Closes https://gitlab.com/gitlab-org/gitlab/-/issues/517124+.

Do not try to change exit codes if no access to... (!180354 - merged) fixes some of the errors in the security project related to test health, but not all of them (example).

What does this MR do and why?

Fix all errors related to test_tooling usage in projects that don't have access tokens available.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

Related to #517124

Edited by David Dieulivol

Merge request reports

Loading