Skip to content

feat: add secrets_bag support for sensitive data injection#2

Merged
ratazzi merged 3 commits intomasterfrom
agent
Mar 20, 2026
Merged

feat: add secrets_bag support for sensitive data injection#2
ratazzi merged 3 commits intomasterfrom
agent

Conversation

@ratazzi
Copy link
Copy Markdown
Owner

@ratazzi ratazzi commented Mar 20, 2026

Summary

  • Add --secrets <JSON> CLI parameter for hola provision command
  • Add secrets field support in agent task JSON, with automatic stripping from callback responses
  • New secrets_bag() Ruby DSL function for accessing injected secrets in provision scripts
  • Refactor injectParams into reusable injectJsonGlobal helper

Test plan

  • zig build test passes (includes mruby integration test for secrets_bag + callback stripping test)
  • Manual CLI test: hola provision script.rb --secrets '{"api_key":"sk-123"}' --output plain
  • Verified secrets_bag("key"), nested access, and missing key returns nil
  • Verified callback body does not contain secrets field or values

ratazzi added 3 commits March 20, 2026 20:51
…ibute is set

seteuid/setegid before clone/fetch/open so that libgit2 runs under the
target user identity, fixing safe.directory ownership checks and SSH key
access. Supplementary groups are saved/restored via getgroups/setgroups
to avoid polluting subsequent resources.
When revision is a bare branch name like "master", git_revparse_single
fails because only remote tracking refs exist after fetch. Now tries
the revision as-is first (works for tags, SHAs, qualified refs), then
falls back to {remote}/{revision} for bare branch names.
Add --secrets CLI parameter and agent task JSON "secrets" field to inject
sensitive data (passwords, API keys) into Ruby scripts via secrets_bag().
Secrets are stripped from agent callback responses to prevent leakage.
@ratazzi ratazzi merged commit 666fbaf into master Mar 20, 2026
9 checks passed
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.

1 participant