Commit Graph

5005 Commits

Author SHA1 Message Date
houyuwushang
ea2eea57a7 plugin/file: stop self-referential DNAME loops (#8418) 2026-08-10 13:26:01 -07:00
rpb-ant
c2ca1b2c23 plugin/kubernetes: Add support for topology-aware headless services via "az-pinned" subdomains (#8388) 2026-08-10 13:24:50 -07:00
Mehrdad Biukian
b2ef1a13e8 image: pin numeric uid/gid for the nonroot user (#8316)
Kubernetes rejects a pod at admission when runAsNonRoot is set and the image
declares its user by name: "container has runAsNonRoot and image has
non-numeric user (nonroot), cannot verify user is non-root". The Dockerfile
set `USER nonroot:nonroot`, so the built image's config user was the name
rather than a uid, which the kubelet cannot verify.

distroless "nonroot" is uid/gid 65532, so pin the numeric id. The image runs
as the same user and the binary keeps cap_net_bind_service from the build
stage, so it can still bind :53. Verified by building the image: config user
is now `65532:65532`.

Fixes #7542

Signed-off-by: mehrdadbn9 <mehrdadbiukian@gmail.com>
2026-08-05 21:11:02 -07:00
Michael Wolf
c7e5424e7c Support IPv6 service endpoints in trace plugin (#8410)
Use net.JoinHostPort rather than string concatenation to support
both ipv4, ipv6, and hostname service endpoints for the trace
plugin. Previously, ipv6 bind addresses in the coredns configuration
would fail to be parsed, as the ipv6 address was not surrounded in
brackets.

Signed-off-by: Michael Wolf <mwolf@cloudflare.com>

Closes #8409

Co-authored-by: Michael Wolf <mwolf@cloudflare.com>
2026-08-05 21:10:34 -07:00
dependabot[bot]
419869ebac build(deps): bump github.com/aws/aws-sdk-go-v2/credentials (#8395)
Bumps [github.com/aws/aws-sdk-go-v2/credentials](https://github.com/aws/aws-sdk-go-v2) from 1.19.31 to 1.19.32.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/credentials/v1.19.31...credentials/v1.19.32)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2/credentials
  dependency-version: 1.19.31
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-05 21:10:17 -07:00
dependabot[bot]
db197816ca build(deps): bump github.com/aws/aws-sdk-go-v2/service/secretsmanager (#8397)
Bumps [github.com/aws/aws-sdk-go-v2/service/secretsmanager](https://github.com/aws/aws-sdk-go-v2) from 1.44.0 to 1.44.2.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/s3/v1.44.0...service/ecr/v1.44.2)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2/service/secretsmanager
  dependency-version: 1.44.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-05 19:48:25 -07:00
dependabot[bot]
68ef0ce4a2 build(deps): bump github.com/aws/aws-sdk-go-v2/service/route53 (#8402)
Bumps [github.com/aws/aws-sdk-go-v2/service/route53](https://github.com/aws/aws-sdk-go-v2) from 1.65.1 to 1.65.4.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/s3/v1.65.1...service/ecs/v1.65.4)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2/service/route53
  dependency-version: 1.65.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-05 18:58:06 -07:00
dependabot[bot]
ac5eb3e26f build(deps): bump github.com/aws/aws-sdk-go-v2/feature/ec2/imds (#8403)
Bumps [github.com/aws/aws-sdk-go-v2/feature/ec2/imds](https://github.com/aws/aws-sdk-go-v2) from 1.18.32 to 1.18.33.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.18.32...config/v1.18.33)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2/feature/ec2/imds
  dependency-version: 1.18.32
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-05 17:01:04 -07:00
dependabot[bot]
5c8e969e7f build(deps): bump github.com/aws/aws-sdk-go-v2 from 1.43.1 to 1.43.2 (#8404)
Bumps [github.com/aws/aws-sdk-go-v2](https://github.com/aws/aws-sdk-go-v2) from 1.43.1 to 1.43.2.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/v1.43.1...v1.43.2)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2
  dependency-version: 1.43.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-05 17:00:54 -07:00
dependabot[bot]
f609e3c7e4 build(deps): bump google.golang.org/api from 0.290.0 to 0.291.0 (#8398)
Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.290.0 to 0.291.0.
- [Release notes](https://github.com/googleapis/google-api-go-client/releases)
- [Changelog](https://github.com/googleapis/google-api-go-client/blob/main/CHANGES.md)
- [Commits](https://github.com/googleapis/google-api-go-client/compare/v0.290.0...v0.291.0)

---
updated-dependencies:
- dependency-name: google.golang.org/api
  dependency-version: 0.291.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-05 16:35:12 -07:00
dependabot[bot]
246f0083d6 build(deps): bump go.uber.org/zap from 1.27.1 to 1.28.0 (#8396)
Bumps [go.uber.org/zap](https://github.com/uber-go/zap) from 1.27.1 to 1.28.0.
- [Release notes](https://github.com/uber-go/zap/releases)
- [Changelog](https://github.com/uber-go/zap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/uber-go/zap/compare/v1.27.1...v1.28.0)

---
updated-dependencies:
- dependency-name: go.uber.org/zap
  dependency-version: 1.28.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-05 16:34:30 -07:00
dependabot[bot]
cab4467517 build(deps): bump github.com/caddyserver/certmagic from 0.25.3 to 0.25.4 (#8399)
Bumps [github.com/caddyserver/certmagic](https://github.com/caddyserver/certmagic) from 0.25.3 to 0.25.4.
- [Release notes](https://github.com/caddyserver/certmagic/releases)
- [Commits](https://github.com/caddyserver/certmagic/compare/v0.25.3...v0.25.4)

---
updated-dependencies:
- dependency-name: github.com/caddyserver/certmagic
  dependency-version: 0.25.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-05 16:34:17 -07:00
dependabot[bot]
e184229c34 build(deps): bump actions/stale from 10.4.0 to 11.0.0 (#8400)
Bumps [actions/stale](https://github.com/actions/stale) from 10.4.0 to 11.0.0.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](1e223db275...4391f3da66)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-version: 11.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-05 16:34:07 -07:00
dependabot[bot]
8cc02202a6 build(deps): bump ossf/scorecard-action from 2.4.3 to 2.4.4 (#8401)
Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 2.4.3 to 2.4.4.
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](4eaacf0543...2d1146689b)

---
updated-dependencies:
- dependency-name: ossf/scorecard-action
  dependency-version: 2.4.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-05 16:33:55 -07:00
dependabot[bot]
e7bc2f22f3 build(deps): bump docker/login-action from 4.4.0 to 4.6.0 (#8394)
Bumps [docker/login-action](https://github.com/docker/login-action) from 4.4.0 to 4.6.0.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](af1e73f918...dbcb813823)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-version: 4.6.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-05 16:33:26 -07:00
dependabot[bot]
a1cf7d3a6b build(deps): bump github.com/prometheus/client_golang (#8405)
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.24.0 to 1.24.1.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/v1.24.1/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.24.0...v1.24.1)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-version: 1.24.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-05 16:32:30 -07:00
dependabot[bot]
c19d0d963f build(deps): bump github.com/aws/aws-sdk-go-v2/config (#8406)
Bumps [github.com/aws/aws-sdk-go-v2/config](https://github.com/aws/aws-sdk-go-v2) from 1.32.31 to 1.32.32.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.32.31...config/v1.32.32)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2/config
  dependency-version: 1.32.32
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-05 16:32:19 -07:00
Manuel Rüger
19cd5fe0c3 plugin/hosts: pre-convert Origins to plugin.Zones in setup (#8383)
* test: add benchmark cases for Request IP/Port and parseRequest

Signed-off-by: Manuel Rüger <manuel@rueg.eu>

* test(kubernetes): add BenchmarkServices and BenchmarkServicesHeadless

Signed-off-by: Manuel Rüger <manuel@rueg.eu>

* perf(hosts): pre-convert Origins to plugin.Zones in hosts setup

Signed-off-by: Manuel Rüger <manuel@rueg.eu>

* style: fix gofmt trailing line formatting

Signed-off-by: Manuel Rüger <manuel@rueg.eu>

---------

Signed-off-by: Manuel Rüger <manuel@rueg.eu>
2026-08-03 18:50:45 -07:00
Saleh
097ef7ef91 plugin/file: run additional processing for CNAME/DNAME answers (#8337)
externalLookup, which resolves the chase for ordinary CNAME, wildcard
CNAME, and DNAME answers, returned a nil additional section. So a chased
SRV/MX/SVCB/HTTPS answer with an in-bailiwick target was missing the
target's A/AAAA glue, unlike the direct path.

Run additionalProcessing at externalLookup's return points so all three
callers add the glue, and add ordinary-CNAME, wildcard-CNAME, and DNAME
regression cases.

Fixes #6628

Signed-off-by: Saleh <root@lr0.org>
2026-08-03 18:49:50 -07:00
houyuwushang
0fa6c66797 plugin/forward: cap default connect attempts (#8365)
Default to two connect attempts per configured upstream so fast failures cannot spin until the request deadline. Track whether max_connect_attempts was explicitly configured so zero still opts into the legacy unbounded behavior.

Fixes #7723

Signed-off-by: houyuwushang <liuluoqianqiu@outlook.com>
2026-08-03 18:49:29 -07:00
Yash Singh
dc1e3a96ad kubernetes: add tests for endpoint/service-import equivalence checks (#8368)
Signed-off-by: yashsingh74 <yashsingh1774@gmail.com>
2026-08-03 18:49:05 -07:00
Karan V
aeaadc0f8c plugin/kubernetes: skip zone serial bump on DNS neutral pod updates (#8338)
* plugin/kubernetes: skip zone serial bump on DNS neutral pod updates

In pods verified mode every pod update event bumped the zone modified
timestamp, even when the pod IP did not change. Pod records only depend
on the pod IP, so routine status churn (conditions, container statuses,
labels) caused spurious SOA serial changes and needless zone transfer
activity, even though pod records are not part of transfers at all.

Only bump the modified timestamp when the pod IP changes, mirroring how
service and endpoint updates are already filtered. Also update the pods
verified documentation to describe the actual overhead: modest memory
for a stripped down pod object, plus watch load on the API server.

Ref #8043

Signed-off-by: Karan V <karanvknarayanan@gmail.com>

* plugin/kubernetes: keep pods verified cost description neutral

Avoid characterizing the memory overhead as modest until benchmark
data quantifies it. State only what the code does: the watch requires
additional memory in CoreDNS and adds load to the API server.

Signed-off-by: Karan V <karanvknarayanan@gmail.com>

---------

Signed-off-by: Karan V <karanvknarayanan@gmail.com>
2026-08-03 18:46:10 -07:00
Manuel Rüger
53ad30a268 plugin/kubernetes: pre-allocate search path slice capacity in AutoPath (#8381)
* test: add benchmark cases for Request IP/Port and parseRequest

Signed-off-by: Manuel Rüger <manuel@rueg.eu>

* perf(kubernetes): optimize AutoPath slice allocation and copy

Signed-off-by: Manuel Rüger <manuel@rueg.eu>

* perf(kubernetes): pre-allocate search path slice capacity in AutoPath

Signed-off-by: Manuel Rüger <manuel@rueg.eu>

---------

Signed-off-by: Manuel Rüger <manuel@rueg.eu>
2026-08-03 18:45:17 -07:00
Manuel Rüger
a1642a64dc plugin/forward: fast-path string comparison in isAllowedDomain (#8385)
* test: add benchmark cases for Request IP/Port and parseRequest

Signed-off-by: Manuel Rüger <manuel@rueg.eu>

* test(kubernetes): add BenchmarkServices and BenchmarkServicesHeadless

Signed-off-by: Manuel Rüger <manuel@rueg.eu>

* perf(forward): fast-path string comparison in isAllowedDomain

Signed-off-by: Manuel Rüger <manuel@rueg.eu>

---------

Signed-off-by: Manuel Rüger <manuel@rueg.eu>
2026-08-03 18:44:27 -07:00
houyuwushang
d74404f8ac plugin/file: handle empty non-terminal wildcard sources (#8386)
RFC 4592 permits a wildcard source of synthesis to exist as an empty non-terminal. Track wildcard names proven by descendant records and return NODATA when such a source is selected.

Fixes #4256

Signed-off-by: houyuwushang <liuluoqianqiu@outlook.com>
2026-08-03 18:37:38 -07:00
maximilize
9ddc4fdb8f plugin/rewrite: test EDNS0 revert with a record present and on the replace path (#8315)
Adds two regression tests for #8234 that the existing suite does not cover:

- an OPT-less upstream reply that carries a record, so the per-record
  response rules run while the request OPT is reused by ScrubWriter;
- a request that already carries the option, where "set ... revert" must
  put the client's original value back rather than just drop the option.

Both fail against the tree before #8235 and pass on current master.

Signed-off-by: maximilize <3752128+maximilize@users.noreply.github.com>
2026-08-03 18:13:46 -07:00
Pujitha Paladugu
4438f6d708 plugin/timeouts: add maxtcpqueries option to bound queries per TCP/TLS connection (#8376) 2026-08-03 16:16:43 -07:00
github-actions[bot]
335c8b9a33 auto make -f Makefile.doc (#8387)
Signed-off-by: coredns[bot] <bot@coredns.io>
Co-authored-by: coredns[bot] <bot@coredns.io>
2026-08-02 17:40:59 +03:00
Yong Tang
3a52659cb8 plugin/file: Fixes multi-primary AXFR zone contamination (#8367)
This PR fixes multi-primary AXFR zone contamination. It
use a fresh candidate zone for each primary so records from failed transfers cannot leak into later.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2026-07-30 01:44:02 -07:00
Yong Tang
36515d9dce plugin/cache: Fix cache stale verification metadata race (#8366)
* plugin/cache: Fix cache stale verification metadata race

This PR fixes cache stale verification metadata race
which isolate background stale-refresh metadata from
the foreground request to prevent concurrent map writes and process crashes

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>

* Address review comment

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>

---------

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2026-07-30 01:25:50 -07:00
dependabot[bot]
068d68888a build(deps): bump github/codeql-action/autobuild from 4.37.0 to 4.37.3 (#8357)
Bumps [github/codeql-action/autobuild](https://github.com/github/codeql-action) from 4.37.0 to 4.37.3.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](99df26d4f1...e4fba868fa)

---
updated-dependencies:
- dependency-name: github/codeql-action/autobuild
  dependency-version: 4.37.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-30 00:01:39 -07:00
dependabot[bot]
ea6ec26795 build(deps): bump github/codeql-action/analyze from 4.37.0 to 4.37.3 (#8355)
Bumps [github/codeql-action/analyze](https://github.com/github/codeql-action) from 4.37.0 to 4.37.3.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](99df26d4f1...e4fba868fa)

---
updated-dependencies:
- dependency-name: github/codeql-action/analyze
  dependency-version: 4.37.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-30 00:01:04 -07:00
dependabot[bot]
fca4ac0671 build(deps): bump github/codeql-action/init from 4.37.0 to 4.37.3 (#8348)
Bumps [github/codeql-action/init](https://github.com/github/codeql-action) from 4.37.0 to 4.37.3.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](99df26d4f1...e4fba868fa)

---
updated-dependencies:
- dependency-name: github/codeql-action/init
  dependency-version: 4.37.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-30 00:00:51 -07:00
dependabot[bot]
66cb9201a6 build(deps): bump google.golang.org/api from 0.288.0 to 0.290.0 (#8362)
Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.288.0 to 0.290.0.
- [Release notes](https://github.com/googleapis/google-api-go-client/releases)
- [Changelog](https://github.com/googleapis/google-api-go-client/blob/main/CHANGES.md)
- [Commits](https://github.com/googleapis/google-api-go-client/compare/v0.288.0...v0.290.0)

---
updated-dependencies:
- dependency-name: google.golang.org/api
  dependency-version: 0.289.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-29 23:59:25 -07:00
dependabot[bot]
4ba845bb1f build(deps): bump github.com/aws/aws-sdk-go-v2/config (#8353)
Bumps [github.com/aws/aws-sdk-go-v2/config](https://github.com/aws/aws-sdk-go-v2) from 1.32.30 to 1.32.31.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.32.30...config/v1.32.31)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2/config
  dependency-version: 1.32.31
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-29 21:20:13 -07:00
Nitin Nizhawan
e073d1c05b plugin/cache: do not cache SOA-less NODATA responses (#8232)
* plugin/cache: do not cache SOA-less NODATA responses

An upstream may return NOERROR with a non-empty answer that still does not
resolve the question and without an SOA record to bound a negative TTL: a
CNAME chain that does not terminate in a record of the queried type at the
chain's terminal name (an incomplete recursion result from a forwarder).
Because the answer section is non-empty, response.Typify classifies it as
NoError (positive), so the cache plugin stores it keyed on <qname,qtype> and
replays the non-answer to clients until the TTL expires.

Per RFC 2308 section 5, negative responses without an SOA record SHOULD NOT be
cached. Following RFC 1034 section 3.6.2 and RFC 2308 sections 1 and 2.2, the
effective owner name is the target at the end of the CNAME chain, and the
response is NODATA unless it carries the queried type at that terminal name;
this holds for every query type, not just A/AAAA. Skip caching such a response
(mirroring the existing NameError && !hasSOA guard) and let the next query be
resolved upstream again.

An empty answer section is deliberately left cacheable: it is indistinguishable
from a legitimate NOERROR positive response that carries its data outside the
answer section (for example the whoami plugin).

Refs coredns#6958, coredns#5077, coredns#4987.

Signed-off-by: Nitin Nizhawan <nitin.nizhawan@gmail.com>

* plugin/cache: fail closed on malformed CNAME chains in isNODATA

canonicalName now returns a validity flag and rejects chains that are not a
single unambiguous path to a terminal name: an owner with more than one
distinct CNAME target (RFC 2181 section 10.1) and a revisited owner / CNAME
loop (RFC 1034 section 3.6.2). isNODATA treats an invalid chain as a
non-answer, so a SOA-less response with such a chain is not cached. This makes
the classification order-independent (previously the first CNAME per owner
won, so a two-target owner was cacheable or not depending on wire order) and
closes the loop-with-co-located-record case. Duplicate CNAME records naming
the same target are still tolerated.

Adds regression tests for the two-distinct-targets case in both orders, the
CNAME loop with a co-located A, and the tolerated duplicate-identical-CNAME
case.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d59b4564-a9df-425f-858e-aadee0f35581
Signed-off-by: Nitin Nizhawan <nitin.nizhawan@gmail.com>

* plugin/cache: split canonicalName into self-documenting helpers

Extract the per-owner CNAME lookup into uniqueCNAMETarget and loop detection
into a small case-insensitive nameSet type, leaving canonicalName as a short
driver. Signature and algorithm are unchanged.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d59b4564-a9df-425f-858e-aadee0f35581
Signed-off-by: Nitin Nizhawan <nitin.nizhawan@gmail.com>

---------

Signed-off-by: Nitin Nizhawan <nitin.nizhawan@gmail.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d59b4564-a9df-425f-858e-aadee0f35581
2026-07-29 20:39:49 -07:00
dependabot[bot]
0f4bda24eb build(deps): bump github.com/aws/aws-sdk-go-v2/credentials (#8356)
Bumps [github.com/aws/aws-sdk-go-v2/credentials](https://github.com/aws/aws-sdk-go-v2) from 1.19.29 to 1.19.30.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/credentials/v1.19.29...credentials/v1.19.30)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2/credentials
  dependency-version: 1.19.30
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-29 20:38:37 -07:00
houyuwushang
546fac83ea plugin/tls: manage certificates with ACME DNS-01 (#8310)
* plugin/tls: add automatic ACME certificates

Signed-off-by: houyuwushang <liuluoqianqiu@outlook.com>

* chore: add houyuwushang to CODEOWNERS

Signed-off-by: houyuwushang <liuluoqianqiu@outlook.com>

* chore: regenerate maintainer owners

Signed-off-by: houyuwushang <liuluoqianqiu@outlook.com>

---------

Signed-off-by: houyuwushang <liuluoqianqiu@outlook.com>
2026-07-29 19:24:22 -07:00
Manuel Rüger
03260d5b67 plugin/kubernetes: short-circuit matchPortAndProtocol and fast-path string match (#8344)
Signed-off-by: Manuel Rüger <manuel@rueg.eu>
2026-07-29 18:38:04 -07:00
dependabot[bot]
951f146c68 build(deps): bump github.com/aws/aws-sdk-go-v2/service/secretsmanager (#8358)
Bumps [github.com/aws/aws-sdk-go-v2/service/secretsmanager](https://github.com/aws/aws-sdk-go-v2) from 1.43.1 to 1.44.0.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/v1.43.1...service/s3/v1.44.0)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2/service/secretsmanager
  dependency-version: 1.44.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-29 18:37:04 -07:00
Manuel Rüger
88c558ad7c plugin/kubernetes: preallocate slice capacities in controller query lookups (#8343)
Signed-off-by: Manuel Rüger <manuel@rueg.eu>
2026-07-29 18:25:44 -07:00
dependabot[bot]
ad49f74edd build(deps): bump github.com/go-logr/logr from 1.4.3 to 1.4.4 (#8350)
Bumps [github.com/go-logr/logr](https://github.com/go-logr/logr) from 1.4.3 to 1.4.4.
- [Release notes](https://github.com/go-logr/logr/releases)
- [Changelog](https://github.com/go-logr/logr/blob/master/CHANGELOG.md)
- [Commits](https://github.com/go-logr/logr/compare/v1.4.3...v1.4.4)

---
updated-dependencies:
- dependency-name: github.com/go-logr/logr
  dependency-version: 1.4.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-29 18:21:23 -07:00
houyuwushang
c0adbae99b plugin/cache: preserve monotonic time for TTL expiry (#8346)
Keep cache timestamps and TTL calculations on the time values returned by the cache clock. Converting them with UTC strips Go's monotonic clock reading and can extend cached entries when the wall clock moves backward.

Add a regression test that verifies new cache items retain the original monotonic timestamp.

Fixes #5478.

Signed-off-by: houyuwushang <liuluoqianqiu@outlook.com>
2026-07-29 18:12:56 -07:00
houyuwushang
3c2c33bb50 plugin/file: return referrals after alias resolution (#8341)
Detect zone cuts while following CNAME and DNAME targets so partial answers carry the child NS and glue records instead of returning SERVFAIL or apex authority. Keep AA set for authoritative alias partial answers while clearing it for referral-only responses.

Fixes #6405
Fixes #6627

Signed-off-by: houyuwushang <liuluoqianqiu@outlook.com>
2026-07-29 18:12:07 -07:00
houyuwushang
73cd1efe5b plugin/secondary: support catalog migration and member scoping (#8288)
* plugin/secondary: support catalog zone ownership migration

Signed-off-by: houyuwushang <liuluoqianqiu@outlook.com>

* plugin/secondary: scope catalog member zones

Signed-off-by: houyuwushang <liuluoqianqiu@outlook.com>

---------

Signed-off-by: houyuwushang <liuluoqianqiu@outlook.com>
2026-07-29 18:11:36 -07:00
dependabot[bot]
a3135de7ec build(deps): bump github.com/prometheus/common from 0.70.0 to 0.70.1 (#8359)
Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.70.0 to 0.70.1.
- [Release notes](https://github.com/prometheus/common/releases)
- [Changelog](https://github.com/prometheus/common/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prometheus/common/compare/v0.70.0...v0.70.1)

---
updated-dependencies:
- dependency-name: github.com/prometheus/common
  dependency-version: 0.70.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-29 18:08:04 -07:00
dependabot[bot]
ec6171fb4c build(deps): bump github.com/aws/aws-sdk-go-v2/service/route53 (#8361)
Bumps [github.com/aws/aws-sdk-go-v2/service/route53](https://github.com/aws/aws-sdk-go-v2) from 1.64.1 to 1.65.1.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/s3/v1.64.1...service/s3/v1.65.1)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2/service/route53
  dependency-version: 1.65.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-29 18:07:52 -07:00
dependabot[bot]
3cdff995f5 build(deps): bump actions/checkout from 7.0.0 to 7.0.1 (#8352) 2026-07-29 17:38:00 -07:00
dependabot[bot]
ca0dde47e4 build(deps): bump github.com/prometheus/client_golang (#8354) 2026-07-29 17:37:49 -07:00
dependabot[bot]
9cc107fecc build(deps): bump github.com/quic-go/quic-go from 0.60.0 to 0.61.0 (#8360) 2026-07-29 17:37:31 -07:00