joelhooks / joelhooks/agent-secrets
feat: Add 1Password adapter
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 109
- Forks
- 7
- Avg merge
- 2h 37m
- Merged PRs (30d)
- 1
Description
Summary
Add 1Password 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/onepassword/onepassword.gointernal/adapters/onepassword/onepassword_test.go
Spec
type OnePasswordAdapter struct {
binary string // path to op CLI, default "op"
}
func New() *OnePasswordAdapter
func (o *OnePasswordAdapter) Pull(project, scope string) (map[string]string, error)
func (o *OnePasswordAdapter) Name() string // returns "1password"
CLI command
# project = vault name, scope = item name or tag
op item get <scope> --vault <project> --format json
# Parse fields into key=value pairs
Register in cmd/secrets/adapter.go
case "1password":
return onepassword.New(), nil
Test pattern
Follow internal/adapters/vercel/vercel_test.go - mock the CLI, test JSON parsing.
.secrets.json example
{
"source": "1password",
"project": "Development",
"scope": "my-app-secrets",
"ttl": "1h"
}
Acceptance
-
secrets envworks with"source": "1password" - Tests pass without requiring actual 1Password CLI
- Error message when op CLI not installed
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with internal/adapters/adapter.go and the Vercel implementation and tests in internal/adapters/vercel. Implement the adapter and tests in internal/adapters/onepassword, then register it in cmd/secrets/adapter.go. Done means secrets env accepts source 1password, JSON parsing is tested without the CLI, and the missing op CLI produces an error.
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
- 48/100