Verified file execution

Use alpacon exec --file PATH when a reviewer needs to see the script you intend to run. The agent on the server checks the file against the reviewed contents before execution and refuses it if they differ.

Run a script

--file names an absolute path on the server. Choose where the CLI reads the contents:

SourceExampleWhat to prepare
Same path on your machinealpacon exec --file /opt/check.sh my-serverMatching local and server files
A different local pathalpacon exec --file /opt/check.sh --file-from ./check.sh my-serverA local copy matching the server file
Upload a local file firstalpacon exec --file /opt/check.sh --file-from ./check.sh --upload my-serverThe local file; add --overwrite only to replace an existing server file
Read the server filealpacon exec --file /opt/check.sh --from-server my-serverA readable file on the server

The default interpreter is /bin/bash. Use --interpreter with an absolute path to choose another. Put script arguments after the server and --:

bash
alpacon exec --file /opt/check.sh --file-from ./check.sh --interpreter /bin/sh my-server -- --summary

Do not put credentials in the script or its arguments. Have the script read them from an environment variable or a file already on the server. --file does not accept --env. See the CLI reference for flag combinations and upload behavior.

Limits

InputLimit
Script contentsNon-empty UTF-8, at most 65,536 bytes (64 KB)
Generated command line2048 characters for the interpreter, path, and arguments together
Script path1024 characters; absolute path
Interpreter256 characters; absolute path
Each argument1024 characters
Argument count64
Proposed reuse duration1–366 days, within the workspace’s ceiling

See file execution refusals if submission fails.

Standing approvals

--reuse-days N proposes a reuse period; only an approver can grant a standing approval. It covers the exact contents, server, account and group, interpreter, and arguments. Altering any of these requires another review.

The workspace’s Standing approvals settings include Maximum standing approval duration. Request a period within that ceiling. Lowering the ceiling does not shorten approvals already granted.

A Superuser or a member with the admin or security admin role can select Revoke under “Approved file executions” to revoke a standing approval. The next run asks for approval again, and the revoked grant stays in the list for audit.

What file execution needs

The workspace must have AI review enabled, and the server must support checking the file before execution. Ask your administrator if either requirement is refused. With browser login, include command in the work session; --upload and --from-server also require file transfer (webftp). See verified file execution for details.

Last updated: