Add HAB_AUTH_TOKEN support to automate-container-scan action#52
Open
peter-at-progress wants to merge 2 commits intomainfrom
Open
Add HAB_AUTH_TOKEN support to automate-container-scan action#52peter-at-progress wants to merge 2 commits intomainfrom
peter-at-progress wants to merge 2 commits intomainfrom
Conversation
Signed-off-by: Peter Arsenault <parsenau@progress.com>
Configure token in /hab/etc/cli.toml so it persists for all Habitat processes including those spawned by systemd during chef-automate deploy. Previously the token was only passed as an environment variable to the docker exec command, but systemd services don't inherit these variables. Signed-off-by: Peter Arsenault <parsenau@progress.com>
Collaborator
Author
|
@brianLoomis @sean-sype-simmons Could you review this HAB_AUTH_TOKEN fix? The dev channel automate scans started failing this morning with 401 errors due to new authentication requirements. This PR adds token support while maintaining backward compatibility. Thanks! |
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.
Description
Adds Habitat Builder authentication support to the
automate-container-scancomposite action to enable scanning of protected Habitat channels (e.g.,dev).Problem
The
devchannel automate container scan workflow began failing on April 22, 2026 with401 Unauthorizederrors when attempting to download Habitat packages during Chef Automate deployment:This appears to be new behavior where
devchannel Habitat packages now require authentication, whilecurrentchannel packages remain publicly accessible.Solution
hab_auth_tokeninput parameter to the action definition/hab/etc/cli.tomlbefore Chef Automate deploymentdocker exec -e HAB_AUTH_TOKENdidn't work because systemd services don't inherit environment variablesChanges
.github/actions/automate-container-scan/action.yml- Addedhab_auth_tokeninput and environment variable.github/actions/automate-container-scan/run.sh- Configure token in Habitat CLI config before deployment.github/actions/automate-container-scan/README.md- Document new parameter and usageBackward Compatibility
✅ Fully backward compatible - channels that don't require authentication continue to work without the token parameter.
Related Issue
This fixes the automate-grype-scan workflow failure discovered on April 22, 2026 when the
devchannel job failed whilecurrentsucceeded. This appears to be a new authentication requirement for thedevchannel Habitat packages.Types of changes
Checklist:
Gemfile.lockhas changed, I have used--conservativeto do it and included the full output in the Description above.Testing
Tested with both channels in the automate-grype-scan workflow:
currentchannel: Continues to work (backward compatible, no token required)devchannel: Now successfully deploys and scans with HAB_AUTH_TOKEN providedNotes
The
HAB_AUTH_TOKENsecret was already configured in the repository for existing Habitat package scanning workflows, so no additional secret setup is needed for users of this action.