Juan Denis and Tyler Boykin
9fb0a6cab5
fix(security): close git argument injection in repo_url/app_path/branch (GHSA-8vx6-432p-h62q)
...
An authenticated user of any role could inject arguments into git
subprocesses running as the backend user (root under systemd):
- repo_url was passed unvalidated to git ls-remote/clone, enabling the
ext:: transport (host command execution on git < 2.52 defaults) and
file:// local-repository disclosure (all git versions).
- app_path on POST /deploy/clone was passed without a '--' terminator,
enabling --upload-pack=<cmd> option injection independent of git
version and protocol.*.allow policy.
- branch flowed into 'git fetch origin <branch>' as an unterminated
refspec.
Fix (new app/utils/git_security.py applied at every affected sink):
- repo_url scheme allowlist (https/http/git/ssh + scp-like SSH);
rejects ext::/file://, local paths, leading '-', whitespace.
- '-c protocol.ext.allow=never -c protocol.file.allow=never' pinned on
every remote-touching git call, plus a restrictive GIT_ALLOW_PROTOCOL
in the subprocess environment.
- '--' positional terminator before URL/path/refspec arguments —
co-load-bearing with protocol pinning, which alone does not stop
option injection such as --upload-pack=<cmd>.
- branch/ref validation (leading '-', ref-format metacharacters) for
clone --branch, fetch refspecs and stored deploy configs.
- POST /deploy/clone now confines app_path to the managed apps root,
mirroring how /apps/from-repository derives it server-side.
Adds 31 regression tests; bumps version to 1.7.86.
Reported-by: CaptBoykin
Co-authored-by: Tyler Boykin <25166954+CaptBoykin@users.noreply.github.com >
2026-08-11 19:43:46 -04:00
..
2026-07-09 05:02:54 -04:00
2026-07-08 01:41:22 -04:00
2026-07-03 15:21:23 -04:00
2026-07-01 23:45:22 -04:00
2026-06-15 00:52:30 -04:00
2026-03-23 01:46:41 -04:00
2026-06-12 18:35:35 -04:00
2026-07-02 22:36:34 -04:00
2026-07-25 14:15:29 -04:00
2026-07-25 14:15:29 -04:00
2026-06-01 02:39:05 -04:00
2026-01-22 18:11:22 -05:00
2026-03-04 01:53:46 -05:00
2026-03-04 01:53:46 -05:00
2026-07-09 02:57:23 -04:00
2026-08-09 13:53:59 -04:00
2026-07-18 00:59:19 -04:00
2026-07-07 20:29:25 -04:00
2026-06-22 19:53:23 -04:00
2026-08-05 01:18:11 -04:00
2026-08-05 13:36:33 -04:00
2026-07-07 20:29:25 -04:00
2026-08-05 01:18:11 -04:00
2026-06-22 19:53:23 -04:00
2026-07-08 01:41:31 -04:00
2026-07-03 15:21:48 -04:00
2026-07-09 03:05:08 -04:00
2026-07-09 04:55:53 -04:00
2026-06-23 18:49:04 -04:00
2026-07-09 03:28:08 -04:00
2026-03-23 02:27:52 -04:00
2026-07-25 15:48:36 -04:00
2026-07-09 05:02:54 -04:00
2026-07-08 01:41:43 -04:00
2026-07-15 12:07:14 -04:00
2026-07-02 01:04:03 -04:00
2026-07-21 22:57:33 -04:00
2026-06-23 21:15:16 -04:00
2026-07-07 20:29:31 -04:00
2026-05-05 14:03:31 -04:00
2026-07-01 01:35:44 -04:00
2026-06-19 10:13:50 -04:00
2026-06-19 09:54:40 -04:00
2026-06-23 18:23:47 -04:00
2026-07-25 19:24:41 -04:00
2026-07-08 00:17:55 -04:00
2026-07-27 22:44:40 -04:00
2026-07-25 21:14:50 -04:00
2026-07-25 23:44:34 -04:00
2026-07-25 20:09:05 -04:00
2026-07-25 23:44:34 -04:00
2026-07-03 14:24:15 -04:00
2026-07-03 14:24:03 -04:00
2026-07-03 14:24:02 -04:00
2026-05-31 22:39:57 -04:00
2026-06-19 03:12:07 -04:00
2026-07-23 16:58:46 -04:00
2026-07-25 12:46:59 -04:00
2026-07-25 16:51:44 -04:00
2026-07-22 16:36:58 -04:00
2026-07-01 01:57:07 -04:00
2026-03-23 01:58:28 -04:00
2026-06-22 16:34:17 -04:00
2026-07-09 04:50:16 -04:00
2026-06-22 16:34:17 -04:00
2026-06-22 16:34:17 -04:00
2026-06-23 00:34:55 -04:00
2026-07-25 16:19:33 -04:00
2026-07-25 13:56:09 -04:00
2026-07-31 14:56:37 -04:00
2026-07-04 01:28:16 -04:00
2026-07-04 01:39:53 -04:00
2026-06-24 14:36:08 -04:00
2026-07-09 03:28:08 -04:00
2026-07-04 01:34:54 -04:00
2026-01-28 21:12:55 -05:00
2026-06-22 14:37:44 -04:00
2026-07-11 22:15:10 -04:00
2026-07-01 23:45:22 -04:00
2026-08-05 13:36:33 -04:00
2026-08-05 13:36:33 -04:00
2026-07-20 01:16:16 -04:00
2026-07-22 17:37:20 -04:00
2026-07-03 15:21:34 -04:00
2026-08-02 18:56:33 -04:00
2026-02-10 08:09:38 -05:00
2026-07-31 14:56:37 -04:00
2026-03-23 01:58:28 -04:00
2026-07-08 01:41:13 -04:00
2026-07-07 20:29:24 -04:00
2026-08-11 19:43:46 -04:00
2026-08-11 19:43:46 -04:00
2026-01-21 21:31:57 -05:00
2026-07-03 15:22:05 -04:00
2026-06-19 01:33:45 -04:00
2026-06-19 09:22:18 -04:00
2026-07-31 14:56:37 -04:00
2026-03-04 02:34:49 -05:00
2026-07-22 00:48:13 -04:00
2026-07-22 00:35:33 -04:00
2026-07-26 16:25:12 -04:00
2026-07-03 14:23:50 -04:00
2026-07-03 15:21:23 -04:00
2026-07-01 09:44:48 -04:00
2026-07-25 23:44:34 -04:00
2026-07-10 01:13:14 -04:00
2026-07-04 01:16:29 -04:00
2026-07-04 01:46:34 -04:00
2026-07-10 01:13:14 -04:00
2026-07-10 01:13:14 -04:00
2026-07-04 01:39:53 -04:00
2026-07-07 20:29:24 -04:00
2026-07-03 14:23:11 -04:00
2026-07-08 02:06:01 -04:00
2026-07-25 20:33:34 -04:00
2026-07-02 00:15:10 -04:00
2026-08-05 01:18:23 -04:00
2026-07-11 22:15:10 -04:00
2026-03-23 02:19:33 -04:00
2026-07-03 15:21:09 -04:00
2026-01-22 18:11:22 -05:00
2026-06-21 19:57:02 -04:00
2026-03-04 01:53:46 -05:00
2026-05-31 16:08:32 -04:00
2026-06-19 01:33:45 -04:00
2026-03-04 02:34:49 -05:00
2026-03-04 00:02:52 -05:00
2026-08-05 13:36:20 -04:00
2026-07-26 15:19:08 -04:00
2026-07-04 01:46:34 -04:00
2026-01-19 02:35:18 -05:00
2026-06-18 22:16:00 -04:00
2026-06-23 19:33:44 -04:00
2026-06-23 21:15:16 -04:00
2026-06-22 14:37:44 -04:00
2026-06-15 19:43:00 -04:00
2026-08-05 13:36:20 -04:00
2026-05-01 05:52:11 -04:00
2026-07-08 02:05:39 -04:00
2026-07-25 04:40:10 -04:00
2026-05-01 03:37:33 -04:00
2026-05-01 04:33:08 -04:00
2026-05-01 04:42:30 -04:00
2026-05-01 04:33:08 -04:00
2026-07-10 02:38:46 -04:00
2026-07-08 01:41:43 -04:00
2026-07-31 14:56:37 -04:00
2026-07-25 13:29:12 -04:00
2026-08-09 02:32:55 -04:00
2026-07-25 13:40:00 -04:00
2026-07-25 13:40:00 -04:00
2026-06-20 22:43:38 -04:00
2026-08-02 18:35:25 -04:00
2026-07-08 01:41:43 -04:00
2026-07-03 15:21:23 -04:00
2026-01-22 08:51:31 -05:00
2026-06-23 20:04:04 -04:00
2026-06-12 18:35:35 -04:00
2026-07-22 23:18:33 -04:00
2026-07-08 01:41:31 -04:00
2026-07-08 01:41:31 -04:00
2026-06-23 23:19:41 -04:00
2026-08-04 23:34:02 -04:00
2026-07-01 00:07:00 -04:00
2026-07-08 02:06:01 -04:00
2026-07-08 01:41:22 -04:00
2026-07-01 00:11:18 -04:00
2026-07-10 23:06:09 -04:00
2026-07-03 14:23:29 -04:00
2026-07-09 05:02:54 -04:00
2026-06-22 14:37:44 -04:00
2026-06-21 02:11:47 -04:00
2026-07-07 20:29:31 -04:00
2026-07-08 01:41:13 -04:00
2026-07-01 22:55:11 -04:00
2026-06-22 01:45:15 -04:00
2026-08-06 09:32:40 -04:00
2026-01-22 16:44:06 -05:00
2026-07-20 22:26:19 -04:00
2026-07-23 09:25:01 -04:00
2026-07-23 00:24:00 -04:00
2026-07-23 09:25:01 -04:00
2026-01-18 01:03:56 -05:00
2026-07-09 03:13:54 -04:00
2026-06-20 22:43:38 -04:00
2026-01-17 13:37:40 -05:00
2026-07-09 03:05:08 -04:00
2026-06-19 14:02:24 -04:00
2026-06-20 22:43:38 -04:00
2026-07-04 01:39:53 -04:00
2026-08-05 13:36:33 -04:00
2026-06-21 18:32:25 -04:00
2026-07-03 15:21:23 -04:00