HUB
Sign inSign up
syncret logo

fayrus/syncret

Sponsored OSS

By Fayrus

•Updated 6 days ago

Syncs dependent secrets and redeploys ECS services when an AWS Secrets Manager secret rotates

Image
Networking
Security
0

10K+

fayrus/syncret repository overview

⁠Syncret

Syncret reacts to AWS Secrets Manager rotation and change events. It copies selected fields into a dependent secret, forces ECS services to redeploy with the new values, or both, and can notify Google Chat or Slack after every run. It runs as an AWS Lambda container function triggered by EventBridge.

⁠Quick reference

⁠Use with AWS Lambda

Lambda cannot pull images from Docker Hub, and it needs a single-architecture image. Copy the image to your ECR repository for the architecture your function uses:

ECR=123456789012.dkr.ecr.us-east-1.amazonaws.com/syncret
VERSION=v0.6.0

aws ecr get-login-password --region us-east-1 \
  | docker login --username AWS --password-stdin 123456789012.dkr.ecr.us-east-1.amazonaws.com

docker pull --platform linux/arm64 fayrus/syncret:$VERSION   # or linux/amd64
docker tag fayrus/syncret:$VERSION $ECR:$VERSION
docker push $ECR:$VERSION

The platform you copy must match the function's --architectures value. The AWS deployment guide⁠ covers the IAM role, the function, and the EventBridge rule.

⁠Which tag should I use?

Every release publishes four tags that point to the same image:

TagExampleMoves whenUse it for
vX.Y.Zv0.6.0NeverProduction. Reproducible copies to ECR; upgrade deliberately.
vX.Yv0.6Each patch releasePicking up the latest fixes within a minor version when you copy.
vXv0Each minor and patch releasePicking up fixes and new features without breaking changes when you copy.
latestEvery release, including major versionsTrying Syncret out. Avoid in production.

Your function runs the image you copied to ECR, so a moving tag only changes what you get the next time you copy it. All tags are on the Tags⁠ page, and each release is described in the GitHub Releases⁠.

⁠Configuration

Set environment variables on the Lambda function. At least one action is required:

SYNCRET_PROVIDER=aws
SYNCRET_AWS_REGION=us-east-1
SYNCRET_AWS_SECRET_ARN=<source secret ARN>      # the secret whose events trigger Syncret

# Action 1: copy fields into a dependent secret
SYNCRET_AWS_TARGET_SECRET_ARN=<target secret ARN>
SYNCRET_TARGET_SECRET_KEYS=password             # or source_key:target_key, comma-separated

# Action 2: redeploy ECS services
SYNCRET_AWS_ECS_FORCE_DEPLOY=true
SYNCRET_AWS_ECS_CLUSTER=my-cluster
SYNCRET_AWS_ECS_SERVICES=backend,worker

# Optional notifications (webhook URLs contain credentials; treat them as secrets)
SYNCRET_GCHAT_WEBHOOK=<Google Chat incoming webhook URL>
SYNCRET_SLACK_WEBHOOK=<Slack incoming webhook URL>

Invalid configuration fails at startup with a message naming the variable. See the configuration reference⁠ for every option.

⁠Image security

  • Runtime image: Chainguard static⁠, containing only the statically linked syncret binary; no shell or package manager.
  • Each release is built once, and every platform of that exact image is scanned with Trivy before it is pushed; a release with fixable HIGH or CRITICAL vulnerabilities is not published.
  • Go code, modules, and the toolchain are checked with govulncheck on every pull request and daily.
  • Report vulnerabilities privately as described in the security policy⁠.

⁠License

Apache License 2.0. See LICENSE⁠.

Tag summary
Recent tags
Content type
Image
Digest
sha256:a607c5d41…
Size
6.2 MB
Last updated
6 days ago
docker pull fayrus/syncret:latest
This week's pulls