Keeping your authorization policies in sync with your codebase just got easier. We’re introducing the cerbos-store-action, a new GitHub Action that automates the upload of Cerbos policies directly to your Cerbos Hub Store as part of your CI/CD workflow, should you wish to have finer control over uploads than available with our native GitHub connector built into Hub.
Until now, teams used manual scripts or Docker commands to publish policies via cerbosctl. The new action wraps that entire process into a single, declarative step - bringing first-class Cerbos policy delivery automation to every repository.
As teams scale, authorization logic evolves alongside code. Teams need a reliable, repeatable way to publish changes to Cerbos Hub Stores whenever policy files change.
By using the cerbos-store-action, you can:
It’s part of our growing set of GitHub Actions - alongside the cerbos-setup-action - designed to make policy management frictionless from development to production.
Previously, uploading policy changes to Cerbos Hub required steps like this:
- name: Setup Cerbos (:dev)
run: docker pull ghcr.io/cerbos/cerbosctl:${{env.CERBOS_VERSION}}
- name: Upload policies
run: |
docker run --rm \
-e CERBOS_HUB_STORE_ID=${{ env.CERBOS_HUB_STORE_ID }} \
-e CERBOS_HUB_CLIENT_ID=${{ secrets.CERBOS_HUB_CLIENT_ID }} \
-e CERBOS_HUB_CLIENT_SECRET=${{ secrets.CERBOS_HUB_CLIENT_SECRET }} \
-v "$PWD":/app \
ghcr.io/cerbos/cerbosctl:${{env.CERBOS_VERSION}} \
hub store replace-files /app/cerbos/policies
This worked, but it required managing Docker images and environment setup manually.
The new cerbos-store-action replaces all of that with a single YAML block:
- name: Upload Cerbos policies
uses: cerbos/cerbos-store-action@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
store_id: ${{ secrets.CERBOS_HUB_STORE_ID }}
client_id: ${{ secrets.CERBOS_HUB_CLIENT_ID }}
client_secret: ${{ secrets.CERBOS_HUB_CLIENT_SECRET }}
to_revision: HEAD
from_revision: main
subdir: policies # optional
The action will automatically:
cerbosctl (if not already set up)
cerbos-setup-actionIf your workflow already uses the cerbos-setup-action, this new action integrates cleanly. Together they provide end-to-end automation:
cerbos-setup-action ensures the correct Cerbos binaries are installed.cerbos-store-action handles uploading your policy set to Hub.Example combined workflow:
name: Deploy policies to Cerbos Hub
on:
push:
paths:
- "cerbos/policies/**"
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Cerbos
uses: cerbos/cerbos-setup-action@v1
with:
version: latest
- name: Upload policies to Hub
uses: cerbos/cerbos-store-action@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
store_id: ${{ secrets.CERBOS_HUB_STORE_ID }}
client_id: ${{ secrets.CERBOS_HUB_CLIENT_ID }}
client_secret: ${{ secrets.CERBOS_HUB_CLIENT_SECRET }}
to_revision: HEAD
from_revision: main
subdir: cerbos/policies
The action is available now in the GitHub Marketplace: cerbos/cerbos-store-action
Full documentation and configuration examples are in the repository README.
If you’re interested in implementing externalized authorization - try out Cerbos for free, or book a call with a Cerbos engineer to see how our solution can help streamline access control in your organization.
Book a free Policy Workshop to discuss your requirements and get your first policy written by the Cerbos team
Join thousands of developers | Features and updates | 1x per month | No spam, just goodies.