MAQPNADocs

maqpna cp

Copy files to and from a session's sandbox (kubectl cp; privileged, audited)

Run agents

Synopsis#

maqpna cp SESSION:PATH LOCAL | LOCAL SESSION:PATH [-n NS] [-c CONTAINER]

Description#

cp runs kubectl cp against the session's pod (it uses pods/exec and tar in the container) after the RBAC check and records a PrivilegedAccess event. To read the files an agent produced through the gateway, use maqpna session files.

Flags#

FlagTypeDescriptionDefault
-c, --containerstringsame as -cagent
-n, --namespacestringnamespacedefault

The global flags (--context, -o, --no-color, ...) work with every command.

Examples#

maqpna cp coder-x1:/workspace/report.md ./report.md -n team-a

Exit codes#

CodeMeaning
0success
1error (the message says what failed, with a hint when there is one)
2usage error: unknown flag, missing argument or bad value; the synopsis is printed
3a check failed, a change is blocked, or a result did not match (tamper, policy mismatch) (not used by this command)