Skip to content

Choose a tag to compare

@airvzxf airvzxf released this 05 Jul 05:19
v2.0.0
07f0ce7

⚠️ Breaking change

The default of ssl_verify_certificate is flipped from "false" to
"true". The action now refuses to connect to a server with an
invalid, expired, or hostname-mismatched certificate. The previous
default made Man-in-the-Middle attacks trivial; the new default
makes certificate validation safe-by-default.

Migration

If you connect to a server with a self-signed certificate or a
direct IP address, you must opt back into the v1.x behaviour
explicitly:

- uses: airvzxf/ftp-deployment-action@v2
  with:
    server: ${{ secrets.FTP_SERVER }}
    user:   ${{ secrets.FTP_USERNAME }}
    password: ${{ secrets.FTP_PASSWORD }}
    ssl_verify_certificate: 'false'   # opt back into v1.x behaviour

If you want to stay on the v1.x line forever and never see this
default flip, pin to the v1 major-version ref:

- uses: airvzxf/ftp-deployment-action@v1   # currently v1.5.0

Note on direct-IP connections: lftp cannot validate a
hostname against an IP-address certificate, so
ssl_verify_certificate: true requires both a valid certificate
and a hostname (not a bare IP) in the server input.

What ships in v2.0.0

Beyond the breaking default flip, v2.0.0 includes two prior
releases worth of backward-compatible work that landed on master
before this tag:

  • v1.4.0 — P0 quality fixes (PR #40): mirror_verbose and
    lftp_settings are now real inputs, integer inputs are validated
    with clear error messages, retry backoff is exponential with
    jitter, a hard 5-hour timeout wraps the lftp call, input values
    are no longer echoed to the log by default, exit codes are
    documented. CI workflow with shellcheck / actionlint / hadolint
    / contract test / smoke test on every push and PR.

  • v1.5.0 — Security hardening (PR #42): the container now
    runs as the unprivileged lftp user, the password is written
    to ~/.netrc with mode 0600 and removed via an EXIT trap
    (no longer in argv), local_dir / remote_dir are validated
    against path-traversal and shell-metacharacter injection, and
    lftp_settings is lightly sanitised (rejects !, backtick,
    dollar, control characters, more than three ;-chained
    directives).

Both v1.4.0 and v1.5.0 are behaviour-preserving — no input default
changes, no new required inputs, no new required configuration.
The only v2.0.0 behaviour change is the SSL default.

Assets