Thanks for your interest in contributing.
This guide follows contribution patterns commonly used across Algolia repositories, adapted for this Go + Vault project.
Opening an issue is one of the best ways to contribute.
Before creating one:
- Search existing issues to avoid duplicates.
- Include your environment details (OS, Go version, Docker version).
- Provide clear reproduction steps.
- Include expected behavior and actual behavior.
- If possible, include a minimal reproducible example.
If you believe you found a security vulnerability, please do not post exploit details publicly first. Follow SECURITY.md and open a private security report through GitHub Security Advisories for this repository.
For any code contribution:
- Open an issue first for non-trivial changes, behavior changes, or API-affecting updates.
- Fork and clone the repository.
- Create a dedicated branch (
fix/<issue-number>orfeat/<short-description>). - Keep changes focused and small.
- Add or update tests.
- Open a pull request against
master.
Then:
- CI checks will run automatically.
- A maintainer will review your pull request.
- Once checks are green and review is approved, the PR can be merged.
Use Conventional Commits:
type(scope): description
Common types:
fix: bug fixesfeat: new featuresrefactor: code changes with no feature or bug fixdocs: documentation onlychore: tooling, CI, maintenance
Examples:
fix(vault): delete secret after successful readfeat(handler): support custom ttl parsingdocs(readme): clarify docker compose usage
If your commit resolves an issue, add a closing keyword in the commit body or PR description, for example Closes #123.
Requirements:
- Go 1.26.1+
- Docker
curljq
Install dependencies:
go mod downloadBuild binary:
go build -o sup3rs3cret cmd/sup3rS3cretMes5age/main.gomake runApp is exposed on http://localhost:8082.
Start Vault:
docker run -d --name vault-dev -p 8200:8200 \
-e VAULT_DEV_ROOT_TOKEN_ID=supersecret \
hashicorp/vault:latestRun app:
VAULT_ADDR=http://localhost:8200 \
VAULT_TOKEN=supersecret \
SUPERSECRETMESSAGE_HTTP_BINDING_ADDRESS=":8080" \
./sup3rs3cretCleanup:
docker stop vault-dev && docker rm vault-devRun these before opening a pull request:
gofmt -s -l .
go vet ./...
golangci-lint run --timeout 300s
make testExpected results:
gofmt -s -l .returns no output.go vet,golangci-lint, andmake testcomplete without errors.
After changes to request handling, Vault integration, or message lifecycle, validate end-to-end behavior:
TOKEN=$(curl -X POST -s -F 'msg=test secret message' http://localhost:8080/secret | jq -r .token)
curl -s "http://localhost:8080/secret?token=$TOKEN" | jq .
curl -s "http://localhost:8080/secret?token=$TOKEN" | jq .The first read should return the secret, and the second read should fail because the message is self-destructing.
- Change is scoped and focused.
- Tests added or updated where needed.
-
gofmt,go vet,golangci-lint, andmake testpass locally. - Docs updated if behavior or configuration changed.
- PR description explains what changed and why.
By contributing, you agree that your contributions are provided under the repository license (MIT).