Repository navigation
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Context
We ran a review from the point of view of a platform engineer adding an agent step to self-hosted CI (GitHub Enterprise, GitLab, Jenkins, Kubernetes jobs) behind a proxy, with an internal model gateway, who then has to pass a security review. These gaps block that path. Each one was checked against v0.5.4.
Security
- Tool subprocesses inherit the whole environment.
bashpassesprocess.envto every command (packages/cli/src/tool/bash.ts). In CI that includes model keys and tokens, so an allowed command such asgh pr comment *can expand$ANTHROPIC_API_KEYinto public output. Options:- an env allowlist for tool subprocesses;
- stripping known secret variables;
- at least documenting the behaviour.
- Allow rules don't inspect the arguments of an allowed command.
git diff --no-index /proc/self/environ /dev/nullandgh pr comment --body-file <any path>both pass. Document this, and consider argument-aware patterns. - Project config and plugins are loaded from the checked-out repository. This covers
.aictrl/,.opencode/,plugin/*.tsandbun installof.aictrl/package.json.AICTRL_DISABLE_PROJECT_CONFIGexists, but nothing in the README describes it as the setting for untrusted checkouts. - No
SECURITY.mdor disclosure policy. Support is only via Discord.
Limits
- No run-level caps. There's no flag for max steps, wall-clock time or cost budget; max steps exists only as the agent
stepsconfig. Related: Add configurable session cost budget with guardrail events #32 (session cost budget). - The stream idle timeout is off by default.
AICTRL_MODEL_STREAM_IDLE_TIMEOUT_MS=0means a stalled call can hang until the job's own timeout. Consider a non-zero default in headless mode.
Distribution and verification
- No standalone binaries, checksums or published container image. GitHub Releases have no assets, and
packages/cli/Dockerfileisn't published. - npm provenance exists but isn't documented. Add
npm audit signatures, or the equivalent check, to the README.
Documentation (the code supports it; the README doesn't say)
- Model endpoints: an OpenAI-compatible gateway (
provider.<id>.options.baseURL,timeout), plus Azure, Bedrock and Vertex config examples. - Proxy and custom CA:
HTTPS_PROXYandNODE_EXTRA_CA_CERTS. - On-disk state: the SQLite file at
$XDG_DATA_HOME/aictrl/aictrl.dbandlog/, how to clean them up, and how to pointXDG_*at a per-job directory on persistent runners or read-only root filesystems. - Default permissions: what is allowed with no config (bash is allowed), and a recommended deny-all baseline for CI.
- Egress: the full list, including the project plugin
bun installand the remote.well-knownconfig fetch. - CI examples: GitLab CI, Jenkins and a Kubernetes CronJob.
- Stale or inconsistent text:
- the README quick start uses an old model id;
EVENTS.mdshowscostas an object inmessage_completebut a number insubagent_message_complete;- the README says the CLI "switches" mode in a non-TTY;
packages/cli/package.jsonhas its homepage set toaictrl.aiand contains filler scripts.
The aictrl.dev/agent quickstart already uses the safe pattern. It splits the job into three steps: fetch the diff with the GitHub token only, review with the model key only (read/glob/grep, AICTRL_DISABLE_PROJECT_CONFIG=true), and post with the GitHub token only. A README recipe should match it.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
Activity