Guard Snyk workflow against missing SNYK_TOKEN - #23
Merged
Conversation
Co-authored-by: johnny603 <23467609+johnny603@users.noreply.github.com>
johnny603
approved these changes
Sep 3, 2026
johnny603
marked this pull request as ready for review
September 3, 2026 06:27
Copilot
AI
changed the title
[WIP] Fix failing GitHub Actions job snyk
Guard Snyk workflow against missing Sep 3, 2026
SNYK_TOKEN
Copilot stopped work on behalf of
johnny603 due to an error
September 3, 2026 06:27
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.
The
snykActions job was failing withSNYK-0005(401 Unauthorized) whenSNYK_TOKENwas not available in the workflow environment. This change makes the workflow resilient by running Snyk only when credentials are present and explicitly skipping otherwise.Root-cause handling
SNYK_TOKENto job-levelenvfor a single source of truth.ifcondition on token presence.Fail-safe behavior
SNYK_TOKENis empty so the job outcome is deterministic and readable.