renovate 44.78.0 → 44.79.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/dist/config/global.d.ts +1 -1
  2. package/dist/config/global.js +2 -0
  3. package/dist/config/global.js.map +1 -1
  4. package/dist/config/options/index.js +35 -0
  5. package/dist/config/options/index.js.map +1 -1
  6. package/dist/config/presets/http/index.js +3 -1
  7. package/dist/config/presets/http/index.js.map +1 -1
  8. package/dist/config/presets/index.js +7 -1
  9. package/dist/config/presets/index.js.map +1 -1
  10. package/dist/config/presets/npm/index.js +4 -2
  11. package/dist/config/presets/npm/index.js.map +1 -1
  12. package/dist/config/types.d.ts +4 -1
  13. package/dist/config/types.js.map +1 -1
  14. package/dist/config/validation.js +18 -0
  15. package/dist/config/validation.js.map +1 -1
  16. package/dist/constants/error-messages.d.ts +2 -1
  17. package/dist/constants/error-messages.js +2 -1
  18. package/dist/constants/error-messages.js.map +1 -1
  19. package/dist/global-config-option-defaults.generated.js +2 -0
  20. package/dist/global-config-option-defaults.generated.js.map +1 -1
  21. package/dist/modules/datasource/docker/common.js +3 -2
  22. package/dist/modules/datasource/docker/common.js.map +1 -1
  23. package/dist/modules/datasource/index.js +1 -1
  24. package/dist/modules/datasource/index.js.map +1 -1
  25. package/dist/modules/datasource/maven/util.js +3 -2
  26. package/dist/modules/datasource/maven/util.js.map +1 -1
  27. package/dist/modules/datasource/npm/get.js +1 -1
  28. package/dist/modules/datasource/npm/get.js.map +1 -1
  29. package/dist/modules/datasource/pod/index.js +2 -1
  30. package/dist/modules/datasource/pod/index.js.map +1 -1
  31. package/dist/modules/datasource/repology/index.js +3 -2
  32. package/dist/modules/datasource/repology/index.js.map +1 -1
  33. package/dist/types/host-rules.d.ts +35 -2
  34. package/dist/types/index.d.ts +2 -2
  35. package/dist/util/host-rules.d.ts +8 -2
  36. package/dist/util/host-rules.js +54 -6
  37. package/dist/util/host-rules.js.map +1 -1
  38. package/dist/util/http/host-guard.js +279 -0
  39. package/dist/util/http/host-guard.js.map +1 -0
  40. package/dist/util/http/host-rules.js.map +1 -1
  41. package/dist/util/http/http.d.ts +8 -0
  42. package/dist/util/http/http.js +37 -21
  43. package/dist/util/http/http.js.map +1 -1
  44. package/dist/util/http/types.d.ts +6 -0
  45. package/dist/util/http/types.js.map +1 -1
  46. package/dist/util/http/util.js +10 -1
  47. package/dist/util/http/util.js.map +1 -1
  48. package/dist/workers/repository/init/inherited.js +28 -4
  49. package/dist/workers/repository/init/inherited.js.map +1 -1
  50. package/dist/workers/repository/init/merge.js +28 -12
  51. package/dist/workers/repository/init/merge.js.map +1 -1
  52. package/package.json +1 -1
  53. package/renovate-schema.json +17 -2
@@ -1,7 +1,7 @@
1
1
  import { InternalGlobalConfigOptions, RenovateConfig, RepoGlobalConfig } from "./types.js";
2
2
  //#region lib/config/global.d.ts
3
3
  declare class GlobalConfig {
4
- static OPTIONS: readonly ["allowCustomCrateRegistries", "allowPlugins", "allowScripts", "allowShellExecutorForPostUpgradeCommands", "allowedCommands", "allowedEnv", "allowedHeaders", "allowedUnsafeExecutions", "autodiscoverRepoOrder", "autodiscoverRepoSort", "bbUseDevelopmentBranch", "binarySource", "cacheDir", "cacheHardTtlMinutes", "cachePrivatePackages", "cacheTtlOverride", "checkedBranches", "configFileNames", "containerbaseDir", "customEnvVariables", "dockerChildPrefix", "dockerCliOptions", "dockerMaxPages", "dockerSidecarImage", "dockerUser", "dryRun", "encryptedWarning", "endpoint", "executionTimeout", "exposeAllEnv", "gitTimeout", "githubTokenWarn", "httpCacheTtlDays", "ignorePrAuthor", "includeMirrors", "localDir", "migratePresets", "onboarding", "onboardingAutoCloseAge", "onboardingBranch", "onboardingCommitMessage", "onboardingConfig", "onboardingConfigFileName", "onboardingNoDeps", "onboardingPrTitle", "platform", "prCacheSyncMaxPages", "presetCachePersistence", "productLinks", "rebaseAllOpenBranches", "repositoryCacheForceLocal", "requireConfig", "s3Endpoint", "s3PathStyle", "toolSettings", "userAgent"];
4
+ static OPTIONS: readonly ["allowCustomCrateRegistries", "allowPlugins", "allowScripts", "allowShellExecutorForPostUpgradeCommands", "allowedCommands", "allowedEnv", "allowedHeaders", "allowedUnsafeExecutions", "autodiscoverRepoOrder", "autodiscoverRepoSort", "bbUseDevelopmentBranch", "binarySource", "cacheDir", "cacheHardTtlMinutes", "cachePrivatePackages", "cacheTtlOverride", "checkedBranches", "configFileNames", "containerbaseDir", "customEnvVariables", "dockerChildPrefix", "dockerCliOptions", "dockerMaxPages", "dockerSidecarImage", "dockerUser", "dryRun", "encryptedWarning", "endpoint", "executionTimeout", "exposeAllEnv", "gitTimeout", "githubTokenWarn", "httpCacheTtlDays", "ignorePrAuthor", "includeMirrors", "inheritConfigTrusted", "internalHostAccess", "localDir", "migratePresets", "onboarding", "onboardingAutoCloseAge", "onboardingBranch", "onboardingCommitMessage", "onboardingConfig", "onboardingConfigFileName", "onboardingNoDeps", "onboardingPrTitle", "platform", "prCacheSyncMaxPages", "presetCachePersistence", "productLinks", "rebaseAllOpenBranches", "repositoryCacheForceLocal", "requireConfig", "s3Endpoint", "s3PathStyle", "toolSettings", "userAgent"];
5
5
  private static config;
6
6
  static get(): RepoGlobalConfig & InternalGlobalConfigOptions;
7
7
  static get<Key extends keyof RepoGlobalConfig | keyof InternalGlobalConfigOptions>(key: Key): Required<RepoGlobalConfig & InternalGlobalConfigOptions>[Key];
@@ -37,6 +37,8 @@ var GlobalConfig = class GlobalConfig {
37
37
  "httpCacheTtlDays",
38
38
  "ignorePrAuthor",
39
39
  "includeMirrors",
40
+ "inheritConfigTrusted",
41
+ "internalHostAccess",
40
42
  "localDir",
41
43
  "migratePresets",
42
44
  "onboarding",
@@ -1 +1 @@
1
- {"version":3,"file":"global.js","names":[],"sources":["../../lib/config/global.ts"],"sourcesContent":["import { globalConfigOptionDefaults } from '../global-config-option-defaults.generated.ts';\nimport type {\n InternalGlobalConfigOptions,\n RenovateConfig,\n RepoGlobalConfig,\n} from './types.ts';\n\nexport class GlobalConfig {\n // TODO: once global config work is complete, add a test to make sure this list includes all options with globalOnly=true (#9603)\n static OPTIONS = [\n 'allowCustomCrateRegistries',\n 'allowPlugins',\n 'allowScripts',\n 'allowShellExecutorForPostUpgradeCommands',\n 'allowedCommands',\n 'allowedEnv',\n 'allowedHeaders',\n 'allowedUnsafeExecutions',\n 'autodiscoverRepoOrder',\n 'autodiscoverRepoSort',\n 'bbUseDevelopmentBranch',\n 'binarySource',\n 'cacheDir',\n 'cacheHardTtlMinutes',\n 'cachePrivatePackages',\n 'cacheTtlOverride',\n 'checkedBranches',\n 'configFileNames',\n 'containerbaseDir',\n 'customEnvVariables',\n 'dockerChildPrefix',\n 'dockerCliOptions',\n 'dockerMaxPages',\n 'dockerSidecarImage',\n 'dockerUser',\n 'dryRun',\n 'encryptedWarning',\n 'endpoint',\n 'executionTimeout',\n 'exposeAllEnv',\n 'gitTimeout',\n 'githubTokenWarn',\n 'httpCacheTtlDays',\n 'ignorePrAuthor',\n 'includeMirrors',\n /** NOTE that this is not a config option, but an internal variable **/\n 'localDir',\n 'migratePresets',\n 'onboarding',\n 'onboardingAutoCloseAge',\n 'onboardingBranch',\n 'onboardingCommitMessage',\n 'onboardingConfig',\n 'onboardingConfigFileName',\n 'onboardingNoDeps',\n 'onboardingPrTitle',\n 'platform',\n 'prCacheSyncMaxPages',\n 'presetCachePersistence',\n 'productLinks',\n 'rebaseAllOpenBranches',\n 'repositoryCacheForceLocal',\n 'requireConfig',\n 's3Endpoint',\n 's3PathStyle',\n 'toolSettings',\n 'userAgent',\n ] as const satisfies readonly (\n keyof RepoGlobalConfig | keyof InternalGlobalConfigOptions\n )[];\n\n private static config: RepoGlobalConfig & InternalGlobalConfigOptions = {};\n\n static get(): RepoGlobalConfig & InternalGlobalConfigOptions;\n static get<\n Key extends keyof RepoGlobalConfig | keyof InternalGlobalConfigOptions,\n >(key: Key): Required<RepoGlobalConfig & InternalGlobalConfigOptions>[Key];\n static get<\n Key extends keyof RepoGlobalConfig | keyof InternalGlobalConfigOptions,\n >(\n key?: Key,\n ):\n | (RepoGlobalConfig & InternalGlobalConfigOptions)\n | Required<RepoGlobalConfig & InternalGlobalConfigOptions>[Key] {\n const defaultValue = key\n ? (globalConfigOptionDefaults[key] as Required<\n RepoGlobalConfig & InternalGlobalConfigOptions\n >[Key])\n : undefined;\n\n return key\n ? ((GlobalConfig.config[key] ?? defaultValue) as Required<\n RepoGlobalConfig & InternalGlobalConfigOptions\n >[Key])\n : GlobalConfig.config;\n }\n\n static set(\n config: RenovateConfig & RepoGlobalConfig & InternalGlobalConfigOptions,\n ): RenovateConfig {\n GlobalConfig.reset();\n\n const result = { ...config };\n for (const option of GlobalConfig.OPTIONS) {\n GlobalConfig.config[option] = config[option] as never;\n delete result[option];\n }\n\n return result;\n }\n\n static reset(): void {\n GlobalConfig.config = {};\n }\n}\n"],"mappings":";;AAOA,IAAa,eAAb,MAAa,aAAa;CAExB,OAAO,UAAU;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CAIA,OAAe,SAAyD,CAAC;CAMzE,OAAO,IAGL,KAGgE;EAChE,MAAM,eAAe,MAChB,2BAA2B,OAG5B,KAAA;EAEJ,OAAO,MACD,aAAa,OAAO,QAAQ,eAG9B,aAAa;CACnB;CAEA,OAAO,IACL,QACgB;EAChB,aAAa,MAAM;EAEnB,MAAM,SAAS,EAAE,GAAG,OAAO;EAC3B,KAAK,MAAM,UAAU,aAAa,SAAS;GACzC,aAAa,OAAO,UAAU,OAAO;GACrC,OAAO,OAAO;EAChB;EAEA,OAAO;CACT;CAEA,OAAO,QAAc;EACnB,aAAa,SAAS,CAAC;CACzB;AACF"}
1
+ {"version":3,"file":"global.js","names":[],"sources":["../../lib/config/global.ts"],"sourcesContent":["import { globalConfigOptionDefaults } from '../global-config-option-defaults.generated.ts';\nimport type {\n InternalGlobalConfigOptions,\n RenovateConfig,\n RepoGlobalConfig,\n} from './types.ts';\n\nexport class GlobalConfig {\n // TODO: once global config work is complete, add a test to make sure this list includes all options with globalOnly=true (#9603)\n static OPTIONS = [\n 'allowCustomCrateRegistries',\n 'allowPlugins',\n 'allowScripts',\n 'allowShellExecutorForPostUpgradeCommands',\n 'allowedCommands',\n 'allowedEnv',\n 'allowedHeaders',\n 'allowedUnsafeExecutions',\n 'autodiscoverRepoOrder',\n 'autodiscoverRepoSort',\n 'bbUseDevelopmentBranch',\n 'binarySource',\n 'cacheDir',\n 'cacheHardTtlMinutes',\n 'cachePrivatePackages',\n 'cacheTtlOverride',\n 'checkedBranches',\n 'configFileNames',\n 'containerbaseDir',\n 'customEnvVariables',\n 'dockerChildPrefix',\n 'dockerCliOptions',\n 'dockerMaxPages',\n 'dockerSidecarImage',\n 'dockerUser',\n 'dryRun',\n 'encryptedWarning',\n 'endpoint',\n 'executionTimeout',\n 'exposeAllEnv',\n 'gitTimeout',\n 'githubTokenWarn',\n 'httpCacheTtlDays',\n 'ignorePrAuthor',\n 'includeMirrors',\n 'inheritConfigTrusted',\n 'internalHostAccess',\n /** NOTE that this is not a config option, but an internal variable **/\n 'localDir',\n 'migratePresets',\n 'onboarding',\n 'onboardingAutoCloseAge',\n 'onboardingBranch',\n 'onboardingCommitMessage',\n 'onboardingConfig',\n 'onboardingConfigFileName',\n 'onboardingNoDeps',\n 'onboardingPrTitle',\n 'platform',\n 'prCacheSyncMaxPages',\n 'presetCachePersistence',\n 'productLinks',\n 'rebaseAllOpenBranches',\n 'repositoryCacheForceLocal',\n 'requireConfig',\n 's3Endpoint',\n 's3PathStyle',\n 'toolSettings',\n 'userAgent',\n ] as const satisfies readonly (\n keyof RepoGlobalConfig | keyof InternalGlobalConfigOptions\n )[];\n\n private static config: RepoGlobalConfig & InternalGlobalConfigOptions = {};\n\n static get(): RepoGlobalConfig & InternalGlobalConfigOptions;\n static get<\n Key extends keyof RepoGlobalConfig | keyof InternalGlobalConfigOptions,\n >(key: Key): Required<RepoGlobalConfig & InternalGlobalConfigOptions>[Key];\n static get<\n Key extends keyof RepoGlobalConfig | keyof InternalGlobalConfigOptions,\n >(\n key?: Key,\n ):\n | (RepoGlobalConfig & InternalGlobalConfigOptions)\n | Required<RepoGlobalConfig & InternalGlobalConfigOptions>[Key] {\n const defaultValue = key\n ? (globalConfigOptionDefaults[key] as Required<\n RepoGlobalConfig & InternalGlobalConfigOptions\n >[Key])\n : undefined;\n\n return key\n ? ((GlobalConfig.config[key] ?? defaultValue) as Required<\n RepoGlobalConfig & InternalGlobalConfigOptions\n >[Key])\n : GlobalConfig.config;\n }\n\n static set(\n config: RenovateConfig & RepoGlobalConfig & InternalGlobalConfigOptions,\n ): RenovateConfig {\n GlobalConfig.reset();\n\n const result = { ...config };\n for (const option of GlobalConfig.OPTIONS) {\n GlobalConfig.config[option] = config[option] as never;\n delete result[option];\n }\n\n return result;\n }\n\n static reset(): void {\n GlobalConfig.config = {};\n }\n}\n"],"mappings":";;AAOA,IAAa,eAAb,MAAa,aAAa;CAExB,OAAO,UAAU;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CAIA,OAAe,SAAyD,CAAC;CAMzE,OAAO,IAGL,KAGgE;EAChE,MAAM,eAAe,MAChB,2BAA2B,OAG5B,KAAA;EAEJ,OAAO,MACD,aAAa,OAAO,QAAQ,eAG9B,aAAa;CACnB;CAEA,OAAO,IACL,QACgB;EAChB,aAAa,MAAM;EAEnB,MAAM,SAAS,EAAE,GAAG,OAAO;EAC3B,KAAK,MAAM,UAAU,aAAa,SAAS;GACzC,aAAa,OAAO,UAAU,OAAO;GACrC,OAAO,OAAO;EAChB;EAEA,OAAO;CACT;CAEA,OAAO,QAAc;EACnB,aAAa,SAAS,CAAC;CACzB;AACF"}
@@ -100,6 +100,20 @@ const options = [
100
100
  subType: "string",
101
101
  globalOnly: true
102
102
  },
103
+ {
104
+ name: "internalHostAccess",
105
+ description: "Whether Renovate may make HTTP requests to internal hosts, such as loopback, private-range and link-local addresses. `warn` logs the requests which `block` would refuse.",
106
+ type: "string",
107
+ allowedValues: [
108
+ "allow",
109
+ "warn",
110
+ "block"
111
+ ],
112
+ default: "warn",
113
+ globalOnly: true,
114
+ experimental: true,
115
+ advancedUse: true
116
+ },
103
117
  {
104
118
  name: "useCloudMetadataServices",
105
119
  description: "If `false`, Renovate does not try to access cloud metadata services.",
@@ -826,6 +840,15 @@ const options = [
826
840
  default: false,
827
841
  globalOnly: true
828
842
  },
843
+ {
844
+ name: "inheritConfigTrusted",
845
+ description: "If `true`, `hostRules` in inherited config may grant access to internal hosts.",
846
+ type: "boolean",
847
+ default: false,
848
+ globalOnly: true,
849
+ experimental: true,
850
+ advancedUse: true
851
+ },
829
852
  {
830
853
  name: "requireConfig",
831
854
  description: "Controls Renovate's behavior regarding repository config files such as `renovate.json`.",
@@ -2776,6 +2799,18 @@ const options = [
2776
2799
  env: false,
2777
2800
  advancedUse: true
2778
2801
  },
2802
+ {
2803
+ name: "allowInternal",
2804
+ description: "Whether requests to this host may reach internal addresses when `internalHostAccess=block`. Only honored from the self-hosted administrator's own configuration, or from inherited config when `inheritConfigTrusted=true`.",
2805
+ type: "boolean",
2806
+ stage: "repository",
2807
+ parents: ["hostRules"],
2808
+ cli: false,
2809
+ env: false,
2810
+ advancedUse: true,
2811
+ globalOnly: true,
2812
+ inheritConfigSupport: true
2813
+ },
2779
2814
  {
2780
2815
  name: "abortOnError",
2781
2816
  description: "If enabled, Renovate aborts its run when HTTP request errors occur.",