joelhooks / joelhooks/agent-secrets

feat: Add Infisical adapter

Open
#3 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
109
Forks
7
Avg merge
2h 37m
Merged PRs (30d)
1

Description

Summary

Add Infisical as a secret source adapter for project-aware secrets.

Context

The SourceAdapter interface exists in internal/adapters/adapter.go. Vercel is implemented as reference.

Implementation

Files to create
  • internal/adapters/infisical/infisical.go
  • internal/adapters/infisical/infisical_test.go
Spec
type InfisicalAdapter struct {
    binary string // path to infisical CLI, default "infisical"
}

func New() *InfisicalAdapter
func (i *InfisicalAdapter) Pull(project, scope string) (map[string]string, error)
func (i *InfisicalAdapter) Name() string // returns "infisical"
CLI command
infisical export --projectId <project> --env <scope> --format dotenv
Register in cmd/secrets/adapter.go
case "infisical":
    return infisical.New(), nil
Test pattern

Follow internal/adapters/vercel/vercel_test.go - mock the CLI, test env parsing.

.secrets.json example
{
  "source": "infisical",
  "project": "proj_abc123",
  "scope": "production",
  "ttl": "1h"
}

Acceptance

  • secrets env works with "source": "infisical"
  • Tests pass without requiring actual Infisical CLI
  • Error message when infisical CLI not installed

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with internal/adapters/adapter.go and the reference implementation in internal/adapters/vercel, then inspect cmd/secrets/adapter.go for registration. Add the specified Infisical files, follow the Vercel test pattern to mock the CLI and parse its environment output, and verify secrets env works without Infisical installed and reports that missing dependency.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli, security
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.