{"record":{"id":"9e02fc42647212e9","repo":"jdx/mise","slug":"self-update-api-url-must-use-https-got","errorCode":null,"errorMessage":"self_update.api_url must use HTTPS, got {:?}","messagePattern":"self_update\\.api_url must use HTTPS, got (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/cli/version.rs","lineNumber":83,"sourceCode":"    #[cfg(feature = \"self_update\")]\n    pub(crate) fn repository_parts(&self) -> Result<(&str, &str)> {\n        let (owner, repo) = self.repository.split_once('/').ok_or_else(|| {\n            eyre::eyre!(\n                \"self_update.repository must be in owner/repository format, got {:?}\",\n                self.repository\n            )\n        })?;\n        eyre::ensure!(\n            !owner.is_empty() && !repo.is_empty() && !repo.contains('/'),\n            \"self_update.repository must be in owner/repository format, got {:?}\",\n            self.repository\n        );\n        Ok((owner, repo))\n    }\n\n    pub(crate) fn validate(&self) -> Result<()> {\n        let api_url = url::Url::parse(&self.api_url)?;\n        eyre::ensure!(\n            api_url.scheme() == \"https\",\n            \"self_update.api_url must use HTTPS, got {:?}\",\n            self.api_url\n        );\n        Ok(())\n    }\n}\n\n/// Display the version of mise\n///\n/// Displays the version, os, architecture, and the date of the build.\n///\n/// If the version is out of date, it will display a warning.\n#[derive(Debug, usage_rs::Args)]\n#[usage(\n    verbatim_doc_comment,\n    visible_alias = \"v\",\n    example(","sourceCodeStart":65,"sourceCodeEnd":101,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/cli/version.rs#L65-L101","documentation":"Self-update validates that the configured `api_url` uses the HTTPS scheme before making GitHub API requests. A non-HTTPS URL is rejected to avoid insecure update traffic (tokens/manifests over plaintext).","triggerScenarios":"Setting self_update.api_url to an http:// (or other scheme) URL and then running self-update paths (update_mise_shim, get_latest_version) which call validate().","commonSituations":"Pointing the updater at a local proxy or mirror with http://, enterprise GitHub instances configured with http, or a typo like 'htps://'.","solutions":["Change self_update.api_url to an https:// URL (e.g. https://api.github.com)","If using a proxy/mirror, terminate TLS and expose it via https","Fix scheme typos in the configured URL","Remove the api_url override to fall back to the default HTTPS endpoint"],"exampleFix":"// before\nself_update.api_url = \"http://api.github.com\"\n// after\nself_update.api_url = \"https://api.github.com\"","handlingStrategy":"validation","validationCode":"const u = new URL(api_url);\nif (u.protocol !== \"https:\") throw new Error(`api_url must use HTTPS, got ${api_url}`);","typeGuard":null,"tryCatchPattern":"try {\n  run_self_update()\n} catch (e) {\n  if (String(e).includes(\"must use HTTPS\")) {\n    console.error(\"Switch self_update.api_url to an https:// endpoint\");\n  } else throw e;\n}","preventionTips":["Only configure https:// endpoints for update APIs","Front any http proxy/mirror with TLS","Avoid overriding api_url unless necessary","Validate URLs with a scheme check in config linting"],"tags":["self-update","https","config","security"],"backgroundTag":"invalid-config-value","analyzedSha":"533346cc374382b41ec5ff70536252b2e96e725c","analyzedAt":"2026-09-17T13:35:38.149Z","contentChangedAt":"2026-09-17T13:35:38.149Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}