Commit Graph

2880 Commits

Author SHA1 Message Date
Valentin Maerten
89b8d04ad9 refactor(remote): rename HostHeaders to HeadersByHost
The type is a map of host to headers, not a flat header set. Name it after
that shape, and rename the fields carrying it to authHeadersByHost so the
lookup step is visible at every call site.

Claude-Session: https://claude.ai/code/session_01KNPMznEzkRpxFZMLisjdqL
2026-08-29 21:47:53 +02:00
Valentin Maerten
bff4f97d7e refactor(remote): template header values instead of expanding ${VAR}
Aligns the syntax with the rest of Task, and lets functions compose: a
Basic credential no longer needs its base64 computed by hand. The strict
expansion this replaces was already gone, so nothing is lost by the
switch.

Only functions resolve — the configuration file is read before any
Taskfile, so {{.VAR}} has nothing to read and produces an empty header.
That is documented next to the option.
2026-08-23 12:35:55 +02:00
Valentin Maerten
8fc344f6cc test(remote): drop the RemoteExists status tests 2026-08-23 12:25:36 +02:00
Valentin Maerten
433e2bb2ee docs(remote): add the remote.auth schema to next-schema-taskrc.json
Same next/latest split as the docs: schema.json and schema-taskrc.json
are the frozen copies served for the released version.
2026-08-23 12:24:58 +02:00
Valentin Maerten
d10460ab61 docs(remote): document remote.auth under next instead of latest
The rebase landed these additions in the frozen copy served for the
released version, because the commits predated the split into next and
latest.
2026-08-23 12:22:38 +02:00
Valentin Maerten
1b7e67d1f9 refactor(remote): carry the auth headers as taskfile.HostHeaders
map[string]map[string]string named neither key. The type already existed
in taskfile; package task reaches it through setup.go, so only an import
was missing. Callers keep passing a plain map literal, which stays
assignable to a named map type.
2026-08-23 12:11:55 +02:00
Valentin Maerten
a41df4a127 fix(remote): report a 401 instead of a missing Taskfile
RemoteExists treated every non-200 as an absent file, so a server
refusing the credentials ended up as "No Taskfile found", sending the
user to check the URL rather than the token. A 401 now stops the search
and reports the status code; the default names need the same credentials,
so trying them would only add rejected requests. A 403 is left alone: it
is also what a server without directory listing answers for a readable
directory.

That message being correct, the expansion no longer needs to refuse an
undefined variable: os.ExpandEnv is inlined and expandEnv is gone. The
`$$` escape goes with it, so a literal value can no longer hold a `$`
followed by a name; a secret carried in an environment variable is
unaffected, as os.Expand never rescans what it substituted.

Header names are validated with httpguts.ValidHeaderFieldName, the table
net/http itself uses, rather than a denylist that let X-Foo(bar) through.
golang.org/x/net was already in the module graph, so tidy only moves it
to the direct block.

Finally, node_http_auth.go becomes http_auth.go: the node_ prefix is for
files defining a Node type, and this one holds the auth concern of
HTTPNode plus hostMatches, which reader.go uses for trusted hosts.
2026-08-23 12:11:55 +02:00
Valentin Maerten
8d3a20ef33 chore(remote): trim the remote.auth comments 2026-08-23 12:11:08 +02:00
Valentin Maerten
8a93190060 feat(remote): add remote.auth to send HTTP headers when downloading Taskfiles
Authenticating a remote Taskfile so far meant putting the credential in the
include URL, where it leaks into error messages and the confirmation prompt.
`remote.auth` configures free-form headers per host instead, so the URL stays
safe to commit. Values may reference environment variables with ${VAR}.

The headers are injected by a RoundTripper rather than set on the request:
that covers the HEAD probe RemoteExists issues before the GET, and keeps a
cross-host redirect from carrying the credentials. They are resolved when the
request is about to be made, so a cached or offline run does not require a
token it will never send.
2026-08-23 12:11:08 +02:00
Valentin Maerten
b250872d9a feat(release): publish the snap package with goreleaser (#2989) 2026-08-21 15:31:53 +02:00
Valentin Maerten
920de654cd feat(release): announce releases on discord (#2988) 2026-08-21 15:31:53 +02:00
Valentin Maerten
30c998136d feat(release): generate the GitHub release body from the changelog (#2987)
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-08-21 15:31:52 +02:00
Valentin Maerten
dd4463ec60 chore: bump minimum Go to 1.26 and adopt 1.26 features (#2920) 2026-08-20 12:24:04 +02:00
Valentin Maerten
325e3188f0 chore(deps): update golangci-lint to 2.13.0 (#2991) 2026-08-20 12:24:03 +02:00
Valentin Maerten
6170794c9f chore: re-write changelog for 3.53.1 2026-08-18 18:08:21 +02:00
Valentin Maerten
ff3372fc50 v3.53.1 v3.53.1 2026-08-18 17:23:38 +02:00
Valentin Maerten
beed208fd3 fix(ci): run pnpm install from the website directory 2026-08-18 17:20:25 +02:00
Valentin Maerten
3ae5b31b90 chore: remove accidentally committed worktree gitlink 2026-08-18 17:16:46 +02:00
Valentin Maerten
1530114bca v3.53.0 v3.53.0 2026-08-18 17:14:13 +02:00
Valentin Maerten
2449247e16 feat(homebrew): migrate from Formula to Cask (#2702) 2026-08-18 17:11:28 +02:00
Valentin Maerten
ed98857afc docs: credit JetBrains for the open source licenses (#2984) 2026-08-18 17:00:39 +02:00
Pete Davison
4bcc01fb1e feat: add blog post for remote taskfiles (#2974) 2026-08-18 16:59:59 +02:00
renovate[bot]
d9d0e44cf4 chore(deps): update all non-major dependencies (#2978)
Co-authored-by: Valentin Maerten <maerten.valentin@gmail.com>
2026-08-18 16:58:43 +02:00
Valentin Maerten
936b90c625 feat(website): serve the released docs from a versioned copy (#2979) 2026-08-17 14:15:03 +02:00
Pete Davison
b7836eb893 feat: set content type for example remote taskfile 2026-08-16 11:46:30 +00:00
Pete Davison
c1a804e0bc chore: changelog for #2981 2026-08-16 11:32:28 +00:00
Pete Davison
1d0719b65a feat: load the sidebar data and titles/excerpts from the blog post markdown document and its frontmatter (#2981) 2026-08-16 12:14:08 +01:00
Valentin Maerten
1868ad2969 fix(remote): verify the pinned checksum on remote cache hits (#2980) 2026-08-14 19:46:08 +02:00
Pete Davison
50c5ae18e4 fix: minor adjustment to blog post description to match post edit 2026-08-13 21:49:48 +00:00
Pete Davison
908c6b96da feat: update pull request template (#2975) 2026-08-13 18:05:29 +01:00
Andrey Nering
4c144fed8f chore(website): add blog post about the github secure oss fund (#2977)
Co-authored-by: Pete Davison <pd93.uk@outlook.com>
Co-authored-by: Valentin Maerten <maerten.valentin@gmail.com>
2026-08-13 13:18:56 -03:00
Valentin Maerten
813bc8a11d chore: drop the breaking-change marker from the #2898 changelog entry 2026-08-13 16:01:18 +02:00
Valentin Maerten
695df18231 fix(completion): drop the REMOTE_TASKFILES marker from the Nushell flags (#2973) 2026-08-13 16:00:46 +02:00
Pete Davison
9491f1683c chore: add changelog for #2906 2026-08-13 13:51:02 +00:00
Pete Davison
87076b165f feat: enable remote taskfiles (#2906) 2026-08-13 14:38:10 +01:00
Valentin Maerten
37898d9102 feat: command timeouts (#2898) 2026-08-11 22:09:25 +02:00
Valentin Maerten
993508c782 feat(completion): add Nushell completions (#2966) 2026-08-11 20:12:17 +02:00
Valentin Maerten
e8404ea6e0 chore: changelog for #2942 2026-08-11 08:48:45 +02:00
Anil Natha
5e6b365fe8 fix: resolved escape key presses not canceling prompt for required vars (#2942)
Co-authored-by: Anil Natha <anilnatha@AnilsMacStudio.lan>
2026-08-11 08:47:21 +02:00
Andrei Bodrov
49e929d353 feat: Improve verbose logging - print failed task (#2240) 2026-08-10 22:52:08 +02:00
Valentin Maerten
bc37f113f1 chore: changelog for #2240 2026-08-10 22:51:54 +02:00
Valentin Maerten
8e89cf879c chore: changelog for #2967 2026-08-10 20:30:33 +02:00
Valentin Maerten
2ea5d7dee2 chore: changelog for #2044 2026-08-10 20:30:32 +02:00
Valentin Maerten
65471a2ef8 fix: align command schema definitions with the parser (#2967) 2026-08-10 20:25:05 +02:00
Gerard O'Keefe
49eea5352c fix: schema does not allow ignore_error in a for loop (#2044)
Co-authored-by: O'Keefe, Gerard (Gerry) <gokeefe@atb.com>
2026-08-10 18:22:25 +00:00
Valentin Maerten
2cdadb4c99 chore: changelog for #2956 2026-08-10 19:50:50 +02:00
shaurya
85aca587b1 fix: accept []string and []int in matrix refs (#2956)
Co-authored-by: no-hup <shauryaj.finance@gmail.com>
2026-08-10 19:47:58 +02:00
Nithwin
d4fd591dd3 docs: fix incorrect godoc comments on WithVersionCheck and WithFailfast (#2963) 2026-08-10 17:45:37 +00:00
renovate[bot]
a80bee87cb chore(deps): update all non-major dependencies (#2943) 2026-08-10 16:39:06 +02:00
Valentin Maerten
678bd6ba62 chore: changelog for #2959 2026-08-10 16:27:19 +02:00