Metadata-Version: 2.4
Name: dawnfix
Version: 0.6.1
Summary: Dawnfix, the AI SRE that runs in your own GitHub Actions: the read-only production log check (dawnfix) and the free tools logbill, parity, sweeper, leastpriv, receipt and fleet. Your logs stay in your accounts.
Author: Dawnfix
License-Expression: FSL-1.1-ALv2
Project-URL: Homepage, https://dawnfix.dev
Project-URL: Source, https://github.com/dawnfix/dawnfix
Project-URL: Documentation, https://dawnfix.dev/docs/setup
Project-URL: Issues, https://github.com/dawnfix/dawnfix/issues
Keywords: ai-sre,sre,aws,gcp,cloudwatch,github-actions,finops,iam
Classifier: Environment :: Console
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: System :: Monitoring
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: PyYAML>=6.0
Requires-Dist: boto3>=1.34
Provides-Extra: gcp
Requires-Dist: google-cloud-logging>=3.5; extra == "gcp"
Dynamic: license-file

# Dawnfix

An AI SRE (AI Site Reliability Engineer) for AWS and GCP that runs in your own GitHub
Actions. A deterministic, read-only job reads CloudWatch Logs, alarms, load balancer 5xx or
Cloud Logging every hour, fingerprints and redacts the errors, and remembers which ones it
has seen. When one is new, an agent runs with your own AI API key (Claude today). It either files a
GitHub issue with the cause, the impact and a severity, or writes a failing test and the fix
and opens a draft PR for you to review. It never merges or deploys. Your logs never leave your accounts.

On GitLab, it runs as four jobs in your project's pipeline ([GitLab CI](#gitlab-ci)). On
Bitbucket Cloud, it runs in diagnose mode only; fixes need a self-hosted runner
([Bitbucket Pipelines](#bitbucket-pipelines)).

Free and source available. No key and no plan is needed for anything in this repo.

## Quick start

In the repo whose production Dawnfix should watch (Node 20+, and `gh` signed in):

```sh
npx dawnfix init
```

It asks where your logs are (AWS or GCP) and how far the agent may go (`autonomy`, start
with `diagnose`), shows the two files it will write, and writes them when you say yes:

- `.dawnfix.yml`: the log sources, `autonomy`, `test.command` (every key:
  [templates/dawnfix.yml](templates/dawnfix.yml));
- `.github/workflows/dawnfix.yml`: about 15 lines that call the reusable workflow, with your
  schedule and permissions:

```yaml
name: Dawnfix
on:
  schedule: [{ cron: "17 * * * *" }] # the `schedule` of .dawnfix.yml
  workflow_dispatch: { inputs: { baseline: { type: boolean }, dry_run: { type: boolean } } }
permissions: { contents: write, pull-requests: write, issues: write, id-token: write }
jobs:
  dawnfix:
    uses: dawnfix/dawnfix/.github/workflows/dawnfix.yml@<release commit SHA> # vX.Y.Z
    with:
      aws-role-arn: ${{ vars.DAWNFIX_AWS_ROLE_ARN }}
      aws-region: us-east-1 # STS region; keep it equal to region: in .dawnfix.yml
    secrets:
      DAWNFIX_AI_API_KEY: ${{ secrets.DAWNFIX_AI_API_KEY }} # your AI API key (Claude today)
      DAWNFIX_ENTERPRISE_KEY: ${{ secrets.DAWNFIX_ENTERPRISE_KEY }} # optional
```

It never asks for a secret and never writes one. It prints what you run next:

1. **Read-only cloud role.** AWS: `infra/aws/dawnfix-read-role.yaml` with CloudFormation
   (it trusts GitHub OIDC for your repo's default branch only; check it with
   `infra/aws/verify_readonly.py`). GCP: `infra/gcp/setup-wif.sh` (Workload Identity
   Federation, `roles/logging.viewer` only).
2. **Repo settings**, typed by you: the role as the variable `DAWNFIX_AWS_ROLE_ARN` (or
   `DAWNFIX_GCP_WIF_PROVIDER`), and `gh secret set DAWNFIX_AI_API_KEY` (your AI API key,
   Claude today). The model is the `model` input (your `DAWNFIX_AI_MODEL` variable);
   the default is `sonnet`.
3. **Review and run.** Open a PR with the two files and merge it. Then
   `gh workflow run dawnfix.yml -f dry_run=true` shows exactly what would leave your account,
   and `gh workflow run dawnfix.yml -f baseline=true` records the errors you already have, so
   only new ones are reported.
4. `npx dawnfix doctor` checks the config, the pinned workflow, the secret and variable
   names, and says whether you run Free or Enterprise.

Renamed in v0.4.0: the secret `ANTHROPIC_API_KEY` is now `DAWNFIX_AI_API_KEY`, and the
template's variable `DAWNFIX_MODEL` is now `DAWNFIX_AI_MODEL`. The old names still work as a
deprecated fallback for this release, with one notice in the run log.

Later, switch `autonomy` to `plan` or `draft-pr` through a PR (and give `install-command`; the
fix job sets up the Node.js of `.nvmrc`, `.node-version` or `package.json` `engines.node`, or the
`node-version` input, before it).
For draft PRs that trigger your CI, set a GitHub App (`pr-app-id`,
`DAWNFIX_PR_APP_PRIVATE_KEY`) or a fine-grained token (`DAWNFIX_PR_TOKEN`) as the PR author.

### The workflows

| Reusable workflow (`uses: dawnfix/dawnfix/.github/workflows/<file>@<commit SHA> # vX.Y.Z`) | Copy-it-yourself template |
|---|---|
| [dawnfix.yml](.github/workflows/dawnfix.yml): the read job and the diagnose or fix agent | [templates/github/workflows/dawnfix.yml](templates/github/workflows/dawnfix.yml) |
| [parity.yml](.github/workflows/parity.yml): config drift between two AWS environments | [dawnfix-parity.yml](templates/github/workflows/dawnfix-parity.yml) |
| [flare.yml](.github/workflows/flare.yml): the daily Cloudflare audit | [dawnfix-flare.yml](templates/github/workflows/dawnfix-flare.yml) |
| [receipt.yml](.github/workflows/receipt.yml): a cost comment on every production deploy | [dawnfix-receipt.yml](templates/github/workflows/dawnfix-receipt.yml) |

Each reusable workflow's header shows its caller and lists its inputs and secrets. The
permissions in your caller are a ceiling: every job asks for less (only the read job gets
`id-token`, only the publish job can push, on a fresh runner after the agent's job has
ended, and it only opens draft PRs). GitHub checks every job's permissions against the
caller's before the run starts, even the jobs `autonomy: diagnose` skips, so keep all four.
`npx dawnfix init` pins the main workflow to its own release, as the tag's commit SHA with a
`# vX.Y.Z` comment (the tag itself when it cannot read the SHA), because that workflow gets
`id-token` and your AI key. Pin the Parity, Flare and Receipt callers the same way (the
prompts do): `git ls-remote https://github.com/dawnfix/dawnfix refs/tags/vX.Y.Z` prints the
SHA. `@v0` follows every 0.x release, a moving tag: use it only on purpose (`init --ref v0`). Each release installs the
same version of the PyPI package `dawnfix` and loads the agent's instructions from
`prompts/ci/` at its own tag. Fallback, without PyPI: the `core-ref` input (a tag or commit
SHA of this repo) installs from git at that ref and loads the instructions from it.

The templates are the same jobs and steps, reading repository variables
(`DAWNFIX_AWS_ROLE_ARN`, `DAWNFIX_INSTALL_COMMAND`, ...) instead of inputs, for those who
would rather keep the whole file in their repo. Copy one, copy the `schedule` of
`.dawnfix.yml` into its cron, and set the variables its header lists.

### The CLIs

```sh
pipx install dawnfix          # PyPI: dawnfix (the read job's CLI), logbill, parity, sweeper, leastpriv, receipt, fleet
dawnfix validate --config .dawnfix.yml
npx dawnfix flare --help      # npm: the Cloudflare audit (also node flare/dist/cli.js)
```

## GitLab CI

On GitLab, Dawnfix runs as four jobs in your project's pipeline. Each job is a fresh container
that holds one secret:

- `dawnfix-read`: the cloud OIDC token only (`id_tokens:`). Reads your logs.
- `dawnfix-agent`: `DAWNFIX_AI_API_KEY` only. It runs no git and has no repo token. Its only
  output is an artifact with the changed files and the issue texts.
- `dawnfix-publish`: `DAWNFIX_HOST_TOKEN` only. It checks the files again in a fresh checkout,
  then opens a draft merge request or an issue. It never merges.
- `dawnfix-report`: `DAWNFIX_ENTERPRISE_KEY` only, optional.

Shared runners on gitlab.com work. The agent's sandbox starts there, and the agent job is also
isolated by being its own job.

Hardening:

- The agent job never clones (`GIT_STRATEGY: none`): it gets a copy of the commit without
  `.git`, and the CI job token and every CI password are unset before the agent runs.
- Turn on the runner feature flag `FF_GIT_URLS_WITHOUT_TOKENS`, and limit the project's job
  token (Settings > CI/CD > Job token permissions).
- Dawnfix branches are pushed with `-o ci.skip`, so no pipeline runs on them by itself. The
  merge request's pipeline runs when a person runs it or pushes to the branch, or when your
  config has merge request pipelines. Dawnfix never changes CI config, including files your
  `.gitlab-ci.yml` includes with `include: local`.

1. **Init.** `npx dawnfix init --host gitlab` writes `.dawnfix.yml` and shows the include for
   your `.gitlab-ci.yml`. It never asks for a secret.
2. **Include the template** at the release tag. GitLab checks it against the hash before it
   runs it (the template's header says how to get the hash):

   ```yaml
   include:
     - remote: https://raw.githubusercontent.com/dawnfix/dawnfix/v<version>/templates/gitlab/dawnfix.gitlab-ci.yml
       integrity: sha256-…
   ```

3. **Read-only cloud role.** AWS: `infra/aws/dawnfix-read-role-gitlab.yaml` with
   CloudFormation (it trusts GitLab OIDC for your project's default branch only). GCP:
   `infra/gcp/setup-wif-gitlab.sh`, which prints the value for `DAWNFIX_GCP_WIF_PROVIDER`.
4. **CI/CD variables.** Each secret is masked, protected and scoped to one environment:

   | Variable | Environment scope | What |
   |---|---|---|
   | `DAWNFIX_AI_API_KEY` | `dawnfix-agent` | your AI API key (Claude today) |
   | `DAWNFIX_HOST_TOKEN` | `dawnfix-publish` | a project access token named Dawnfix (its bot user opens the merge requests): role Developer, scopes `api` and `write_repository` |
   | `DAWNFIX_ENTERPRISE_KEY` | `dawnfix-report` | optional, Enterprise only |

   Not secret: `DAWNFIX_AWS_ROLE_ARN` and `DAWNFIX_AWS_REGION`, or `DAWNFIX_GCP_WIF_PROVIDER`.
   `glab` reads each secret from stdin, so it stays out of your shell history:

   ```sh
   glab variable set DAWNFIX_AI_API_KEY --masked --protected --scope dawnfix-agent
   glab variable set DAWNFIX_HOST_TOKEN --masked --protected --scope dawnfix-publish
   glab variable set DAWNFIX_ENTERPRISE_KEY --masked --protected --scope dawnfix-report   # optional
   glab variable set DAWNFIX_AWS_ROLE_ARN --value "<role arn>"
   ```

5. **Schedule.** The jobs run only when `DAWNFIX_RUN` is `true`, so your other pipelines are
   untouched:

   New projects block pipeline variables, and the schedule needs `DAWNFIX_RUN`: allow them
   for maintainers (Settings > CI/CD > Variables > Minimum role to use pipeline variables).

   ```sh
   glab api --method PUT "projects/:fullpath" --field ci_pipeline_variables_minimum_override_role=maintainer
   glab schedule create --cron "17 * * * *" --ref main --description dawnfix --variable "DAWNFIX_RUN:true"
   ```

   To run it by hand: Build > Pipelines > Run pipeline with `DAWNFIX_RUN=true`, plus
   `DAWNFIX_DRY_RUN=true` or `DAWNFIX_BASELINE=true`.

### Parity and Flare on GitLab CI

Free, the same checks as on GitHub. `npx dawnfix init --host gitlab --tools parity,flare`
adds one include per template, each pinned with its integrity, and prints the next steps.

- Parity (`templates/gitlab/dawnfix-parity.gitlab-ci.yml`): `dawnfix-parity` holds the job's
  OIDC token only and assumes one read-only role per environment
  (`parity/iam/parity-role-gitlab.yaml`, your project on its default branch only) from the token
  file; no AWS key is written. Variables, not secret: `PARITY_LEFT_ROLE_ARN`,
  `PARITY_RIGHT_ROLE_ARN`, `PARITY_LEFT`, `PARITY_RIGHT`. A weekly schedule with
  `DAWNFIX_PARITY=true`, and pushes to the default branch that change `.parity.yml`. Drift fails
  the job; the names are in its artifact, `summary.md`.
- Flare (`templates/gitlab/dawnfix-flare.gitlab-ci.yml`): `dawnfix-flare` holds
  `FLARE_CLOUDFLARE_API_TOKEN` only (masked, protected, scoped to `dawnfix-flare`). A daily
  schedule with `DAWNFIX_FLARE=true`. The table with the names goes to its artifact, not the log.
- With an Enterprise key, `dawnfix-parity-report` and `dawnfix-flare-report` (environment
  `dawnfix-report`, the same `DAWNFIX_ENTERPRISE_KEY`) send the counts. Receipt on GitLab is
  coming soon.

## Bitbucket Pipelines

**On Bitbucket Cloud, Dawnfix runs in diagnose mode only.** It reads your logs and files an
issue. With the repository's issue tracker off, it writes the analysis to the publish step's log
instead. It does not change code there.

Why: every Pipelines step can push to your repository through Bitbucket's git proxy, with the
pipeline's own credential. Claude Code's sandbox would keep the agent off that proxy, but it
cannot start in Bitbucket Cloud's step containers. So `npx dawnfix init --host bitbucket` writes
a diagnose config, and the agent step refuses the fix modes (plan, draft-pr) wherever the sandbox
cannot start.

**Fix modes need a self-hosted runner** where the sandbox can start: a Linux runner (the Linux
Shell runner, or the Docker runner with a seccomp and AppArmor profile that allows it) where bwrap
can create user and network namespaces (kernel unprivileged user namespaces on), with bubblewrap,
socat, Node 20 or later and Python 3.11 or later.

**Required on every Bitbucket repository: a push restriction on every branch** that lets only
the account behind `DAWNFIX_HOST_TOKEN` push. Set it with your own admin token in
`BITBUCKET_TOKEN`:

```sh
curl -sS -X POST -H "Authorization: Bearer $BITBUCKET_TOKEN" -H 'Content-Type: application/json' \
  https://api.bitbucket.org/2.0/repositories/<workspace>/<repo>/branch-restrictions \
  -d '{"kind":"push","branch_match_kind":"glob","pattern":"*","users":[{"uuid":"{<account UUID>}"}],"groups":[]}'
```

Or in Repository settings > Branch restrictions > Add: pattern `*`, write access only for that
account. `npx dawnfix doctor` fails without it (with `BITBUCKET_TOKEN` set, it checks it).

Tags: Bitbucket Cloud cannot restrict who pushes tags. A tag pushed through the git proxy can carry a new commit whose bitbucket-pipelines.yml runs a tag pipeline with your deployment secrets. In diagnose mode the agent runs no command, so it cannot push anything. That is why Bitbucket Cloud is diagnose only.

Dawnfix runs as a custom pipeline, `dawnfix`, with four steps. Each step is a fresh container
that holds one secret at most:

- `dawnfix read`: the cloud OIDC token only (`oidc: true`). Reads your logs.
- `dawnfix agent`: `DAWNFIX_AI_API_KEY` only. It has no clone, runs no git and has no repo
  token. Its only output is an artifact with the issue texts (and, on a self-hosted runner in a
  fix mode, the changed files).
- `dawnfix publish`: `DAWNFIX_HOST_TOKEN` only. It files the issue. In a fix mode it checks the
  files again in a fresh clone, pushes with `[skip ci]` and opens a draft pull request. It never
  merges.
- `dawnfix report`: `DAWNFIX_ENTERPRISE_KEY` only, optional.

Hardening:

- The agent step has `clone: enabled: false`: it gets a copy of the commit without `.git`.
  Every Bitbucket token and every variable named like a secret is unset before the agent runs,
  and the agent refuses to start if one is left.
- In a fix mode, Dawnfix branches are pushed with `[skip ci]` in each commit message, so no pipeline runs on
  them by itself. Dawnfix never changes CI config: `bitbucket-pipelines.yml` and anything under
  `.bitbucket/` are refused.
- Issues only when the repository's issue tracker is on. With it off, the text Dawnfix would
  file goes to the publish step's log and its artifact.

1. **Init.** `npx dawnfix init --host bitbucket` writes `.dawnfix.yml` (diagnose mode) and the
   pipeline (or the lines to merge into your `bitbucket-pipelines.yml`), and prints the push
   restriction, variables, deployments and schedule to set. It never asks for a secret.
2. **Turn Pipelines on** in Repository settings > Pipelines > Settings.
3. **Read-only cloud role.** It trusts your workspace's OIDC issuer
   (`api.bitbucket.org/2.0/workspaces/<workspace>/pipelines-config/identity/oidc`), the audience
   `ari:cloud:bitbucket::workspace/<workspace UUID>`, and only steps in your repository's
   deployment environment `dawnfix-read`, where the read step runs (`EnvironmentUuid`, required).
   Create that environment first (type Test, no secret in it) and restrict it to your main branch
   (Deployment permissions, Bitbucket Premium): without that, anyone with write access can run a
   branch pipeline in it. AWS: `infra/aws/dawnfix-read-role-bitbucket.yaml` with CloudFormation.
   GCP: `infra/gcp/setup-wif-bitbucket.sh`, which prints the value for `DAWNFIX_GCP_WIF_PROVIDER`.
4. **Deployment environments and secrets** (Repository settings > Deployments). Each secret is
   a secured variable of one environment:

   | Variable | Environment | Type | What |
   |---|---|---|---|
   | `DAWNFIX_AI_API_KEY` | `dawnfix-agent` | Test | your AI API key (Claude today) |
   | `DAWNFIX_HOST_TOKEN` | `dawnfix-publish` | Staging | a repository access token named Dawnfix (its bot user opens the pull requests): repository write, pull requests write, pipelines write; or an Atlassian API token with `DAWNFIX_BITBUCKET_EMAIL` |
   | `DAWNFIX_ENTERPRISE_KEY` | `dawnfix-report` | Production | optional, Enterprise only |

   Never put a secret in repository or workspace variables: those reach every step. Not
   secret (repository variables): `DAWNFIX_AWS_ROLE_ARN` and `DAWNFIX_AWS_REGION`, or
   `DAWNFIX_GCP_WIF_PROVIDER`. Each run records a deployment in the four environments
   (`dawnfix-read` too).

5. **Schedule.** Repository settings > Pipelines > Schedules: your main branch, the custom
   pipeline `dawnfix`, hourly. To run it by hand: Pipelines > Run pipeline, custom: dawnfix,
   with `DAWNFIX_DRY_RUN=true` or `DAWNFIX_BASELINE=true`.

### Parity and Flare on Bitbucket Pipelines

Free, the same checks as on GitHub. `npx dawnfix init --host bitbucket --tools parity,flare`
adds the custom pipelines `dawnfix-parity` and `dawnfix-flare` and prints the next steps.

- Parity (`templates/bitbucket/bitbucket-pipelines-parity.yml`): the step `dawnfix parity` runs
  with `oidc: true` in the deployment environment `dawnfix-parity`. Its role
  (`parity/iam/parity-role-bitbucket.yaml`) trusts only steps in that environment
  (`EnvironmentUuid` is required). Restrict the environment to your main branch (Deployment
  permissions, Bitbucket Premium): without it, anyone with write access can run a branch
  pipeline in it. Repository variables, not secret: `PARITY_LEFT_ROLE_ARN`,
  `PARITY_RIGHT_ROLE_ARN`. A weekly schedule.
- Flare (`templates/bitbucket/bitbucket-pipelines-flare.yml`): the step `dawnfix flare` runs in
  the deployment environment `dawnfix-flare`, whose secured variables are
  `FLARE_CLOUDFLARE_API_TOKEN` and, optional, `DAWNFIX_ENTERPRISE_KEY`. A daily schedule.
  Secret-change tracking between runs is coming soon on Bitbucket; every other check runs.
- Parity's `dawnfix-parity` environment holds the optional `DAWNFIX_ENTERPRISE_KEY` too. Receipt
  on Bitbucket is coming soon.

## What it costs you

Dawnfix itself is free, with no key. It runs on accounts you already pay for, and those
bills go to you, not to us:

- **Claude tokens**, on your own AI API key (`DAWNFIX_AI_API_KEY`). Only the diagnose or fix job uses
  them, and only on a run that found a new error. A quiet hour spends no tokens.
  `limits.fix_prs_per_day` and the agent's `max_turns` cap a busy day.
- **GitHub Actions minutes.** The read job runs every hour, about a minute each, so about
  720 minutes a month on the default schedule, plus the agent jobs when they run. Free on
  public repos; on private repos they count against your plan's included minutes.
- **AWS API calls** in your account: the tick reads with `FilterLogEvents` and
  `DescribeAlarms`, and load balancer 5xx with `GetMetricData` ($0.01 per 1,000 metrics).
  Those are the only calls the read-only role allows (no Logs Insights). In an account shared
  with other environments, turn alarms off (`init --no-alarms`, `ReadAlarms=false` on the role:
  it cannot list any alarm; recommended) or keep them to a name prefix (`alarm_prefix` in
  `.dawnfix.yml` and the same value as `AlarmNamePrefix` on the role); the load balancer and
  metric reads are account-wide ([infra/aws/README.md](infra/aws/README.md)).
  Logbill's Logs Insights queries are billed per GB scanned; it prints the estimate and
  stops at its budget.
- **AWS Cost Explorer, for Receipt only**: $0.01 per request, one per deploy (two with
  `--tag-key`).

| `autonomy` | What happens when a new error shows up |
|---|---|
| `diagnose` | An issue: cause with `file:line`, impact, severity. The agent has no shell and the job cannot push |
| `plan` | An issue with the planned test and fix |
| `draft-pr` | A failing test, then the fix, as two commits on `dawnfix/<fingerprint>`, opened as a draft PR. An issue when no cause or failing test can be shown |

## Use it from your coding agent

[prompts/](prompts/README.md) holds copy-paste prompts for any coding agent (Claude Code,
Codex, Cursor and others): set up Dawnfix in a repo, diagnose or fix a findings file, check
status, and run each tool below. Paste one, or ask your agent to save it as a skill or a
command. [prompts/ci/](prompts/ci/) holds the instructions the workflow gives its agent.

## What is here

| Folder | |
|---|---|
| [core/](core/README.md) | `dawnfix-core`: the deterministic tick (query, fingerprint, dedupe, redact), the findings and ingest schemas |
| [.github/workflows/](.github/workflows/) | the reusable workflows `dawnfix.yml`, `parity.yml`, `flare.yml`, `receipt.yml`, and `release.yml` |
| [templates/](templates/) | `.dawnfix.yml` and the copy-it-yourself workflows: `dawnfix.yml`, and the optional `dawnfix-parity.yml`, `dawnfix-flare.yml`, `dawnfix-receipt.yml`; the GitLab CI templates and Bitbucket Pipelines files of Dawnfix, Parity and Flare |
| [infra/](infra/aws/README.md) | the read-only AWS role (CloudFormation), its verifier, the GCP Workload Identity script |
| [prompts/](prompts/README.md) | copy-paste prompts for coding agents, and the CI agent's instructions |
| [logbill/](logbill/README.md) | Dawnfix Logbill: read-only CloudWatch Logs bill X-ray that runs on your machine. Google Cloud Logging: coming soon |
| [parity/](parity/README.md) | Dawnfix Parity: read-only config drift between AWS environments and a secret inventory; names and metadata only. In CI on GitHub, GitLab and Bitbucket. Google Cloud: coming soon |
| [flare/](flare/README.md) | Dawnfix Flare: read-only audit of Cloudflare accounts and Workers and your wrangler files; one bundled file, `node flare/dist/cli.js`. In CI on GitHub, GitLab and Bitbucket |
| [sweeper/](sweeper/README.md) | Dawnfix Sweeper: what an AWS migration left behind, priced per month, with a teardown plan; never deletes. Google Cloud: coming soon |
| [leastpriv/](leastpriv/README.md) | Dawnfix Leastpriv: least-privilege trim of one IAM role from last-accessed data, as a PR body and diffs; never changes IAM. Google Cloud IAM: coming soon |
| [receipt/](receipt/README.md) | Dawnfix Receipt: a comment on every production deploy with what it did to the AWS bill. Google Cloud Billing, GitLab CI and Bitbucket Pipelines: coming soon |
| [fleet/](fleet/README.md) | Dawnfix Fleet: a read-only collector for agencies that look after many client accounts. Google Cloud, GitLab CI and Bitbucket Pipelines: coming soon |
| [hosted/](hosted/README.md) | a helper for Dawnfix Enterprise, the hosted part (below) |

Also [cli/](cli/README.md), the npm package `dawnfix` (`init`, `doctor`, `flare`), and
`pyproject.toml`, the PyPI package `dawnfix` (core and the Python tools in one). How a
release is published: [RELEASING.md](RELEASING.md).

Tests: `cd core && make install && make test`; `core/.venv/bin/pytest -q infra/tests`;
`cd <logbill|parity|sweeper|leastpriv|receipt> && make install test`;
`cd fleet/collector && make install && make test`;
`cd flare && npm ci && npm test && npm run build:check`;
`cd cli && npm ci && npm test && npm run build:check`.

## Enterprise (hosted, optional)

Everything above runs in your own accounts with no key. Our hosted part adds a status page,
digest and alert emails, the Fleet board, and support.
Dawnfix Enterprise is sold by contact: [dawnfix@sivakoza.ai](mailto:dawnfix@sivakoza.ai). It is a monthly
subscription, priced per organization (https://dawnfix.dev/pricing). With an Enterprise key
in the `DAWNFIX_ENTERPRISE_KEY` secret, the workflows also send counts (never log text, service
names, account or project ids, or values) to the hosted service, and with them the repository's
name (owner/name, or the full GitLab group path) and the CI run's ID, in request headers
(`X-Dawnfix-Repo`, `X-Dawnfix-Run`), to file the report under that repository in your workspace and link back to the run. Field by field: `core/schema/ingest.schema.json` and
https://dawnfix.dev/security. Without the key, each of those steps prints one line, such as
"Hosted reporting (status page and digest) needs an Enterprise key.", sends nothing, and the
run goes on.

## Release notes

- **0.6.1**: the first release with Parity and Flare on GitLab CI and Bitbucket Pipelines
  (`npx dawnfix init --host gitlab|bitbucket --tools parity,flare`). Bitbucket: the cloud roles
  of Dawnfix and Parity trust one deployment environment only (`dawnfix-read`,
  `dawnfix-parity`), never the whole repository; the read step now runs in `dawnfix-read`.
  Upgrading a Bitbucket setup: create `dawnfix-read` (type Test), update the role's stack with
  `EnvironmentUuid`, take the new `bitbucket-pipelines.yml`.
- **0.6.0** was tagged but never published (no PyPI or npm package): use 0.6.1.

## License

Dawnfix is under the [Functional Source License, Version 1.1, ALv2 Future License](LICENSE)
(FSL-1.1-ALv2). In plain words, and the license text is what counts:

- You may use, copy, modify and run it, including in your company and for your clients'
  systems.
- You may not sell it or offer it, or a substitute for it, as a competing product or service.
- Every release becomes Apache-2.0 two years after it is published.
- Contributions are welcome.

Versions released before 27 Nov 2026 were MIT-licensed; from v0.2.0 on the code is under
FSL-1.1-ALv2.
