Fail a deploy that exposes something
Run the same read-only scan as this site against every deployment, and fail the job when it finds a leaked key, a table anyone can read, a private file being served, or anything else at or above the severity you choose. It needs no token, no checkout of your code and no account, and nothing is sent to xlogs: the scan runs on your CI runner.
After each deployment (Vercel, Netlify and others)
Hosting providers that report deployments to GitHub fire a deployment_status event with the deployed URL. This workflow scans each successful one and uploads the findings to the repository's Security tab.
name: Security
on: deployment_status
permissions:
security-events: write # only for the SARIF upload; the scan needs none
jobs:
xlogs:
# deployment_status also fires for pending and failed deployments
if: github.event.deployment_status.state == 'success'
runs-on: ubuntu-latest
steps:
- uses: damnepic/xlogs-cli@v0.2.5
with:
url: ${{ github.event.deployment_status.environment_url || github.event.deployment_status.target_url }}
fail-on: high
sarif: xlogs.sarif
- uses: github/codeql-action/upload-sarif@v3
if: always() # upload the findings even when the gate failed
with:
sarif_file: xlogs.sarifIf your preview deployments sit behind a login (Vercel Deployment Protection, for example), the scanner reads the login page, not your app. The gate then fails with exit 4 instead of passing an app it never saw. Scan your production URL instead, on a schedule or after a production deploy.
On a schedule
name: Nightly security check
on:
schedule:
- cron: "0 6 * * *"
workflow_dispatch:
permissions: {}
jobs:
xlogs:
runs-on: ubuntu-latest
steps:
- uses: damnepic/xlogs-cli@v0.2.5
with:
url: https://your-app.com
fail-on: highInputs
| Input | Default | What it does |
|---|---|---|
url | required | The deployed URL to scan. |
fail-on | high | Fail the job on a finding at or above this severity: critical, high, medium or low. |
allow-inconclusive | false | Pass even when a check could not run. Every check that did not run is still named in the log. |
sarif | none | A path to write a SARIF 2.1.0 report to, for the repository's Security tab. |
policy | none | A path to your database access policy file on the runner, so check your repository out first. A read it does not allow fails the job. |
block-anonymous-reads | false | true fails the job on any table that answers a logged-out request, with no policy file. Not with policy. |
The URL reaches the scanner as an environment variable, never pasted into a shell command, so an event payload cannot become code. There is deliberately no stack-only input: a gate that skipped the private-file and database checks would pass by not looking.
What the job sees
| Exit code | Meaning |
|---|---|
0 | Nothing at or above fail-on. The job passes. |
1 | A finding at or above fail-on. The job fails and the log names each one. |
3 | The input was unusable, or the URL could not be reached. The job fails. |
4 | Nothing found at or above fail-on, but a check could not run, so the gate cannot call it a pass. The job fails unless allow-inconclusive is true. |
5 | Your policy failed: a table answered a logged-out request that the policy does not allow, and nothing reached fail-on (a finding at or above it is exit 1). The job fails. |
The most common exit 4: hosted Supabase stopped letting a public key list a project's tables in April 2026, so the database check cannot run on many Supabase apps. A gate that could not test your database has not passed it. Set allow-inconclusive: true to accept that explicitly; the log still names every check that did not run.
A table anyone can read, and your policy
What the action runs (v0.2.5, the grading xlogs.com uses): a database table that returns rows to a logged-out request is a review item, MEDIUM, because a table read by everyone can be deliberate and only you can say which. On its own it does not fail fail-on: high, and the log prints a note saying so. To fail on it, give the gate your policy: block-anonymous-reads: true (on the command line, --block-anonymous-reads) fails on any readable table, and policy: xlogs.policy.json (--policy) names the tables that are public on purpose and the tables that must be private. A private table that answers becomes HIGH. A read the policy does not allow fails the job: exit 5, or exit 1 when a finding at or above fail-on stands too (at medium or low every readable table is one). A table it requires private that could not be checked, or a database a blocking policy could not read in full, is exit 4 unless allow-inconclusive is true. The policy file is read on the runner, so check your repository out first, at your default branch, so a pull request cannot loosen its own gate.
Earlier releases graded such a table HIGH, or CRITICAL when a column is named like a credential or private data, so a workflow still pinned to an older tag keeps failing fail-on: high on it. Moving the pin to v0.2.5 without a policy turns that failure into a note.
{
"policyVersion": 1,
"database": {
"anonymousRead": "block",
"approved": [
{ "project": "abcdefghijklmnopqrst", "schema": "public", "table": "countries",
"reason": "Reference data, public by design" }
],
"private": [
{ "project": "abcdefghijklmnopqrst", "schema": "public", "table": "customers",
"reason": "Customer contact details; reads limited to the row owner" }
]
}
}Each entry names the exact table: the project (or the API origin), the schema and the table, with a reason. No wildcards. The file stays on your runner; the report carries its name, its hash and each outcome. A policy changed in the same pull request can weaken its own gate, so read it from your default branch or require review of changes to it. How a readable table is graded is on the methodology page.
Any other CI
The action is a thin wrapper. Any runner with Node 18.18 or newer and git can run the same release directly:
npx -y github:damnepic/xlogs-cli#v0.2.5 https://your-app.com --fail-on highThe command line tool is released on its own: the release these pages run is v0.2.5 (2026-11-04), and the copy on npm, xlogs-scanner 0.1.0 (2026-08-13), is older still, so either can report differently from a scan on this site.
What it sends
Every request is a GET. The full list, including the sensitive-file paths it requests and the anonymous database read, is on the methodology page. Run the gate against your own deployment only. To let your coding agent run the same scan while it works, see xlogs for MCP.
