Commit Graph

29 Commits

Author SHA1 Message Date
Sebastian Poxhofer c41b46bac3 feat(logging): do not use dynamic fields in log messages with severity WARN or higher (#44560)
* ci(linter): add renovate/logger-static-message rule

Adds a custom oxlint rule that enforces a static msg component for
logger.warn/error/fatal calls (including logger.once variants) so the
messages can be grouped in metrics and error catching services, per
docs/development/best-practices.md. It also flags metadata properties
named 'error' that hold error-ish values, because the bunyan serializer
only handles the 'err' key.

The rule is enabled as an error for lib/ production code and disabled
for spec files. All 33 pre-existing violations are fixed by moving
interpolated values into the metadata object, making messages static,
and renaming 'error' metadata keys to 'err'. Affected log-message
assertions in co-located specs are updated accordingly.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* ci: ignore validator output

* fixup new merged in log messages

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-16 06:53:37 +00:00
Jamie Tanna ff6761ed23 fix(config/global): return default values for GlobalConfig.get (#42113)
* fix(config/global): return default values for `GlobalConfig.get`

As noted in #39949, it can be awkward working with in `GlobalConfig.get`, where
we would previously need to specify the default value when calling `.get`,
which could lead to drift with the defaults for a given config option.

To reduce this risk, we can rely on a given `default` for a configuration
option, providing that as a default.

Because this now definitely returns a value that matches the config option, it
now allows us to remove `!` assertions.

* fixup! fix(config/global): return default values for `GlobalConfig.get`

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>

* fixup! fix(config/global): return default values for `GlobalConfig.get`

* test(presets): remove impossible test

As it's now not possible to set a value as `undefined` (as
`GlobalConfig` will then use the default), this test no longer validates
anything.

* test(workers/repository): add mock

Now `platform` defaults to `github`, we need to mock out the call to
fetch config.

Co-authored-by: Claude Sonnet 4.6 <jamie.tanna+claude-code@mend.io>

* test: coverage

* test: coverage

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <jamie.tanna+claude-code@mend.io>
2026-05-15 17:10:38 +00:00
Jamie Tanna 2d1e57532f refactor(types): rename lockFile to fileName in ArtifactError (#41631)
As `fileName` makes more sense (as it's not always a lock file we're
updating).

Also, if you set `fileName`, it would never actually output the
filename.

This renames the usages of `lockFile` to `fileName`.

Co-authored-by: Claude Sonnet 4.5 <jamie.tanna+github-copilot@mend.io>
2026-03-10 09:57:31 +00:00
Jamie Tanna b25102789e feat(gradle): set toolSettings' JVM limits when invoking ./gradlew (#41514)
As noted in #39559, we should also make it possible to use Renovate's
`toolSettings` to tune the Java Virtual Machine that's used to spawn
Gradle, via the Gradle Wrapper.

This will affect any `gradle` manager invocations, but will not apply to
`postUpgradeTasks`, as this is passed in as a parameter.

Co-authored-by: Claude Sonnet 4.5 <jamie.tanna+github-copilot@mend.io>
2026-02-26 17:40:59 +00:00
Jamie Tanna b6ef3e1290 fix(self-hosted)!: don't allow any unsafe commands by default (#40684)
As a safety measure for self-hosted administrators, we can make sure
that we set `allowedUnsafeExecutions` to not allow any commands by
default.

This closes off a significant risk of executing Gradle Wrapper
commands, which use the repository's copy of the wrapper, and any
Gradle buildscript, when executing, which can lead to significant remote
code execution, even before you take into account malicious dependencies.

As this is now off-by-default, we can enable it by default in our tests
to make sure that there are minimal changes required.
2026-01-29 13:28:06 +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
Jamie Tanna f50470985c feat: add allowedUnsafeExecutions for ./gradlew (#39945)
We recently introduced the ability for self-hosted administrators to
control execution of possibly unsafe commands with
`allowedUnsafeExecutions`.

An existing attack vector of Gradle Wrapper commands being executed
(i.e. for Verification Metadata or lockfile updates) needs to be
retrofit into `allowedUnsafeExecutions` as part of #39657.

This will be kept on-by-default until the next breaking change, after
which self-hosted administrators will be able to opt-in to enabling this
functionality is required.
2025-12-18 10:28:39 +00:00
RahulGautamSingh 76f911041a refactor: use named exports (#39196)
* use named exports

* fix test

* add missing imnport

* fix prettier
2025-11-10 12:00:35 +00:00
Sergei Zharinov 7c79c11285 fix: Always use default import from upath and semver-stable (#37325) 2025-08-05 11:01:45 +00:00
Johannes Feichtner 03542cb789 fix(gradle): update dependency verification metadata also without verify-metadata enabled (#36843) 2025-07-05 11:17:55 +00:00
RahulGautamSingh 80b7cdf1e0 refactor(util): move user env to util folder (#35103) 2025-04-02 10:27:27 +00:00
Johannes Feichtner 32a13f66f9 feat(gradle-wrapper): add support for gradle daemon JVM discovery (#31319)
Co-authored-by: Rhys Arkins <rhys@arkins.net>
2024-09-15 04:59:25 +00:00
Raphi 8975c9bda6 feat(manager/gradle): Use dependencies task when generating verification metadata (#29602) 2024-06-11 18:02:50 +00:00
RahulGautamSingh 2194142f78 feat(config): support user configured env (#27028)
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>
2024-02-22 05:05:05 +00:00
Sergei Zharinov b69416ce17 refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
Leonardo Rocha 805e727af5 fix(gradle): add dependency-verification to gradle commands (#25195)
Co-authored-by: Rhys Arkins <rhys@arkins.net>
2023-10-15 05:46:07 +00:00
udakak 0bce5452f0 feat(manager/gradle): Add verification metadata update support to gradle manager (#23733)
Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
Co-authored-by: Johannes Feichtner <343448+Churro@users.noreply.github.com>
2023-08-17 18:20:37 +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
Johannes Feichtner 4dc6d691f6 refactor(manager/gradle): ignore stdout of artifact updates via stdio convenience option (#23088) 2023-07-02 21:09:06 +00:00
Johannes Feichtner 5336723207 fix(manager/gradle-wrapper): refresh Gradle lockfile after wrapper update (#23081) 2023-07-02 11:19:10 +00:00
Rhys Arkins 9276a54069 refactor(scm): use scm for getFileList, checkoutBranch (#22006) 2023-05-07 04:12:15 +00:00
Satoshi Namai 3e92cdd10a fix(manager/gradle): drop stdout from gradlew :dependency command (#20820)
Co-authored-by: Rhys Arkins <rhys@arkins.net>
2023-03-15 10:13:06 +00:00
Johannes Feichtner 766cc3a70e fix(manager/gradle): correct execution order for buildscript dependencies in lockfiles (#20303) 2023-02-09 05:26:02 +01:00
Michael Kriese e78048dfc1 fix: no cycles (#19982) 2023-01-23 21:20:54 +00:00
Michael Kriese 73be295310 feat(core): centralize sidecar image usage (#19545) 2022-12-23 09:45:15 +00:00
Jan Høydahl 0d9aaed601 feat(gradle): Support for gradle consistent versions plugin (#19182)
Co-authored-by: Johannes Feichtner <Churro@users.noreply.github.com>
Closes https://github.com/renovatebot/renovate/issues/8017
2022-12-08 12:21:14 +00:00
Johannes Feichtner c49be3d69a fix(manager/gradle): optimize performance of Gradle lock file maintenance and ensure gradlew is executable (#18348) 2022-10-15 17:13:19 +00:00
Johannes Feichtner 5559b5359d fix(manager/gradle): use Gradle version to resolve Java constraints for lockfile updates (#18346) 2022-10-15 10:00:59 +00:00
Johannes Feichtner 2305550013 feat(manager/gradle): add support for dependency lockfile updates (#17949) 2022-10-05 12:24:43 +00:00