Dawnfix

Is prod configured like dev? Which secrets does nobody read?

Works with AWS GitHub ActionsGitHub Actions PythonPython

Dawnfix Parity compares two AWS environments' configuration (SSM Parameter Store, Secrets Manager, ECS task definitions, Lambda env vars) and lists every secret and parameter with its last read, rotation and who references it. Read-only, names and metadata only: values are never printed or stored. The CLI and the CI check are free and source available.

Two AWS environments, dev and prod, are compared by name: prod settings that point at dev or at nothing, and a password in a plain env var, are flagged, and the CI check fails on the drift. dev and prod SSM, Secrets Manager, ECS and Lambda config Compared key by key 11 keys in dev, 13 in prod · names only Drift found prod's REDIS reads dev's parameter A secret in plain text PASSWORD in prod holds a literal value The CI check fails before the drift reaches a deploy
The sample: prod reads two settings from dev, and a password sits in a plain env var. Values are never printed or stored.

What it checks

parity diff --left dev --right prod finds:

  • missing in left (missing_in_left): a key exists only in the right environment (a whole missing ECS service or Lambda is one finding).
  • missing in right (missing_in_right): a key exists only in the left environment: the classic "added it to dev, forgot prod".
  • type mismatch (type_mismatch): String in dev, SecureString in prod; high when a secret became a plain env var.
  • reference to a missing parameter/secret (dangling_reference): a task definition or Lambda points at a parameter or secret that does not exist.
  • references the other environment (cross_env_reference): prod's task definition or Lambda points at dev's path, prefix or account (and vice versa).
  • same secret value in both (hash) (value_shared): with --compare-hashes: a secret holds the same value in both environments.
  • value differs (hash) (value_differs): with --compare-hashes: a key you said must match differs.
  • reference not checkable (unverifiable_reference): the target is in an account that is not configured, or the lookup was denied.
  • names collide after normalisation (duplicate_key): two names normalise to the same key: your normalisation rules are too broad.
  • literal secret in an env var (plaintext_secret): an ECS or Lambda env var named like PASSWORD, SECRET, TOKEN, API_KEY or PRIVATE_KEY holds a literal value instead of a Secrets Manager / SSM reference. Only the name is reported, never the value.

parity inventory lists, per secret and parameter, when it last changed, when it was last read, its rotation and every task definition or Lambda that references it, and flags:

  • unread: no read in 90 days (Secrets Manager's last-accessed date; for SSM with the opt-in --cloudtrail lookup).
  • never rotated: rotation off and never rotated; an SSM SecureString still at version 1.
  • rotation overdue: last rotated or changed more than 90 days ago (with rotation on, the rotation Lambda is probably failing).
  • orphaned: nothing parity can see references it and nobody read it. Check with --cloudtrail before deleting anything.

Free CLI and CI check, hosted history

Free and source availableWith an Enterprise key
Where it runsYour machine with your AWS credentials, or your GitHub Actions with a read-only role per environment through GitHub OIDC (no stored keys)The same CI run, which also sends its counts to the hosted service
parity diff, parity inventoryYesYes
Drift check in CIdawnfix-parity.yml: weekly, and on every push to main that touches task definitions or infrastructure code; fails on driftThe same
Job summary with the namesIn the run, in your GitHub. It stays thereThe same. Names never reach us
Weekly email—Monday: drift counts and unread / never-rotated / orphaned secrets, with a link to the Actions run where the names are
Status page—Drift trend per environment pair, last run, link to the run

How to run it

  1. Install the CLI from PyPI. The dawnfix package (version 0.5.0, Python 3.11 or later) holds every Python tool. To build from source instead, clone dawnfix/dawnfix and run make install in its parity/ folder:
    python3 -m venv .venv
    .venv/bin/pip install dawnfix==0.5.0
  2. Write a .parity.yml that says which paths, prefixes, clusters and functions make up each environment (parity/examples/.parity.yml has every field). Sign in to AWS as usual (aws sso login --profile dev and --profile prod), then:
    .venv/bin/parity validate
    .venv/bin/parity diff --left dev --right prod
    .venv/bin/parity inventory --env prod
    It changes nothing in AWS.
  3. Or use it from your coding agent: paste prompts/parity.md. The agent writes the starter .parity.yml with you, runs the CLI and explains what it found.

The IAM policy it needs

Metadata only. There is no value-reading action in it at all: with this policy alone, parity cannot read a parameter value or a secret. cloudtrail:LookupEvents is used only with --cloudtrail and can be dropped. This is parity/iam/parity-read-only-policy.json, verbatim:

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "ParityMetadata",
      "Effect": "Allow",
      "Action": [
        "ssm:DescribeParameters",
        "secretsmanager:ListSecrets",
        "secretsmanager:DescribeSecret",
        "ecs:ListServices",
        "ecs:DescribeServices",
        "ecs:DescribeTaskDefinition",
        "lambda:ListFunctions",
        "sts:GetCallerIdentity"
      ],
      "Resource": "*"
    },
    {
      "Sid": "ParityCloudTrailOptIn",
      "Effect": "Allow",
      "Action": [
        "cloudtrail:LookupEvents"
      ],
      "Resource": "*"
    }
  ]
}

Opt-in add-on for --compare-hashes only (parity/iam/parity-hash-mode-addon.json). Attach it only if you want to know whether dev and prod share a secret's value; scope Resource to your prefixes:

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "ParityHashModeValues",
      "Effect": "Allow",
      "Action": [
        "ssm:GetParameters",
        "secretsmanager:GetSecretValue"
      ],
      "Resource": [
        "arn:aws:ssm:*:*:parameter/REPLACE/WITH/YOUR/PREFIX/*",
        "arn:aws:secretsmanager:*:*:secret:REPLACE/WITH/YOUR/PREFIX/*"
      ]
    },
    {
      "Sid": "ParityHashModeDecrypt",
      "Effect": "Allow",
      "Action": [
        "kms:Decrypt"
      ],
      "Resource": "*",
      "Condition": {
        "StringLike": {
          "kms:ViaService": [
            "ssm.*.amazonaws.com",
            "secretsmanager.*.amazonaws.com"
          ]
        }
      }
    }
  ]
}

Privacy

  • Values are never read unless you pass --compare-hashes. Then each value is turned into an HMAC-SHA-256 digest with a fresh random salt on the line it arrives, on your machine or runner; the salt never leaves memory, and the report says only "same" or "differs".
  • ecs:DescribeTaskDefinition and lambda:ListFunctions return plain env values whatever you ask; parity inspects them for references and for secret-looking literals, then drops them. A literal secret is reported by its name only.
  • The CLI uploads nothing: no telemetry, no account.
  • In CI, the names stay in your GitHub, in the run's job summary. Only counts per finding kind and per inventory flag, pass or drift, and a hashed id for the environment pair reach the hosted service. The service rejects anything else. This is exactly what leaves, for the sample below:
{
  "allowed": 0,
  "failing": 15,
  "findings": {
    "cross_env_reference": 2,
    "dangling_reference": 2,
    "duplicate_key": 0,
    "missing_in_left": 5,
    "missing_in_right": 3,
    "plaintext_secret": 1,
    "type_mismatch": 2,
    "unverifiable_reference": 0,
    "value_differs": 0,
    "value_shared": 0
  },
  "generated_at": "2026-10-27T10:00:00Z",
  "hashed": false,
  "inventory": {
    "flags": {
      "never_rotated": 3,
      "orphaned": 5,
      "rotation_overdue": 1,
      "unread": 2
    },
    "items": 11
  },
  "keys": {
    "left": 11,
    "references": 8,
    "right": 13
  },
  "pair": "2b6a2be75f6f3fd5",
  "result": "drift",
  "schema": "dawnfix.parity/1"
}

Sample output

Synthetic: the test suite's made-up 'shop' app in two made-up accounts (111111111111, 222222222222). No real account.

parity diff --left dev --right prod

Dawnfix Parity: dev vs prod (11 vs 13 keys, 8 references)

references the other environment:
  [high]    ref:ecs:shop-prod/shop-api-prod (shop-api-prod:42)/app/REDIS  REDIS in prod references dev's arn:aws:ssm:eu-central-1:111111111111:parameter/shop/dev/DB_URL
  [high]    ref:lambda:shop-prod-worker/CONFIG_PREFIX  CONFIG_PREFIX in prod references dev's /shop/dev/

reference to missing parameter/secret:
  [high]    ref:ecs:shop-prod/shop-api-prod (shop-api-prod:42)/app/DB_URL  DB_URL in prod references ssm /shop/prod/DB_URL_OLD, which does not exist
  [high]    ref:lambda:shop-prod-worker/CONFIG_PREFIX  CONFIG_PREFIX in prod references ssm /shop/dev/, which does not exist

literal secret in a plain env var:
  [high]    lambda:shop-{env}-worker/PASSWORD  PASSWORD in prod holds a literal value and its name says it is a credential: move it to Secrets Manager or an SSM SecureString and reference it (secrets.valueFrom / ARN)

type mismatch:
  [high]    ecs:shop-api-{env}/app/STRIPE  secret-ref in dev, plain in prod
  [high]    ssm:API_KEY  String in dev, SecureString in prod

missing in dev:
  [medium]  ecs:shop-api-{env}/app/REDIS  missing in dev
  [medium]  lambda:shop-{env}-worker/CONFIG_PREFIX  missing in dev
  [medium]  lambda:shop-{env}-worker/PASSWORD  missing in dev
  [medium]  secret:legacy  missing in dev
  [medium]  ssm:NEW_FEATURE  missing in dev

missing in prod:
  [medium]  ecs:shop-api-{env}/app/CONFIG_PATH  missing in prod
  [medium]  lambda:shop-{env}-worker/QUEUE  missing in prod
  [medium]  ssm:DEBUG_TOOLBAR  missing in prod

15 finding(s) fail the check

parity inventory

dev: 5 secrets/parameters, 1 flagged
  secret Secret       shop/dev/stripe
         changed 2026-09-27  read -  rotation off age 400d  refs 2
           <- ecs:shop-dev/shop-api-dev (shop-api-dev:7)/app STRIPE
           <- lambda:shop-dev-worker SECRET_ARN
         FLAGS: unread, never_rotated  (never accessed)
  ssm    String       /shop/dev/API_KEY
         changed 2026-10-17  read -  rotation - age -  refs 1
           <- ecs:shop-dev/shop-api-dev (shop-api-dev:7)/app CONFIG_PATH (prefix)
  ssm    SecureString /shop/dev/DB_URL
         changed 2026-10-17  read -  rotation - age 10d  refs 3
           <- ecs:shop-dev/shop-api-dev (shop-api-dev:7)/app CONFIG_PATH (prefix)
           <- ecs:shop-dev/shop-api-dev (shop-api-dev:7)/app DB_URL
           <- ecs:shop-prod/shop-api-prod (shop-api-prod:42)/app REDIS [from prod]
  ssm    String       /shop/dev/DEBUG_TOOLBAR
         changed 2026-10-17  read -  rotation - age -  refs 1
           <- ecs:shop-dev/shop-api-dev (shop-api-dev:7)/app CONFIG_PATH (prefix)
  ssm    String       /shop/dev/LOG_LEVEL
         changed 2026-10-17  read -  rotation - age -  refs 1
           <- ecs:shop-dev/shop-api-dev (shop-api-dev:7)/app CONFIG_PATH (prefix)

prod: 6 secrets/parameters, 6 flagged
  secret Secret       shop/prod/legacy
         changed 2026-09-27  read 2026-06-29  rotation off age 400d  refs 0
         FLAGS: unread, never_rotated, orphaned
  secret Secret       shop/prod/stripe
         changed 2026-09-27  read 2026-10-26  rotation on age 200d  refs 1
           <- lambda:shop-prod-worker SECRET_ARN
         FLAGS: rotation_overdue  (rotation is enabled but has not run: check the rotation Lambda)
  ssm    SecureString /shop/prod/API_KEY
         changed 2026-10-17  read -  rotation - age 10d  refs 0
         FLAGS: orphaned
  ssm    SecureString /shop/prod/DB_URL
         changed 2025-12-31  read -  rotation - age 300d  refs 0
         FLAGS: never_rotated, orphaned
  ssm    String       /shop/prod/LOG_LEVEL
         changed 2026-10-17  read -  rotation - age -  refs 0
         FLAGS: orphaned
  ssm    String       /shop/prod/NEW_FEATURE
         changed 2026-10-17  read -  rotation - age -  refs 0
         FLAGS: orphaned

CI drift check and the weekly email

Free. Add .github/workflows/dawnfix-parity.yml that calls the reusable workflow dawnfix/dawnfix/.github/workflows/parity.yml@v0 with your read-only role per environment, or paste prompts/parity-ci.md into your coding agent:

name: dawnfix-parity
on:
  schedule: [{ cron: "41 5 * * 1" }]   # Mondays, before the 06:30 UTC digest
  push: { branches: [main], paths: [".parity.yml", "infra/**", "**/*.tf"] }
  workflow_dispatch:
permissions: { contents: read, id-token: write }
jobs:
  parity:
    uses: dawnfix/dawnfix/.github/workflows/parity.yml@v0
    with:
      left-role-arn: arn:aws:iam::111111111111:role/dawnfix-parity-read
      right-role-arn: arn:aws:iam::222222222222:role/dawnfix-parity-read
    secrets:
      DAWNFIX_ENTERPRISE_KEY: ${{ secrets.DAWNFIX_ENTERPRISE_KEY }}   # optional

It runs weekly and on every push to main that touches task definitions or infrastructure code, with a read-only OIDC role per environment, and runs parity check with the names in the job summary.

Pin @v0.5.0 or a commit SHA instead of @v0 to freeze it. Rather keep the whole job in your repo? Copy templates/github/workflows/dawnfix-parity.yml: the same job, reading repo variables instead of inputs.

With an Enterprise key as the DAWNFIX_ENTERPRISE_KEY secret, it also sends the counts to the hosted service, for the status page trend and Monday's email of unread, never-rotated and orphaned secrets. Without one it sends nothing. Contact us for Enterprise.