Skip to content

feat: never store credentials in plain text - #124

Open
Pijukatel wants to merge 3 commits into
masterfrom
claude/actor-runtime-api-key-security-wm77zx
Open

Pijukatel wants to merge 3 commits into
masterfrom
claude/actor-runtime-api-key-security-wm77zx

Conversation

@Pijukatel

Copy link
Copy Markdown
Collaborator

Login tokens, proxy passwords and Actors' secret passphrases are no longer readable from the data directory.
They are sealed with a key file the runtime creates there, readable only by the runtime's own user and root.
Existing data directories are rewritten on start.


Generated by Claude Code

Tokens are kept in the data directory only as SHA-256 hashes (for login lookup)
and sealed with AES-256-GCM under a key held outside it, in a Docker volume at
/var/lib/actor-runtime. Proxy passwords are sealed too. Existing data
directories are rewritten on start.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017ocuAKna7JTHKG2TiQi5qH
Drop the separate key volume: the runtime creates the key file in its data
directory with mode 0600, re-tightened on every start, so only the runtime's
own user and root can open the sealed tokens.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017ocuAKna7JTHKG2TiQi5qH
The passphrase protecting each Actor's private key is no longer stored in plain
text, so the data directory alone no longer opens secret env vars or secret
input. Existing records are rewritten on start; only outdated ones are touched.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017ocuAKna7JTHKG2TiQi5qH
@Pijukatel
Pijukatel marked this pull request as ready for review November 18, 2026 08:57

@apify-factory apify-factory left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just one note.

🏭 Factory review — ℹ️ not auto-approved

This change was reviewed but cannot be auto-approved: a gate failed, so the review cannot end in an approval.

check result
Static gates ❌ 11/16 — pr-open-and-ready, max-files, max-lines, deny-globs, no-risky-content
Review findings ❌ not clean
Reviewer escalation ❌ Adds at-rest encryption of tokens, proxy passwords and Actor secret passphrases with a new key file, and rewrites existing stored user and Actor records on start.
Juror 1 — claude-sonnet-5-5, adversarial ⏭️ skipped — a gate failed
Why it was not auto-approved

Failed gates:

  • pr-open-and-ready: PR is a draft
  • max-files: 22 changed files, limit 10
  • max-lines: 582 changed lines (+539/-43), limit 200
  • deny-globs: skills/actor-runtime/SKILL.md matches skills/**; src/services/secrets.ts matches src/services/secrets.ts
  • no-risky-content: src/services/actor-codec.ts: credential-like assignment (credential-assignment); src/services/user-codec.ts: credential-like assignment (credential-assignment); src/services/users.ts: credential-like assignment (credential-assignment); test/integration/actor-secret-sealing.test.ts: credential-like assignment (credential-assignment); test/integration/token-sealing.test.ts: credential-like assignment (credential-assignment)

The comments above are the review itself; this section only explains the approval decision. Push a change and request @apify-factory again to re-run it, or ask a human to review.

Reviewed e6697f7e7 · workflow run

Comment thread src/services/users.ts Resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants