Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: CI Build Flatpak
on:
push:
branches: ['**']
branches: ['main']
pull_request:
workflow_dispatch:
jobs:
Expand Down
44 changes: 42 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,16 @@ socket.
The default sandbox grants display, IPC, network, portal-based file picking, and
cursor theme access. It does not grant access to the full home directory, SSH
agent, host command execution, host private keys, or broad host filesystems.
SSH-agent access is available through an explicit user override described below.
SSH-agent and GPG-agent access are available through explicit user overrides
described below. These are optional authentication permissions, not requirements
for launching T3 Code or using every provider.

Provider CLIs can be installed into app data with the sandbox-local helper below.
Project directory access still requires an explicit per-path override.

## Sandbox runtime tools

The Flatpak bundles sandbox-local `node`, `npm`, `npx`, `corepack`, `git`, GNU make, OpenSSH client tools, and the `gh`, `glab`, and `tea` hosting CLIs. These are real binaries inside `/app`, not host wrappers. Managed commands precede optional extension commands in `PATH`, without adding host `~/.local/bin`. The manifest does not grant host command execution, home access, or SSH-agent access.
The Flatpak bundles sandbox-local `node`, `npm`, `npx`, `corepack`, `git`, GNU make, OpenSSH client tools, and the `gh`, `glab`, and `gt` hosting CLIs. `gt` is [Gitea CLI](https://gitea.com/gitea/cli), not Graphite. These are real binaries inside `/app`, not host wrappers. Before export, the build checks that all three hosting CLIs exist in `/app/bin` and can print their versions. Managed commands precede optional extension commands in `PATH`, without adding host `~/.local/bin`. The manifest does not grant host command execution, home access, or SSH-agent access.

The launcher configures npm globals and cache under T3 Code app data:

Expand Down Expand Up @@ -129,6 +131,13 @@ Restart T3 Code. On the host, ensure the agent contains the intended key.
Inside T3 Code's terminal, `ssh-add -l` lists the available agent identities.
Git then uses the bundled SSH client for authentication.

The package already includes `--persist=.ssh`, so current builds do not need a
separate persistence override. For an older build without it, use:

```bash
flatpak override --user --persist=.ssh --socket=ssh-auth com.t3tools.t3code
```

Every provider, extension, and project subprocess inherits agent access. An
agent does not normally disclose private-key material, but those processes can
request authentication with its loaded keys while access lasts. Prefer a
Expand Down Expand Up @@ -161,6 +170,37 @@ These revocations cannot undo earlier credential disclosure. Agent access is a
separate permission and does not require any of those directory or D-Bus grants.
See [the disposable SSH boundary checks](tests/ssh-boundary.md) for runtime validation.

## Optional GPG-agent access

If your workflow needs the host GPG agent, for example for GPG-signed Git
commits, grant access and preserve sandbox-local GnuPG state with:

```bash
flatpak override --user --socket=gpg-agent --persist=.gnupg com.t3tools.t3code
```

Restart T3 Code after changing permissions. This preserves the sandbox's own
`~/.gnupg` under `~/.var/app/com.t3tools.t3code/.gnupg`; it does not expose or
import the host's `~/.gnupg`, public keyring, or configuration. The socket grant
alone does not install a GPG client or configure Git signing. Check that `gpg`
is available inside T3 Code's terminal and configure the required public keys
and signing identity there. This package does not explicitly bundle GnuPG, and
the SSH boundary test does not validate GPG signing.

All sandbox processes gain access to the agent socket, including providers,
extensions, and project commands. They can request operations permitted by the
agent; do not assume that every request requires fresh confirmation. Only
enable this permission if you trust those processes with that access.

To revoke GPG-agent access:

```bash
flatpak override --user --nosocket=gpg-agent com.t3tools.t3code
```

Restart T3 Code after revoking access. Revocation does not delete the persisted
sandbox-local GnuPG state.

## Project access

T3 Code's private app data lives under `~/.var/app/com.t3tools.t3code` (see
Expand Down
19 changes: 14 additions & 5 deletions com.t3tools.t3code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,15 @@ command: startt3code
branch: master
separate-locales: false

# Check the finished /app tree before exporting any repository or bundle.
cleanup-commands:
- |
set -eu
for cli in gh glab gt; do
test -x "/app/bin/$cli"
"/app/bin/$cli" --version
done

add-extensions:
com.t3tools.t3code.Tools:
directory: tools
Expand Down Expand Up @@ -92,15 +101,15 @@ modules:
sha256: 4e6c59de9f7ed2f304bf93aad01ea8f8a69584f0450ce90ad696ef81f69c69aa
only-arches: [x86_64]

- name: tea
- name: gt
buildsystem: simple
build-commands:
- install -Dm755 tea-0.16.0-linux-amd64 /app/bin/tea
- install -Dm755 gitea-cli-0.2.0-linux-amd64 /app/bin/gt
sources:
- type: file
url: https://gitea.com/gitea/tea/releases/download/v0.16.0/tea-0.16.0-linux-amd64
dest-filename: tea-0.16.0-linux-amd64
sha256: 9c142c8a0b31485eea2387031c1c404f12b7141075eb4ffbd7ced49441590636
url: https://gitea.com/gitea/cli/releases/download/v0.2.0/gitea-cli-0.2.0-linux-amd64
dest-filename: gitea-cli-0.2.0-linux-amd64
sha256: 220f329cbc08f55f623aa0814000eabab2fe76271c57ffb12fdb6311ab358e36
only-arches: [x86_64]

- name: openssh
Expand Down