Skip to content

Scan for committed secrets in CI: non-public Babel URLs and Google Sheet IDs #25

Description

@gaurav

Why

"Never commit the Translator-specific URL" has been a documented rule in CLAUDE.md and
README.md for as long as there has been a config template, and until #20 nothing enforced it. The
rule had already failed in practice: the internal releases URL was the hardcoded default in
cli.py from the initial commit until the history was rewritten to remove it on 2026-09-01.

#20 added TestCommittedConfigTemplate (tests/test_cli.py), which fails if a non-public host
appears in env.default. That closes the template, but not the hole the leak actually came
through
— a default value in source. A scan over the whole tree is what would have caught it.

What to add

A CI step (and ideally a test, so it also runs locally) that fails on:

  1. Non-public Babel URLs. Every stars.renci.org URL in a tracked file must be under
    /var/babel/. Today there are 11, all compliant:

    6  https://stars.renci.org/var/babel/
    5  https://stars.renci.org/var/babel/latest/
    

    Prefer an allowlist ("only these paths are permitted") over a denylist naming the private
    directory — writing the private path into ci.yml to grep for it would reintroduce the string
    this repository just spent a history rewrite removing.

  2. Google Sheet IDs. Requested for coverage; note there is currently no Google Sheets
    reference anywhere in this repo, tracked or in history (git log -S docs.google --all is
    empty), so this one is preventive rather than fixing a known leak. Relevant because upstream
    Babel curates some concords in Sheets, so an ID could plausibly arrive here with a future
    feature. Pattern: docs.google.com/spreadsheets/d/<44-char id>, plus bare 44-character
    [A-Za-z0-9_-] IDs assigned to a variable named like a sheet.

Notes

  • Run it over tracked files only (git grep), not the working tree, so a developer's local .env
    is out of scope — .gitignore covers .env and .env.* as of Add babel-explorer: a CLI for querying Babel cross-references via DuckDB and NodeNorm #20.
  • Consider a general secret scanner (gitleaks, trufflehog) instead of bespoke greps, if the
    maintenance trade seems right. A bespoke allowlist is easier to reason about and produces no
    false positives; a scanner catches classes nobody thought to write a rule for.
  • This does not retroactively fix anything: the URL is out of this repository's history, but
    GitHub still retains pre-rewrite objects reachable by SHA, and the tree it pointed at still
    serves 200 unauthenticated. Both are being handled outside this repo.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions