111 Commits

Author SHA1 Message Date
Sebastian Poxhofer 0070fc5e6a refactor: remove unused exports and types (#47130)
Found with knip.
2026-10-17 09:10:12 +00:00
Kim Gustyr 6eedb413f9 refactor(types): Add lockfile-only skip reason (#46384)
refactor(types): add `lockfile-only` skip reason
2026-09-22 13:40:30 +00:00
Jamie Tanna 7386ea49c4 refactor(host-rules): add an inherited trust tier
As part of looking to allow Inherit Config to manage Host Rules' grants,
we need to perform a prefactor to create an additional trust tier
between the global self-hosted administrator's config, and presets/repo
config.

The `find()` method already resolves sensitive fields - `headers`,
`enabled`, and the computed internal-host grant - a "trust tier" at a
time, so that the outcome cannot depend on how specific a rule from a
less trusted tier makes itself. The new `inherit` tier slots in between
the two we had:

- `headers` are applied untrusted first, then inherited, then the
  administrator's, so theirs still win outright
- `enabled` is taken from the administrator's rules, falling back to
  inherited config's, then a repository's
- an administrator's `allowInternal: false` acts as a veto: it is
  resolved before inherited config's rules, and clears the scoped
  and implicit grants too, so inherited config cannot re-grant the
  host in any shape by out-scoping it. Meanwhile any inherited rule
  naming a host in its `matchHost` - credentialed or not - now
  implicitly permits it, like the admin's own rules do

We introduce a separate field than `trusted` to avoid Inherit Config
gaining the same precedence as the admin themselves.

Co-authored-by: Claude Fable 5 <jamie.tanna+claude-code@mend.io>
Co-authored-by: Claude Opus 5 <jamie.tanna+claude-code@mend.io>
2026-09-10 14:52:01 +01:00
Jamie Tanna 29a7b9c5f5 fix(util/http): allow blocking requests to internal hosts
To harden Renovate from being able to access internal hosts, we can add
a level of enforcement on all outgoing requests.

We can split this into two types of traffic:

- where the response becomes configuration (i.e. `extends`)
- where the response does not become configuration (i.e.
  `customDatasources`)

To harden this, we enforce on every outbound HTTP request:

- check the resolved URL before anything, including cache lookups, can
  proceed
  - catching IP-literal hosts in every spelling the WHATWG URL parser normalizes
  - blocking known Cloud metadata IPs, too
- a `dnsLookup` wrapper validates every address a hostname resolves to,
  on every new connection, which also defeats DNS rebinding
- a `beforeRedirect` hook re-runs the URL check on each redirect
  target, with the new host getting its own grant lookup rather than
  inheriting the original host's verdict

We default this enforcement to `warn`, to not break existing deployments
and instead give them visibility into required configuration before a
future major version (major+1) enables `block` by default.

We'll also remove allow in a future major version (major+2), to give
time for admins to migrate over.

When a request is blocked, this degrades like an unreachable registry,
so a Renovate run isn't aborted by a blocked request.

As part of this, we can also provide a worked example of the different
cases that do/do not need allowing via `hostRules`.

Requests through an admin-configured proxy resolve DNS at the proxy, so
`dnsLookup` never runs for them, so we can resolve the hostname locally
and validate every address before the request instead.

This doesn't catch everything, especially as the proxy may resolve the
name to a different result, and if we can't resolve the name - possible
in locked-down corporate environments - we fail open.

Child processes aren't currently able to route traffic through
Renovate's HTTP layer, so are unrestricted.

Co-authored-by: Claude Fable 5 <jamie.tanna+claude-code@mend.io>
Co-authored-by: Claude Opus 5 <jamie.tanna+claude-code@mend.io>
Co-authored-by: Claude Sonnet 5 <jamie.tanna+claude-code@mend.io>
2026-09-10 14:52:01 +01:00
Jamie Tanna 09d2da2f1b feat(host-rules): add allowInternal
As part of follow-up changes, we're looking to tighten the way that
Renovate handles outgoing HTTP traffic.

Before we do this, we can introduce a new config option,
`hostRules[].allowInternal`, that allows a self-hosted administrator to
mark an internal host as "trusted" for access.

This wires in the new global-only config option, `allowInternal`, which
implies a new internal field `internalHostGrant`.

We'll add full documentation in a future commit, when the full
enforcement is in place, as there are some wider changes to enforce it
fully.

Co-authored-by: Claude Fable 5 <jamie.tanna+claude-code@mend.io>
Co-authored-by: Claude Opus 5 <jamie.tanna+claude-code@mend.io>
2026-09-10 14:52:01 +01:00
Mike Ryan 525f80d6df fix(package-rules): respect each dep update's fetchChangeLogs value (#42671)
* fix(package-rules): respect each dep update's fetchChangeLogs value

Ensures that changelog fetching respects each dep update's specific `fetchChangeLogs` value.

Given the following renovate configuration: https://github.com/justfalter/renovate-test-packagerules-fetchchangelogs/blob/fb9e070d0f9a4d6fc742c4a22edee2c9b055fece/.github/renovate.json5#L42-L61

My expectation is that Renovate would never fetch changelogs for `lodash`. However, when grouped
together with `chalk` and `tar` under `group of unrelated packages`, we find that
renovate fetches changelogs all packages, including `lodash`.

Before this change (`lodash` logs fetched):
- Run: https://github.com/justfalter/renovate-test-packagerules-fetchchangelogs/actions/runs/24480887343/job/71544876893
- (wrong) lodash, tar, and chalk all have changelogs: https://github.com/justfalter/renovate-test-packagerules-fetchchangelogs/pull/9

After this change, the PR created by renovate only contains changelogs for `chalk` and `tar`, but not `lodash`:

- Run: https://github.com/justfalter/renovate-test-packagerules-fetchchangelogs/actions/runs/24481738609/job/71547632550
- (expected) lodash does not have changelogs, but tar and chalk have changelogs: https://github.com/justfalter/renovate-test-packagerules-fetchchangelogs/pull/10

----

We can further explore the effectiveness of the change with a more elaborate configuration, where the top-level has `fetchChangeLogs: off`: https://github.com/justfalter/renovate-test-packagerules-fetchchangelogs/blob/0ea69c18b9171e38c56440c762faa68109d3d0d5/.github/renovate.json5#L41-L95

Before the change:

- Run: https://github.com/justfalter/renovate-test-packagerules-fetchchangelogs/actions/runs/24482213234/job/71549162174
- (wrong) lodash, tar, and chalk all have changelogs: https://github.com/justfalter/renovate-test-packagerules-fetchchangelogs/pull/15
- (expected) typescript (inherited `off`) does not have changelogs: https://github.com/justfalter/renovate-test-packagerules-fetchchangelogs/pull/17
- (expected) grunt (overridden `pr`) has changelogs: https://github.com/justfalter/renovate-test-packagerules-fetchchangelogs/pull/13

After the change::

- Run: https://github.com/justfalter/renovate-test-packagerules-fetchchangelogs/actions/runs/24482561172/job/71550255278
- (expected) lodash does not have changelogs, but tar and chalk have changelogs: https://github.com/justfalter/renovate-test-packagerules-fetchchangelogs/pull/22
- (expected) typescript (inherited `off`) does not have changelogs: https://github.com/justfalter/renovate-test-packagerules-fetchchangelogs/pull/24
- (expected) grunt (overridden `pr`) has changelogs: https://github.com/justfalter/renovate-test-packagerules-fetchchangelogs/pull/20

Portions of this PR previously appeared in #42368

* pre feedback: just use fetchChangeLogs from upgrade

* revert documentation.spec.ts changes

They've already been integrated with #42846
2026-04-27 15:28:15 +00:00
Jamie Tanna 4faa847896 chore(types): add skipStage=enrichment (#42585)
As part of future changes, it will be useful to make it clear that a
dependency was skipped during an Enrichment module.
2026-04-14 10:04:40 +00:00
Jamie Tanna a945d8bc5a chore(workers/repository): split malicious dependency checks (#42508)
* chore(workers/repository): report malicious packages before `packageFiles with updates`

As part of future changes, we may modify the `skipReason`s before the
update phase, which means that we should ensure these are correct before
logging out `packageFiles with updates`.

* chore(workers/repository): split malicious dependency checks

We will likely run into two specific cases of malicious dependencies -
you're currently using one, or you're receiving an update to one.

We should make these separate, explicit, cases so users are aware what
`malicious` actually means, and what the path forward is.
2026-04-09 19:06:50 +00:00
Jamie Tanna 61463553bd chore(types): add a skipReason: malicious (#42500)
As part of future work, we'll need this to mark explicitly malicious
packages as skipped, with their own distinct reason.
2026-04-09 10:29:44 +00:00
Johannes Feichtner 3a05ade06b refactor(github/vulnerability): use Zod-inferred types as single source of truth (#42494)
* refactor(github/vulnerability): use Zod-inferred types as single source of truth

* revert to false, since undefined means something else on GHES
2026-04-09 08:36:40 +00:00
Zack Kanter eda8c595bd chore(types): export additional types for downstream log consumers (#40930)
* feat(types): export additional types for downstream log consumers

Export types commonly needed by downstream consumers parsing Renovate logs:

- BunyanRecord: Log entry structure
- RepositoryResult, ProcessStatus, ProcessResult: Repository processing outcomes
- ValidationMessage, RenovateSplit: Validation/error types
- BranchResult, PrBlockedBy: Branch processing outcomes
- UpdateType, MergeStrategy: Update and merge configuration
- MergeConfidence: Merge confidence levels
- BranchUpgradeCache, BranchCache: Branch info from logs

These types enable tools like log ingesters to parse Renovate output
without redefining types locally.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* style(types): consolidate export comments into single section header

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* chore: remove unnecessary types

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Jamie Tanna <jamie.tanna@mend.io>
2026-03-31 17:36:30 +00:00
Johannes Feichtner 3eb6f5a31b feat(vulnerabilities): add support for github-actions vulnerability alerts (#40175)
* feat(vulnerabilities): add support for github-actions vulnerability alerts

* fix failed merge from main

* now for real

* review comments

* remove no longer needed assertion
2026-02-26 08:11:14 +00:00
Sergei Zharinov 9d857c1f68 refactor(lint): Organize imports with biome (#40966) 2026-02-06 13:40:01 +00:00
Sergei Zharinov 930cf6633c refactor: Rewrite imports with .ts extensions (#40700)
fix: Additional vi.mock path corrections and prettier formatting
2026-01-26 22:48:17 +00:00
Michael Kriese 8651fe1a1e refactor: fix preset api types (#37137) 2025-07-24 09:15:36 +00:00
renovate[bot] 55845508b6 chore(deps): update eslint monorepo to v9 (major) (#33573)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2025-02-20 11:31:13 +00:00
Rhys Arkins 07c005869c feat: extend skipStage to extract, lookup (#33108) 2024-12-14 10:32:51 +00:00
Payman Delshad b775d83830 fix(vulnerability-alerts): fix handling of first_patched_version: null (#31447) 2024-09-17 16:34:15 +00:00
Michael Kriese 09824b1bef build!: require node v20 (#30291) 2024-07-25 15:28:16 +02:00
RahulGautamSingh 2eb7c76027 feat(http)!: remove dnsCache option (#29449)
BREAKING CHANGE: dnsCache is now removed
2024-07-25 15:28:16 +02:00
RahulGautamSingh 5ed97aa738 refactor(vulnerability-alerts): move to REST API (#27378) 2024-07-25 15:28:16 +02:00
Rhys Arkins b6b85eb69e feat(package-rules): set skipStage (#30264) 2024-07-21 10:29:13 +00:00
Rhys Arkins bf22e13e90 feat(packageRules): set skipReason=package-rules (#28952) 2024-05-09 10:04:58 +00:00
Sergei Zharinov 5c0628bf3b feat(host-rules): Support readOnly request matching (#28562)
Co-authored-by: Rhys Arkins <rhys@arkins.net>
2024-04-23 03:26:20 +00:00
Sergei Zharinov a39ca89101 refactor: Host rule types (#28454) 2024-04-17 05:00:00 +00:00
François db9d485227 feat(config): implement custom header field inside HostRules (#26225) 2024-01-17 09:22:19 +00:00
Sergei Zharinov 3aaa3e57e2 feat(http): Support for Retry-After header (#25859)
Co-authored-by: Rhys Arkins <rhys@arkins.net>
Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
Co-authored-by: Sebastian Poxhofer <secustor@users.noreply.github.com>
2023-12-14 07:10:50 +00:00
Michael Kriese 8c78b5a733 fix(keep-alive): use camlcase for option name (#26018) 2023-11-28 22:31:18 +00:00
Yun Lai 667f137081 feat: add options to host rules to enable mTLS calls to host (#24155)
Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>
Co-authored-by: Rhys Arkins <rhys@arkins.net>
2023-09-06 12:02:34 +00:00
renovate[bot] fe739befbf chore(deps): update linters to v6 (major) (#23325)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2023-08-02 15:07:49 +00:00
Jamie Magee 8f793259f9 refactor: replace our custom @breejs/later types with upstream types (#22665) 2023-06-12 23:09:00 +00:00
Ryo Matsukawa 0417c111ac refactor: Merged multiple skipReasons into unspecified-version. (#22409) 2023-05-25 05:48:11 +00:00
DjordyKoert 62b57aa27c feat: disable setting COMPOSER_AUTH for gitlab (#20634)
Co-authored-by: Rhys Arkins <rhys@arkins.net>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2023-04-17 06:16:02 +00:00
Michael Kriese 34b5401812 feat(manager/bitbucket-pipelines): support docker image object (#21102) 2023-03-29 10:41:05 +00:00
Sebastian Poxhofer 27aae2868e fix(presets/gitlab): directly request default branch (#20319) 2023-02-10 09:46:10 +00:00
Kasper Juul Hermansen eecccfa485 feat: handle workspace.dependencies in cargo (#18831) 2022-12-09 06:11:32 +01:00
RahulGautamSingh 8e4b5231f8 refactor: convert enums to unions (#18900) 2022-11-20 07:34:23 +00:00
RahulGautamSingh af3b2038f8 refactor: replace enums with union/object (#18903) 2022-11-14 20:55:38 +02:00
Sergei Zharinov b2d18d1110 feat(http): maxRequestsPerSecond (#18325) 2022-10-25 11:03:19 +00:00
HonkingGoose c44dbae214 chore(types): fix typos in comments (#18065) 2022-10-01 14:01:11 +02:00
Rhys Arkins 9bc8b05af3 feat: http keepalives (#17582) 2022-09-02 12:32:34 +02:00
Michael Kriese 13574419ba feat(http): support dns cache (#17533) 2022-08-31 11:49:54 +00:00
Sergei Zharinov f8c789efb4 feat(github): Log warning when GitHub token is not configured (#16566)
* feat(github): Log warning when GitHub token is not configured

* Check `sourceUrl`

* Add tests

* Fix test

* Fix

* Remove `sourceUrl` check

* Test nullable input

* Fix nulls
2022-08-01 06:16:09 +00:00
Maksim ed73d380e8 refactor: improve commit message functionality (#13328)
* refactor: improve commit message functionality

* refactor: fix test coverage

* refactor: fix by comments

* refactor: fix build

* refactor: fix linting

* refactor: fix export type

* refactor: js private fields

* refactor: static private fields

* fix: lint

* refactor: fix tsconfig

* refactor: implement method normalizeInput

* refactor: fix by comments

* Update lib/workers/repository/model/commit-message.ts

* refactor: fix by comments

* refactor: use private typescript fields again

* refactor: fix by comments

Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2022-05-02 01:42:33 +00:00
Michael Kriese fb9303c190 feat(core:changelogs): better platform detection (#14989)
Co-authored-by: Rhys Arkins <rhys@arkins.net>
2022-04-06 14:56:40 +00:00
Andrei Silviu Dragnea 27bfb75137 fix(manager/maven): Apply Maven properties recursively (#14566) 2022-03-12 15:16:07 +00:00
Rhys Arkins 143c9a6751 refactor: rename lookupName -> packageName (#14494)
Renames `lookupName` to be `packageName`.

BREAKING CHANGE: Use `packageName` instead of `lookupName` if interacting with Renovate datasources directly.
2022-03-04 09:04:02 +01:00
Hasan Awad f83c82b94f fix: added filtering for empty depName (#14037) 2022-02-13 09:59:03 +01:00
Michael Kriese 5723be1ac5 refactor: add strict null checks (#14169) 2022-02-11 11:02:30 +01:00
Jamie Magee 3b7e9a17cb refactor: set importsNotUsedAsValues to error (#14052) 2022-02-07 06:37:17 +00:00