Store and Materialize Encrypted File Secrets in ironrun
Store files like service account JSON as encrypted secrets. ironrun materializes them in isolated owner-only temp directories only while a command runs.
File secrets let you store entire credential files — JSON service accounts, TLS certificates, SSH keys — as encrypted blobs inside the ironrun vault. Unlike string secrets, these files need to be present on disk for the child process to read them. ironrun handles this safely: it writes the file to a unique owner-only temporary directory immediately before the command starts, injects only the path as an environment variable, and deletes the directory when the command finishes.
Navigate to the environment where you want to store the file, open the action palette (/), and choose Add secret file. ironrun prompts for the source path, reads the file, encrypts it, and stores the blob in the vault. The source file is not deleted.
On startup, ironrun scans for and removes validated stale temp directories left behind by a previous crash or unexpected termination.
Temporary plaintext necessarily exists on disk for the duration of the command. SSD media may not physically erase overwritten sectors even after the directory is deleted. To limit exposure: set a short ttl on commands that use file secrets, and revoke agent leases as soon as the work is done.
{"docsConfig":{"theme":"aspen","$schema":"https://mintlify.com/docs.json","name":"ironrun","colors":{"primary":"#2c9cd4"},"logo":{"light":"https://media.brand.dev/03faf157-ea39-4bc6-9b53-fb2827a3026a.svg","dark":"https://media.brand.dev/03faf157-ea39-4bc6-9b53-fb2827a3026a.svg"},"favicon":"https://icons.duckduckgo.com/ip3/goreportcard.com.ico","navbar":{"primary":{"type":"github","href":"https://github.com/generalized-labs/ironrun"}},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"cilow","hasAudioNarration":false,"actualSubdomain":"cilow","customDomains":["docs.ironrun.dev"],"gitSource":{"type":"github","owner":"mintlify-community","repo":"docs-cilow-6f6ccfc4","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6ae95c528e1cea2a2a518a47:success","clientVersion":"0.0.4111","searchFilterCounts":[{"language":"default","tag":"Documentation","count":25},{"language":"default","tag":"CLI Reference","count":7},{"language":"default","tag":"Guides","count":5},{"language":"default","tag":"Core Concepts","count":4},{"language":"default","tag":"MCP Tools","count":4},{"language":"default","tag":"Get Started","count":3},{"language":"default","tag":"Troubleshooting","count":2}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"guides/file-secrets","slug":"/guides/file-secrets","pageMetadata":{"title":"Store and Materialize Encrypted File Secrets in ironrun","sidebarTitle":"File Secrets","description":"Store files like service account JSON as encrypted secrets. ironrun materializes them in isolated owner-only temp directories only while a command runs.","href":"/guides/file-secrets"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Store files like service account JSON as encrypted secrets. ironrun materializes them in isolated owner-only temp directories only while a command runs.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`File secrets let you store entire credential files — JSON service accounts, TLS certificates, SSH keys — as encrypted blobs inside the ironrun vault. Unlike string secrets, these files need to be present on disk for the child process to read them. ironrun handles this safely: it writes the file to a unique owner-only temporary directory immediately before the command starts, injects only the `,_jsx(_components.strong,{children:`path`}),` as an environment variable, and deletes the directory when the command finishes.`]}),`\n`,_jsx(Heading,{level:`2`,id:`how-it-works`,children:`How it works`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`You declare the file secret in `,_jsx(_components.code,{children:`ironrun.yml`}),` with a `,_jsx(_components.code,{children:`kind: file`}),` entry that specifies the env var name, the safe basename, and which commands may use it.`]}),`\n`,_jsxs(_components.li,{children:[`You store the file’s contents using the TUI’s `,_jsx(_components.strong,{children:`Add secret file`}),` option — the encrypted blob lives in `,_jsx(_components.code,{children:`~/.ironrun/vaults/`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`At execution time, ironrun:`,`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Creates a unique owner-only temp directory `,_jsx(_components.strong,{children:`outside`}),` the repository.`]}),`\n`,_jsxs(_components.li,{children:[`Writes the decrypted file with owner-only permissions (`,_jsx(_components.code,{children:`600`}),`).`]}),`\n`,_jsxs(_components.li,{children:[`Injects only the `,_jsx(_components.strong,{children:`path`}),` (e.g. `,_jsx(_components.code,{children:`/tmp/ironrun-abc123/service-account.json`}),`) into the command’s environment as the declared env var.`]}),`\n`,_jsx(_components.li,{children:`Streams output through the redactor, which strips literal contents, base64-encoded forms, and other common encodings of the file’s bytes.`}),`\n`,_jsx(_components.li,{children:`Removes the temp directory after the command succeeds, fails, times out, or is cancelled.`}),`\n`]}),`\n`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`policy-declaration`,children:`Policy declaration`}),`\n`,_jsxs(_components.p,{children:[`Declare the file secret in `,_jsx(_components.code,{children:`ironrun.yml`}),` alongside your string secrets:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`11`,language:`yaml`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`yaml`,children:_jsxs(_components.code,{language:`yaml`,numberOfLines:`11`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`secrets`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` service-account`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` env`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`GOOGLE_APPLICATION_CREDENTIALS`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` kind`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`file`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` filename`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`service-account.json`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` allow`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`integration-test`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`commands`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` - `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`id`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`integration-test`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` argv`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`go`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`test`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`./integration/...`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` secrets`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`service-account`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`]})})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`env`}),` — the environment variable the command reads to find the file path.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`kind: file`}),` — marks this as a file secret rather than a string value.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`filename`}),` — the safe basename that ironrun uses when writing the temp file.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`allow`}),` — command IDs that are permitted to receive this file secret.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`secrets`}),` — on the command, lists which secret entries to materialize.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`adding-the-file-through-the-tui`,children:`Adding the file through the TUI`}),`\n`,_jsx(_components.p,{children:`Open the terminal control room:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`ironrun`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Navigate to the environment where you want to store the file, open the action palette (`,_jsx(_components.code,{children:`/`}),`), and choose `,_jsx(_components.strong,{children:`Add secret file`}),`. ironrun prompts for the source path, reads the file, encrypts it, and stores the blob in the vault. The source file is not deleted.`]}),`\n`,_jsx(Heading,{level:`2`,id:`what-ironrun-rejects`,children:`What ironrun rejects`}),`\n`,_jsx(_components.p,{children:`When you add a file secret or at execution time, ironrun validates the source and target:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Symlinks`}),` — rejected; ironrun follows no symlinks.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Path traversal`}),` — filenames containing `,_jsx(_components.code,{children:`..`}),` or `,_jsx(_components.code,{children:`/`}),` are rejected.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Unsafe basenames`}),` — names that would be dangerous in a temp directory (e.g. hidden files with dangerous extensions).`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Permissive source files`}),` — source files readable by group or others are rejected.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Duplicate targets`}),` — two secrets cannot write to the same path in the same temp directory.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`redaction-coverage`,children:`Redaction coverage`}),`\n`,_jsx(_components.p,{children:`ironrun redacts the following from command output before it reaches the agent:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`The literal bytes of the file’s contents.`}),`\n`,_jsx(_components.li,{children:`Base64-encoded forms (standard and URL-safe).`}),`\n`,_jsx(_components.li,{children:`Hex-encoded forms.`}),`\n`,_jsx(_components.li,{children:`URL-encoded forms.`}),`\n`,_jsx(_components.li,{children:`A warn-only entropy scan flags high-entropy tokens that match the shape of the file’s content but slip through other patterns.`}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`cleanup-and-stale-remnants`,children:`Cleanup and stale remnants`}),`\n`,_jsx(_components.p,{children:`The temp directory is removed after:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`The command exits (success or failure).`}),`\n`,_jsxs(_components.li,{children:[`The command is killed due to a `,_jsx(_components.code,{children:`ttl`}),` timeout.`]}),`\n`,_jsx(_components.li,{children:`The command is cancelled by a revocation.`}),`\n`]}),`\n`,_jsx(_components.p,{children:`On startup, ironrun scans for and removes validated stale temp directories left behind by a previous crash or unexpected termination.`}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`Temporary plaintext necessarily exists on disk for the duration of the command. SSD media may not physically erase overwritten sectors even after the directory is deleted. To limit exposure: set a short `,_jsx(_components.code,{children:`ttl`}),` on commands that use file secrets, and revoke agent leases as soon as the work is done.`]})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Store and Materialize Encrypted File Secrets in ironrun","sidebarTitle":"File Secrets","description":"Store files like service account JSON as encrypted secrets. ironrun materializes them in isolated owner-only temp directories only while a command runs.","href":"/guides/file-secrets"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"How it works","slug":"how-it-works","depth":2,"children":[]},{"title":"Policy declaration","slug":"policy-declaration","depth":2,"children":[]},{"title":"Adding the file through the TUI","slug":"adding-the-file-through-the-tui","depth":2,"children":[]},{"title":"What ironrun rejects","slug":"what-ironrun-rejects","depth":2,"children":[]},{"title":"Redaction coverage","slug":"redaction-coverage","depth":2,"children":[]},{"title":"Cleanup and stale remnants","slug":"cleanup-and-stale-remnants","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"cilow","siteName":"ironrun","title":"Store and Materialize Encrypted File Secrets in ironrun - ironrun","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-07-16T22:56:37.964Z","originalFileLocation":"guides/file-secrets.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Store files like service account JSON as encrypted secrets. ironrun materializes them in isolated owner-only temp directories only while a command runs.\">\u003cmeta data-mint-head name=\"application-name\" content=\"ironrun\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/x-icon\" sizes=\"180x180\" href=\"https://icons.duckduckgo.com/ip3/goreportcard.com.ico\">\u003clink data-mint-head rel=\"icon\" type=\"image/x-icon\" sizes=\"32x32\" href=\"https://icons.duckduckgo.com/ip3/goreportcard.com.ico\">\u003clink data-mint-head rel=\"icon\" type=\"image/x-icon\" sizes=\"16x16\" href=\"https://icons.duckduckgo.com/ip3/goreportcard.com.ico\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"https://icons.duckduckgo.com/ip3/goreportcard.com.ico\">\u003cmeta data-mint-head property=\"og:title\" content=\"Store and Materialize Encrypted File Secrets in ironrun - ironrun\">\u003cmeta data-mint-head property=\"og:description\" content=\"Store files like service account JSON as encrypted secrets. ironrun materializes them in isolated owner-only temp directories only while a command runs.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"ironrun\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.ironrun.dev/guides/file-secrets\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://cilow.mintlify.site/_mintlify/api/og/v2?division=Guides\u0026amp;title=Store+and+Materialize+Encrypted+File+Secrets+in+ironrun\u0026amp;description=Store+files+like+service+account+JSON+as+encrypted+secrets.+ironrun+materializes+them+in+isolated+owner-only+temp+directories+only+while+a+command+runs.\u0026amp;theme=b40159a21ea31816dc485d9a\u0026amp;signature=e4cdaae90a8b6806a97c3bdcfa08ca253ed9517b456b790579fa2248f7f9cab3\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Store and Materialize Encrypted File Secrets in ironrun - ironrun\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Store files like service account JSON as encrypted secrets. ironrun materializes them in isolated owner-only temp directories only while a command runs.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://cilow.mintlify.site/_mintlify/api/og/v2?division=Guides\u0026amp;title=Store+and+Materialize+Encrypted+File+Secrets+in+ironrun\u0026amp;description=Store+files+like+service+account+JSON+as+encrypted+secrets.+ironrun+materializes+them+in+isolated+owner-only+temp+directories+only+while+a+command+runs.\u0026amp;theme=b40159a21ea31816dc485d9a\u0026amp;signature=e4cdaae90a8b6806a97c3bdcfa08ca253ed9517b456b790579fa2248f7f9cab3\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"https://mintlify.s3.us-west-1.amazonaws.com/cilow/_generated/favicon/browserconfig.xml?v=3\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"ironrun\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#2c9cd4\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.ironrun.dev/guides/file-secrets\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/guides/file-secrets.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.ironrun.dev/#organization\",\"name\":\"ironrun\",\"url\":\"https://docs.ironrun.dev\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://media.brand.dev/03faf157-ea39-4bc6-9b53-fb2827a3026a.svg\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.ironrun.dev#website\",\"name\":\"ironrun\",\"url\":\"https://docs.ironrun.dev\",\"publisher\":{\"@id\":\"https://docs.ironrun.dev/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.ironrun.dev/guides/file-secrets#webpage\",\"url\":\"https://docs.ironrun.dev/guides/file-secrets\",\"name\":\"Store and Materialize Encrypted File Secrets in ironrun\",\"description\":\"Store files like service account JSON as encrypted secrets. ironrun materializes them in isolated owner-only temp directories only while a command runs.\",\"dateModified\":\"2026-07-16T22:56:37.964Z\",\"isPartOf\":{\"@id\":\"https://docs.ironrun.dev#website\"},\"breadcrumb\":{\"@id\":\"https://docs.ironrun.dev/guides/file-secrets#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.ironrun.dev/guides/file-secrets#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Guides\",\"item\":\"https://docs.ironrun.dev/guides/agent-setup\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Store and Materialize Encrypted File Secrets in ironrun\",\"item\":\"https://docs.ironrun.dev/guides/file-secrets\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.ironrun.dev/guides/file-secrets#article\",\"headline\":\"Store and Materialize Encrypted File Secrets in ironrun\",\"name\":\"Store and Materialize Encrypted File Secrets in ironrun\",\"description\":\"Store files like service account JSON as encrypted secrets. ironrun materializes them in isolated owner-only temp directories only while a command runs.\",\"url\":\"https://docs.ironrun.dev/guides/file-secrets\",\"mainEntityOfPage\":{\"@id\":\"https://docs.ironrun.dev/guides/file-secrets#webpage\"},\"dateModified\":\"2026-07-16T22:56:37.964Z\",\"publisher\":{\"@id\":\"https://docs.ironrun.dev/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.ironrun.dev#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"ironrun\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"ironrun\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/guides/file-secrets.md","siteName":"ironrun","nav":{"global":null,"tabs":[{"tab":"Documentation","groups":[{"group":"Get Started","pages":[{"title":"ironrun: Sealed Command Execution for AI Coding Agents","sidebarTitle":"Introduction","href":"/introduction"},{"title":"Get Started with ironrun: Sealed Execution in 5 Minutes","sidebarTitle":"Quickstart","href":"/quickstart"},{"title":"ironrun Installation: Linux, macOS, Windows, and Go","sidebarTitle":"Installation","href":"/installation"}]},{"group":"Core Concepts","pages":[{"title":"How ironrun Keeps Your Secrets Out of Agent Context","sidebarTitle":"How It Works","href":"/concepts/how-it-works"},{"title":"Configuring Approved Commands and Secrets in ironrun.yml","sidebarTitle":"Policy File","href":"/concepts/policy-file"},{"title":"Managing Project Environments and Secrets in ironrun","sidebarTitle":"Environments","href":"/concepts/environments"},{"title":"Secret Providers: Where ironrun Resolves Credentials","sidebarTitle":"Secret Providers","href":"/concepts/secret-providers"}]},{"group":"Guides","pages":[{"title":"Configure ironrun MCP for Claude Code, Cursor, Codex","sidebarTitle":"Agent Setup","href":"/guides/agent-setup"},{"title":"Import .env Files into ironrun's Encrypted Secret Vault","sidebarTitle":"Importing Secrets","description":"Import credentials from existing .env files into ironrun's encrypted vault using ironrun import. Keys are previewed; values are never displayed.","href":"/guides/importing-secrets"},{"title":"Store and Materialize Encrypted File Secrets in ironrun","sidebarTitle":"File Secrets","href":"/guides/file-secrets"},{"title":"Using ironrun for Sealed Execution in GitHub Actions","sidebarTitle":"GitHub Actions","description":"Run sealed commands in GitHub Actions. ironrun blocks fork pull requests from accessing secrets and redacts all credential values from CI job logs.","href":"/guides/ci-github-actions"},{"title":"Automate ironrun via the Local Unix Socket HTTP API","sidebarTitle":"Local API","href":"/guides/local-curl-api"}]},{"group":"CLI Reference","pages":[{"title":"ironrun CLI Reference — Commands and Command Groups","sidebarTitle":"Overview","href":"/cli/overview"},{"title":"ironrun run — Execute a Sealed Command with Secrets","sidebarTitle":"run","href":"/cli/run"},{"title":"ironrun env — Manage Encrypted Named Environments","sidebarTitle":"env","href":"/cli/env"},{"title":"ironrun trust — Manage Trusted Agent Workspace Sessions","sidebarTitle":"trust","href":"/cli/trust"},{"title":"ironrun agents — Manage Agent Leases and Secret Requests","sidebarTitle":"access","href":"/cli/access"},{"title":"ironrun share — Encrypt Secrets for Safe Chat Transmission","sidebarTitle":"capsule","href":"/cli/capsule"},{"title":"ironrun audit — Verify the Tamper-Evident Execution Log","sidebarTitle":"audit","href":"/cli/audit"}]},{"group":"MCP Tools","pages":[{"title":"ironrun MCP Server: Value-Blind Tools for AI Agents","sidebarTitle":"Overview","href":"/mcp/overview"},{"title":"run_sealed: Execute Commands Without Exposing Secrets","sidebarTitle":"run_sealed","href":"/mcp/run-sealed"},{"title":"Workspace Access MCP Tools: Request and Check Trust","sidebarTitle":"Workspace Access","href":"/mcp/workspace-access"},{"title":"propose_command — Let Agents Suggest New Policy Commands","sidebarTitle":"propose_command","href":"/mcp/propose-command"}]},{"group":"Troubleshooting","pages":[{"title":"ironrun doctor — Diagnose Configuration Problems","sidebarTitle":"Doctor","href":"/troubleshooting/doctor"},{"title":"Common ironrun Errors: Causes and Fixes for Developers","sidebarTitle":"Common Errors","href":"/troubleshooting/common-errors"}]}]}]},"basePath":"","title":"Store and Materialize Encrypted File Secrets in ironrun - ironrun","buildId":"dpl_DqYu5MPb49gWBBbUGgpHQUmCHY3P","deploymentId":"dpl_DqYu5MPb49gWBBbUGgpHQUmCHY3P","dynamics":[],"chunks":[]}