Commit Graph

799 Commits

Author SHA1 Message Date
Matthew Nitschke ac22678812 feat(datasource/npm): integrity and tarball extraction (#44315)
* added support for extracting integrity and tarball from npm datasource

* test(datasource/npm): keep integrity and tarball in packument shape assertions

The packument-trimming tests on main pinned a cached shape that dropped
`dist.tarball`, so they broke once the schema started retaining
`integrity` and `tarball`. Update both expectations to the new shape and
cover `integrity` alongside `tarball`.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* test(workers/lookup): expect integrity and tarball on npm updates

`generateUpdate` copies `downloadUrl` and `newDigest` from the release
onto the update, so every npm lookup in these tests now carries the
tarball URL and, where the packument fixture has one, the integrity
hash. Pin and rollback updates are built without those release fields,
so their expectations are unchanged.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Michael Kriese <michael.kriese@mend.io>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-11 10:09:59 +00:00
Sebastian Poxhofer 05e1271376 test: use expect().resolves instead of awaiting inside expect (#45672)
Enables the vitest/prefer-expect-resolves oxlint rule and applies its
autofix across the spec suite.
2026-09-04 10:40:46 +00:00
Sergei Zharinov 09ff8d22b6 test: Validate minimumReleaseAge is ignored for security updates (#44272)
* test: validate minimumReleaseAge does not apply to security updates

* test: add end-to-end coverage for security-update minimumReleaseAge bypass

Drive the real vulnerability flow (appendVulnerabilityPackageRules) through the
real lookupUpdates, instead of only simulating the generated packageRule. Also
reword the inline comment and use luxon/asTimestamp for timestamps.

* test: fix type-check on e2e lookup config

Cast the spread config to satisfy partial() overload resolution, matching the
existing `getConfig() as never` idiom in the lookup spec.

* test: drop redundant inline lookup test in favor of end-to-end coverage

The simulated lookup test hand-built the security packageRule; the end-to-end
test plus the generated-rule assertion in vulnerabilities.spec.ts cover the same
behavior against the real flow, so the inline test added no unique coverage.

* test(vulnerability): align lookup config types
2026-09-04 09:31:58 +00:00
Birger Johan Nordølum 19e4cdc47f fix(lookup): preserve current compatibility (#45171)
* fix: preserve current compatibility after lookup

* fix: expose current compatibility in lookup result

* test: preserve current compatibility after lookup

* test: preserve compatibility through fetch

* test: isolate current compatibility regression

* test: isolate current compatibility regression

* test: isolate current compatibility regression

* test: isolate current compatibility regression
2026-09-03 14:29:15 +00:00
RahulGautamSingh 3b699b3698 feat: configure limiting security updates (#45574)
* configure limiting security updates

* separate security limit from other limits

* rename type

* fix coverage

* add comments

* add test
2026-09-03 06:08:37 +00:00
Sebastian Poxhofer 8d08b51db0 refactor: return a RepositoryResult while onboarding (#45531)
* refactor(onboarding): return repository result from ensureOnboarding

Rename ensureOnboardingPr to ensureOnboarding and have it return a new
'onboarding' RepositoryResult. renovateRepository now branches on
repoIsOnboarded, so exactly one of ensureOnboarding/updateRepo produces
the repository result and the non-null assertion on the update result
(TODO #22198) is no longer needed. updateRepo/update no longer return
undefined for non-onboarded repositories.

* refactor(onboarding): keep ensureOnboardingPr name
2026-08-28 11:50:28 +00:00
Sebastian Poxhofer 97327c3d28 refactor(linters): add prefer-coerce-array rule (#45492)
* refactor(linters): add prefer-coerce-array rule

Refs #45217

`x ?? []` and `coerceArray(x)` say the same thing, but only the second
one is searchable and consistent. The rule flags a `??` whose default is
a bare `[]` literal; a non-empty default or an asserted `([] as Foo[])`
still passes.

Applying it across `lib/` surfaced three spots the helper cannot cover,
which keep `?? []` with a disable comment or a narrower fix:

- `package-files.ts` destructures a tuple, which `coerceArray()` widens
- `generate.spec.ts` defaults `matchAll()`, an iterator rather than an array
- `mise/upgradeable-tooling.ts` declares a `Record` return, so its
  `?? []` fallback was wrong to begin with and becomes `coerceObject()`

* refactor(platform/github): hoist the GHE version header lookup

`Object.entries(...).find()` returns a tuple, and defaulting it with
`?? []` only to destructure the second element reads as an array
default when it is not one. Name the found entry instead, which drops
the `?? []` rather than routing a tuple through `coerceArray()`.
2026-08-28 09:27:58 +00:00
Sebastian Poxhofer a473e73b3e fix(linters): forbid inert counts in v8 coverage-ignore comments (#45287)
Adds a custom oxlint rule renovate/v8-ignore-no-count that flags the
count form '/* v8 ignore next <N> */'. The count is not honored by
vitest's ast-v8-to-istanbul hint parser, which captures only the
keyword (if/else/next/file); 'next' always exempts exactly the next
AST node. Trailing counts therefore suggest a line range that is never
applied and mislead readers.

The rule is autofixable (drops the count, preserving actual behavior)
and has been applied to all existing occurrences.
2026-08-22 11:25:31 +00:00
Jameel Al-Aziz 6c7d345057 fix(vulnerabilities): scope Go stdlib OSV remediation to the toolchain directive (#45334)
* fix(vulnerabilities): scope Go stdlib OSV remediation to the `toolchain` directive

The module `go` directive was already excluded from OSV alerts, but the toolchain
rule still matched it via shared datasource/packageName and go-mod-directive ranges.

* fix(vulnerabilities): scope OSV remediation rules to the vulnerable depType

Remediation rules are generated per dependency. When that dep has a depType,
constrain the rule so it cannot match another dep that shares datasource and
packageName.

* fix(vulnerabilities): set matchDepTypes only for Go toolchain OSV rules

A generic matchDepTypes would stop an npm `dependencies` rule from also
matching `overrides` of the same package. Only the existing toolchain path
sets depType on the generated rule.
2026-08-21 08:56:12 +00:00
Sebastian Poxhofer e01b50c6ab refactor(linter): oxlint prefer partial typed casts for consts (#45239)
* refactor: flag all typed object literal casts in prefer-partial-in-specs

* refactor: type maven spec httpError helper against got response shape
2026-08-12 08:50:57 +00:00
Beto Aveiga a84e007f46 feat(vulnerabilities): match OSV Packagist sub-ecosystems (#45203)
Allow osvVulnerabilityAlerts to match OSV sub-ecosystems such as
Packagist:https://packages.drupal.org/8, based on #40004. Adds a
negative test so unrelated prefixes like PackagistSomething do not match.

Co-authored-by: Stephan Zeidler <stephan@ramsalt.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-10 16:28:55 +00:00
Jamie Tanna 7f40d43179 refactor(workers/repository): allow managers to opt out of digest pinning (#45198)
As part of future changes in #45190, we have found that when using
GitHub Actions' dependency lockfile, the digest pinning is manged by the
lockfile, rather than being specified in the package file itself.

To avoid a "flip flop" where using the manager removes the digest from
the package file (relying on the lockfile itself) and then a `pinDigest`
update re-adds it to the package file, we can instead follow how
`digestOneAndOnly` works and add a means to note
`digestManagedExternally`.

This isn't currently used, but allows an opt out for github-actions in
the future.

Co-authored-by: Claude Opus 5 <jamie.tanna+claude-code@mend.io>
2026-08-10 13:56:23 +00:00
Wade Carpenter a16858be0d refactor(workers): allow extractedConstraints on PackageDependency (#43252)
* refactor(workers): allow extractedConstraints on PackageDependency

Mirror the existing PackageFileContent.extractedConstraints field on
PackageDependency so managers can attach per-dep constraints (e.g.
python_version markers from PEP 508 dependencies) without overloading
the user-facing constraints field. In fetch.ts these dep-level
constraints are merged on top of the file/global constraints before
lookup, so the most specific source wins while user packageRules can
still override afterwards.

Extracted from #42701 at the reviewer's request so the type-level
change can land independently of the pep621/poetry feature work that
consumes it.

* fix(workers): prefer configured constraints over extracted values

Preserve configured constraints when extraction provides values for
the same names.

User configuration must take precedence over metadata discovered during
package extraction so users retain control over dependency lookup
behavior.

---------

Co-authored-by: wwade <wwade@users.noreply.github.com>
2026-08-03 18:08:26 +00:00
Jamie Tanna 33f51391f0 fix(workers/repository): apply minimumReleaseAge to pinDigest updates (#44968)
As per #44820, `pinDigest` updates currently don't get
`minimumReleaseAge` checks applied to them.

We can extend the recent support for `digest`s being handled by also
introducing support for `pinDigest`s to receive `minimumReleaseAge`
enforcement.

This will:

- enforce `minimumReleaseAge` on all updates that `pinDigest`s has
  pending
- consider the newest resolved version's timestamp, ignoring
  `rangeStrategy`-related logic
- allow unversioned releases like `latest` to /not/ be bound by
  `minimumReleaseAge`, as they'll potentially not have a release
  timestamp and will be unpinned forever, which is less safe (and
  reduces reproducibility)

Co-authored-by: Claude Sonnet 5 <jamie.tanna+claude-code@mend.io>
2026-07-30 16:00:12 +00:00
Jamie Tanna 1247df7fc4 fix(workers/repository): apply minimumReleaseAge to digest updates (#44965)
In some cases, we hadn't correctly wired in the `minimumReleaseAge`
checks for `digest`, due to the `currentValue` not changing.

To handle this, we need to:

- use our helper methods for calculating whether the `minimumReleaseAge`
  has passed
- handle a new digest's new `releaseTimestamp`
  the current timestamp
- intentionally not gate `minimumConfidence`, as this is only computed
  per-release, not at the digest level
- note the fixed behaviour, and clarify when it will/will not work
- add coverage for all generated updates for `digest`s, including when
  remapping a Go Modules update as a `digest`
- clarify that `filterInternalChecks` and
  `applyMinimumReleaseAgeToDigestUpdate` should stay in sync

Co-authored-by: Claude Fable 5 <jamie.tanna+claude-code@mend.io>
2026-07-30 12:06:25 +00:00
Jamie Tanna 12f5fde66e refactor(types): make currentVersionTimestamp a Timestamp (#44917)
To more strongly type it for other usages.
2026-07-28 13:03:28 +00:00
Arnaud Dezandee 5173de026b refactor: move checkMinimumReleaseAge to lib/util/minimum-release-age.ts (#44904) 2026-07-28 08:11:05 +00:00
renovate[bot] 196101a6bb chore(deps): update dependency oxlint-tsgolint to v0.25.0 (main) (#44424)
* chore(deps): update dependency oxlint-tsgolint to v0.25.0

| datasource | package         | from   | to     |
| ---------- | --------------- | ------ | ------ |
| npm        | oxlint-tsgolint | 0.23.0 | 0.25.0 |

* chore: fix new no-unnecessary-type-assertion findings

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

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Sebastian Poxhofer <sebastian.poxhofer@stedi.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-28 07:04:21 +00:00
Jamie Tanna 927b094344 refactor(workers/repository): extract minimumReleaseAge/minimumConfidence checks (#44825)
As part of follow-up changes, we'll need to call the checks in multiple
places, so should prefactor these into helper methods.

Co-authored-by: Claude Sonnet 5 <jamie.tanna+claude-code@mend.io>
2026-07-25 16:00:26 +00:00
Jamie Tanna f1cd516513 refactor(workers/repository): add isMinimumReleaseAgeApplicable/isMinimumConfidenceApplicable (#44824)
As part of follow-up changes, we'll use these functions to centrally
determine as to whether to execute `minimumReleaseAge` or
`minimumConfidence` checks against a given updateType.

For now, we can wire this into our documentation tests, to make sure
that this stays in sync with `isMinimumReleaseAgeApplicable`.

Co-authored-by: Claude Sonnet 5 <jamie.tanna+claude-code@mend.io>
2026-07-24 16:22:00 +00:00
Jamie Tanna f932d52fbd feat(platform): get all branch update dates in a more performant manner (#44582)
* feat(platform): get all branch update dates in a more performant manner

When Renovate is working on a repository with many /potential/ branches,
as well as some actually created branches, it's possible for the
calculation for `commitHourlyLimit` to end up taking significant time.

This can lead to a less performant job generally, but can sometimes lead
to the Renovate job failing to complete, and then timing out when
executed by a job runner.

To handle this, we can instead use use `git for-each-ref` to look up
each Git ref (remotely) and request the commit date, which leads to a
much more performant lookup.

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

* fixup! feat(platform): get all branch update dates in a more performant manner

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

* fixup! Merge remote-tracking branch 'origin/HEAD' into wip/commit-hourly-slow

---------

Co-authored-by: Claude Sonnet 5 <jamie.tanna+claude-code@mend.io>
2026-07-21 13:17:58 +00:00
Sebastian Poxhofer 1e03699cd6 test: add linter for as LongCommitSha in test files (#44681)
* test: add linter for `as LongCommitSha` in test files

Adds a custom oxlint rule `renovate/prefer-fake-sha-in-specs` that flags
`as LongCommitSha` casts in spec files and suggests the deterministic
`fakeSha()` helper from `test/util` instead. Enabled at error level for
`**/*.spec.ts` and `test/**`; all 131 pre-existing casts across 22 spec
files replaced.

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

* Update lib/modules/platform/bitbucket-server/index.spec.ts

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-20 10:08:09 +00:00
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 df7aa7b687 chore(workers/repository): instrument calculation of limits (#44581)
As part of an investigation around `commitHourlyLimit` performing slowly
on a repository with many branches, we can introduce more
instrumentation to be able to debug further.
2026-07-14 16:09:22 +00:00
Jamie Tanna 121f5df81d chore: log how many branches commitHourlyLimit is being calculated against (#44575)
As it can be useful to know on large repositories.
2026-07-14 13:55:42 +00:00
Sebastian Poxhofer d57843c60d refactor(oxlint): enable typescript/no-unnecessary-type-arguments (#44555)
Enable the type-aware typescript/no-unnecessary-type-arguments rule as
error and remove all 44 pre-existing redundant type arguments (type
arguments identical to the type parameter default), e.g.
HttpResponse<string>, ZodError<unknown>,
PackageDependency<Record<string, any>>.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-14 12:33:42 +00:00
Sebastian Poxhofer 9717259ffc refactor(oxlint): enable no-else-return and unicorn/no-lonely-if (#44553)
Enable no-else-return (with allowElseIf: false) and unicorn/no-lonely-if
as errors in .oxlintrc.json and fix all 131 pre-existing violations
(91 no-else-return, 40 unicorn/no-lonely-if) across 98 files.

The no-else-return violations were fixed with the oxlint autofix
(iterated to a fixpoint, plus two else-if chains that required
--fix-dangerously) followed by Prettier formatting. One comment dropped
by the autofix in lib/modules/manager/pub/artifacts.ts was restored
manually. The unicorn/no-lonely-if violations were merged by hand,
preserving comments and coverage-ignore hints.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-14 12:11:21 +00:00
Sebastian Poxhofer 7436b80cda test(linter): add renovate/no-redundant-mock-reset rule (#44557)
ci(linter): add renovate/no-redundant-mock-reset rule

Vitest sets mockReset: true globally in vitest.config.mts, which resets
all mocks before each test. This makes vi.resetAllMocks() /
vi.clearAllMocks() and per-mock .mockReset() / .mockClear() calls inside
beforeEach/afterEach hooks redundant. Add a custom oxlint rule (enabled
for **/*.spec.ts and test/**) flagging such calls, and remove the 40
redundant calls it found. restoreAllMocks/mockRestore are not flagged
because restoreMocks is not enabled globally.

Two sites keep an inline disable with a reason: nested beforeEach hooks
in filter-checks.spec.ts and onboarding/pr/index.spec.ts intentionally
call mockReset() to discard once-values queued by an outer beforeEach.

Requested by maintainer review feedback (review comment 3052324877).

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-14 11:26:20 +00:00
Sebastian Poxhofer ad0b59f8b7 refactor(oxlint): enable vitest/require-to-throw-message (#44421) 2026-07-07 17:47:04 +00:00
Sebastian Poxhofer 171a591d84 feat(git): validate commit shas (#43988)
* feat(git): validate length commit shas

* test: adapt test mocks

* chore: update import paths

* feat(git): make the validation more strict and support repositories using sha256

* test: add fakeSha function for deterministic git commit shas in tests
2026-06-15 06:36:57 +00:00
Jérémy Fauvel 5646cbae8c fix: use lockedVersion for currentVersionTimestamp lookup (#42476)
break line
2026-06-09 09:28:35 +00:00
Michael Kriese 058faaa872 fix(worker/lookup): don't use a range as current version (#43737) 2026-06-02 12:46:05 +00:00
Sebastian Poxhofer 914c64afbd test(linter): zod schema and infered type naming rule (#43736)
* ci: add linting rule for schema and infered types

* refactor: remove usages of Schema and differently named types
2026-06-02 12:07:35 +00:00
Sebastian Poxhofer 15f4bd8eff chore: migrate from zod/v3 to zod/v4 (#43691)
* chore: migrate from zod/v3 to zod/v4

This commit contains the logic changes

* chore: migrate imports from zod/v3 to zod/v4

This contains import updates and adds explicit record keys as zod/v4 requires these now

* ci: enforce usage of zod/v4
2026-05-30 16:01:58 +00:00
Björn Kautler 950f9a40a7 fix(lookup): try to find a release for changelog by newVersion if not found by newValue (#38894)
* fix(lookup): try to find a release for changelog by newVersion if not found by newValue

* Review Feedback Vol. 1

* Review Feedback Vol. 2
2026-05-27 11:31:56 +00:00
Sebastian Poxhofer 73b90e958b refactor: remove string concetation for production code (#43442)
refactor: prefer templates rather than `+`
2026-05-19 13:31:27 +00:00
Sebastian Poxhofer 0793274b86 refactor: prefer templates rather than + in test files (#43441)
refactor: prefer templates rather than `+`
2026-05-19 09:52:28 +00:00
Johannes Feichtner b05b21802d feat(vulnerabilities): support golang-version toolchain directive for OSV vulnerability alerts (#43333) 2026-05-14 06:05:17 +00:00
Jamie Tanna fd537a28be chore(workers/repository): improve error for invalid allowedVersions (#43312)
As noted in #43304, when using `osvVulnerabilityAlerts`, we can
sometimes produce an `allowedVersions` that is valid for the ecosystem,
but without setting the `versioning`, we produce an invalid rule, which
then results in a `config-validation` result, breaking any updates on
the repo.

When this happens, it's unclear which `versioning` is used to validate
this, so we should add this to the error message.
2026-05-13 13:41:54 +00:00
Jamie Tanna 83a415072d fix(vulnerability): set datasource if overriding allowedVersions (#43308)
As noted in #43304, when using `osvVulnerabilityAlerts`, we can
sometimes produce an `allowedVersions` that is valid for the ecosystem,
but without setting the `versioning`, we produce an invalid rule, which
then results in a `config-validation` result, breaking any updates on
the repo.

We should therefore wire in the default `versioning` for the given
datasource.
2026-05-13 13:41:16 +00:00
RahulGautamSingh ff037fa7c2 fix(prune): use configured base branch when single non-default baseBranchPatterns is set (#43152) 2026-05-07 17:09:10 +00:00
Elliot Courant 8776389291 feat(vulnerability): Add vulnerability alerts to deps-edn + lein (#42945)
* feat(vulnerability): Add vulnerability alerts to deps-end + lein

deps-edn and lein both essentially use maven upstream for several
packages. Some packages come from clojars directly but others are
typical java packages. If there is an OSV alert for a maven package
however, it will not propagate to the deps-edn or lein dependency update
from renovate. This tries to adjust that so that clojure can derive
dependency alerts from maven as well so that those dependencies are
treated the same way.

* chore: Code review feedback

* chore: Make ecosystem to datasource one to many

Technically datasource to ecosystem was already many to one in a way, as
maven appeared in the values twice. Once for clojure and once for maven
itself. This changes it so that the ecosystem to datasource is the same
way and looking up by ecosystem you will get multiple datasources
(should match the map above the modified code).

Then to make this work, instead of keying off of datasource for
vulnerabilities we key off of ecosystem so that all of the datasources
that are part of that ecosystem inherit the vulnerabilities for the same
dependency.

* chore: Tweaking to try to force CI/CD retry
2026-05-04 08:08:17 +00:00
Jamie Tanna e37388d91f feat: allow separate versioning for constraints (#42966)
* feat: allow separate versioning for constraints

As noted in #31831, there are times where it can be useful to override
the version that a given datasource uses, when performing
`constraintsFiltering=strict.`

This should only be applicable to the "additional" constraints, so we
make sure to validate this.

As this is new functionality, any misconfiguration should be marked as
an error.

We can make sure to provide a real-world usecase for this (taking
inspiration from `rails`' versioning of the `rubygems` constraint).

This will be used in the future by the extraction of the `go` directive,
which requires a different versioning to the default `semver`.

* fixup! feat: allow separate versioning for constraints

* fixup! feat: allow separate versioning for constraints

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

* extra-log-context

---------

Co-authored-by: Claude Sonnet 4.6 <jamie.tanna+claude-code@mend.io>
2026-04-29 13:00:15 +00:00
Felipe Santos 3afa38511b refactor(datasource/npm): extract defaultRegistryUrl constant (#42794)
* feat(datasource/npm): extract defaultRegistryUrl constant

* Fix some other places

* Remove useless defaultRegistryUrls export

* Fix another place

* Undo rules.spec.ts changes, which are not related

* Fix npm presets

* Restore line removed by mistake

* Fix another test file

* Restore changes to a file which is not relevant

* Fix another small place
2026-04-27 15:24:01 +00:00
Jamie Tanna 300035a700 chore(workers/repository): provide more detail when rolling back (#42818)
* chore(workers/repository): provide more detail when rolling back

To help debug the case where rollbacks are being initiated, we can:

- add slightly more information to the `Filtered out ...` log line
- add `prBodyNotes` to the resulting PR

This requires we expose the `prBodyNotes` field to `LookupUpdate`, and
the `packageName` and `datasource` to `RollbackConfig`, so we can log
them.

* chore(modules/datasource): log `datasource` and `packageName` when filtering

For more context when reviewing the logs.
2026-04-24 16:23:45 +00:00
Jamie Tanna 0c21df1e22 perf(workers/repository): use a Set for allReleaseVersions (#42779)
So all lookups downstream can be performed in `O(1)` time.

Suggested by Claude Sonnet.

Co-authored-by: Claude Sonnet 4.6 <jamie.tanna+claude-code@mend.io>
2026-04-21 08:55:41 +00:00
Jamie Tanna a11f338de6 fix(workers/repository): correctly pass all version numbers to versioning (#42767)
This results in some incorrect behaviour, where we'll have an incorrect
measure of all releases, as this was previously only for a given bucket
of updates.

Additionally, we can make sure this is only mapped once by moving it
above other loops.
2026-04-20 15:45:13 +00:00
Jamie Tanna 171d17734a chore(versioning): allow providing known versions to module (#42719)
As part of future changes, we'll introduce a new Versioning module for
GitHub Actions, which requires knowing if the version it's proposing
actually exists.

This is a more useful concept for Versioning modules to be able to take
advantage of, so we can expose this as an optional capability that
Versioning modules can use.
2026-04-17 15:00:06 +00:00
Jamie Tanna 01f2479eab feat(osv): mark malicious packages with skipReasons (#42510)
* fix(workers/repository): don't include `skipReason`'d dependencies in flattened updates

When we're preparing the final, flattened, list of branches to prepare
updates for, we're not filtering out any dependencies that have a
`skipReason` in them.

In the case that, as part of future changes like #42510, a `skipReason`
may be added after the `lookup` phase, we can still get PRs raised even
when they shouldn't be.

We already filter out `enabled=false`, so we should make sure to also
filter anything with a `skipReason`.

* feat(osv): mark malicious packages with `skipReason`s

As part of current ongoing supply chain attacks, there have been cases
where Renovate updates packages to a malicious version.

We'll be introducing a more in-depth means to surface these, including
from different API sources, as part of the Enrichment functionality,
but in the short-term we can utilise osv.dev's ingestion of OpenSSF's
Malicious Packages data.

To do this, we need to:

- look for any `MAL-` advisories
- match it against the current dependency's version, and if affected, mark it
  as `skipReason: malicious-version-in-use` (which will be unset in
  the `lookup()` function, so we still perform updates
- match it against the dependency's available updates, and if any are
  affected, mark the dependency
  as `skipReason: malicious-update-proposed`

* fixup! feat(osv): mark malicious packages with `skipReason`s

* fixup! feat(osv): mark malicious packages with `skipReason`s

* test(workers/repository): add missing coverage

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

* chore: simplify type

* wip-opus

* Revert "wip-opus"

This reverts commit e7b5f297c9.

* simplify

* sq

* sq

* fixup

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

---------

Co-authored-by: Claude Opus 4.6 <jamie.tanna+claude-code@mend.io>
2026-04-14 13:11:04 +00:00
Jamie Tanna 1044a80642 chore(types): add a strong type for ToolName and ConstraintName (#42589)
* chore(types): add a strong type for `ToolName`s

Until #41849, we can use our local definitions of the tool names that
Containerbase supports by extracting out a `ToolName` type.

* fixup! chore(types): add a strong type for `ToolName`s

Co-authored-by: Claude Opus 4.6 <jamie.tanna+claude-code@mend.io>
Co-authored-by: gpt-4.1 <jamie.tanna+github-copilot@mend.io>

* fixup! fixup! chore(types): add a strong type for `ToolName`s

* no-never

* simplify

* coverage

* sq

* warn

* sq

* fixup! sq

* sq

* fixup! sq

---------

Co-authored-by: Claude Opus 4.6 <jamie.tanna+claude-code@mend.io>
Co-authored-by: gpt-4.1 <jamie.tanna+github-copilot@mend.io>
2026-04-14 08:55:42 +00:00