diff --git a/docs/Homebrew/Attestation.html b/docs/Homebrew/Attestation.html index df7facc4c..6006e0df3 100644 --- a/docs/Homebrew/Attestation.html +++ b/docs/Homebrew/Attestation.html @@ -69,6 +69,11 @@ +
system_command, system_command!
+-73 -74 -75 76 77 78 @@ -466,13 +479,17 @@+111 +112 +113 +114 +115108 109 110 -111
# File 'attestation.rb', line 73 +# File 'attestation.rb', line 76 def self.check_attestation(bottle, signing_repo, signing_workflow = nil, subject = nil) - cmd = [gh_executable, "attestation", "verify", bottle.cached_download, "--repo", signing_repo, "--format", + cmd = ["attestation", "verify", bottle.cached_download, "--repo", signing_repo, "--format", "json"] cmd += ["--cert-identity", signing_workflow] if signing_workflow.present? @@ -484,7 +501,8 @@raise GhAuthNeeded, "missing credentials" if credentials.blank? begin - output = Utils.safe_popen_read({ "GH_TOKEN" => credentials }, *cmd) + result = system_command!(gh_executable, args: cmd, env: { "GH_TOKEN" => credentials }, + secrets: [credentials]) rescue ErrorDuringExecution => e # Even if we have credentials, they may be invalid or malformed. raise GhAuthNeeded, "invalid credentials" if e.status.exitstatus == 4 @@ -493,7 +511,7 @@
end begin - attestations = JSON.parse(output) + attestations = JSON.parse(result.stdout) rescue JSON::ParserError raise InvalidAttestationError, "attestation verification returned malformed JSON" end @@ -610,10 +628,6 @@
-124 -125 -126 -127 128 129 130 @@ -645,10 +659,14 @@+159 +160 +161 +162 +163156 157 158 -159
# File 'attestation.rb', line 124 +# File 'attestation.rb', line 128 def self.check_core_attestation(bottle) begin @@ -734,17 +752,17 @@
-46 -47 -48 49 50 51 52 -53+53 +54 +55 +56
# File 'attestation.rb', line 46 +# File 'attestation.rb', line 49 def self.gh_executable # NOTE: We disable HOMEBREW_VERIFY_ATTESTATIONS when installing `gh` itself, diff --git a/docs/SystemCommand/Mixin.html b/docs/SystemCommand/Mixin.html index 10750816a..48441a6ae 100644 --- a/docs/SystemCommand/Mixin.html +++ b/docs/SystemCommand/Mixin.html @@ -76,7 +76,7 @@
- Included in:
-- AbstractDownloadStrategy, Cask::Artifact::AbstractUninstall, Cask::Audit, Cask::Quarantine, GitHub, GitHub::API, GitHubPackages, Homebrew::BundleVersion, Homebrew::Cmd::List, Homebrew::DevCmd::BumpUnversionedCasks, Homebrew::DevCmd::GenerateManCompletions, Homebrew::DevCmd::Tests, Homebrew::DevCmd::UpdateLicenseData, Homebrew::DevCmd::UpdateMaintainers, Homebrew::DevCmd::UpdateSponsors, Homebrew::Diagnostic::Checks, Homebrew::Livecheck::Strategy::Git, Homebrew::Style, Homebrew::UnversionedCaskChecker, Keg, Pathname, Readall, SystemConfig, SystemConfig, UnpackStrategy, UnpackStrategy::Dmg, UnpackStrategy::Dmg::Bom, UnpackStrategy::Fossil, UnpackStrategy::Tar, User, Utils::Curl, Utils::Curl, Utils::Git, Utils::Svn, Utils::Tar
+- AbstractDownloadStrategy, Cask::Artifact::AbstractUninstall, Cask::Audit, Cask::Quarantine, GitHub, GitHub::API, GitHubPackages, Homebrew::Attestation, Homebrew::BundleVersion, Homebrew::Cmd::List, Homebrew::DevCmd::BumpUnversionedCasks, Homebrew::DevCmd::GenerateManCompletions, Homebrew::DevCmd::Tests, Homebrew::DevCmd::UpdateLicenseData, Homebrew::DevCmd::UpdateMaintainers, Homebrew::DevCmd::UpdateSponsors, Homebrew::Diagnostic::Checks, Homebrew::Livecheck::Strategy::Git, Homebrew::Style, Homebrew::UnversionedCaskChecker, Keg, Pathname, Readall, SystemConfig, SystemConfig, UnpackStrategy, UnpackStrategy::Dmg, UnpackStrategy::Dmg::Bom, UnpackStrategy::Fossil, UnpackStrategy::Tar, User, Utils::Curl, Utils::Curl, Utils::Git, Utils::Svn, Utils::Tar