ci: audit Hex dependencies with mix hex.audit - #76
Merged
Merged
Conversation
mix_audit reads only a GitHub advisory mirror and misses the Hex advisory feed. mix hex.audit (Hex 2.5.1 or newer) reads it. The security workflow installs the newest Hex with mix local.hex. Removing mix_audit also drops yaml_elixir and yamerl from the lock.
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.
Before:
security.ymlrunsMIX_ENV=test mix deps.auditfrom themix_audit2.1.5 dependency.Problem
mix_auditreads only a GitHub advisory mirror. It misses the Hex advisory feed (EEF CNA).mix_auditand two YAML deps only for this one check.After:
security.ymlrunsMIX_ENV=test mix hex.audit.mix_audit,yaml_elixir, andyamerlleavemix.exsandmix.lock.Advisories: none.
mix hex.auditreports no advisory and no retired package, so this PR bumps nothing and waives nothing.Details
mix hex.auditreports advisories from Hex 2.5.1. The workflow runsmix local.hex --force, which installs the newest Hex (2.5.1 today). Nothing pins an older Hex.~/.cache/hex-audit/prototype.sh(the audit step that the sharedciworkflow will run, on a stub with the hexpm part of the lock): "No retired or security advisory packages found".MIX_ENV=test mix hex.auditwith Hex 2.5.1: "No retired or security advisory packages found".mix compile --warnings-as-errors: passes.Security Auditrun passes.