Repository navigation
Releases
v4.0.2
Changed
-
The action image is built on Alpine 3.24.4.
Dockerfile,tests/Dockerfile.smokeandtests/integration/Dockerfile.test-servernow useFROM alpine:3.24.4@sha256:f59abe65...instead of 3.24.3 (#416). The digest is the one Docker Hub lists for the3.24.4tag. Between the two base images onlyapk-tools/libapk(3.0.8 -> 3.0.9) andalpine-releasechange;lftpstays pinned at~4.9.3. Inputs, outputs and behaviour are unchanged. -
Release workflow actions updated:
docker/login-action4.7.0 -> 4.8.0 (#413),sigstore/cosign-installer4.1.2 -> 4.1.3 (#414, installs Cosign 3.1.4) andsoftprops/action-gh-release3.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
Fixed
concurrency_lockover 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 andlftp_settingsdid not reach them. Withssl_verify_certificate: "false"against a server with a self-signed certificate, every lockmkdirfailed withCertificate verification: self-signed certificate, which counted as "lock held": the run waited the fullconcurrency_lock_timeoutand 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 withcould 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
Changed
-
BREAKING:
concurrency_lock_pathandremote_dircan 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 ~andmkdir ~/sendMKDfor the login directory (550, it always exists),mkdir ~/xandmirror -R ... ~/m/send paths under the login directory,cls -la ~lists the login directory. Soconcurrency_lock_path: "~"could never take the lock: every poll got a550, and afterconcurrency_lock_timeoutthe run failed with "another deployment is currently in progress". Both inputs now exit 2 withERROR: <input> starts with "~": <value>; lftp expands a leading ~ to the FTP login directory. ...before connecting, aslocal_diralready 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~bandx/~. (FND-0113) -
The Alpine base image is pinned as tag@digest, so Dependabot PRs show the Alpine version.
Dockerfile,tests/Dockerfile.smokeandtests/integration/Dockerfile.test-serverpinnedalpine@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 useFROM 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 thedockerfile-basegroup still bumps the three files in one PR.tests/acceptance/static.shS13 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. Theverify-tag-reachabilityjob 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-releasevX.Y.Z-rc.Nneeds[X.Y.Z], as forVERSION). The check and the build job's extraction use the same awk program, the build job fails too if the section is empty, and thepublishjob no longer has a generated-notes fallback:fail_on_unmatched_filesis 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
124as the timeout code, but the image runs busyboxtimeout, which kills lftp and leaves143(SIGTERM at the 5-hour cap), or137if 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 lists143as the timeout and keeps137for the SIGKILL; both were measured in the action image. The4 Fatal errorline is removed: lftp 4.9.3 exits only0or1on its own. The1line 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 themax_retriestries. (FND-0051) -
A cancelled run (SIGTERM, SIGINT or SIGHUP) now removes
/home/lftp/.netrcand releases theconcurrency_locklock, 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,.netrcand 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 (inwrite_netrc, before the password is written, and again with the EXIT trap inentrypoint.sh) that exit129,130or143through the EXIT trap, asscripts/verify-tag.shdoes 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_oncereturns the same status as before (lftp's,143/137on the 5-hour timeout, underpipefail), 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 oneconcurrency_lock_poll_intervalwhile waiting for the lock. A signal during the lockmkdirreleases nothing, so a lock dir thatmkdircreated 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 forpodman kill -s TERM,-s INTandpodman stop, with and without--init: exit within a second,.netrcgone, lock dir gone. Theconcurrency_lockdescription 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_recoverynamed 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 lockmkdirsucceeds, so the releaseDELEs the sentinel (harmless if the upload never landed) and runsrmdiron the lock dir. When the upload fails, the name is cleared before the acquire's ownDELE+rmdircleanup, so the release never removes the dir after that cleanup, when it may be another run's. A signal during the lockmkdirstill releases nothing: whether themkdirfailed (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 exits143(130) and leaves no lock dir; before, the lock dir and the sentinel stayed. A signal during amkdiragainst 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 lockmkdiroutput was discarded and any failure counted as "lock held", so a login or connection error waited the fullconcurrency_lock_timeoutand then blamed a concurrent deployment. The output is now read:mkdir: Login failed: ...,Fatal error: max-retries exceeded (Connection refused), a bareFatal error: max-retries exceeded(connect timeout) and an unknown host (Name does not resolve, or glibc'sName or service not known) make the action exit 1 at once withERROR: concurrency lock: lftp could not log in to <server>(orcould not connect to <server>) and lftp's error line, also withconcurrency_lock_timeout: "0". A550and any other failure, including a421or530connection limit and an expired 30-secondtimeout, are still treated as a held lock and polled. Separately, on a server that allowsmkdirbut refusesRMD, the cleanup after a failed sentinel upload and the takeover of a lock dir without a sentinel swallowed the refusedRMD(quote RMDdoes not change lftp's exit code), so every later run timed out with the same misleading message. Both now use lftp'srmdir, which sends the sameRMDand exits non-zero on a refusal; a runner that gives up on a sentinel-less lock dir it could not remove exits 1 withERROR: 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 aconcurrency_lock_timeoutabove 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 theconcurrency_lockdescription 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 sentquote RMD <path>with its output discarded, and lftp exits 0 whenquotegets a550, so on a server that allowsmkdir,putandDELEbut refusesRMD, a successful run left an empty lock dir and nothing in its log said so; the next run waited for its wholeconcurrency_lock_timeoutand, with a timeout of 120 seconds or less (or"0"), blamed another deployment. The release now ends with lftp'srmdir <path>, the same singleRMD, 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...
v3.1.0
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_notifyand, over a real network, the tail of the file. The server replied426 Failure reading network stream., lftp reconnected and resumed, and the log showedfile 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 withmax_retries: 1it failed and left truncated files. The action now negotiates TLS 1.2 at most by default. (#361)
Added
tls_max_versioninput:'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'sssl:priorityhas 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 withtls_max_version: '1.3'. The test server keeps TLS 1.3 enabled. Unit and smoke tests cover the validator and theOPENSSL_CONFswitch.
v3.0.0
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_deprecatedinput, and the warnings for@latest,@main/@masterand 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_locknever takes the lock from a run that is still deploying. A waiter used to take over once the holder's sentinel was older thanconcurrency_lock_timeout(5 minutes by default), and on vsftpd it never saw the sentinel at all (a dot-file hidden fromLIST), 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@v3or@latestresolved to. The image reads it from the repo'sVERSIONfile; theVERSIONbuild arg is gone. server,mirror_verboseandmax_retriesdescriptions 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-artifactv7.0.2 andactions/download-artifactv8.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 cleansays 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
v2.12.1
Bug-fix release for two problems found while testing v2.12.0 against
real servers.
Fixed
dry_run: truefails 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's530. A dry run of a first deploy, to aremote_dirthat 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
v2.12.0
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_retriesdefaults to1. - A wrong password is reported as
530 Login incorrectand classified as permanent (no pointless retries):net_persist_retriesdefaults to0. - lftp's output (transferred files, server errors, the
dry_runplan) is shown in the step log.
Changed
excludeis 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: useexclude.- The
log_fileoutput: it pointed inside the container, which is gone when the step ends. curlfrom the image.
v2.11.14
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
PERMANENTfailure banner now correctly classifies bad-password — pre-fix,lib.sh:656defaultednet:max-retriesto1,action.ymldefaultednet_max_retriesto1, andentrypoint.sh:69defaultedINPUT_NET_MAX_RETRIESto1. When lftp received a server530 Login incorrect, it internally retried once (consuming the inner retry budget); the second attempt often timed out, and lftp's final log line becamemirror: Fatal error: max-retries exceeded— overwriting the original 530.classify_permanent_errorthen found no530 | login authentication failed | login incorrectpattern and silently returned 1 (not permanent). Lowered the lftp-internalnet:max-retriesdefault to0inlib.sh:665(build_ftp_settings),action.yml(net_max_retriesinput default), andentrypoint.sh:69(INPUT_NET_MAX_RETRIESfallback), so the FIRST attempt's server error is preserved in the log. The action's outerINPUT_MAX_RETRIESloop still retries the entire command on transient errors, so transient-error handling is preserved. Added a bats regression test intests/unit/retry.batsand a default-value pin intests/unit/parse.bats. Closes #330.
v2.11.13
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/VERSIONfile mode is now independent of build-host umask — pre-fix,Dockerfile:31-33created/app/VERSIONviaRUN 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 runtimelftpuser couldn't read it,entrypoint.sh:123fell throughcat /app/VERSION 2>/dev/null || echo "unknown"and the deprecation warning reported(image version: unknown). Replaced theRUNwithprintf '%s\n' "$VERSION" > /app/VERSION && chmod 0644 /app/VERSION && chmod 0755 /app/entrypoint.sh.tests/release-smoke.shCheck 3 (already fixed in v2.11.12) catches the regression on a 0077 build host. Closes #311.acquire_lock_with_recoverymktemp-fallback sentinel body now lands at 0600 — pre-fix,lib.sh:1296-1303ranchmod 600 "${_alwr_sentinel_body}"BEFORE the redirect{ printf ... } > "${_alwr_sentinel_body}"that actually created the file. On the fallback path (whenmktempreturns 1) the static filename did not exist whenchmodran, the redirect then created the file with the process umask (022 → 0644), and the sentinel body containingpid/started_at/host=$(hostname)ended up world-readable. Regression of the v2.11.7 #184 fix. Moved thechmodAFTER 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_masksno longer leaks multi-line secrets via partial::add-mask::coverage — pre-fix,lib.sh:512-522interpolated the rawINPUT_PASSWORD/INPUT_USER/INPUT_SERVERinto::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 intests/unit/report.bats. Closes #314.- GITHUB_OUTPUT write no longer aborts the action after a successful mirror — pre-fix,
entrypoint.sh:422-424ranprintf 'log_file=%s\n' "${LOG_FILE}" >> "${GITHUB_OUTPUT}"underset -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 withset +e/ capture rc /set -e/ warn, mirroring theupload_log_artifactpattern atlib.sh:1743-1759. Closes #313.
Chore
make testnow auto-builds the smoke image as a prerequisite — pre-fix,Makefile:121declaredtest: contract unit smoke, buttests/smoke.sh:42-45hard-fails (exit 1) whenSMOKE_IMAGEis not present. A developer following the documented T1 flow (make test, perAGENTS.mdandREADME.md) hit a confusing "smoke image not found" failure. ChangedMakefile:134totest: contract unit build-smoke-image smokeso the dependency chain builds the image transparently. CI is unaffected (it already built the smoke image explicitly before invokingmake smoke). Closes #315.
Documentation
action.ymlconcurrency_lock_pathdescription now enumerates the fullvalidate_pathdeny list — pre-fix, the description listed only.., shell metacharacters, leading dash,!, and", butvalidate_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.ymlexcludeandexclude_deletedescriptions now enumerate the fullvalidate_glob_patterndeny 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 listsnet_timeoutanddns_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.mdECR re-enable recipe rewritten to match the actual v2.11.11 state — pre-fix,README.md:163-166claimed the ECR Public publishing code is "fully present and uncommented" inrelease.yml. As of v2.11.11 #216 the meta-stepifblock, 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-1294stopped 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.9to@v2.11.12— pre-fix, README.md had 9-10 occurrences ofairvzxf/ftp-deployment-action@v2.11.9at lines 79, 94, 114, 115, 375, 465, 530, 558, 638, 828 (and the related:v2.11.9image tags on the "Publishing targets" table). Pin drift had been open since v2.11.10. Closes #322.
Tests
make shellchecknow coverstests/integration/lib/self-signed-cert.shandscripts/verify-tag.sh— pre-fix, the lint target atMakefile:88-90listed 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 fixedtests/release-smoke.sh). The cert helper carries 3 known SC2016 false positives; the invocation uses-e SC2016per-file so the global lint policy is unchanged. Closes #317.tests/contract.shnow mechanically verifies README@vX.Y.Zexample pins match VERSION — pre-fix,tests/contract.sh:171-180only checked thelatest = vX.Y.Zstamp (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 usesgrep -oE 'airvzxf/ftp-deployment-action@v[0-9]+\.[0-9]+\.[0-9]+' README.md | sort -uand 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_FAILUREpath (see #290). - #189, #192, #296 — log-growth and unbounded-runtime concerns. Already labelled
pending-design/pending-humanbecause they require operator decision on the retry-forever semantics. - #180 —
validate_intupper bound. Labelledpending-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.Zpin stamp matches VERSION; new lint coverage fortests/integration/lib/self-signed-cert.shandscripts/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 + 2add_masksmulti-line tests).make smoke: all smoke tests pass (themake testchain now auto-builds the smoke image).
v2.11.12
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_pathnow 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 toextract_netrc_host, whose IPv6 sed produced empty output, thenwrite_netrcemittedmachine login user password(invalid.netrc) and the user saw a confusing530 Login authentication faileddownstream instead of a precise URL-shape error. Added agrep -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 attests/unit/validate.bats:269-302(4 new tests, including the zone-id form[fe80::1%25eth0]regression guard).tests/release-smoke.shCheck 3 now actually checks what its comment claims — pre-fix, the check ran the image withGITHUB_ACTION_REF=v1.3.3(the EOL branch atlib.sh:444-452) and grepped the captured log forimage version: unknown. The EOL branch does NOT emit the substringimage version:(only the@latest/@master/v1.4*-v1.9*branches do, atlib.sh:432andlib.sh:456), so the grep never matched regardless of whether the build-arg VERSION reached/app/VERSION. Replaced with a direct read of/app/VERSIONvia--entrypoint catand an explicit empty/unknownfailure path. Catches the v2.3.0-style build-arg regression that the original Check 3 was supposed to catch.
Fixed
validate_durationrejects leading zeros — symmetric withvalidate_int's v2.11.7 #253 fix — pre-fix,validate_duration's firstcaseadmitted00and01sas valid durations; the validate_int fix (reject00/01/ etc. to preserve the retry-forever sentinel) was never mirrored to validate_duration. lftp 4.9.3 happens to treat00sas0s, 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 attests/unit/validate.bats:425-446.stop_ftp_servernow removes the per-scenario bind-mount source directory —tests/integration/lib/common.sh:258-272. Pre-fix, the EXIT trap (scenario_setupline 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.mdis 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.shno longer references the deletedscenario 06— the file header (lines 3-9) and three inline comments (lines 65, 95, 105-110) referred toscenario 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 realassert_action_successcall (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.shstamps no longer depend on hardcoded line numbers —SECURITY.mdstamp now usesgrep -oE 'latest = ...'withhead -n 1instead ofsed -n '7p'; a future maintainer who adds another row to the supported-versions table no longer shifts line 7 silently.CHANGELOG.mdstamp now reads the whole file with an awk thatexits at the first match; the previous1,30pbound silently broke if a maintainer expanded the preamble past line 30.tests/smoke.shTest 16 pins the image-version field —tests/smoke.sh:355-360. Thev1.4*-v1.9*branch inlib.sh:454-456emits(image version: %s)where%sis the value baked into/app/VERSIONat build time. Pre-fix, Test 16 only grepped forv2 is available; a regression that turned_edw_img_verinto the literal stringunknownwould still pass. The new check fails if the captured log containsimage version: unknown.
Chore
_alwr_attemptis no longer dead code inacquire_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.batssetup drops the deadBATS_TESTDIRbranch —BATS_TESTDIR(no underscores) is not a bats-core variable; the correct name isBATS_TEST_DIRNAME. The pre-fix branch always evaluated to a non-empty but invalid path so theBATS_TEST_DIRNAMEfallback always fired. Aligning with the other 6 .bats files.tests/integration/scenarios/10-stale-lock-recovery.sh:194has a space before>&2— wascat "${_log}>&2. POSIX still parses it, but the surrounding"${_log}" >&2form 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).