Skip to content

Releases

v4.0.2

Choose a tag to compare

@github-actions github-actions released this 16 Nov 23:14
v4.0.2
37a0604

Changed

  • The action image is built on Alpine 3.24.4. Dockerfile, tests/Dockerfile.smoke and tests/integration/Dockerfile.test-server now use FROM alpine:3.24.4@sha256:f59abe65... instead of 3.24.3 (#416). The digest is the one Docker Hub lists for the 3.24.4 tag. Between the two base images only apk-tools/libapk (3.0.8 -> 3.0.9) and alpine-release change; lftp stays pinned at ~4.9.3. Inputs, outputs and behaviour are unchanged.

  • Release workflow actions updated: docker/login-action 4.7.0 -> 4.8.0 (#413), sigstore/cosign-installer 4.1.2 -> 4.1.3 (#414, installs Cosign 3.1.4) and softprops/action-gh-release 3.0.3 -> 3.0.4 (#415). Each is pinned by the commit SHA of its tag. These steps run only when a release is published; the action itself does not use them.

v4.0.1

Choose a tag to compare

@github-actions github-actions released this 03 Nov 15:51
v4.0.1
6c95507

Fixed

  • concurrency_lock over FTPS with a self-signed certificate never got the lock. The lock's lftp calls (mkdir, the sentinel upload and refresh, the release) used fixed retry settings and none of the run's own: ftp_ssl_allow, ssl_verify_certificate, ssl_check_hostname, the passive mode and lftp_settings did not reach them. With ssl_verify_certificate: "false" against a server with a self-signed certificate, every lock mkdir failed with Certificate verification: self-signed certificate, which counted as "lock held": the run waited the full concurrency_lock_timeout and then reported another deployment in progress (seen with v4.0.0 against vsftpd; no earlier release passed these settings to the lock either). The lock calls now start with the same settings as the mirror, followed by their own shorter retry and timeout values, and a rejected certificate fails the lock at once with could not verify the TLS certificate of <server> instead of being polled. Integration scenario 32 covers FTPS with a self-signed certificate and the lock on.

v4.0.0

Choose a tag to compare

@github-actions github-actions released this 03 Nov 13:32
v4.0.0
f2d328e

Changed

  • BREAKING: concurrency_lock_path and remote_dir can no longer be ~ or start with ~/. Both are passed to lftp without quotes, and lftp 4.9.3 expands a leading ~ in a path argument to the FTP login directory. Measured in the action image against vsftpd: mkdir ~ and mkdir ~/ send MKD for the login directory (550, it always exists), mkdir ~/x and mirror -R ... ~/m/ send paths under the login directory, cls -la ~ lists the login directory. So concurrency_lock_path: "~" could never take the lock: every poll got a 550, and after concurrency_lock_timeout the run failed with "another deployment is currently in progress". Both inputs now exit 2 with ERROR: <input> starts with "~": <value>; lftp expands a leading ~ to the FTP login directory. ... before connecting, as local_dir already does (remote_dir: "~" is reported as ~/ after the trailing slash is added). Give a relative path instead; it already starts at the login directory. A ~ that lftp sends as written stays accepted: ~name (MKD ~name; lftp does not expand ~user), a~b and x/~. (FND-0113)

  • The Alpine base image is pinned as tag@digest, so Dependabot PRs show the Alpine version. Dockerfile, tests/Dockerfile.smoke and tests/integration/Dockerfile.test-server pinned alpine@sha256:... with no tag. Dependabot had no version to compare, and a minor jump (3.23 -> 3.24 in #55, which broke the v2.3.0 build) looked like a routine digest refresh. All three now use FROM alpine:3.24.2@sha256:294b683c..., the same digest as before with its tag added, so the image content does not change. Dependabot updates the tag and the digest together, and the dockerfile-base group still bumps the three files in one PR. tests/acceptance/static.sh S13 now requires the same tag and digest in all three files, and S12 checks that the "Alpine X.Y" in AGENTS.md matches the tag. (FND-0077)

  • Release workflow: a missing or empty CHANGELOG section for the version now fails the release before any image is built. The build job only warned when CHANGELOG.md had no ## [X.Y.Z] section for the tag, and the release was then published with GitHub's generated notes, after the image had already been pushed. The verify-tag-reachability job now reads CHANGELOG.md at the tag commit and fails unless it has a ## [X.Y.Z] heading followed by a section that is not empty or whitespace-only (a pre-release vX.Y.Z-rc.N needs [X.Y.Z], as for VERSION). The check and the build job's extraction use the same awk program, the build job fails too if the section is empty, and the publish job no longer has a generated-notes fallback: fail_on_unmatched_files is now always on. (FND-0030, FND-0036)

Fixed

  • The failure banner now explains the exit code you get when lftp hits the 5-hour cap. Its "Common codes" list gave 124 as the timeout code, but the image runs busybox timeout, which kills lftp and leaves 143 (SIGTERM at the 5-hour cap), or 137 if lftp ignores SIGTERM and is killed 30 s later. So a run that hit the cap showed "Last lftp exit code: 143", a code the list did not mention. The banner now lists 143 as the timeout and keeps 137 for the SIGKILL; both were measured in the action image. The 4 Fatal error line is removed: lftp 4.9.3 exits only 0 or 1 on its own. The 1 line is aligned with the others, and the README timeout paragraph names the two codes. The README now also says the 5-hour cap applies to each lftp attempt and that a timed-out attempt counts as one of the max_retries tries. (FND-0051)

  • A cancelled run (SIGTERM, SIGINT or SIGHUP) now removes /home/lftp/.netrc and releases the concurrency_lock lock, and stops at once instead of after the mirror. Only an EXIT trap did the cleanup, and busybox ash does not run it when a signal kills the shell. As the container's PID 1 (no --init) the shell ignored TERM until the runtime's SIGKILL (podman stop: exit 137 after 10 s, .netrc and lock dir left behind) and handled INT only after the mirror had finished; with --init, TERM killed the shell at once and INT after the mirror, both without the cleanup. The lock then blocked every later run for up to 6 hours. The action now installs HUP, INT and TERM traps (in write_netrc, before the password is written, and again with the EXIT trap in entrypoint.sh) that exit 129, 130 or 143 through the EXIT trap, as scripts/verify-tag.sh does since FND-0024. The mirror pipeline (timeout ... lftp ... | tee -a LOG) now runs in the background and the shell waits for it, so a signal is handled at once: the trap sends SIGTERM to lftp and tee, waits for them, then the EXIT trap releases the lock and removes the .netrc. A second signal during that cleanup is ignored, so it cannot cut the release short. run_lftp_once returns the same status as before (lftp's, 143/137 on the 5-hour timeout, under pipefail), and the log file is still appended to. A signal during another step still takes effect when that step ends: after at most 30 seconds for an lftp call of the lock code (lock acquire or refresh), at most 45 seconds for the retry backoff (30 s ± 15 s jitter), or one concurrency_lock_poll_interval while waiting for the lock. A signal during the lock mkdir releases nothing, so a lock dir that mkdir created stays without a sentinel and is taken over after 120 seconds; a signal during the sentinel upload releases the lock since FND-0108 (entry below). SIGKILL runs no cleanup. Checked in the action image against vsftpd for podman kill -s TERM, -s INT and podman stop, with and without --init: exit within a second, .netrc gone, lock dir gone. The concurrency_lock description and the README no longer promise a release "on SIGINT" without these limits. (FND-0097, FND-0002)

  • concurrency_lock: a run cancelled during the sentinel upload now releases the lock. acquire_lock_with_recovery named the sentinel for the release only after the upload had returned, and the shell handles a signal only when the running command ends. A SIGTERM or SIGINT during the upload therefore ran the EXIT trap with no sentinel name, the release made no lftp call (#188), and the lock dir with a fresh sentinel stayed on the server, so later runs waited until it was older than 6 hours. The name is now set as soon as the lock mkdir succeeds, so the release DELEs the sentinel (harmless if the upload never landed) and runs rmdir on the lock dir. When the upload fails, the name is cleared before the acquire's own DELE + rmdir cleanup, so the release never removes the dir after that cleanup, when it may be another run's. A signal during the lock mkdir still releases nothing: whether the mkdir failed (another run's lock) or created the dir is not known yet, so a dir it created stays without a sentinel and is taken over after 120 seconds. Checked in the action image against vsftpd, with the upload held by an lftp wrapper: podman kill -s TERM (and -s INT) during the upload now exits 143 (130) and leaves no lock dir; before, the lock dir and the sentinel stayed. A signal during a mkdir against another run's lock leaves that lock untouched. (FND-0108)

  • concurrency_lock: a wrong password, an unreachable server, or a lock dir the server will not let the action remove no longer ends as "another deployment is currently in progress". The lock mkdir output was discarded and any failure counted as "lock held", so a login or connection error waited the full concurrency_lock_timeout and then blamed a concurrent deployment. The output is now read: mkdir: Login failed: ..., Fatal error: max-retries exceeded (Connection refused), a bare Fatal error: max-retries exceeded (connect timeout) and an unknown host (Name does not resolve, or glibc's Name or service not known) make the action exit 1 at once with ERROR: concurrency lock: lftp could not log in to <server> (or could not connect to <server>) and lftp's error line, also with concurrency_lock_timeout: "0". A 550 and any other failure, including a 421 or 530 connection limit and an expired 30-second timeout, are still treated as a held lock and polled. Separately, on a server that allows mkdir but refuses RMD, the cleanup after a failed sentinel upload and the takeover of a lock dir without a sentinel swallowed the refused RMD (quote RMD does not change lftp's exit code), so every later run timed out with the same misleading message. Both now use lftp's rmdir, which sends the same RMD and exits non-zero on a refusal; a runner that gives up on a sentinel-less lock dir it could not remove exits 1 with ERROR: lock dir <path> exists without a sentinel and could not be removed (RMD refused or failed) and how to fix it, and the run whose upload failed adds that the lock dir could not be removed either. A later run tries the takeover only after 120 seconds, so it reports this only with a concurrency_lock_timeout above that. The release at the end of a run is covered by the FND-0105 entry below. This replaces the "a login or connection error looks like a held lock" note added to the README and the concurrency_lock description for FND-0005. (FND-0005, FND-0092)

  • concurrency_lock: a lock dir that the release at the end of a run cannot remove is now reported in that run's log. The release in the EXIT trap still sent quote RMD <path> with its output discarded, and lftp exits 0 when quote gets a 550, so on a server that allows mkdir, put and DELE but refuses RMD, a successful run left an empty lock dir and nothing in its log said so; the next run waited for its whole concurrency_lock_timeout and, with a timeout of 120 seconds or less (or "0"), blamed another deployment. The release now ends with lftp's rmdir <path>, the same single RMD, whose exit code shows a refusal, a failure, or a dir that is not empty. On a non-zero exit it prints one line, `::warnin...

Read more

v3.1.0

Choose a tag to compare

@github-actions github-actions released this 14 Oct 02:40
v3.1.0
682e17e

FTPS uploads to servers that negotiate TLS 1.3 no longer reset at the
end of each file. No workflow change is needed: the fix is the new
default.

Fixed

  • FTPS to a TLS 1.3 server: uploads were truncated or many times slower. lftp 4.9.3 closes each data connection without reading the session tickets a TLS 1.3 server sends after the handshake. The kernel then resets the connection and drops what lftp had not sent: its TLS close_notify and, over a real network, the tail of the file. The server replied 426 Failure reading network stream., lftp reconnected and resumed, and the log showed file size increased during transfer. Measured from a home connection to a TLS 1.3 vsftpd: a deploy took 786 s instead of 13 s, and with max_retries: 1 it failed and left truncated files. The action now negotiates TLS 1.2 at most by default. (#361)

Added

  • tls_max_version input: '1.2' (default) or '1.3'. Set '1.3' only for a server that refuses TLS 1.2; it brings back the behaviour above. Other values exit 2. The cap is applied through OpenSSL (/app/openssl-tls12.cnf), because lftp's ssl:priority has no effect on its OpenSSL build. (#361)

Tests

  • Scenario 30 reads the TLS version vsftpd logs for each connection (debug_ssl=YES): TLS 1.2 by default, TLS 1.3 with tls_max_version: '1.3'. The test server keeps TLS 1.3 enabled. Unit and smoke tests cover the validator and the OPENSSL_CONF switch.

v3.0.0

Choose a tag to compare

@github-actions github-actions released this 13 Oct 23:43
v3.0.0
272f579

Major release. The only breaking change is the removed
fail_on_deprecated input: delete it from your workflow if you set it
(see "Upgrading" in the README). @v3 is the new major alias; v2.x is
end-of-life and @v2 stays on v2.12.1.

Removed

  • BREAKING: the fail_on_deprecated input, and the warnings for @latest, @main/@master and v1 refs. A workflow pinned to a v1 tag runs v1 code, so the end-of-life check could never fire. A workflow that still sets the input gets GitHub's "Unexpected input" warning and deploys as before. (#324)

Fixed

  • concurrency_lock never takes the lock from a run that is still deploying. A waiter used to take over once the holder's sentinel was older than concurrency_lock_timeout (5 minutes by default), and on vsftpd it never saw the sentinel at all (a dot-file hidden from LIST), so it took over at once. A sentinel now counts as abandoned only after 6 hours (GitHub's maximum job time); before that the waiter fails after its timeout with an error that names the sentinel and how to clear it. (#250)
  • A dry run no longer prints the server's 200 NOOP ok. above the plan. (#357)

Changed

  • The first line of every run is ftp-deployment-action vX.Y.Z, so a log shows which release @v3 or @latest resolved to. The image reads it from the repo's VERSION file; the VERSION build arg is gone.
  • server, mirror_verbose and max_retries descriptions say what the code does. (#189, #200, #201)
  • Support policy: only v3.x is maintained; v2.x and v1.x are end-of-life (SECURITY.md, issue forms).
  • Release workflow: actions/upload-artifact v7.0.2 and actions/download-artifact v8.0.2. (#359)

Tests

  • The FTPS integration tests no longer fail at random: vsftpd ran as PID 1 in the test container and crashed on every run; it now runs under an init, and a crash fails the test. The v2.12.1 notes credited this fix to #349; the fix is #358. (#138)
  • Integration ports can be overridden by env; make clean says when there is no container runtime. (#161, #223)
  • New checks fail when SECURITY.md or an issue form names another major line than VERSION, when a file links the removed ROADMAP.md, or when AGENTS.md describes a different image than the Dockerfile.

Docs

  • Dead ROADMAP links removed; AGENTS.md records the design decisions and describes the image as the Dockerfile builds it (no curl, lftp~4.9.3). SECURITY.md no longer claims @v2 is stuck on v2.0.x. (#237, #238)

v2.12.1

Choose a tag to compare

@github-actions github-actions released this 08 Oct 02:26
v2.12.1
4ce5b07

Bug-fix release for two problems found while testing v2.12.0 against
real servers.

Fixed

  • dry_run: true fails when the server cannot be reached. It used to print a full upload plan and succeed for a wrong host, port or a firewall that blocks the runner. A dry run now connects and logs in, so a wrong password also fails it, with the server's 530. A dry run of a first deploy, to a remote_dir that does not exist yet, still works. (#341)
  • When the server never replies (a firewall that drops packets, a wrong host), lftp only says max-retries exceeded. The failure banner now explains that there was no reply and tells you to check the address, port and firewall. GitHub-hosted runners connect from Azure IP ranges, which some hosters block. (#342)

Tests

  • The FTPS integration tests no longer fail at random: the harness's readiness probe made the test server crash. Leftover references to the inputs removed in v2.12.0 are gone from tests and docs. (#138, #343)

v2.12.0

Choose a tag to compare

@github-actions github-actions released this 06 Oct 04:17
v2.12.0
8845f76

Repair release. Tags v2.0.1 through v2.11.14 fail to build on the
user's runner; this release builds again and makes the defaults work.

Fixed

  • The image builds again on every runner: apk packages are pinned by version (lftp~4.9.3), not by Alpine revision, so Alpine rotating a package no longer breaks the build.
  • The action no longer hangs with the default settings: net_max_retries defaults to 1.
  • A wrong password is reported as 530 Login incorrect and classified as permanent (no pointless retries): net_persist_retries defaults to 0.
  • lftp's output (transferred files, server errors, the dry_run plan) is shown in the step log.

Changed

  • exclude is a comma-separated list of shell globs (*.map, *.bak, node_modules/); matching files are neither uploaded nor deleted. Breaking for anyone using the regex syntax introduced in v2.11.2.

Removed

  • upload_log_on_failure: it posted to a GitHub endpoint that does not exist and never uploaded anything.
  • exclude_delete: use exclude.
  • The log_file output: it pointed inside the container, which is gone when the step ends.
  • curl from the image.

v2.11.14

Choose a tag to compare

@airvzxf airvzxf released this 07 Sep 03:52
v2.11.14
c866afb

Hardening batch v2.11.14 (F2 audit round post-v2.11.13). One
MEDIUM-severity classification regression found during live
GitHub Actions validation against a real FTP/FTPS server: the
"PERMANENT" failure banner did not fire for bad-password because
lftp's internal retry overwrote the server's "530 Login
incorrect" with "max-retries exceeded" before
classify_permanent_error could see it. See #330 for the full
writeup and reproduction.

Fixed

  • PERMANENT failure banner now correctly classifies bad-password — pre-fix, lib.sh:656 defaulted net:max-retries to 1, action.yml defaulted net_max_retries to 1, and entrypoint.sh:69 defaulted INPUT_NET_MAX_RETRIES to 1. When lftp received a server 530 Login incorrect, it internally retried once (consuming the inner retry budget); the second attempt often timed out, and lftp's final log line became mirror: Fatal error: max-retries exceeded — overwriting the original 530. classify_permanent_error then found no 530 | login authentication failed | login incorrect pattern and silently returned 1 (not permanent). Lowered the lftp-internal net:max-retries default to 0 in lib.sh:665 (build_ftp_settings), action.yml (net_max_retries input default), and entrypoint.sh:69 (INPUT_NET_MAX_RETRIES fallback), so the FIRST attempt's server error is preserved in the log. The action's outer INPUT_MAX_RETRIES loop still retries the entire command on transient errors, so transient-error handling is preserved. Added a bats regression test in tests/unit/retry.bats and a default-value pin in tests/unit/parse.bats. Closes #330.

v2.11.13

Choose a tag to compare

@github-actions github-actions released this 06 Sep 20:40
v2.11.13
a46c5d6

Hardening batch v2.11.13 (F2 audit round post-v2.11.12). Closes 16
follow-up findings from the 2026-09-06 F2 audit swarm (8 subagents in
parallel): 5 LOW-severity defence-in-depth code fixes, 1 MEDIUM
build/dev-tooling fix, 4 MEDIUM docs drifts, 4 LOW docs drifts, 1 LOW
shellcheck lint target gap, 1 MEDIUM contract test gap. See EPIC #327
for the full audit backlog.

Fixed

  • /app/VERSION file mode is now independent of build-host umask — pre-fix, Dockerfile:31-33 created /app/VERSION via RUN echo "$VERSION" > /app/VERSION && /bin/chmod +x /app/entrypoint.sh, leaving the VERSION file's mode to whatever the build-time umask allowed (0644 under Docker/BuildKit's 0022 default, 0600 under a stricter 0077 host). When the file ended up 0600 and the runtime lftp user couldn't read it, entrypoint.sh:123 fell through cat /app/VERSION 2>/dev/null || echo "unknown" and the deprecation warning reported (image version: unknown). Replaced the RUN with printf '%s\n' "$VERSION" > /app/VERSION && chmod 0644 /app/VERSION && chmod 0755 /app/entrypoint.sh. tests/release-smoke.sh Check 3 (already fixed in v2.11.12) catches the regression on a 0077 build host. Closes #311.
  • acquire_lock_with_recovery mktemp-fallback sentinel body now lands at 0600 — pre-fix, lib.sh:1296-1303 ran chmod 600 "${_alwr_sentinel_body}" BEFORE the redirect { printf ... } > "${_alwr_sentinel_body}" that actually created the file. On the fallback path (when mktemp returns 1) the static filename did not exist when chmod ran, the redirect then created the file with the process umask (022 → 0644), and the sentinel body containing pid / started_at / host=$(hostname) ended up world-readable. Regression of the v2.11.7 #184 fix. Moved the chmod AFTER the redirect; added a bats test (tests/unit/lock.bats) that forces the mktemp fallback and asserts the resulting file's mode is 0600. Closes #312.
  • add_masks no longer leaks multi-line secrets via partial ::add-mask:: coverage — pre-fix, lib.sh:512-522 interpolated the raw INPUT_PASSWORD / INPUT_USER / INPUT_SERVER into ::add-mask::<value>\n. If the value contained a CR/LF (intentional or copy-paste artifact), the runner's ::add-mask:: directive masked only the first line and the remainder surfaced verbatim in the workflow log. Refactored into a 3-name loop that strips CR/LF and the rest of the C0 control range (tr -d '\r\n' | tr -d '[:cntrl:]') before emitting the directive. Added 2 bats tests in tests/unit/report.bats. Closes #314.
  • GITHUB_OUTPUT write no longer aborts the action after a successful mirror — pre-fix, entrypoint.sh:422-424 ran printf 'log_file=%s\n' "${LOG_FILE}" >> "${GITHUB_OUTPUT}" under set -e. If the file became unwritable (ENOSPC, chmod 000 by a misconfigured runner, fd leaked from a dead worker, read-only fs on a self-hosted runner), the script aborted AFTER the mirror had succeeded, marking the workflow run as failed for a side-channel metadata write. Follow-up to v2.11.8 #191 (which guarded the env-unset half). Bracketed the write with set +e / capture rc / set -e / warn, mirroring the upload_log_artifact pattern at lib.sh:1743-1759. Closes #313.

Chore

  • make test now auto-builds the smoke image as a prerequisite — pre-fix, Makefile:121 declared test: contract unit smoke, but tests/smoke.sh:42-45 hard-fails (exit 1) when SMOKE_IMAGE is not present. A developer following the documented T1 flow (make test, per AGENTS.md and README.md) hit a confusing "smoke image not found" failure. Changed Makefile:134 to test: contract unit build-smoke-image smoke so the dependency chain builds the image transparently. CI is unaffected (it already built the smoke image explicitly before invoking make smoke). Closes #315.

Documentation

  • action.yml concurrency_lock_path description now enumerates the full validate_path deny list — pre-fix, the description listed only .., shell metacharacters, leading dash, !, and ", but validate_path (lib.sh:274-394) also rejects ASCII space (v2.11.8 #174), embedded newlines (v2.11.3.1 #246), [[:cntrl:]] control characters, $ (pre-v2.5.0), unbalanced IPv6 brackets (v2.11.10 #295), and empty [] brackets (v2.11.12). Re-drift of closed #271. Closes #316.
  • action.yml exclude and exclude_delete descriptions now enumerate the full validate_glob_pattern deny list — same drift class as #316 for the glob validator. Added mention of embedded newlines, [[:cntrl:]] control characters, and a leading -. Closes #318.
  • README.md "Numeric inputs reject leading zeros" block now lists net_timeout and dns_fatal_timeout — pre-fix, the block listed 8 inputs (max_retries, mirror_verbose, ftp_nop_interval, net_max_retries, net_persist_retries, dns_max_retries, concurrency_lock_timeout, concurrency_lock_poll_interval) but missed the two duration-validated inputs (net_timeout, dns_fatal_timeout) that the v2.11.12 F2 audit also extended to reject leading zeros. Closes #320.
  • README.md ECR re-enable recipe rewritten to match the actual v2.11.11 state — pre-fix, README.md:163-166 claimed the ECR Public publishing code is "fully present and uncommented" in release.yml. As of v2.11.11 #216 the meta-step if block, the two ECR login steps, and the SBOM attestation step are all under # DISABLED: preambles. Re-drift of closed #300. Rewrote the section to enumerate the four sites and the three-step re-enable procedure; cross-references #212 as the canonical runbook. Closes #321.
  • CHANGELOG.md link-reference footer now covers v2.11.9 through v2.11.12 — pre-fix, the footer block at CHANGELOG.md:1270-1294 stopped at [2.11.0]; the four newer version headings (lines 8, 46, 84, 136) had no matching [X.Y.Z]: definitions, so external readers saw headings that should be clickable but rendered as plain text. Re-drift of closed #235 / #264. Added the four missing compare-links. Closes #319.
  • 9 README example pin occurrences updated from @v2.11.9 to @v2.11.12 — pre-fix, README.md had 9-10 occurrences of airvzxf/ftp-deployment-action@v2.11.9 at lines 79, 94, 114, 115, 375, 465, 530, 558, 638, 828 (and the related :v2.11.9 image tags on the "Publishing targets" table). Pin drift had been open since v2.11.10. Closes #322.

Tests

  • make shellcheck now covers tests/integration/lib/self-signed-cert.sh and scripts/verify-tag.sh — pre-fix, the lint target at Makefile:88-90 listed 7 files explicitly but missed the openssl cert helper used by FTPS scenarios 03/04 and the local tag-signature re-verification script. Same family of gap as #228 (which fixed tests/release-smoke.sh). The cert helper carries 3 known SC2016 false positives; the invocation uses -e SC2016 per-file so the global lint policy is unchanged. Closes #317.
  • tests/contract.sh now mechanically verifies README @vX.Y.Z example pins match VERSION — pre-fix, tests/contract.sh:171-180 only checked the latest = vX.Y.Z stamp (which README does not have). The 9-occurrence pin drift from #322 (now fixed) had to be caught at the audit table. Added a check that uses grep -oE 'airvzxf/ftp-deployment-action@v[0-9]+\.[0-9]+\.[0-9]+' README.md | sort -u and asserts the unique value equals $VER. Closes #326.

Out of scope (deferred to a follow-up)

  • #323, #324, #325 — three INPUT_* integration e2e coverage gaps (INPUT_DRY_RUN, INPUT_FAIL_ON_DEPRECATED, INPUT_UPLOAD_LOG_ON_FAILURE). These are test-coverage gaps that overlap with the umbrella issue #230 / #231 and need a design decision on what a passing scenario looks like for the always-broken INPUT_UPLOAD_LOG_ON_FAILURE path (see #290).
  • #189, #192, #296 — log-growth and unbounded-runtime concerns. Already labelled pending-design / pending-human because they require operator decision on the retry-forever semantics.
  • #180 — validate_int upper bound. Labelled pending-design / pending-human.

Validation

  • make lint (shellcheck + actionlint + hadolint): clean.
  • make contract: 6/6 ok (31 inputs match; SECURITY.md / CHANGELOG.md stamps match VERSION; README @vX.Y.Z pin stamp matches VERSION; new lint coverage for tests/integration/lib/self-signed-cert.sh and scripts/verify-tag.sh).
  • make unit: 215/215 passing (was 212 in v2.11.12, +3 for the v2.11.13 batch: 1 mktemp-fallback chmod test + 2 add_masks multi-line tests).
  • make smoke: all smoke tests pass (the make test chain now auto-builds the smoke image).

v2.11.12

Choose a tag to compare

@github-actions github-actions released this 06 Sep 19:32
v2.11.12
a3ea1d6

Hardening batch v2.11.12 (F2 audit round post-v2.11.11). Closes the
HIGH-class bugs from the F2 audit subagent swarm (empty-IPv6-brackets
silent-netrc-corruption class, plus the silently-passing release-smoke
Check 3), tightens validate_duration to reject leading zeros
symmetrically with validate_int (#253), cleans up stale
FTP_DATA_DIR leaks and tests/integration/README.md drift, and
removes three small bits of dead code. See EPIC #309 for the full
audit backlog.

Security

  • validate_path now rejects empty IPv6 brackets — closes the v2.11.10 #295 follow-up — pre-fix, the v2.11.10 balance-count guard accepted BALANCED-but-empty bracket pairs (ftp://[]:21, ftp://[abc[def]ghi]:21). The pre-fix pipeline passed the value through to extract_netrc_host, whose IPv6 sed produced empty output, then write_netrc emitted machine login user password (invalid .netrc) and the user saw a confusing 530 Login authentication failed downstream instead of a precise URL-shape error. Added a grep -oE '\[\]' check after the balance guard; the check fails any input containing an empty [...] pair. Shell-meta / control-char / space checks above already catch the rest of the bracket-content threats. Tests at tests/unit/validate.bats:269-302 (4 new tests, including the zone-id form [fe80::1%25eth0] regression guard).
  • tests/release-smoke.sh Check 3 now actually checks what its comment claims — pre-fix, the check ran the image with GITHUB_ACTION_REF=v1.3.3 (the EOL branch at lib.sh:444-452) and grepped the captured log for image version: unknown. The EOL branch does NOT emit the substring image version: (only the @latest / @master / v1.4*-v1.9* branches do, at lib.sh:432 and lib.sh:456), so the grep never matched regardless of whether the build-arg VERSION reached /app/VERSION. Replaced with a direct read of /app/VERSION via --entrypoint cat and an explicit empty/unknown failure path. Catches the v2.3.0-style build-arg regression that the original Check 3 was supposed to catch.

Fixed

  • validate_duration rejects leading zeros — symmetric with validate_int's v2.11.7 #253 fix — pre-fix, validate_duration's first case admitted 00 and 01s as valid durations; the validate_int fix (reject 00 / 01 / etc. to preserve the retry-forever sentinel) was never mirrored to validate_duration. lftp 4.9.3 happens to treat 00s as 0s, so this is not load-bearing today; the fix is a strict-improvement consistency guard. Added leading-zero branch matching validate_int's shape; tests at tests/unit/validate.bats:425-446.
  • stop_ftp_server now removes the per-scenario bind-mount source directory — tests/integration/lib/common.sh:258-272. Pre-fix, the EXIT trap (scenario_setup line 566: trap stop_ftp_server EXIT) only removed the FTP container; FTP_DATA_DIR=$(mktemp -d -t ftpint.XXXXXX) (line 550) was leaked on every scenario exit. Local dev and self-hosted CI accumulated one stale bind-mount source per scenario per run. The fix unlinks the directory AFTER removing the container (so the bind-mount is detached first). Order documented inline.
  • tests/integration/README.md is no longer a frozen #117-era document — the Layout tree (lines 26-44) now lists scenario 12; the acceptance table (line 178-187) now claims 11 scenarios instead of 5; the "Why variant B" section (lines 113-167) is rewritten to reflect that v2.11.0 closed both #124 and #131 (variant C is now the primary path, scenarios 03 / 04 / 07 / 08 / 09 / 10 / 11 / 12); the "Limitations / follow-ups" section (lines 316-325) no longer cites the closed #124 quirk as a blocker.
  • scenarios/07-self-hosted-home.sh no longer references the deleted scenario 06 — the file header (lines 3-9) and three inline comments (lines 65, 95, 105-110) referred to scenario 06 (deleted in commit 214492e once the bug it reproduced was fixed). Header rewritten to reference #111 directly. The stale "TODO (v2.11.x): enable full upload assertion after #124 lands" comment block (old lines 227-236) is removed and replaced with a real assert_action_success call (line 207-209) — #124 was closed in v2.11.0, so the scenario now exercises the action end-to-end instead of just narrowing on the .netrc write fix.
  • tests/contract.sh stamps no longer depend on hardcoded line numbers — SECURITY.md stamp now uses grep -oE 'latest = ...' with head -n 1 instead of sed -n '7p'; a future maintainer who adds another row to the supported-versions table no longer shifts line 7 silently. CHANGELOG.md stamp now reads the whole file with an awk that exits at the first match; the previous 1,30p bound silently broke if a maintainer expanded the preamble past line 30.
  • tests/smoke.sh Test 16 pins the image-version field — tests/smoke.sh:355-360. The v1.4*-v1.9* branch in lib.sh:454-456 emits (image version: %s) where %s is the value baked into /app/VERSION at build time. Pre-fix, Test 16 only grepped for v2 is available; a regression that turned _edw_img_ver into the literal string unknown would still pass. The new check fails if the captured log contains image version: unknown.

Chore

  • _alwr_attempt is no longer dead code in acquire_lock_with_recovery — lib.sh:1253-1255. The variable was initialised to 0 and $((_alwr_attempt + 1))-incremented at the top of every loop iteration, but no other reference existed. Removed the two lines. Harmless but the cleanup matches the project's "no dead code" hygiene posture.
  • tests/unit/retry.bats setup drops the dead BATS_TESTDIR branch — BATS_TESTDIR (no underscores) is not a bats-core variable; the correct name is BATS_TEST_DIRNAME. The pre-fix branch always evaluated to a non-empty but invalid path so the BATS_TEST_DIRNAME fallback always fired. Aligning with the other 6 .bats files.
  • tests/integration/scenarios/10-stale-lock-recovery.sh:194 has a space before >&2 — was cat "${_log}>&2. POSIX still parses it, but the surrounding "${_log}" >&2 form on lines 177, 183, 205 is the idiomatic shape.

Validation

  • make lint (shellcheck + actionlint + hadolint): clean.
  • make contract: 5/5 ok (31 inputs match; SECURITY.md / CHANGELOG.md / README.md stamps match VERSION).
  • make unit: 212/212 passing (was 207 in v2.11.11, +5 for the v2.11.12 batch: 3 bracket-content tests + 1 leading-zeros test + 1 RFC 6874 zone-id test).
  • make smoke: all smoke tests pass (the v1.5.0 ::notice:: test now also pins the image-version field).