Skip to content

Releases

flare-redact v1.10.4

Choose a tag to compare

@github-actions github-actions released this 22 Nov 19:44
17e41a6

Security: password-only connection strings were not redacted (GHSA-h8xg-cv97-3pfp)

  • url_credentials required a username before :password@, so a URL with an
    empty username, the usual form for Redis and Valkey and also used by
    RabbitMQ, Postgres and others, passed through in clear text:
    redis://:SuperSecret123@localhost:6379 now becomes redis://:***@localhost:6379.
    Hosts that look like a domain were sometimes caught by the email detector,
    but localhost, IP addresses and service names leaked in full.
  • In the JavaScript engine a password containing a colon was only partly
    masked: postgres://user:pa:ss@db became postgres://user:pa:***@db. The
    whole password is masked now, as the Python, Go and Rust engines already did.
  • The JavaScript, Python, Go and Rust engines change together, and the
    conformance corpus has both cases. Reported by Pranshu Raghav
    (@Zureno).

flare-redact v1.10.3

Choose a tag to compare

@github-actions github-actions released this 20 Nov 18:09
43b30d9

Fixed: an error keeps its cause

  • Redacting an error dropped its cause and an AggregateError's errors,
    because both are non-enumerable. A failed fetch logged through
    --import flare-redact/register showed only TypeError: fetch failed, without
    the ECONNREFUSED underneath. Both are now kept, redacted and still
    non-enumerable; scan() reports findings inside them (cause.message), and
    FlareFlow checks a placeholder inside a cause before restoring it.
  • Python keeps an exception's __cause__ and __context__ the same way.

flare-redact v1.10.2

Choose a tag to compare

@github-actions github-actions released this 20 Nov 09:14
cccc844

Fixed: a value redacted from JSON text comes back escaped once

  • Since 1.10.0 an original restored into JSON text is JSON-escaped. When the
    redacted input was itself JSON text and the captured value held an escape,
    such as p\"ss in {"url":"https://user:p\"ss@db.example.com/x"}, the
    vault stored the escaped form and the restore escaped it a second time, so a
    round trip added a backslash (#34).
  • A vault now stores a value captured from a string that is a JSON document in
    decoded form, when it is valid JSON string content. Restored into JSON it is
    escaped exactly once; restored into other text it reads as the value itself.
    Anything else is still stored as captured, so restored JSON stays valid.
  • FlareFlow applies the same rule when it mints a placeholder. A mask
    function now also receives text, the whole string the match was found in.
  • The JavaScript, Python, Go and Rust engines change together; FRS-1 section 11
    describes the rule and three new conformance cases cover it.

flare-redact v1.10.1

Choose a tag to compare

@github-actions github-actions released this 19 Nov 06:46
be1847f

Fixed: the IPv6 detector

  • Times of day such as 12:30:45 are no longer masked as IPv6 addresses. The
    old pattern accepted any three to eight colon-separated hex groups, so clock
    times in logs and FIX messages were redacted when ipv6 was enabled (it is
    part of the gdpr and strict presets).
  • A compressed address is now masked whole. 2001:db8::8a2e:370:7334 used to
    come out as 2001:db8::[REDACTED IPv6], leaving the network prefix visible.
    The pattern now knows every :: form, fe80::1, ::1, a trailing :: and
    an embedded IPv4 address (::ffff:192.168.1.10, 64:ff9b::192.0.2.33).
  • MAC addresses and code such as dead::beef or Foo::abc are not matched.
  • The JavaScript, Python, Go and Rust engines change together; new conformance
    cases cover compressed addresses, clock times and letter-only matches.

flare-redact v1.10.0

Choose a tag to compare

@github-actions github-actions released this 18 Nov 12:22
b798753

Security: restored values keep the structure of JSON (GHSA-4c5j-9f3p-p7mh)

  • An original put back into a string that is JSON is now JSON-escaped: tool-call
    arguments, Anthropic partial_json, JSON-mode output, and any string that
    is a JSON object or array passed to vault.restore() or restore(). Before,
    a value containing " broke the JSON, and a value containing ","key": could
    add a field to tool-call arguments or replace an earlier one, since JSON
    parsers keep the last duplicate key. Text that is not JSON is restored exactly
    as before.
  • Covered: wrapOpenAI and wrapAnthropic (buffered and streamed), the tool
    boundaries, authorizeForSink, the CLI's --restore, and the gateway. The
    gateway now restores streamed responses event by event and field by field, so
    a placeholder split across two events is put back and tool arguments that are
    JSON inside a JSON event are escaped at both levels. response.streamEscape: 'none' keeps the old byte-level behaviour.
  • OpenAI json_object/json_schema and Anthropic output_config.format
    requests have their streamed text restored escaped too.
  • The Python, Go and Rust engines follow the same rule, described in FRS-1
    section 11 and checked by new conformance cases. Python's wrap_openai and
    wrap_anthropic now restore streamed tool arguments (they were left as
    placeholders) and no longer drop text held back at the end of a field. Go and
    Rust add a JSON stream restorer (StreamJSON, stream_json) for callers that
    restore tool arguments themselves.
  • Known limits: JSON carried as a string inside tool arguments gets one level of
    escaping, and the deprecated streaming function_call is not restored.

Security: url_credentials in linear time (GHSA-x2x8-c4pf-r947)

  • The URL scheme in url_credentials is limited to 64 characters. Unbounded, a
    long run of scheme characters such as a-b.a-b.… made matching take time
    quadratic in its length: about 7 s for 80 kB through the default redact(),
    and the same in the Python engine. 1 MB now takes about 130 ms.
  • The scheme may contain _, so passwords in SQLAlchemy URLs such as
    oracle+cx_oracle://scott:tiger@db and redshift+redshift_connector://…
    are masked. They were not masked before.
  • Ships in the FRS-1 pack, which moves to version 1.10.0, with new conformance
    cases and a new case in npm run benchmark:adversarial.

Vercel AI SDK

  • Add flare-redact/ai-sdk. wrapLanguageModel({ model, middleware: flareRedactMiddleware() }) keeps secrets and personal data out of prompts for
    every provider the AI SDK supports (OpenAI, Anthropic, Google, Bedrock,
    Mistral, Groq and the rest). System, user and assistant text, reasoning,
    tool-call inputs and tool results become placeholders before the call; text,
    reasoning, tool calls and structured output are restored after it, streamed or
    not, including placeholders split across chunks. Files and images pass through
    unchanged.
  • It takes the same options as wrapOpenAI, plus session to keep placeholders
    stable across calls, and works with AI SDK 5, 6 and 7 without depending on
    ai. flare-redact init recognises the ai package and prints the line.

39 more detectors (90 to 129)

  • 25 service tokens, on by default: aws_bedrock_key, langsmith_key,
    pinecone_key, tavily_key, pypi_token, rubygems_key,
    dockerhub_token, jfrog_token, google_oauth_secret,
    alibaba_access_key, heroku_api_key, flyio_token,
    terraform_cloud_token, pulumi_token, planetscale_token,
    onepassword_token, age_secret_key, sentry_auth_token, grafana_token,
    dynatrace_token, atlassian_token, slack_webhook, mailchimp_key,
    brevo_key and resend_key.
  • gitlab_token catches GitLab 17's longer personal access tokens and the
    deploy, runner, trigger, CI job and other GitLab token types.
    digitalocean_token catches OAuth (doo_v1_) and refresh (dor_v1_) tokens.
  • 14 national IDs, off by default and reached through enable or the llm,
    gdpr and strict presets, each validated by its check digit and, where the
    number carries one, its birth date: ro_cnp, se_personnummer, fi_hetu,
    no_fodselsnummer, be_national_number, pt_nif, za_id, mx_curp,
    cl_rut, ar_cuit, sg_nric, il_teudat_zehut, gr_amka and uk_nino
    (prefix and suffix rules; it has no check digit). With za or ro enabled, a
    South African ID or Romanian CNP is masked whole instead of as a card number.
  • Every detector ships in all four engines through the FRS-1 pack, with match
    and near-miss tests and hostile-input cases in the adversarial benchmark.

Where people already look

  • Add .pre-commit-hooks.yaml: id: flare-redact stops a commit for the lines
    it adds, and id: flare-redact-files scans whole files for
    pre-commit run --all-files and pre-commit.ci. The package now builds in
    prepack, so installing it from a git checkout works.
  • Add a GitHub Action: uses: flare-collection/flare-redact@v1 scans the
    checkout, annotates each finding on the pull request, writes a job summary,
    can upload SARIF to code scanning, and never prints a value. Each release
    moves the v1 tag.
  • The Python and Rust engines are published to PyPI and crates.io from this
    release on, and the Go module gets sdk/go/vX.Y.Z tags so go get sees real
    versions. Both packages now include the licence file.

Platforms

  • CI runs the whole suite on Windows and macOS. --scan reports file paths with
    forward slashes on every platform; on Windows they used backslashes, which also
    made SARIF URIs invalid there.
  • The Python engine requires 3.9 or newer, the oldest version CI tests.

flare-redact v1.9.1

Choose a tag to compare

@github-actions github-actions released this 17 Nov 10:48
4d2c053

Documentation

  • The README is now a short overview: what it does, a quick start, where it
    plugs in (logs, LLM prompts, Sentry, commits), how it compares with logger
    path redaction, Sentry scrubbing, gitleaks and Presidio, and an FAQ.
  • The complete documentation moved, unchanged, to
    docs/guide.md, which also ships in the npm package so
    coding assistants reading node_modules find it.
  • Tests check that every README link lands on a real heading in the guide and
    that every detector count matches the code.

No code changes.

flare-redact v1.9.0

Choose a tag to compare

@github-actions github-actions released this 14 Nov 10:12
eb6151a

Turn it on without touching the code

  • Add flare-redact/register. node --import flare-redact/register app.js (or
    NODE_OPTIONS="--import flare-redact/register") redacts every
    console.log, info, warn, error and debug call with no code
    change. FLARE_REDACT_PRESET picks the preset; an unknown name stops the
    process at startup. It is the only module marked as having side effects.
  • Add flare-redact/sentry. Sentry.init({ dsn, ...sentryRedact({ preset: 'gdpr' }) }) redacts error events, transactions, spans, Sentry Logs and
    breadcrumbs before they are sent, masks cookies whole, and keeps Sentry's own
    fields (event, trace, span and debug ids, release, timestamps, SDK metadata,
    the file and function of each stack frame) exactly, so grouping, tracing and
    source maps keep working even with preset: 'strict'. A field is put back
    only where Sentry keeps it and only when its value has the shape that field
    has and no detector but entropy fires on it, so extra.release, a request
    field called sid or an email in an exception type is redacted like any
    other user data. A stack frame's file is kept only when it names a file and
    has no query string. Cookies are masked whatever the options and wherever
    they sit: the request, the response context, span attributes, breadcrumbs.
    The caller's event is never written to, frozen or not. Checked against
    @sentry/node 11: sentryRedact(opts, { traceLifecycle: 'stream' }) leaves
    out beforeSendTransaction, which Sentry 11 no longer calls and warns about.
    Two things Sentry sends pass through no hook and so cannot be redacted here:
    the release-health session and the trace header carrying the root span name.
  • flare-redact init recognises the Sentry SDKs and prints the no-code
    --import line alongside wrapConsole.

Stop a secret before the commit exists

  • Add flare-redact --staged: scan only the lines the next commit adds, read
    from the staged diff, and report each finding at its line in the staged file.
    A commit is stopped for what it introduces, not for old findings elsewhere in
    the file, and a renamed file is compared with its old path, so moving a file
    reports nothing. Files that change type and files a .gitattributes rule
    marks -diff or binary are scanned too, and line numbers do not depend on
    the repository's diff settings. --exclude, --max-file-size and the default
    excluded directories apply.
  • Add flare-redact init --hook, which writes a git pre-commit hook that runs
    it, preferring the project's own copy and falling back to the pinned release.
    An existing hook is kept unless --force is given; with husky, or a hooks
    folder shared outside the repository, it prints the line to add instead of
    writing anything, and it never writes through a symlink. If Node is not on the PATH of the git client, the hook lets
    the commit through and says so rather than block every commit.

Scans that do not cry wolf

  • --scan and --staged leave out generic_assignment findings whose value
    is plainly code: a variable or template (${SECRET}, $DB_PASSWORD,
    {{ secret }}), an environment read (process.env.TOKEN,
    os.getenv("KEY"), ENV["KEY"]), a field named like a secret
    (config.apiKey, user.password), a call with no arguments, a type
    (password: string), the variable of the same name, or a placeholder. It
    does not try to understand code: from the operator to the end of the line
    there must be exactly one of those forms and nothing else but closing
    punctuation or a comment. A default value, a second argument, a string, a
    number, or a .env and YAML style DB_PASSWORD=value keeps the finding. A
    more specific finding under a dropped assignment is still reported.
    --no-code-filter turns it off.
  • Redaction is not affected. redact(), scan() from code, the detector
    pack and the Python, Go and Rust engines behave exactly as in 1.8.0: an
    assignment is masked whether its value is code or not.
  • Exclude globs are matched with a table instead of a regular expression, so a
    pattern with several ** no longer takes unbounded time on a deep path.
  • flare-redact init /absolute/path reads that directory.

Docs

  • The README has no long dashes, its version and CI badges point at fresh URLs
    so a cached image cannot show an old release, and a test keeps the detector
    and language counts in the badges equal to what ships.
  • The website playground was still running the August build, without the 1.7.0
    fixes. It is rebuilt from this release, and a test now fails when the bundle
    and the shipped detectors differ.

flare-redact v1.8.0

Choose a tag to compare

@github-actions github-actions released this 14 Nov 08:05
522462f

Simpler setup

  • Add presets, so a caller names a goal instead of a list of tags:
    logs (defaults plus phone numbers), llm (every personal identifier plus
    the entities recogniser), gdpr (llm plus network, device and wallet
    identifiers) and strict (every detector). redact(text, { preset: 'llm' }),
    --preset on the CLI and the gateway, and FLARE_REDACT_PRESET. enable
    and disable apply on top and only ignores a preset. An unknown name throws
    ERR_UNKNOWN_PRESET; the gateway refuses one at startup and answers a client
    that sends one with HTTP 400.
  • Add flare-redact init. It reads package.json, prints a ready-to-paste
    step for each library it recognises (openai, @anthropic-ai/sdk, pino,
    winston, express, with console as the fallback) and never edits source
    files. --ci writes a GitHub workflow that runs flare-redact --scan on
    every pull request, and keeps an existing one unless --force is given.
  • Export PRESETS and the Preset type.

No existing option changed meaning; code without preset behaves as before.

flare-redact v1.7.0

Choose a tag to compare

@umudhasanli umudhasanli released this 14 Nov 07:17
8a7c2fd

Security: printed values and broken PEM blocks (GHSA-2jx3-6xv8-798v)

  • IBANs printed in groups of four (GB82 WEST 1234 5698 7654 32) are masked by
    the default policy. Groups may be separated by spaces, no-break spaces, thin
    spaces or narrow no-break spaces. The match stops at each country's registry
    length, so a currency code or BIC after the number is left alone, and the
    check digits are still validated.
  • US SSNs, Brazilian CPFs and German tax IDs written with spaces are masked like
    their compact forms.
  • A private key whose END footer is missing or carries another label is masked
    through that footer, or to the end of the input when no footer follows. Before,
    such a block passed through unmasked. redactStream() buffers it the same way.
  • The fixes ship in all four engines (Node, Python, Go and Rust) and in the FRS-1
    pack, which moves to version 1.7.0, with new conformance cases. Thanks to
    roshcompanylabs for the report.

Free-text PII without a model

  • Add enable: ['entities'] (or entities: true): a model-free recogniser for
    private_person, private_address, private_phone, private_date,
    account_number, private_handle, private_url and secret, the label set
    of OpenAI's privacy-filter. It combines cue phrases in the 24 library
    languages, name lists, address, phone and date shapes, context scoring and
    propagation to later mentions of a name.
  • Add recognizeEntities(), createEntityRecognizer(), ENTITY_LABELS and the
    flare-redact/entities subpath. The labels are ordinary detectors, so
    disable, only, vaults, every replacement mode, streams, the CLI and the
    gateway take them.
  • Add npm run benchmark:entities and a hand-labelled corpus. On a holdout
    written after tuning stopped, the first run reached 84.1% F1 with 12.0% of PII
    characters left visible, against 35.1% F1 and 67.4% for the regex detectors
    alone.
  • Every pattern is bounded; 200,000-character hostile inputs finish in
    milliseconds and the suite checks it.

Fixes

  • The label-only person_name detector no longer runs across a line break:
    Name: Fatima Haddad followed by Address: ... used to take
    Fatima Haddad\nAddress. Fixed in all four engines.

flare-redact v1.6.1 — NeMo Guardrails interoperability

Choose a tag to compare

@umudhasanli umudhasanli released this 09 Aug 14:55
c652ea7

NeMo Guardrails IORails + FlareFlow

This compatibility release adds a tested application-side boundary for combining NeMo Guardrails tool-call validation with FlareFlow source-to-sink declassification.

  • New deterministic, no-network nemo-guardrails-flareflow example
  • Blocks a protected database value transplanted into a valid HTTP tool call
  • Restores the same value only at the approved database sink and JSON path
  • New original integration guide, README/LLM docs, sitemap entry, and CI smoke coverage
  • Explicitly documents responsibilities, limitations, and project independence

No runtime API changed; existing 1.x code remains compatible.

Verification: 374 Node tests, 88 Python tests, Go vet/tests, Rust clippy/tests, Bun/Deno smoke, Docker gateway build/health check, all five examples, and npm provenance publishing.