Skip to content

Self-evolving Context Database for AI Agents. Unify Agent Memory, Knowledge RAG and Skills.

Revert "feat(plugins): redact secrets in captured transcripts before sending …" (#6475)

t0sakid164def87a2a
diff --git a/.gitattributes b/.gitattributes
index bdba17ba2..945fd15fb 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -3,7 +3,6 @@
# keep their copies in git; the rest are built at pack time and gitignored.
examples/claude-code-memory-plugin/scripts/shared/*.mjs linguist-generated=true
examples/codex-memory-plugin/scripts/shared/*.mjs linguist-generated=true
-examples/openclaw-plugin/shared/*.mjs linguist-generated=true
agent-plugins/servers/shared/*.mjs linguist-generated=true
# Regenerated by the TanStack Router plugin during every Studio build, which
diff --git a/docs/en/agent-integrations/02-claude-code.md b/docs/en/agent-integrations/02-claude-code.md
index 55e441e53..17b399bde 100644
--- a/docs/en/agent-integrations/02-claude-code.md
+++ b/docs/en/agent-integrations/02-claude-code.md
@@ -90,7 +90,6 @@ Configuration priority: Environment variables > `ovcli.conf` > `ov.conf` > Built
| `OPENVIKING_BYPASS_SESSION_PATTERNS` | `""` | CSV glob patterns to auto-bypass |
| `OPENVIKING_RECALL_QUERY_FILTERS` | `""` | CSV of sed-style regex rules applied to the prompt before it becomes a query ([grammar and examples](https://github.com/volcengine/OpenViking/blob/main/examples/claude-code-memory-plugin/README.md#input-filters)) |
| `OPENVIKING_CAPTURE_FILTERS` | `""` | CSV of sed-style regex rules applied to every captured turn (same grammar) |
-| `OPENVIKING_CAPTURE_REDACT` | `standard` | Secret redaction before a turn is sent or queued: `standard`, `strict` (adds the generic `key=value` rule) or `off`; user-level only ([details](https://github.com/volcengine/OpenViking/blob/main/examples/claude-code-memory-plugin/README.md#secret-redaction)) |
| `OPENVIKING_MEMORY_ENABLED` | (auto) | Force on/off |
| `OPENVIKING_DEBUG` | `false` | Write logs to `~/.openviking/logs/cc-hooks.log` |
diff --git a/docs/en/agent-integrations/04-codex.md b/docs/en/agent-integrations/04-codex.md
index 0eaf45e21..14c08a8ef 100644
--- a/docs/en/agent-integrations/04-codex.md
+++ b/docs/en/agent-integrations/04-codex.md
@@ -111,7 +111,6 @@ Credential source: env vars win by default — when any `OPENVIKING_*` credentia
| `OPENVIKING_CODEX_COMMITTED_TTL_MS` | `2592000000` | How long a committed session's transcript cursor is kept before its state file is retired |
| `OPENVIKING_RECALL_QUERY_FILTERS` | `""` | CSV of sed-style regex rules applied to the prompt before it becomes a query ([grammar and examples](https://github.com/volcengine/OpenViking/blob/main/examples/codex-memory-plugin/README.md#input-filters)) |
| `OPENVIKING_CAPTURE_FILTERS` | `""` | CSV of sed-style regex rules applied to every captured turn (same grammar) |
-| `OPENVIKING_CAPTURE_REDACT` | `standard` | Secret redaction before a turn is sent or queued: `standard`, `strict` (adds the generic `key=value` rule) or `off`; user-level only ([details](https://github.com/volcengine/OpenViking/blob/main/examples/codex-memory-plugin/README.md#secret-redaction)) |
| `OPENVIKING_DEBUG` | `false` | Write logs to `~/.openviking/logs/codex-hooks.log` |
Most of these knobs can also live in `ovcli.conf` under `plugin` — see [Plugin Settings](../configuration/02-client.md#plugin-settings). The two filter knobs are better written there, as JSON arrays, because the environment form is split on commas.
diff --git a/docs/en/agent-integrations/16-capability-reference.md b/docs/en/agent-integrations/16-capability-reference.md
index c0df7fa84..a9cdea4f4 100644
--- a/docs/en/agent-integrations/16-capability-reference.md
+++ b/docs/en/agent-integrations/16-capability-reference.md
@@ -300,7 +300,6 @@ Injected context is wrapped in fixed tags such as `<openviking-context>`, and ca
- **`keep_recent_count`** sets how many recent messages a commit leaves live in the session. The server default is 0, which archives everything. Claude Code, Codex, OpenCode, DSH, Cursor, TRAE, TRAE CN, ZCode, and Hermes send 0; pi sends the exact message count of its last 3 user turns in takeover mode and 0 otherwise; OpenClaw sends 10 on its threshold commit and 0 on reset, `memory_store`, and compaction.
- **Server auto-commit is off by default.** `memory.session_auto_commit.enabled` defaults to `false`, and the idle scanner does not start while it is off. A new session can still get a policy from `server.user_config_defaults.auto_commit_policy`, or explicitly through `POST /api/v1/sessions`, `PATCH /api/v1/sessions/{id}/config`, the SDK, or `ov session new --auto-commit-policy-json` and `ov session config set`. A policy's defaults are 150,000 pending tokens (strictly greater than), 100 messages, an 86,400-second idle timeout, `keep_recent_count` 0, and no minimum interval. The idle timeout also needs `memory.session_auto_commit.enabled=true`. The memory plugins send no policy, so without one of these settings the client is the only thing that commits.
- **Writes are batched.** The shared plugins send up to 100 messages per `POST /messages/batch`, matching the server limit, and fall back to one message at a time when the batch endpoint returns 404 or 405.
-- **Secrets are redacted on the client.** Before a message is sent or queued, the shared plugins and OpenClaw replace credentials found by the gitleaks default rules with <code v-pre>{{ov_redacted:&lt;rule&gt;:&lt;tag&gt;}}</code>, keeping the surrounding text. `captureRedact` picks `standard` (default), `strict` or `off`; Hermes and the pi-experimental-context-management demo do not redact.
- **Large tool output is stored separately.** The server moves tool output above 20,000 characters into a separate record and leaves a `tool_output_ref`. Plugins raise their own limit (`captureToolMaxChars`) to 1,000,000 only as a safety net.
- **Some writes run in the background.** Claude Code, Codex, and ZCode hand the `Stop` write to a detached worker by default (`OPENVIKING_WRITE_PATH_ASYNC`), so the host does not wait. The worker survives the terminal closing once it has started, but network errors or process termination can still interrupt it. While this is on, `Stop` no longer prints the `appended N turn(s)` notice.
diff --git a/docs/en/configuration/02-client.md b/docs/en/configuration/02-client.md
index 9d177a2d5..05b6013b9 100644
--- a/docs/en/configuration/02-client.md
+++ b/docs/en/configuration/02-client.md
@@ -150,8 +150,6 @@ Settings for memory plugins live under `plugin`. Keys directly under it provide
Many settings have a corresponding `OPENVIKING_*` environment variable: `OPENVIKING_RECALL_LIMIT` is `recallLimit`, `OPENVIKING_CAPTURE_ASSISTANT_TURNS` is `captureAssistantTurns`. `OPENVIKING_BYPASS_SESSION` also has a file setting, `plugin.bypassSession`; use the environment variable for a process-specific override. The full shared list is defined in `examples/memory-plugin-shared/lib/config-schema.mjs`. For usage, see the plugin READMEs: [Claude Code](https://github.com/volcengine/OpenViking/blob/main/examples/claude-code-memory-plugin/README.md#configuration) and [Codex](https://github.com/volcengine/OpenViking/blob/main/examples/codex-memory-plugin/README.md#tuning-the-plugin). List-valued knobs — `bypassSessionPatterns`, `recallQueryFilters`, `captureFilters` — are JSON arrays here, while their environment counterparts are comma-separated strings, so a value containing a literal comma can only be written in the array.
-`captureRedact` (`OPENVIKING_CAPTURE_REDACT`) controls the secret redaction every shared memory plugin and the OpenClaw plugin apply to a captured message before it is sent or queued locally: `standard` (default) runs the [gitleaks](https://github.com/gitleaks/gitleaks) provider-specific rules plus OpenViking's own keys (`ovgw_`, `ovgm_`, `ovat_`, `ovrt_`, `ovac_`); `strict` adds the generic `key=value` rule, which is the only one that catches a value with no provider format such as `SECRET_KEY=...`; and `off` (or `false`) turns it off. Hermes and the pi-experimental-context-management demo do not redact. Each secret is replaced by <code v-pre>{{ov_redacted:&lt;rule&gt;:&lt;tag&gt;}}</code>, where `<tag>` is a per-install HMAC prefix, so the same secret keeps the same tag. It is user-level only: a workspace file cannot set it, and an unknown tier name falls back to `standard`.
-
Resolution order, highest first: environment variables → the [workspace layers](#workspace-configuration) → `plugin.<harness>` → `plugin` → the legacy per-harness block in `ov.conf` → built-in defaults. Separately launched hook processes reread the file on each invocation. Reload behavior for persistent plugins depends on the host; restart the agent when uncertain. Environment changes also require a restart because hooks inherit the agent’s environment.
Memory plugins using the shared configuration loader read this section. See the corresponding [integration guide](../agent-integrations/01-overview.md) for supported fields and defaults. `ov-memory-doctor` prints what it resolved and warns about keys it does not recognise, naming the closest real one.
diff --git a/docs/zh/agent-integrations/02-claude-code.md b/docs/zh/agent-integrations/02-claude-code.md
index 4466537cc..5743c4236 100644
--- a/docs/zh/agent-integrations/02-claude-code.md
+++ b/docs/zh/agent-integrations/02-claude-code.md
@@ -90,7 +90,6 @@ skill 清单就是 `<available-skills>` 块,列出存放在 OpenViking 中的
| `OPENVIKING_BYPASS_SESSION_PATTERNS` | `""` | 通过 CSV 格式的 glob 模式匹配并自动跳过特定会话 |
| `OPENVIKING_RECALL_QUERY_FILTERS` | `""` | CSV 格式的 sed 风格正则规则,在 prompt 变成检索 query 前生效([语法与示例](https://github.com/volcengine/OpenViking/blob/main/examples/claude-code-memory-plugin/README.md#input-filters)) |
| `OPENVIKING_CAPTURE_FILTERS` | `""` | CSV 格式的 sed 风格正则规则,作用于每个被捕获的回合(同一套语法) |
-| `OPENVIKING_CAPTURE_REDACT` | `standard` | 回合发送或写入待重放队列前的密钥脱敏:`standard`、`strict`(另加通用 `key=value` 规则)或 `off`;只能在用户级配置([详情](https://github.com/volcengine/OpenViking/blob/main/examples/claude-code-memory-plugin/README_CN.md#密钥脱敏)) |
| `OPENVIKING_MEMORY_ENABLED` | (auto) | 强制开启或关闭插件 |
| `OPENVIKING_DEBUG` | `false` | 将调试日志输出至 `~/.openviking/logs/cc-hooks.log` |
diff --git a/docs/zh/agent-integrations/04-codex.md b/docs/zh/agent-integrations/04-codex.md
index 1e9ef16ea..b9d568536 100644
--- a/docs/zh/agent-integrations/04-codex.md
+++ b/docs/zh/agent-integrations/04-codex.md
@@ -109,7 +109,6 @@ memory 插件默认内置 OV-Usage。报告汇总自动召回和显式 OpenVikin
| `OPENVIKING_CODEX_COMMITTED_TTL_MS` | `2592000000` | 已提交会话的转录游标保留时长(毫秒),过期后删除状态文件 |
| `OPENVIKING_RECALL_QUERY_FILTERS` | `""` | CSV 格式的 sed 风格正则规则,在 prompt 变成检索 query 前生效([语法与示例](https://github.com/volcengine/OpenViking/blob/main/examples/codex-memory-plugin/README.md#input-filters)) |
| `OPENVIKING_CAPTURE_FILTERS` | `""` | CSV 格式的 sed 风格正则规则,作用于每个被捕获的回合(同一套语法) |
-| `OPENVIKING_CAPTURE_REDACT` | `standard` | 回合发送或写入待重放队列前的密钥脱敏:`standard`、`strict`(另加通用 `key=value` 规则)或 `off`;只能在用户级配置([详情](https://github.com/volcengine/OpenViking/blob/main/examples/codex-memory-plugin/README.md#secret-redaction)) |
| `OPENVIKING_DEBUG` | `false` | 是否将日志写入 `~/.openviking/logs/codex-hooks.log` |
这些配置大多也可以写在 `ovcli.conf` 的 `plugin` 段下——见[插件配置](../configuration/02-client.md#插件配置)。两个过滤器建议使用 JSON 数组,避免环境变量中的逗号被当作分隔符。
diff --git a/docs/zh/agent-integrations/16-capability-reference.md b/docs/zh/agent-integrations/16-capability-reference.md
index 2f12b78b6..ead9a0c36 100644
--- a/docs/zh/agent-integrations/16-capability-reference.md
+++ b/docs/zh/agent-integrations/16-capability-reference.md
@@ -299,7 +299,6 @@ Claude Code 和 Codex 默认 `auto`,其他集成默认 `off`。支持服务端
- **`keep_recent_count`** 决定提交后会话中保留多少条最近的消息。服务端默认 0,即全部归档。Claude Code、Codex、OpenCode、DSH、Cursor、TRAE、TRAE CN、ZCode 和 Hermes 发送 0;pi 在 takeover 模式下发送最近 3 个用户轮对应的确切消息数,其他情况发送 0;OpenClaw 在阈值提交时发送 10,在 reset、`memory_store` 和压缩时发送 0。
- **服务端自动提交默认关闭**。`memory.session_auto_commit.enabled` 默认 `false`,关闭时空闲扫描器不会启动。新会话仍可以从 `server.user_config_defaults.auto_commit_policy` 获得策略,也可以通过 `POST /api/v1/sessions`、`PATCH /api/v1/sessions/{id}/config`、SDK,或 `ov session new --auto-commit-policy-json` 与 `ov session config set` 显式设置。策略的默认值是:待提交 token 150,000(严格大于)、100 条消息、86,400 秒空闲超时、`keep_recent_count` 0、无最小间隔。空闲超时还需要 `memory.session_auto_commit.enabled=true`。记忆插件不发送策略,所以没有上述设置时,只有客户端会提交。
- **批量写入**。共享插件每次 `POST /messages/batch` 最多发送 100 条消息,与服务端上限一致;批量接口返回 404 或 405 时改为逐条发送。
-- **密钥在客户端脱敏**。消息发送或进入待重放队列之前,共享插件和 OpenClaw 会把 gitleaks 默认规则识别出的凭据替换为 <code v-pre>{{ov_redacted:&lt;rule&gt;:&lt;tag&gt;}}</code>,周围文本保持不变。`captureRedact` 可选 `standard`(默认)、`strict` 或 `off`;Hermes 和 pi-experimental-context-management 演示扩展不做脱敏。
- **大块工具输出单独存放**。服务端把超过 20,000 字符的工具输出移到单独的记录中,留下 `tool_output_ref`。插件把自己的上限(`captureToolMaxChars`)提高到 1,000,000,只作为兜底。
- **部分写入在后台运行**。Claude Code、Codex 和 ZCode 默认把 `Stop` 的写入交给一个分离的 worker(`OPENVIKING_WRITE_PATH_ASYNC`),宿主不用等待。worker 启动后,关闭终端不影响它,但网络错误或进程被终止仍可能打断它。开启这项设置时,`Stop` 不再输出 `appended N turn(s)` 提示。
diff --git a/docs/zh/configuration/02-client.md b/docs/zh/configuration/02-client.md
index f0ef1d33e..bfe06c2f0 100644
--- a/docs/zh/configuration/02-client.md
+++ b/docs/zh/configuration/02-client.md
@@ -147,8 +147,6 @@ export OPENVIKING_CLI_CONFIG_FILE=/path/to/ovcli.conf
许多配置项都有对应的 `OPENVIKING_*` 环境变量,例如 `OPENVIKING_RECALL_LIMIT` 对应 `recallLimit`,`OPENVIKING_CAPTURE_ASSISTANT_TURNS` 对应 `captureAssistantTurns`。`OPENVIKING_BYPASS_SESSION` 也有文件配置项 `plugin.bypassSession`;仅需覆盖当前进程时可使用环境变量。完整共享列表由 `examples/memory-plugin-shared/lib/config-schema.mjs` 定义。用法见插件 README:[Claude Code](https://github.com/volcengine/OpenViking/blob/main/examples/claude-code-memory-plugin/README.md#configuration)、[Codex](https://github.com/volcengine/OpenViking/blob/main/examples/codex-memory-plugin/README.md#tuning-the-plugin)。取列表值的配置项(`bypassSessionPatterns`、`recallQueryFilters`、`captureFilters`)在这里是 JSON 数组,而它们的环境变量对应物是逗号分隔的字符串,所以值里带字面逗号的只能写进数组。
-`captureRedact`(`OPENVIKING_CAPTURE_REDACT`)控制密钥脱敏:各共享记忆插件和 OpenClaw 插件在发送被捕获的消息、或把它写入本地待重放队列之前,先替换其中的凭据。`standard`(默认)运行 [gitleaks](https://github.com/gitleaks/gitleaks) 中针对具体服务的规则,外加 OpenViking 自己签发的 key(`ovgw_`、`ovgm_`、`ovat_`、`ovrt_`、`ovac_`);`strict` 另加通用的 `key=value` 规则,`SECRET_KEY=...` 这类没有服务特征格式的值只有它能识别;`off`(或 `false`)关闭。Hermes 和 pi-experimental-context-management 演示扩展不做脱敏。每个密钥替换为 <code v-pre>{{ov_redacted:&lt;rule&gt;:&lt;tag&gt;}}</code>,`<tag>` 是按安装生成的 HMAC 前缀,同一个密钥的 tag 保持不变。它只能在用户级配置:工作区文件设置不了它,不认识的档位名按 `standard` 处理。
-
优先级从高到低:环境变量 → [工作区各层](#工作区配置) → `plugin.<harness>` → `plugin` → `ov.conf` 里遗留的按 harness 分块 → 内置默认值。独立启动的 hook 进程在每次触发时重新读文件;常驻插件何时重载取决于宿主,不确定时重启 Agent。环境变量改动也需要重启,因为 hook 继承的是 Agent 进程的环境。
采用共享配置加载器的记忆插件会读取这一段;各宿主支持的字段和默认值见对应的 [集成文档](../agent-integrations/01-overview.md)。`ov-memory-doctor` 会打印它解析到的结果,并对不认识的键给出告警和最接近的正确键名。
diff --git a/examples/agent-hook-plugin/hosts/cursor.mjs b/examples/agent-hook-plugin/hosts/cursor.mjs
index a1b96b5d3..e3f6c833f 100644
--- a/examples/agent-hook-plugin/hosts/cursor.mjs
+++ b/examples/agent-hook-plugin/hosts/cursor.mjs
@@ -136,9 +136,7 @@ async function captureTranscript(ctx, state) {
...turn,
...(ctx.peerId ? { peer_id: ctx.peerId } : {}),
}));
- const result = await sendSessionMessages(ctx.fetchJSON, ctx.sessionId, payloads, {
- redactTier: ctx.cfg.captureRedact,
- });
+ const result = await sendSessionMessages(ctx.fetchJSON, ctx.sessionId, payloads);
const captured = result.sent;
const acknowledged = toSend.slice(0, captured);
for (const item of acknowledged) {
diff --git a/examples/agent-hook-plugin/hosts/cursor/openviking.integration.json b/examples/agent-hook-plugin/hosts/cursor/openviking.integration.json
index dd9490edb..0920ce723 100644
--- a/examples/agent-hook-plugin/hosts/cursor/openviking.integration.json
+++ b/examples/agent-hook-plugin/hosts/cursor/openviking.integration.json
@@ -1,7 +1,7 @@
{
"schemaVersion": 1,
"id": "openviking-memory",
- "version": "0.5.24",
+ "version": "0.5.23",
"clients": [
"cursor"
],
diff --git a/examples/agent-hook-plugin/hosts/kimicode.mjs b/examples/agent-hook-plugin/hosts/kimicode.mjs
index 811d377ca..3402c65c0 100644
--- a/examples/agent-hook-plugin/hosts/kimicode.mjs
+++ b/examples/agent-hook-plugin/hosts/kimicode.mjs
@@ -65,9 +65,7 @@ export const kimicode = {
const plan = buildIncrementalCapturePlan(transcript.turns, state, ctx.cfg);
if (plan.toSend.length === 0) return null;
- const result = await addAgentMessages(ctx.fetchJSON, ctx.sessionId, plan.payloads, ctx.peerId, {
- redactTier: ctx.cfg.captureRedact,
- });
+ const result = await addAgentMessages(ctx.fetchJSON, ctx.sessionId, plan.payloads, ctx.peerId);
const next = applyIncrementalCaptureResult(state, plan, result, cleanKimicodeText);
let capturedSinceCommit = Number(state.capturedSinceCommit || 0) + next.captured;
if (shouldCommitKimicodeCapture(event, ctx.cfg, state.capturedSinceCommit, next.captured)) {
diff --git a/examples/agent-hook-plugin/hosts/kimicode/kimi.plugin.json b/examples/agent-hook-plugin/hosts/kimicode/kimi.plugin.json
index cca494bbe..341344eea 100644
--- a/examples/agent-hook-plugin/hosts/kimicode/kimi.plugin.json
+++ b/examples/agent-hook-plugin/hosts/kimicode/kimi.plugin.json
@@ -1,6 +1,6 @@
{
"name": "openviking-memory",
- "version": "0.5.24",
+ "version": "0.5.23",
"description": "Long-term semantic memory for Kimi Code CLI, powered by OpenViking.",
"author": {
"name": "OpenViking",
diff --git a/examples/agent-hook-plugin/hosts/kimicode/openviking.integration.json b/examples/agent-hook-plugin/hosts/kimicode/openviking.integration.json
index 4ffcb0ad9..86d611685 100644
--- a/examples/agent-hook-plugin/hosts/kimicode/openviking.integration.json
+++ b/examples/agent-hook-plugin/hosts/kimicode/openviking.integration.json
@@ -1,7 +1,7 @@
{
"schemaVersion": 1,
"id": "openviking-memory",
- "version": "0.5.24",
+ "version": "0.5.23",
"clients": [
"kimicode"
],
diff --git a/examples/agent-hook-plugin/hosts/trae.mjs b/examples/agent-hook-plugin/hosts/trae.mjs
index 309e07da7..98f65dd4c 100644
--- a/examples/agent-hook-plugin/hosts/trae.mjs
+++ b/examples/agent-hook-plugin/hosts/trae.mjs
@@ -43,9 +43,7 @@ export const trae = {
}
toSend.push({ hash, turn: kept[0] });
}
- const result = await addAgentMessages(ctx.fetchJSON, ctx.sessionId, toSend.map((item) => item.turn), ctx.peerId, {
- redactTier: ctx.cfg.captureRedact,
- });
+ const result = await addAgentMessages(ctx.fetchJSON, ctx.sessionId, toSend.map((item) => item.turn), ctx.peerId);
const captured = result.sent + result.queued;
for (const item of toSend.slice(0, captured)) hashes.add(item.hash);
let nextCount = Number(state.capturedSinceCommit || 0) + captured;
diff --git a/examples/agent-hook-plugin/hosts/trae/openviking.integration.json b/examples/agent-hook-plugin/hosts/trae/openviking.integration.json
index cd7859442..857670d07 100644
--- a/examples/agent-hook-plugin/hosts/trae/openviking.integration.json
+++ b/examples/agent-hook-plugin/hosts/trae/openviking.integration.json
@@ -1,7 +1,7 @@
{
"schemaVersion": 1,
"id": "openviking-memory",
- "version": "0.5.24",
+ "version": "0.5.23",
"clients": [
"trae",
"trae-cn"
diff --git a/examples/agent-hook-plugin/hosts/zcode.mjs b/examples/agent-hook-plugin/hosts/zcode.mjs
index c4a271b36..9121711fe 100644
--- a/examples/agent-hook-plugin/hosts/zcode.mjs
+++ b/examples/agent-hook-plugin/hosts/zcode.mjs
@@ -46,9 +46,7 @@ export const zcode = {
// could be a Stop with no new content, or a race with UserPromptSubmit).
if (plan.toSend.length === 0) return null;
- const result = await addAgentMessages(ctx.fetchJSON, ctx.sessionId, plan.payloads, ctx.peerId, {
- redactTier: ctx.cfg.captureRedact,
- });
+ const result = await addAgentMessages(ctx.fetchJSON, ctx.sessionId, plan.payloads, ctx.peerId);
const { captured, ...nextState } = applyZcodeCaptureResult(state, plan, result);
let nextCount = Number(state.capturedSinceCommit || 0) + captured;
if (captured > 0) {
diff --git a/examples/agent-hook-plugin/hosts/zcode/openviking.integration.json b/examples/agent-hook-plugin/hosts/zcode/openviking.integration.json
index b471d078a..1fb90ebeb 100644
--- a/examples/agent-hook-plugin/hosts/zcode/openviking.integration.json
+++ b/examples/agent-hook-plugin/hosts/zcode/openviking.integration.json
@@ -1,7 +1,7 @@
{
"schemaVersion": 1,
"id": "openviking-memory",
- "version": "0.5.24",
+ "version": "0.5.23",
"clients": [
"zcode"
],
diff --git a/examples/agent-hook-plugin/plugin.json b/examples/agent-hook-plugin/plugin.json
index 989c607e9..06a976206 100644
--- a/examples/agent-hook-plugin/plugin.json
+++ b/examples/agent-hook-plugin/plugin.json
@@ -1,6 +1,6 @@
{
"name": "agent-hook-plugin",
- "version": "0.5.24",
+ "version": "0.5.23",
"description": "Long-term semantic memory for Cursor, TRAE, TRAE CN, ZCode and Kimi Code — powered by OpenViking. Auto-recall relevant memories and capture the conversation as it happens.",
"author": {
"name": "OpenViking",
diff --git a/examples/agent-hook-plugin/scripts/hook.mjs b/examples/agent-hook-plugin/scripts/hook.mjs
index 2f0f7e7af..1e69ab34c 100644
--- a/examples/agent-hook-plugin/scripts/hook.mjs
+++ b/examples/agent-hook-plugin/scripts/hook.mjs
@@ -69,8 +69,7 @@ async function sessionStart(ctx) {
const now = Date.now();
if (now - Number(state.lastSessionStartAt || 0) < 2000) return "";
await writeHookState(clientId, ctx.nativeSessionId, { ...state, lastSessionStartAt: now });
- await replayAgentPending(ctx.fetchJSON, log, { redactTier: ctx.cfg.captureRedact })
- .catch((error) => logError("pending", error));
+ await replayAgentPending(ctx.fetchJSON, log).catch((error) => logError("pending", error));
if ((host.profileStage || "session-start") !== "session-start") return "";
const profile = await buildAgentProfile(ctx.fetchJSON, ctx.cfg, ctx.cwd).catch((error) => {
logError("profile", error);
diff --git a/examples/claude-code-memory-plugin/.claude-plugin/plugin.json b/examples/claude-code-memory-plugin/.claude-plugin/plugin.json
index 6e6692b7e..bcf61fa9a 100644
--- a/examples/claude-code-memory-plugin/.claude-plugin/plugin.json
+++ b/examples/claude-code-memory-plugin/.claude-plugin/plugin.json
@@ -1,6 +1,6 @@
{
"name": "openviking-memory",
- "version": "0.7.18",
+ "version": "0.7.17",
"description": "Long-term semantic memory for Claude Code, powered by OpenViking. Auto-recall relevant memories at session start and capture important information during conversations.",
"author": {
"name": "OpenViking",
diff --git a/examples/claude-code-memory-plugin/README.md b/examples/claude-code-memory-plugin/README.md
index 82e2142b4..73028f958 100644
--- a/examples/claude-code-memory-plugin/README.md
+++ b/examples/claude-code-memory-plugin/README.md
@@ -203,7 +203,6 @@ Recall covers skills as well as memories: the server-assembled context block can
| `OPENVIKING_COMMIT_TOKEN_THRESHOLD` | `20000` | Pending-token threshold for client-driven commit |
| `OPENVIKING_RESUME_CONTEXT_BUDGET` | `32000` | Token budget when fetching archive overview on session resume |
| `OPENVIKING_CAPTURE_FILTERS` | `""` | CSV of regex rules applied to every captured turn — see [Input filters](#input-filters) |
-| `OPENVIKING_CAPTURE_REDACT` | `standard` | Secret redaction before a turn is sent or queued: `off`, `standard`, `strict` — see [Secret redaction](#secret-redaction) |
#### Session-start injection
@@ -328,20 +327,6 @@ In `ovcli.conf` the rules are a JSON array, so backslashes are doubled:
- **Substitutions reach tool calls, verdicts do not.** On the capture path an `s` rule also rewrites every string value in a tool call's input and a tool result's output, so a redaction rule covers a secret that reached a command or its output. `d`/`k` rules look only at the turn's text.
- **A bad rule is skipped, never fatal.** `ov-memory-doctor` lists the active rules and reports the exact parse or RegExp error for the ones it could not compile.
-### Secret redaction
-
-Before a captured turn is sent to OpenViking — or written to the local pending queue when the server is unreachable — the plugin replaces credentials in it: tokens a tool printed, a `cat .env`, a key pasted into the prompt. Detection is the [gitleaks](https://github.com/gitleaks/gitleaks) default rule set as gitleaks ships it, plus rules for OpenViking's own keys, run on this machine. Only the secret is replaced, so `API_KEY=sk-…` is stored as `API_KEY={{ov_redacted:<rule>:<tag>}}`; `<tag>` is 8 hex characters of an HMAC under a key kept in `~/.openviking/state/redact/` (or `OPENVIKING_STATE_DIR`), so the same secret gets the same tag but the tag cannot be checked against a guess elsewhere.
-
-`captureRedact` / `OPENVIKING_CAPTURE_REDACT` picks the tier:
-
-| Tier | What it redacts |
-|------|-----------------|
-| `standard` (default) | Every provider-specific gitleaks rule (GitHub, AWS, OpenAI, Anthropic, Slack, Stripe, private keys, JWTs, …), plus OpenViking's own keys (`ovgw_`, `ovgm_`, `ovat_`, `ovrt_`, `ovac_`). A few gitleaks rules too slow for JavaScript's regex engine are left out; `lib/secret-rules.mjs` lists them |
-| `strict` | Also gitleaks' `generic-api-key`: any high-entropy value after a key-ish name such as `password=` or `API_TOKEN:`. A `.env` value with no provider format (`SECRET_KEY=…`, `DB_PASSWORD=…`) is only caught here |
-| `off` | Nothing (`false`, `0` and `no` also mean off) |
-
-It is a user-level setting: set it in `ovcli.conf`'s `plugin` section or the environment. A repository's `.openviking/config.json` cannot change it, and an unknown tier name falls back to `standard`. Redaction runs after `captureFilters`, on every text field of the message, including tool input and output. A string the scanner fails on is replaced whole with `{{ov_redacted:scan-failed:<tag>}}`, and text past a string's first 1,000,000 characters, or past 2,000,000 characters scanned in one send, with `{{ov_redacted:scan-oversize:<tag>}}`, rather than sent unscanned.
-
### Plugin settings in `ovcli.conf`
Client-side tuning belongs in `~/.openviking/ovcli.conf` under a `plugin` section. Shared keys apply to every harness; a per-harness object overrides them:
diff --git a/examples/claude-code-memory-plugin/README_CN.md b/examples/claude-code-memory-plugin/README_CN.md
index 3f66911bd..483212046 100644
--- a/examples/claude-code-memory-plugin/README_CN.md
+++ b/examples/claude-code-memory-plugin/README_CN.md
@@ -171,7 +171,6 @@ claude
| `OPENVIKING_COMMIT_TOKEN_THRESHOLD` | `20000` | client-driven commit 的 pending-token 阈值 |
| `OPENVIKING_RESUME_CONTEXT_BUDGET` | `32000` | resume 时拉取 archive overview 的 token 预算 |
| `OPENVIKING_CAPTURE_FILTERS` | `""` | 逗号分隔的正则规则,作用于每个被捕获的回合 —— 见[输入过滤器](#输入过滤器) |
-| `OPENVIKING_CAPTURE_REDACT` | `standard` | 回合发送或写入待重放队列前的密钥脱敏:`off`、`standard`、`strict` —— 见[密钥脱敏](#密钥脱敏) |
#### 会话启动注入
@@ -296,20 +295,6 @@ bypass 命中时所有 hook 直接放行,不联系 OpenViking。
- **替换会作用到工具调用,取舍判断不会。** 在写路径上,`s` 规则也会改写工具调用输入里的每个字符串值和工具结果的输出,所以脱敏规则同样能盖住出现在命令或命令输出里的密钥;`d`/`k` 规则只看回合的文本。
- **坏规则只会被跳过,不会让 hook 挂掉。** `ov-memory-doctor` 会列出生效的规则,并对编译失败的那条给出确切的解析或 RegExp 报错。
-### 密钥脱敏
-
-被捕获的回合在发往 OpenViking 之前(服务器不可达时,在写入本地待重放队列之前),插件会先把其中的凭据替换掉:工具打印出来的 token、一次 `cat .env`、贴进提示词里的 key。检测规则是 [gitleaks](https://github.com/gitleaks/gitleaks) 原样发布的默认规则集,外加识别 OpenViking 自己 key 的规则,在本机运行。只替换密钥本身,所以 `API_KEY=sk-…` 存下来是 `API_KEY={{ov_redacted:<rule>:<tag>}}`;`<tag>` 是 HMAC 的前 8 位十六进制,密钥保存在 `~/.openviking/state/redact/`(或 `OPENVIKING_STATE_DIR`)下,因此同一个密钥得到同一个 tag,但离开本机无法用猜测值去核对 tag。
-
-`captureRedact` / `OPENVIKING_CAPTURE_REDACT` 选择档位:
-
-| 档位 | 脱敏范围 |
-|------|----------|
-| `standard`(默认) | gitleaks 所有针对具体服务的规则(GitHub、AWS、OpenAI、Anthropic、Slack、Stripe、私钥、JWT 等),外加 OpenViking 自己签发的 key(`ovgw_`、`ovgm_`、`ovat_`、`ovrt_`、`ovac_`)。少数在 JavaScript 正则引擎下过慢的 gitleaks 规则未启用,`lib/secret-rules.mjs` 里列出了它们 |
-| `strict` | 另加 gitleaks 的 `generic-api-key`:任何跟在 `password=`、`API_TOKEN:` 这类键名后面的高熵值。没有服务特征格式的 `.env` 值(`SECRET_KEY=…`、`DB_PASSWORD=…`)只有这一档能识别 |
-| `off` | 不脱敏(`false`、`0`、`no` 也表示关闭) |
-
-这是用户级配置:写在 `ovcli.conf` 的 `plugin` 段或环境变量里。仓库里的 `.openviking/config.json` 改不了它;不认识的档位名按 `standard` 处理。脱敏在 `captureFilters` 之后进行,覆盖消息里的每个文本字段,包括工具的输入和输出。扫描出错的字符串会整体替换成 `{{ov_redacted:scan-failed:<tag>}}`,单个字符串超过 1,000,000 个字符的部分、以及一次发送中累计扫描超过 2,000,000 个字符之后的内容,都替换成 `{{ov_redacted:scan-oversize:<tag>}}`,而不是不经扫描就发出去。
-
### 插件配置放在 `ovcli.conf`
客户端侧的调优应写在 `~/.openviking/ovcli.conf` 的 `plugin` 区域。共享键对所有 harness 生效,分 harness 的对象可覆盖它:
diff --git a/examples/claude-code-memory-plugin/package.json b/examples/claude-code-memory-plugin/package.json
index 3f4f26c65..2557ab684 100644
--- a/examples/claude-code-memory-plugin/package.json
+++ b/examples/claude-code-memory-plugin/package.json
@@ -1,6 +1,6 @@
{
"name": "claude-code-openviking-memory",
- "version": "0.7.18",
+ "version": "0.7.17",
"description": "OpenViking memory plugin for Claude Code — semantic long-term memory",
"type": "module",
"scripts": {
diff --git a/examples/claude-code-memory-plugin/scripts/auto-capture.mjs b/examples/claude-code-memory-plugin/scripts/auto-capture.mjs
index ec7f381df..8be33ec00 100644
--- a/examples/claude-code-memory-plugin/scripts/auto-capture.mjs
+++ b/examples/claude-code-memory-plugin/scripts/auto-capture.mjs
@@ -176,7 +176,6 @@ async function pushTurnsToOv(ovSessionId, turns, peerId = "", cfg = {}) {
}
const res = await sendSessionMessages(fetchJSON, ovSessionId, payloads, {
enqueueOnRetryable: true,
- redactTier: cfg.captureRedact,
});
return {
ok: res.sent,
@@ -196,9 +195,7 @@ async function enqueueTurnsToPending(ovSessionId, turns, peerId = "", cfg = {})
const payload = { role: turn.role, parts };
if (peerId) payload.peer_id = peerId;
- const res = await enqueuePendingDirectly("addMessage", ovSessionId, payload, {
- redactTier: cfg.captureRedact,
- });
+ const res = await enqueuePendingDirectly("addMessage", ovSessionId, payload);
if (res.ok) queued++;
else failed++;
}
@@ -324,7 +321,7 @@ async function main({ cfg, input, cwd }) {
// SessionStart replays at most one capped batch, so drain more of the
// queue here; older entries go out before this turn's messages.
try {
- await replayPending(fetchJSON, log, { consumeRetries: false, redactTier: cfg.captureRedact });
+ await replayPending(fetchJSON, log, { consumeRetries: false });
} catch (err) {
logError("pending-replay", err);
}
diff --git a/examples/claude-code-memory-plugin/scripts/session-start.mjs b/examples/claude-code-memory-plugin/scripts/session-start.mjs
index 40a1f2274..348ad3b85 100644
--- a/examples/claude-code-memory-plugin/scripts/session-start.mjs
+++ b/examples/claude-code-memory-plugin/scripts/session-start.mjs
@@ -118,7 +118,7 @@ runHookStage({
// disable injection but still expect failed writes from prior short-lived
// coding sessions to be recovered when OpenViking is healthy again.
try {
- const replayResult = await replayPending(fetchJSON, log, { redactTier: cfg.captureRedact });
+ const replayResult = await replayPending(fetchJSON, log);
if (replayResult.replayed > 0 || replayResult.failed > 0 || replayResult.deferred > 0) {
log("pending-replay", replayResult);
}
diff --git a/examples/claude-code-memory-plugin/scripts/shared/agent-hook-runtime.mjs b/examples/claude-code-memory-plugin/scripts/shared/agent-hook-runtime.mjs
index fc5f67eff..6018494cf 100644
--- a/examples/claude-code-memory-plugin/scripts/shared/agent-hook-runtime.mjs
+++ b/examples/claude-code-memory-plugin/scripts/shared/agent-hook-runtime.mjs
@@ -11,7 +11,6 @@ import { enqueue, replayPending } from "./pending-queue.mjs";
import { buildProfileBlock } from "./profile-inject.mjs";
import { buildRecallBlock, isRecallEnabled } from "./recall-core.mjs";
import { buildPluginConfig } from "./plugin-config.mjs";
-import { redactPayload } from "./redact.mjs";
import { isRetryableFailure } from "./retryable.mjs";
import { deriveHarnessSessionId, isBypassed } from "./session-model.mjs";
import { resolveEffectivePeerId } from "./workspace-peer.mjs";
@@ -183,14 +182,10 @@ export function makeAgentFetchJSON(cfg, cwd = process.cwd(), {
return { fetchJSON, get effectivePeer() { return workspacePeer(); } };
}
-/**
- * Park a write for the next hook to replay. Never throws: the caller is a hook.
- * An addMessage payload is redacted under `options.redactTier` on its way to
- * disk unless `options.redacted` says the caller already did it.
- */
-export async function enqueueAgentPending(type, sessionId, payload = {}, options = {}) {
+/** Park a write for the next hook to replay. Never throws: the caller is a hook. */
+export async function enqueueAgentPending(type, sessionId, payload = {}) {
try {
- return await enqueue(type, sessionId, payload, options);
+ return await enqueue(type, sessionId, payload);
} catch {
return { ok: false };
}
@@ -201,7 +196,7 @@ export async function enqueueAgentPending(type, sessionId, payload = {}, options
* stderr when no retry can help. `pendingQueued` / `pendingEnqueueFailed` are
* what the capture hooks log and what decides whether a turn is lost.
*/
-async function notePendingWrite(type, sessionId, payload, result, enqueueOptions = {}) {
+async function notePendingWrite(type, sessionId, payload, result) {
if (result.ok) return result;
if (!isRetryableFailure(result)) {
const detail = result.error?.message || result.error?.code || "";
@@ -211,38 +206,30 @@ async function notePendingWrite(type, sessionId, payload, result, enqueueOptions
);
return result;
}
- const pending = await enqueueAgentPending(type, sessionId, payload, enqueueOptions);
+ const pending = await enqueueAgentPending(type, sessionId, payload);
if (pending.ok) result.pendingQueued = true;
else result.pendingEnqueueFailed = true;
return result;
}
-/**
- * Add one message. The payload is secret-redacted under `redactTier` (the
- * caller's resolved `captureRedact`, default "standard") before the POST, and
- * the same redacted copy is what a retryable failure parks in the queue.
- */
-export async function addAgentMessage(fetchJSON, sessionId, payload, { redactTier } = {}) {
- const body = redactPayload(payload, { tier: redactTier });
+export async function addAgentMessage(fetchJSON, sessionId, payload) {
const result = await fetchJSON(`/api/v1/sessions/${encodeURIComponent(sessionId)}/messages`, {
method: "POST",
- body: JSON.stringify(body),
+ body: JSON.stringify(payload),
});
- return notePendingWrite("addMessage", sessionId, body, result, { redacted: true });
+ return notePendingWrite("addMessage", sessionId, payload, result);
}
/**
* Session routes attribute a message by its body `peer_id` alone: the
* actor-peer header scopes reads, not session writes. A payload that already
* names its peer keeps it; an empty `peerId` (peer mode off) stamps nothing.
- * `redactTier` is the caller's resolved `captureRedact`; sendSessionMessages
- * redacts under it before anything is sent or queued.
*/
-export async function addAgentMessages(fetchJSON, sessionId, payloads, peerId = "", { redactTier } = {}) {
+export async function addAgentMessages(fetchJSON, sessionId, payloads, peerId = "") {
const stamped = peerId
? payloads.map((payload) => (payload.peer_id ? payload : { ...payload, peer_id: peerId }))
: payloads;
- return sendSessionMessages(fetchJSON, sessionId, stamped, { enqueueOnRetryable: true, redactTier });
+ return sendSessionMessages(fetchJSON, sessionId, stamped, { enqueueOnRetryable: true });
}
export async function commitAgentSession(fetchJSON, sessionId, log = () => {}, payload = {}) {
@@ -278,9 +265,8 @@ export async function getAgentSessionContext(fetchJSON, sessionId, tokenBudget =
return result.ok ? result.result : null;
}
-/** Replay the pending queue; `options.redactTier` is the caller's `captureRedact`. */
-export async function replayAgentPending(fetchJSON, log = () => {}, options = {}) {
- return replayPending(fetchJSON, log, options);
+export async function replayAgentPending(fetchJSON, log = () => {}) {
+ return replayPending(fetchJSON, log);
}
export async function recallForPrompt(fetchJSON, cfg, prompt, cwd, log = () => {}, options = {}) {
diff --git a/examples/claude-code-memory-plugin/scripts/shared/batch-send.mjs b/examples/claude-code-memory-plugin/scripts/shared/batch-send.mjs
index 253e7713f..d7ec355cc 100644
--- a/examples/claude-code-memory-plugin/scripts/shared/batch-send.mjs
+++ b/examples/claude-code-memory-plugin/scripts/shared/batch-send.mjs
@@ -1,6 +1,5 @@
// GENERATED FROM examples/memory-plugin-shared/lib. DO NOT EDIT.
import { enqueue } from "./pending-queue.mjs";
-import { redactPayloads } from "./redact.mjs";
import { isRetryableFailure } from "./retryable.mjs";
export const BATCH_LIMIT = 100;
@@ -34,8 +33,6 @@ async function enqueueRemainder(sessionId, payloads, startIndex, result, retryab
for (let i = startIndex; i < payloads.length; i++) {
const queued = await enqueue("addMessage", sessionId, payloads[i], {
createdAt: baseCreatedAt + (i - startIndex),
- // sendSessionMessages redacted every payload under the caller's tier.
- redacted: true,
});
if (!queued.ok) {
// Stop at the first enqueue failure so queued entries stay a contiguous
@@ -78,24 +75,18 @@ async function sendSerial(fetchJSON, sessionId, payloads, startIndex, opts, resu
/**
* Send add-message payloads in server-sized batches with serial fallback.
*
- * Every payload is secret-redacted (lib/redact.mjs) once, up front, under
- * `opts.redactTier`; the batch POST, the serial fallback and the pending queue
- * all carry that redacted copy, so no path out of here holds the plaintext.
- * The caller's payload objects are never mutated.
- *
* @param {Function} fetchJSON - (path, init) => { ok, status, result?, error? }
* @param {string} sessionId - OpenViking session id
* @param {Array<object>} payloads - sanitized add-message request bodies
* @param {object} opts
* @param {boolean} opts.enqueueOnRetryable - enqueue unsent payloads after a retryable failure
* @param {Function} opts.onSent - called with the number of messages durably sent after each success
- * @param {string} [opts.redactTier="standard"] - the caller's resolved `captureRedact`
* @returns {Promise<{sent:number,queued:number,enqueueFailed:number,failed:number,retryable:boolean,usedBatch:boolean,lastError:any}>}
*/
export async function sendSessionMessages(fetchJSON, sessionId, payloads, opts = {}) {
const result = makeResult();
- if (!Array.isArray(payloads) || payloads.length === 0) return result;
- const messages = redactPayloads(payloads, { tier: opts.redactTier });
+ const messages = Array.isArray(payloads) ? payloads : [];
+ if (messages.length === 0) return result;
const encodedSid = encodeURIComponent(sessionId);
for (let start = 0; start < messages.length; start += BATCH_LIMIT) {
diff --git a/examples/claude-code-memory-plugin/scripts/shared/config-schema.mjs b/examples/claude-code-memory-plugin/scripts/shared/config-schema.mjs
index bb8cf7a00..cc7152fbb 100644
--- a/examples/claude-code-memory-plugin/scripts/shared/config-schema.mjs
+++ b/examples/claude-code-memory-plugin/scripts/shared/config-schema.mjs
@@ -24,11 +24,6 @@
* harness per-harness default, where one genuinely differs
* min/max clamped, not rejected: a config file must not kill a hook
* values the enum's members; anything else falls back to the default
- * boolValues enum only: the member a boolean-ish value (`true`/`yes`/`on`,
- * `false`/`no`/`off`/`0`) stands for, so `false` can mean "off"
- * unknownToDefault
- * enum only: a value naming no member resolves to the default
- * instead of leaving the lower layer's value standing
* env OPENVIKING_* variable, the highest-priority layer
* aliases older spellings, honoured forever; the doctor names them
* workspace dotted key in `.openviking/config.json`
@@ -156,23 +151,6 @@ export const KNOBS = [
// tool results, so it captures them by default.
{ name: "captureToolResults", type: "bool", default: false, harness: { dsh: true }, env: "OPENVIKING_CAPTURE_TOOL_RESULTS", capability: "capture" },
{ name: "captureFilters", type: "list", default: [], env: "OPENVIKING_CAPTURE_FILTERS", capability: "capture" },
- // Secret redaction of every captured payload before it is sent or queued
- // (lib/redact.mjs); the tiers are REDACT_TIERS there, in the same order.
- // User-level only — deliberately no `workspace` key, so a repository's
- // `.openviking/config.json` cannot switch redaction off for whoever opens it.
- // `false` means off rather than "unparseable"; a tier this build does not
- // know (a newer config read by an older plugin) means the default, never a
- // weaker value left over from a lower layer.
- {
- name: "captureRedact",
- type: "enum",
- values: ["off", "standard", "strict"],
- default: "standard",
- boolValues: { true: "standard", false: "off" },
- unknownToDefault: true,
- env: "OPENVIKING_CAPTURE_REDACT",
- capability: "capture",
- },
// 0 means "derive from timeoutMs": a write gets a longer budget than a read.
{ name: "captureTimeoutMs", type: "int", default: 0, min: 0, max: 600000, env: "OPENVIKING_CAPTURE_TIMEOUT_MS", capability: "capture" },
{ name: "commitTokenThreshold", type: "int", default: 20000, min: 1000, max: 1000000, env: "OPENVIKING_COMMIT_TOKEN_THRESHOLD", workspace: "capture.commit_token_threshold", capability: "capture" },
@@ -339,16 +317,8 @@ export function coerceKnobValue(knob, raw, fallback) {
return knob.max === undefined ? floored : Math.min(knob.max, floored);
}
case "enum": {
- const values = knob.values || [];
const word = String(raw ?? "").trim();
- if (values.includes(word)) return word;
- if (knob.boolValues) {
- const lower = word.toLowerCase();
- if (values.includes(lower)) return lower;
- if (raw === true || TRUE_WORDS.includes(lower)) return knob.boolValues.true;
- if (raw === false || FALSE_WORDS.includes(lower)) return knob.boolValues.false;
- }
- return knob.unknownToDefault && word ? knobDefault(knob) : fallback;
+ return (knob.values || []).includes(word) ? word : fallback;
}
// A peer template may be one string or an ordered list of fallbacks, and
// `String([a, b])` would quietly turn the list into one bogus template.
diff --git a/examples/claude-code-memory-plugin/scripts/shared/doctor-core.mjs b/examples/claude-code-memory-plugin/scripts/shared/doctor-core.mjs
index 319d1d354..107ed1db1 100644
--- a/examples/claude-code-memory-plugin/scripts/shared/doctor-core.mjs
+++ b/examples/claude-code-memory-plugin/scripts/shared/doctor-core.mjs
@@ -1326,20 +1326,11 @@ export function reportTimeouts(report, cfg, { pluginRoot = "", hooksTemplate = "
/** The switches that decide whether anything is injected at all. */
export function reportToggles(report, cfg, { harness = "" } = {}, toggles = []) {
- // Every host captures through the shared send layer, so the redaction tier
- // (already resolved to a tier name by the config knob) is reported here
- // rather than by each doctor.
- const redact = typeof cfg.captureRedact === "string" ? cfg.captureRedact : "";
- const all = redact ? [...toggles, `capture redaction ${redact === "off" ? "OFF" : redact}`] : toggles;
- report.info(`toggles ${all.join(", ")}`);
+ report.info(`toggles ${toggles.join(", ")}`);
if (!cfg.autoRecall || !cfg.autoCapture || cfg.noAutoInject) {
report.warn("one or more injection paths are switched off", toggles.join(", "),
`check OPENVIKING_AUTO_RECALL / OPENVIKING_AUTO_CAPTURE / OPENVIKING_NO_AUTO_INJECT and ovcli.conf plugin.${harnessKey(harness)}`);
}
- if (redact === "off" && cfg.autoCapture) {
- report.warn("capture redaction is off — secrets in captured turns are sent to OpenViking as they are", "",
- "unset OPENVIKING_CAPTURE_REDACT, or set plugin.captureRedact in ovcli.conf to \"standard\" (the default) or \"strict\"");
- }
}
/**
diff --git a/examples/claude-code-memory-plugin/scripts/shared/pending-queue.mjs b/examples/claude-code-memory-plugin/scripts/shared/pending-queue.mjs
index 1f75ac423..e86f59b00 100644
--- a/examples/claude-code-memory-plugin/scripts/shared/pending-queue.mjs
+++ b/examples/claude-code-memory-plugin/scripts/shared/pending-queue.mjs
@@ -11,12 +11,6 @@
*
* Each file contains: { type, sessionId, payload, createdAt, retries, dedupKey }
*
- * An addMessage payload is secret-redacted (lib/redact.mjs) before it is
- * written, and again before it is replayed: the queue is plaintext on disk, and
- * an entry written by an older plugin, or by a caller that skipped redaction,
- * must not reach the server as it was. Redaction is idempotent, so replaying an
- * already-redacted entry sends the same bytes.
- *
* Config (env vars):
* OPENVIKING_PENDING_DIR pending queue directory
* (default: ~/.openviking/pending)
@@ -31,7 +25,6 @@ import { mkdir, readdir, readFile, rename, writeFile, unlink, stat, chmod, utime
import { createHash } from "node:crypto";
import { join } from "node:path";
import { homedir } from "node:os";
-import { redactPayload } from "./redact.mjs";
import { isRetryableFailure } from "./retryable.mjs";
const DEFAULT_MAX_RETRIES = 3;
@@ -191,21 +184,8 @@ async function recoverStaleProcessing(dir) {
* @param {object} payload - the data that failed to send
* @param {object} options
* @param {number} options.createdAt - optional queue timestamp override
- * @param {string} [options.redactTier] - the captureRedact tier an addMessage
- * payload is redacted under before it is written (default "standard")
- * @param {boolean} [options.redacted] - the caller already redacted `payload`
- * under its configured tier, so it is written as it is
*/
export async function enqueue(type, sessionId, payload, options = {}) {
- if (type === "addMessage" && options.redacted !== true) {
- try {
- payload = redactPayload(payload, { tier: options.redactTier });
- } catch (err) {
- // redactPayload fails closed on its own; this is the last line before
- // plaintext would be written to disk, so refuse rather than write it.
- return { ok: false, error: `redaction failed: ${err?.message || String(err)}` };
- }
- }
const dir = getPendingDir();
const now = Number.isFinite(options.createdAt) ? options.createdAt : Date.now();
const dedupKey = makeDedupKey(type, sessionId, payload);
@@ -398,8 +378,6 @@ export async function cleanStale() {
* a background drainer can keep retrying a transient failure without
* burning the session-start retry budget. Exhausted and non-retryable
* entries are deleted exactly as in the default mode.
- * @param {string} [options.redactTier="standard"] - the captureRedact tier
- * every replayed addMessage payload is redacted under before it is sent
* @returns {{ replayed: number, failed: number, skipped: number, deferred: number }}
*/
export async function replayPending(fetchJSON, log, options = {}) {
@@ -444,7 +422,7 @@ export async function replayPending(fetchJSON, log, options = {}) {
if (entry.type === "addMessage") {
res = await fetchJSON(`/api/v1/sessions/${encodedSid}/messages`, {
method: "POST",
- body: JSON.stringify(redactPayload(entry.payload, { tier: options.redactTier })),
+ body: JSON.stringify(entry.payload),
});
} else if (entry.type === "commitSession") {
res = await fetchJSON(`/api/v1/sessions/${encodedSid}/commit`, {
diff --git a/examples/claude-code-memory-plugin/scripts/shared/redact.mjs b/examples/claude-code-memory-plugin/scripts/shared/redact.mjs
deleted file mode 100644
index 727178ee7..000000000
--- a/examples/claude-code-memory-plugin/scripts/shared/redact.mjs
+++ /dev/null
@@ -1,522 +0,0 @@
-// GENERATED FROM examples/memory-plugin-shared/lib. DO NOT EDIT.
-/**
- * Client-side secret redaction for captured transcripts.
- *
- * An agent that runs `cat .env` or prints a token puts that credential in the
- * transcript the memory plugins capture. This module replaces such secrets
- * before a payload leaves the machine — before the POST to OpenViking and
- * before the local pending queue writes it to disk — so the server, its
- * extractor and the memories it writes never see the plaintext.
- *
- * The rules are gitleaks' default rule set plus OpenViking's own key formats
- * (lib/secret-rules.mjs, generated), and detection follows gitleaks: a
- * case-insensitive keyword prefilter, the rule regex, the secret taken from
- * the rule's `secretGroup` or else the first non-empty capture group, the
- * Shannon entropy threshold, then the global and the rule's allowlists and
- * stopwords. Only the secret span is replaced, so `API_KEY=sk-...` becomes
- * `API_KEY={{ov_redacted:<rule>:<tag>}}` and the turn still reads as what
- * happened.
- *
- * The tag is the first 8 hex characters of HMAC-SHA256(install key, secret):
- * the same secret gets the same tag across turns and sessions on one machine,
- * but the tag cannot be checked against a guessed secret without the key,
- * which never leaves the machine.
- *
- * Failure policy: redaction fails closed per string. A scan that throws
- * replaces the whole string with `{{ov_redacted:scan-failed:<tag>}}`; it never
- * throws to the hook and never lets the string through unscanned. Text past
- * `maxChars` (MAX_SCAN_CHARS by default) is not scanned either: it is cut at a
- * whitespace boundary (before an unterminated `-----BEGIN` line) and replaced
- * with `{{ov_redacted:scan-oversize:<tag>}}`. The same happens once one call
- * has scanned `maxTotalChars` (MAX_SCAN_TOTAL_CHARS) across all its strings,
- * which keeps a hook's redaction time bounded however large the batch.
- * A missing or unwritable key file only costs tag stability (an in-process
- * random key is used), never redaction itself.
- *
- * Redaction is idempotent: existing `{{ov_redacted:<rule>:<tag>}}`
- * placeholders and well-formed `{{ov_privacy:...}}` references are never
- * scanned or touched, so replaying a pending entry or redacting twice changes
- * nothing.
- */
-
-import { createHmac, randomBytes } from "node:crypto";
-import { linkSync, mkdirSync, readFileSync, renameSync, unlinkSync, writeFileSync } from "node:fs";
-import { dirname, join } from "node:path";
-
-import SECRET_RULES, { GLOBAL_ALLOWLISTS, TIERS } from "./secret-rules.mjs";
-import { stateDir } from "./workspace-identity.mjs";
-
-/** Ordered, cumulative: each tier runs its own rules and every earlier tier's. */
-export const REDACT_TIERS = Object.freeze([...TIERS]);
-export const DEFAULT_REDACT_TIER = "standard";
-
-/**
- * The most characters of one string that are scanned. It matches the
- * largest tool output a plugin captures (`captureToolMaxChars`, at most
- * 1,000,000), so nothing a plugin builds by default is cut.
- */
-export const MAX_SCAN_CHARS = 1_000_000;
-
-/**
- * The most characters scanned in one redactText / redactPayload /
- * redactPayloads call, summed over every string in it. Ordinary text scans at
- * well under 1 s per MB, but keyword-dense data (hashes, base64) can take
- * 10-20 s per MB, and a hook that times out re-sends the same turns next time.
- */
-export const MAX_SCAN_TOTAL_CHARS = 2_000_000;
-
-const OFF_WORDS = new Set(["off", "false", "0", "no"]);
-const ON_WORDS = new Set(["on", "true", "1", "yes"]);
-
-/**
- * Map a configured value onto a tier name. Anything that says "no" (`false`,
- * `0`, `"off"`, any case) is `off`; a value naming no tier this build knows (a
- * newer config, a typo) falls back to the default, so it can only redact more.
- */
-export function normalizeRedactTier(value, fallback = DEFAULT_REDACT_TIER) {
- const safeFallback = REDACT_TIERS.includes(fallback) ? fallback : DEFAULT_REDACT_TIER;
- if (value === false || value === 0) return "off";
- if (value === true || value === 1) return DEFAULT_REDACT_TIER;
- if (typeof value !== "string") return safeFallback;
- const word = value.trim().toLowerCase();
- if (!word) return safeFallback;
- if (OFF_WORDS.has(word)) return "off";
- if (REDACT_TIERS.includes(word)) return word;
- if (ON_WORDS.has(word)) return DEFAULT_REDACT_TIER;
- return safeFallback;
-}
-
-// ---------------------------------------------------------------------------
-// Install key
-// ---------------------------------------------------------------------------
-
-const KEY_HEX_RE = /^[0-9a-f]{64}$/;
-let cachedKey = null;
-let processKey = null;
-
-function readKeyFile(file) {
- try {
- const text = readFileSync(file, "utf8").trim();
- return KEY_HEX_RE.test(text) ? Buffer.from(text, "hex") : null;
- } catch {
- return null;
- }
-}
-
-/**
- * Create the key file without exposing a half-written one: a private temp
- * file is hard-linked into place, which fails if a concurrent hook got there
- * first (its key is then the one read back). A garbage key file, or a
- * filesystem without hard links, gets the temp file renamed over it.
- */
-function createKeyFile(file) {
- mkdirSync(dirname(file), { recursive: true, mode: 0o700 });
- const tmp = `${file}.${process.pid}.${randomBytes(6).toString("hex")}`;
- writeFileSync(tmp, `${randomBytes(32).toString("hex")}\n`, { mode: 0o600, flag: "wx" });
- try {
- linkSync(tmp, file);
- } catch (error) {
- if (error?.code !== "EEXIST" || !readKeyFile(file)) renameSync(tmp, file);
- } finally {
- try { unlinkSync(tmp); } catch { /* renamed into place */ }
- }
- return readKeyFile(file);
-}
-
-/**
- * The per-install HMAC key: 32 random bytes in `<state dir>/redact/install-key`
- * (dir 0700, file 0600). When it cannot be read or created, a random key for
- * this process is used: tags then differ between processes, nothing else.
- */
-export function loadInstallKey({ env = process.env } = {}) {
- let file = "";
- try {
- file = join(stateDir(env), "redact", "install-key");
- } catch {
- // No state dir: process key.
- }
- if (cachedKey && cachedKey.file === file) return cachedKey.key;
- let key = file ? readKeyFile(file) : null;
- if (!key && file) {
- try {
- key = createKeyFile(file);
- } catch {
- key = null;
- }
- }
- key ||= processKey ||= randomBytes(32);
- cachedKey = { file, key };
- return key;
-}
-
-function placeholder(ruleId, key, secret) {
- const tag = createHmac("sha256", key).update(String(secret), "utf8").digest("hex").slice(0, 8);
- return `{{ov_redacted:${ruleId}:${tag}}}`;
-}
-
-// ---------------------------------------------------------------------------
-// Detection (gitleaks semantics)
-// ---------------------------------------------------------------------------
-
-function compileAllowlists(list) {
- return (list || []).map((al) => ({
- and: al.condition === "AND",
- target: al.regexTarget || "secret",
- regexes: (al.regexes || []).map((r) => new RegExp(r.regex, r.flags)),
- stopwords: (al.stopwords || []).map((w) => String(w).toLowerCase()),
- }));
-}
-
-const compiledCache = new Map();
-
-/** Compile the rules once per process; throws if a rule does not compile. */
-export function compileRuleSet(rules = SECRET_RULES, globalAllowlists = GLOBAL_ALLOWLISTS) {
- const hit = compiledCache.get(rules);
- if (hit && hit.globalsSource === globalAllowlists) return hit;
- const set = {
- globalsSource: globalAllowlists,
- globals: compileAllowlists(globalAllowlists),
- rules: rules.map((rule) => ({
- id: rule.id,
- tierIndex: REDACT_TIERS.indexOf(rule.tier || DEFAULT_REDACT_TIER),
- keywords: (rule.keywords || []).map((k) => String(k).toLowerCase()),
- entropy: Number(rule.entropy) || 0,
- secretGroup: Number(rule.secretGroup) || 0,
- scan: new RegExp(rule.regex, `${rule.flags || ""}g`),
- groups: new RegExp(rule.regex, `${rule.flags || ""}d`),
- allowlists: compileAllowlists(rule.allowlists),
- generic: rule.id.includes("generic"),
- })),
- };
- compiledCache.set(rules, set);
- return set;
-}
-
-/**
- * Shannon entropy as gitleaks computes it: symbol frequencies over code
- * points, divided by the UTF-8 byte length (Go's `len(string)`).
- */
-export function shannonEntropy(data) {
- if (!data) return 0;
- const counts = new Map();
- let bytes = 0;
- for (const ch of data) {
- counts.set(ch, (counts.get(ch) || 0) + 1);
- const cp = ch.codePointAt(0);
- bytes += cp < 0x80 ? 1 : cp < 0x800 ? 2 : cp < 0x10000 ? 3 : 4;
- }
- let entropy = 0;
- for (const count of counts.values()) entropy -= (count / bytes) * Math.log2(count / bytes);
- return entropy;
-}
-
-function isAllowed(allowlists, secret, match, line) {
- const secretLower = secret.toLowerCase();
- for (const al of allowlists) {
- const target = al.target === "match" ? match : al.target === "line" ? line() : secret;
- const checks = [];
- if (al.regexes.length) checks.push(target !== "" && al.regexes.some((re) => re.test(target)));
- if (al.stopwords.length) checks.push(al.stopwords.some((word) => secretLower.includes(word)));
- if (al.and ? checks.every(Boolean) : checks.some(Boolean)) return true;
- }
- return false;
-}
-
-/**
- * The secret spans gitleaks would report in `text`. The `gitleaks:allow`
- * marker is deliberately not honoured: in a transcript it would be a way to
- * opt a line out of redaction.
- */
-function detect(text, rules, globals) {
- const findings = [];
- const lower = text.toLowerCase();
- for (const rule of rules) {
- if (rule.keywords.length && !rule.keywords.some((kw) => lower.includes(kw))) continue;
- const re = rule.scan;
- re.lastIndex = 0;
- for (let m; (m = re.exec(text)) !== null;) {
- if (m[0].length === 0) {
- re.lastIndex++;
- continue;
- }
- // gitleaks trims newlines off the match and re-runs the regex on it.
- let start = m.index;
- let end = m.index + m[0].length;
- while (start < end && text.charCodeAt(start) === 10) start++;
- while (end > start && text.charCodeAt(end - 1) === 10) end--;
- const match = text.slice(start, end);
- let span = [0, match.length];
- const sub = match ? rule.groups.exec(match) : null;
- if (sub && sub.length >= 2) {
- if (rule.secretGroup > 0) span = sub.indices[rule.secretGroup] || [0, 0];
- else span = sub.indices.slice(1).find((idx) => idx && idx[1] > idx[0]) || span;
- }
- const secret = match.slice(span[0], span[1]);
- if (!secret) continue;
- if (rule.entropy && shannonEntropy(secret) <= rule.entropy) continue;
- const line = () => {
- const from = text.lastIndexOf("\n", start - 1) + 1;
- const to = text.indexOf("\n", end);
- return text.slice(from, to < 0 ? text.length : to);
- };
- if (isAllowed(globals, secret, match, line) || isAllowed(rule.allowlists, secret, match, line)) continue;
- findings.push({ start: start + span[0], end: start + span[1], id: rule.id, secret, generic: rule.generic });
- }
- }
- return findings;
-}
-
-// ---------------------------------------------------------------------------
-// Redaction
-// ---------------------------------------------------------------------------
-
-/**
- * Spans that are already placeholders and are never scanned: exactly the
- * placeholders this module writes, and OpenViking privacy references in the
- * grammar the server parses (openviking/privacy/reference.py). Anything else
- * that merely starts with `{{ov_` is scanned like any other text.
- */
-const PROTECTED_RE = new RegExp(
- [
- "\\{\\{ov_redacted:[a-z0-9][a-z0-9-]{0,99}:[0-9a-f]{8}\\}\\}",
- "\\{\\{[ \\t]*ov_privacy:(?:" +
- "ambiguous" +
- "|skill:[A-Za-z0-9_.@-]{1,255}:[^\\s:{}]{1,255}" +
- "|[^\\s:{}]{1,255}:viking://~/privacy/[^/\\s{}]{1,255}/[^#\\s{}]{1,1024}#/values/[^\\s{}]{1,1024}" +
- ")[ \\t]*\\}\\}",
- ].join("|"),
- "g",
-);
-// One pass is not always a fixed point: a placeholder can give the text after
-// it a word boundary it lacked (`ghp_<36>AKIA<16>`: aws-access-token needs
-// `\bAKIA`, which only exists once the GitHub token is replaced). Passes repeat
-// until nothing changes, so a replayed entry is sent byte for byte; a string
-// with no finding costs one pass.
-const MAX_PASSES = 3;
-
-/** The [start, end) stretches of `text` outside existing placeholders. */
-function scannableSegments(text) {
- const segments = [];
- let last = 0;
- for (const m of text.matchAll(PROTECTED_RE)) {
- if (m.index > last) segments.push([last, m.index]);
- last = m.index + m[0].length;
- }
- if (last < text.length) segments.push([last, text.length]);
- return segments;
-}
-
-/**
- * Where scanning stops in a string with more than `max` scannable characters:
- * the `max`-th one, pulled back to whitespace within 4 KiB so a token is not
- * split with its head left in the scanned part. A `-----BEGIN` block whose
- * `-----END ...-----` line lies past the cut cannot match the private-key rule,
- * so the cut moves to the start of the BEGIN line instead.
- */
-function cutPoint(text, segments, max) {
- let budget = max;
- for (const [a, b] of segments) {
- if (b - a <= budget) {
- budget -= b - a;
- continue;
- }
- const hard = a + budget;
- const head = text.slice(a, hard).toLowerCase();
- const begin = head.lastIndexOf("-----begin");
- if (begin >= 0 && !/-----end[^\n]*-----/.test(head.slice(begin))) return a + head.lastIndexOf("\n", begin) + 1;
- for (let k = hard; k > Math.max(a, hard - 4096); k--) if (/\s/.test(text[k - 1])) return k;
- return hard;
- }
- return text.length;
-}
-
-/** Overlapping findings become one span, named by a provider rule over the generic one. */
-function mergeFindings(findings) {
- findings.sort((x, y) => x.start - y.start || y.end - x.end || Number(x.generic) - Number(y.generic));
- const merged = [];
- for (const f of findings) {
- const last = merged[merged.length - 1];
- if (last && f.start < last.end) {
- last.end = Math.max(last.end, f.end);
- if (last.rep.generic && !f.generic) last.rep = f;
- } else {
- merged.push({ start: f.start, end: f.end, rep: f });
- }
- }
- return merged;
-}
-
-/**
- * One scan-and-replace pass over `full`; `base` is where the value starts
- * after a key prefix, and `max` how many characters of the value to scan.
- * Returns the redacted value and how many of its characters were scanned.
- */
-function redactOnce(full, base, ctx, max) {
- const segments = scannableSegments(full);
- const scannable = segments.reduce((n, [a, b]) => n + (b - a), 0);
- const limit = scannable > base + max ? Math.max(base, cutPoint(full, segments, base + max)) : full.length;
- const findings = [];
- for (const [a, b] of segments) {
- if (Math.min(b, limit) <= a) continue;
- for (const f of detect(full.slice(a, Math.min(b, limit)), ctx.rules, ctx.globals)) {
- const start = Math.max(a + f.start, base);
- if (a + f.end > start) findings.push({ ...f, start, end: a + f.end });
- }
- }
- let out = "";
- let pos = base;
- for (const span of mergeFindings(findings)) {
- out += full.slice(pos, span.start) + placeholder(span.rep.id, ctx.key(), span.rep.secret);
- pos = span.end;
- }
- out += full.slice(pos, limit);
- if (limit < full.length) out += placeholder("scan-oversize", ctx.key(), full.slice(limit));
- return { text: out, scanned: Math.max(0, Math.min(scannable, base + max) - base) };
-}
-
-function makeContext(opts = {}) {
- const tier = normalizeRedactTier(opts.tier ?? DEFAULT_REDACT_TIER);
- let key = opts.key ? Buffer.from(opts.key) : null;
- const ctx = {
- tier,
- rules: [],
- globals: [],
- maxChars: Number.isFinite(opts.maxChars) && opts.maxChars > 0 ? opts.maxChars : MAX_SCAN_CHARS,
- // What is left of the call's scan budget; every string's first pass draws on it.
- budget: Number.isFinite(opts.maxTotalChars) && opts.maxTotalChars > 0 ? opts.maxTotalChars : MAX_SCAN_TOTAL_CHARS,
- key: () => (key ||= loadInstallKey(opts.env ? { env: opts.env } : undefined)),
- };
- if (tier === "off") return ctx;
- try {
- const set = compileRuleSet(opts.rules || SECRET_RULES, opts.globalAllowlists || GLOBAL_ALLOWLISTS);
- const index = REDACT_TIERS.indexOf(tier);
- ctx.rules = set.rules.filter((rule) => rule.tierIndex > 0 && rule.tierIndex <= index);
- ctx.globals = set.globals;
- } catch (error) {
- ctx.broken = error;
- }
- return ctx;
-}
-
-function failClosed(text, ctx) {
- try {
- return placeholder("scan-failed", ctx.key(), text);
- } catch {
- return "{{ov_redacted:scan-failed:00000000}}";
- }
-}
-
-function redactStringIn(text, ctx, keyName = null) {
- if (typeof text !== "string" || text === "") return text;
- if (ctx.broken) return failClosed(text, ctx);
- const prefix = keyName ? `${keyName}=` : "";
- // Fixed for every pass, so a later pass never cuts what the first one scanned.
- const max = Math.min(ctx.maxChars, ctx.budget);
- try {
- let current = text;
- for (let pass = 0; pass < MAX_PASSES; pass++) {
- const { text: next, scanned } = redactOnce(prefix + current, prefix.length, ctx, max);
- if (pass === 0) ctx.budget -= scanned;
- if (next === current) return current;
- current = next;
- }
- // Still changing after several passes: not a state to send.
- return failClosed(text, ctx);
- } catch {
- return failClosed(text, ctx);
- }
-}
-
-/**
- * Redact the secrets in one string.
- *
- * @param {string} text
- * @param {object} [opts]
- * @param {string} [opts.tier="standard"] - one of REDACT_TIERS; "off" returns the input
- * @param {string} [opts.keyName] - a field name to scan the value under, as `keyName=value`
- * @param {number} [opts.maxChars] - scannable characters of one string before the rest is cut
- * @param {number} [opts.maxTotalChars] - the same, summed over every string in the call
- * @returns {string}
- */
-export function redactText(text, opts = {}) {
- const ctx = makeContext(opts);
- if (ctx.tier === "off") return text;
- return redactStringIn(text, ctx, opts.keyName || null);
-}
-
-// Message and part fields that identify or describe rather than carry text.
-const META_KEYS = new Set([
- "role", "type", "id", "uri", "peer_id", "session_id", "created_at", "tool_id", "tool_name", "tool_status",
- "context_type", "tool_output_mime_type", "tool_output_externalized_reason",
-]);
-const META_SUFFIX_RE = /_(?:id|uri|ref|sha256|at)$/;
-const KEY_CONTEXT_RE = /^[A-Za-z_][\w.-]{0,63}$/;
-
-const isObject = (value) => value !== null && typeof value === "object" && !Array.isArray(value);
-
-/**
- * Redact every string under `value`. Inside an object each value is scanned
- * as `<key>=<value>`, so a rule that needs a key-ish word (generic-api-key)
- * sees `{ "API_TOKEN": "..." }` as it would see `API_TOKEN=...` in a file;
- * only the value is replaced. Keys are scanned as text of their own.
- */
-function redactDeep(value, ctx, keyName) {
- if (typeof value === "string") return redactStringIn(value, ctx, keyName);
- if (Array.isArray(value)) return value.map((item) => redactDeep(item, ctx, keyName));
- if (!isObject(value)) return value;
- const out = {};
- for (const [k, v] of Object.entries(value)) {
- const key = redactStringIn(k, ctx, null);
- out[key] = redactDeep(v, ctx, key === k && KEY_CONTEXT_RE.test(k) ? k : null);
- }
- return out;
-}
-
-/** A message or part: its fields, metadata copied and the rest redacted. */
-function redactFields(value, ctx) {
- if (!isObject(value)) return redactDeep(value, ctx, null);
- const out = {};
- for (const [k, v] of Object.entries(value)) {
- if (k === "parts" && Array.isArray(v)) out[k] = v.map((part) => redactFields(part, ctx));
- else if (META_KEYS.has(k) || META_SUFFIX_RE.test(k)) out[k] = v;
- else out[k] = redactDeep(v, ctx, null);
- }
- return out;
-}
-
-/**
- * Redact one session add-message payload — `{ role, content }` or
- * `{ role, parts: [...] }` — and return a redacted copy. Text-bearing fields
- * are scanned (`content`, `parts[].text`, `parts[].tool_output`, every leaf of
- * `parts[].tool_input`, `abstract`, any other non-metadata field); ids, URIs,
- * roles, statuses and timestamps are copied. The caller's object is never
- * mutated.
- */
-export function redactPayload(payload, opts = {}) {
- const ctx = makeContext(opts);
- if (ctx.tier === "off") return payload;
- return redactPayloadIn(payload, ctx);
-}
-
-function redactPayloadIn(payload, ctx) {
- if (payload == null) return payload;
- if (typeof payload === "string") return redactStringIn(payload, ctx, null);
- if (typeof payload !== "object") return payload;
- // Walk the data the payload is on the wire (class instances, `toJSON`), as a
- // copy; a payload that cannot be serialised could not be sent either.
- let data;
- try {
- data = JSON.parse(JSON.stringify(payload));
- } catch {
- return failClosed("", ctx);
- }
- return redactFields(data, ctx);
-}
-
-/** redactPayload over a list, with one scan budget (maxTotalChars) for the whole list. */
-export function redactPayloads(payloads, opts = {}) {
- if (!Array.isArray(payloads)) return payloads;
- const ctx = makeContext(opts);
- if (ctx.tier === "off") return payloads;
- return payloads.map((payload) => redactPayloadIn(payload, ctx));
-}
diff --git a/examples/claude-code-memory-plugin/scripts/shared/secret-rules.mjs b/examples/claude-code-memory-plugin/scripts/shared/secret-rules.mjs
deleted file mode 100644
index 1348a0c71..000000000
--- a/examples/claude-code-memory-plugin/scripts/shared/secret-rules.mjs
+++ /dev/null
@@ -1,294 +0,0 @@
-// GENERATED FROM examples/memory-plugin-shared/lib. DO NOT EDIT.
-// GENERATED by examples/memory-plugin-shared/scripts/update-secret-rules.mjs. DO NOT EDIT.
-//
-// Secret detection rules for lib/redact.mjs: the gitleaks v8.30.1 default
-// configuration (config/gitleaks.toml, https://github.com/gitleaks/gitleaks),
-// converted from Go to JavaScript regex syntax and otherwise unchanged, plus
-// the rules for OpenViking's own key formats.
-// Source file sha256: e163e53b9e7e8a8511e77271e2b323ed057759542a6d988258afe3a1fa329caf
-//
-// Tier `strict`: generic-api-key. Every other rule is tier `standard`.
-// Skipped gitleaks rules:
-// cisco-meraki-api-key: nested [\w.-]{0,50}? prefixes: ~3-11 s per MB of hashes or base64url
-// cohere-api-token: nested [\w.-]{0,50}? prefixes: ~3-11 s per MB of hashes or base64url
-// curl-auth-header: time quadratic in line length: minutes for a 1 MB line of `curl ...;` commands
-// curl-auth-user: time quadratic in line length: minutes for a 1 MB line of `curl ...;` commands
-// freemius-secret-key: path-scoped rule; captured text has no file path
-// hashicorp-tf-password: path-scoped rule; captured text has no file path
-// kubernetes-secret-yaml: path-scoped rule; captured text has no file path
-// nuget-config-password: path-scoped rule; captured text has no file path
-// okta-access-token: nested [\w.-]{0,50}? prefixes: ~3-11 s per MB of hashes or base64url
-// pkcs12-file: path-scoped rule; captured text has no file path
-// privateai-api-token: nested [\w.-]{0,50}? prefixes: ~3-11 s per MB of hashes or base64url
-// sumologic-access-id: nested [\w.-]{0,50}? prefixes: ~3-11 s per MB of hashes or base64url
-// OpenViking rules (not from gitleaks):
-// openviking-gateway-key: ovgw_... issued by openviking_gateway/management.py
-// openviking-gateway-management-key: ovgm_... issued by openviking_gateway/cli.py
-// openviking-oauth-access-token: ovat_... issued by openviking/server/oauth/provider.py
-// openviking-oauth-refresh-token: ovrt_... issued by openviking/server/oauth/provider.py
-// openviking-oauth-auth-code: ovac_... issued by openviking/server/oauth/provider.py
-//
-// The gitleaks rule data is used under its license:
-//
-// MIT License
-//
-// Copyright (c) 2019 Zachary Rice
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in all
-// copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-// SOFTWARE.
-
-export const GITLEAKS_VERSION = "v8.30.1";
-
-export const TIERS = ["off","standard","strict"];
-
-export const SKIPPED_RULES = [
- {"id":"cisco-meraki-api-key","reason":"nested [\\w.-]{0,50}? prefixes: ~3-11 s per MB of hashes or base64url"},
- {"id":"cohere-api-token","reason":"nested [\\w.-]{0,50}? prefixes: ~3-11 s per MB of hashes or base64url"},
- {"id":"curl-auth-header","reason":"time quadratic in line length: minutes for a 1 MB line of `curl ...;` commands"},
- {"id":"curl-auth-user","reason":"time quadratic in line length: minutes for a 1 MB line of `curl ...;` commands"},
- {"id":"freemius-secret-key","reason":"path-scoped rule; captured text has no file path"},
- {"id":"hashicorp-tf-password","reason":"path-scoped rule; captured text has no file path"},
- {"id":"kubernetes-secret-yaml","reason":"path-scoped rule; captured text has no file path"},
- {"id":"nuget-config-password","reason":"path-scoped rule; captured text has no file path"},
- {"id":"okta-access-token","reason":"nested [\\w.-]{0,50}? prefixes: ~3-11 s per MB of hashes or base64url"},
- {"id":"pkcs12-file","reason":"path-scoped rule; captured text has no file path"},
- {"id":"privateai-api-token","reason":"nested [\\w.-]{0,50}? prefixes: ~3-11 s per MB of hashes or base64url"},
- {"id":"sumologic-access-id","reason":"nested [\\w.-]{0,50}? prefixes: ~3-11 s per MB of hashes or base64url"},
-];
-
-export const GLOBAL_ALLOWLISTS = [
- {"condition":"OR","regexTarget":"secret","regexes":[{"regex":"^true|false|null$","flags":"i"},{"regex":"^(?:[aA]+|[bB]+|[cC]+|[dD]+|[eE]+|[fF]+|[gG]+|[hH]+|[iI]+|[jJ]+|[kK]+|[lL]+|[mM]+|[nN]+|[oO]+|[pP]+|[qQ]+|[rR]+|[sS]+|[tT]+|[uU]+|[vV]+|[wW]+|[xX]+|[yY]+|[zZ]+|\\*+|\\.+)$","flags":""},{"regex":"^\\$(?:\\d+|{\\d+})$","flags":""},{"regex":"^\\$(?:[A-Z_]+|[a-z_]+)$","flags":""},{"regex":"^\\${(?:[A-Z_]+|[a-z_]+)}$","flags":""},{"regex":"^\\{\\{[ \\t]*[\\w ().|]+[ \\t]*}}$","flags":""},{"regex":"^\\$\\{\\{[ \\t]*(?:(?:env|github|secrets|vars)(?:\\.[A-Za-z]\\w+)+[\\w \"'&./=|]*)[ \\t]*}}$","flags":""},{"regex":"^%(?:[A-Z_]+|[a-z_]+)%$","flags":""},{"regex":"^%[+\\-# 0]?[bcdeEfFgGoOpqstTUvxX]$","flags":""},{"regex":"^\\{\\d{0,2}}$","flags":""},{"regex":"^@(?:[A-Z_]+|[a-z_]+)@$","flags":""},{"regex":"^/Users/[a-z0-9A-Z]+/[\\w .-/]+$","flags":""},{"regex":"^/(?:bin|etc|home|opt|tmp|usr|var)/[\\w ./\\-]+$","flags":""}],"stopwords":["014df517-39d1-4453-b7b3-9930c563627c","abcdefghijklmnopqrstuvwxyz"]},
-];
-
-export default [
- {"id":"1password-secret-key","regex":"\\bA3-[A-Z0-9]{6}-(?:(?:[A-Z0-9]{11})|(?:[A-Z0-9]{6}-[A-Z0-9]{5}))-[A-Z0-9]{5}-[A-Z0-9]{5}-[A-Z0-9]{5}\\b","flags":"","keywords":["a3-"],"entropy":3.8,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"1password-service-account-token","regex":"ops_eyJ[a-zA-Z0-9+/]{250,}={0,3}","flags":"","keywords":["ops_"],"entropy":4,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"adafruit-api-key","regex":"[\\w.\\-]{0,50}?(?:adafruit)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9_\\-]{32})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["adafruit"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"adobe-client-id","regex":"[\\w.\\-]{0,50}?(?:adobe)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-f0-9]{32})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["adobe"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"adobe-client-secret","regex":"\\b(p8e-[a-z0-9A-Z]{32})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["p8e-"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"age-secret-key","regex":"AGE-SECRET-KEY-1[QPZRY9X8GF2TVDW0S3JN54KHCE6MUA7L]{58}","flags":"","keywords":["age-secret-key-1"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"airtable-api-key","regex":"[\\w.\\-]{0,50}?(?:airtable)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{17})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["airtable"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"airtable-personnal-access-token","regex":"\\b(pat[0-9A-Za-z]{14}\\.[a-f0-9]{64})\\b","flags":"","keywords":["airtable"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"algolia-api-key","regex":"[\\w.\\-]{0,50}?(?:algolia)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{32})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["algolia"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"alibaba-access-key-id","regex":"\\b(LTAI[a-z0-9A-Z]{20})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["ltai"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"alibaba-secret-key","regex":"[\\w.\\-]{0,50}?(?:alibaba)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{30})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["alibaba"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"anthropic-admin-api-key","regex":"\\b(sk-ant-admin01-[a-zA-Z0-9_\\-]{93}AA)(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["sk-ant-admin01"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"anthropic-api-key","regex":"\\b(sk-ant-api03-[a-zA-Z0-9_\\-]{93}AA)(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["sk-ant-api03"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"artifactory-api-key","regex":"\\bAKCp[A-Za-z0-9]{69}\\b","flags":"","keywords":["akcp"],"entropy":4.5,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"artifactory-reference-token","regex":"\\bcmVmd[A-Za-z0-9]{59}\\b","flags":"","keywords":["cmvmd"],"entropy":4.5,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"asana-client-id","regex":"[\\w.\\-]{0,50}?(?:asana)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([0-9]{16})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["asana"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"asana-client-secret","regex":"[\\w.\\-]{0,50}?(?:asana)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{32})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["asana"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"atlassian-api-token","regex":"[\\w.\\-]{0,50}?(?:(?:ATLASSIAN|[Aa]tlassian)|(?:CONFLUENCE|[Cc]onfluence)|(?:JIRA|[Jj]ira))(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9A-Z]{20}[a-f0-9A-F]{4})(?:[\\x60'\"\\s;]|\\\\[nrNR]|$)|\\b([Aa][Tt][Aa][Tt][Tt]3[A-Za-z0-9_\\-=a-zA-Z]{186})(?:[\\x60'\"\\s;]|\\\\[nrNR]|$)","flags":"","keywords":["atlassian","confluence","jira","atatt3"],"entropy":3.5,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"authress-service-client-access-key","regex":"\\b((?:sc|ext|scauth|authress)_[a-z0-9A-Z]{5,30}\\.[a-z0-9A-Z]{4,6}\\.(?:acc)[_\\-][a-z0-9\\-A-Z]{10,32}\\.[a-z0-9+/_=\\-A-Z]{30,120})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["sc_","ext_","scauth_","authress_"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"aws-access-token","regex":"\\b((?:A3T[A-Z0-9]|AKIA|ASIA|ABIA|ACCA)[A-Z2-7]{16})\\b","flags":"","keywords":["a3t","akia","asia","abia","acca"],"entropy":3,"secretGroup":0,"allowlists":[{"condition":"OR","regexTarget":"secret","regexes":[{"regex":"[^\\n]+EXAMPLE$","flags":""}],"stopwords":[]}],"tier":"standard"},
- {"id":"aws-amazon-bedrock-api-key-long-lived","regex":"\\b(ABSK[A-Za-z0-9+/]{109,269}={0,2})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["absk"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"aws-amazon-bedrock-api-key-short-lived","regex":"bedrock-api-key-YmVkcm9jay5hbWF6b25hd3MuY29t","flags":"","keywords":["bedrock-api-key-"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"azure-ad-client-secret","regex":"(?:^|[\\\\'\"\\x60\\s>=:(,)])([a-zA-Z0-9_~.]{3}\\dQ~[a-zA-Z0-9_~.\\-]{31,34})(?:$|[\\\\'\"\\x60\\s<),])","flags":"","keywords":["q~"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"beamer-api-token","regex":"[\\w.\\-]{0,50}?(?:beamer)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}(b_[a-z0-9=_\\-]{44})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["beamer"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"bitbucket-client-id","regex":"[\\w.\\-]{0,50}?(?:bitbucket)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{32})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["bitbucket"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"bitbucket-client-secret","regex":"[\\w.\\-]{0,50}?(?:bitbucket)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9=_\\-]{64})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["bitbucket"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"bittrex-access-key","regex":"[\\w.\\-]{0,50}?(?:bittrex)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{32})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["bittrex"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"bittrex-secret-key","regex":"[\\w.\\-]{0,50}?(?:bittrex)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{32})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["bittrex"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"clickhouse-cloud-api-secret-key","regex":"\\b(4b1d[A-Za-z0-9]{38})\\b","flags":"","keywords":["4b1d"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"clojars-api-token","regex":"CLOJARS_[a-z0-9]{60}","flags":"i","keywords":["clojars_"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"cloudflare-api-key","regex":"[\\w.\\-]{0,50}?(?:cloudflare)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9_\\-]{40})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["cloudflare"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"cloudflare-global-api-key","regex":"[\\w.\\-]{0,50}?(?:cloudflare)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-f0-9]{37})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["cloudflare"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"cloudflare-origin-ca-key","regex":"\\b(v1\\.0-[a-f0-9]{24}-[a-f0-9]{146})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["cloudflare","v1.0-"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"codecov-access-token","regex":"[\\w.\\-]{0,50}?(?:codecov)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{32})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["codecov"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"coinbase-access-token","regex":"[\\w.\\-]{0,50}?(?:coinbase)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9_\\-]{64})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["coinbase"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"confluent-access-token","regex":"[\\w.\\-]{0,50}?(?:confluent)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{16})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["confluent"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"confluent-secret-key","regex":"[\\w.\\-]{0,50}?(?:confluent)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{64})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["confluent"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"contentful-delivery-api-token","regex":"[\\w.\\-]{0,50}?(?:contentful)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9=_\\-]{43})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["contentful"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"databricks-api-token","regex":"\\b(dapi[a-f0-9]{32}(?:-\\d)?)(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["dapi"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"datadog-access-token","regex":"[\\w.\\-]{0,50}?(?:datadog)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{40})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["datadog"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"defined-networking-api-token","regex":"[\\w.\\-]{0,50}?(?:dnkey)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}(dnkey-[a-z0-9=_\\-]{26}-[a-z0-9=_\\-]{52})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["dnkey"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"digitalocean-access-token","regex":"\\b(doo_v1_[a-f0-9]{64})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["doo_v1_"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"digitalocean-pat","regex":"\\b(dop_v1_[a-f0-9]{64})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["dop_v1_"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"digitalocean-refresh-token","regex":"\\b(dor_v1_[a-f0-9]{64})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["dor_v1_"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"discord-api-token","regex":"[\\w.\\-]{0,50}?(?:discord)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-f0-9]{64})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["discord"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"discord-client-id","regex":"[\\w.\\-]{0,50}?(?:discord)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([0-9]{18})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["discord"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"discord-client-secret","regex":"[\\w.\\-]{0,50}?(?:discord)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9=_\\-]{32})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["discord"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"doppler-api-token","regex":"dp\\.pt\\.[a-z0-9A-Z]{43}","flags":"","keywords":["dp.pt."],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"droneci-access-token","regex":"[\\w.\\-]{0,50}?(?:droneci)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{32})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["droneci"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"dropbox-api-token","regex":"[\\w.\\-]{0,50}?(?:dropbox)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{15})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["dropbox"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"dropbox-long-lived-api-token","regex":"[\\w.\\-]{0,50}?(?:dropbox)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{11}(AAAAAAAAAA)[a-z0-9\\-_=]{43})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["dropbox"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"dropbox-short-lived-api-token","regex":"[\\w.\\-]{0,50}?(?:dropbox)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}(sl\\.[a-z0-9\\-=_]{135})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["dropbox"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"duffel-api-token","regex":"duffel_(?:test|live)_[a-z0-9_\\-=A-Z]{43}","flags":"","keywords":["duffel_"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"dynatrace-api-token","regex":"dt0c01\\.[a-z0-9A-Z]{24}\\.[a-z0-9A-Z]{64}","flags":"","keywords":["dt0c01."],"entropy":4,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"easypost-api-token","regex":"\\bEZAK[a-z0-9A-Z]{54}\\b","flags":"","keywords":["ezak"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"easypost-test-api-token","regex":"\\bEZTK[a-z0-9A-Z]{54}\\b","flags":"","keywords":["eztk"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"etsy-access-token","regex":"[\\w.\\-]{0,50}?(?:(?:ETSY|[Ee]tsy))(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9A-Z]{24})(?:[\\x60'\"\\s;]|\\\\[nrNR]|$)","flags":"","keywords":["etsy"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"facebook-access-token","regex":"\\b(\\d{15,16}(\\||%)[0-9a-z\\-_]{27,40})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["facebook"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"facebook-page-access-token","regex":"\\b(EAA[MC][a-z0-9A-Z]{100,})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["eaam","eaac"],"entropy":4,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"facebook-secret","regex":"[\\w.\\-]{0,50}?(?:facebook)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-f0-9]{32})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["facebook"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"fastly-api-token","regex":"[\\w.\\-]{0,50}?(?:fastly)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9=_\\-]{32})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["fastly"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"finicity-api-token","regex":"[\\w.\\-]{0,50}?(?:finicity)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-f0-9]{32})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["finicity"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"finicity-client-secret","regex":"[\\w.\\-]{0,50}?(?:finicity)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{20})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["finicity"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"finnhub-access-token","regex":"[\\w.\\-]{0,50}?(?:finnhub)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{20})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["finnhub"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"flickr-access-token","regex":"[\\w.\\-]{0,50}?(?:flickr)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{32})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["flickr"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"flutterwave-encryption-key","regex":"FLWSECK_TEST-[a-h0-9A-H]{12}","flags":"","keywords":["flwseck_test"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"flutterwave-public-key","regex":"FLWPUBK_TEST-[a-h0-9A-H]{32}-[Xx]","flags":"","keywords":["flwpubk_test"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"flutterwave-secret-key","regex":"FLWSECK_TEST-[a-h0-9A-H]{32}-[Xx]","flags":"","keywords":["flwseck_test"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"flyio-access-token","regex":"\\b((?:fo1_[\\w\\-]{43}|fm1[ar]_[a-zA-Z0-9+\\/]{100,}={0,3}|fm2_[a-zA-Z0-9+\\/]{100,}={0,3}))(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["fo1_","fm1","fm2_"],"entropy":4,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"frameio-api-token","regex":"fio-u-[a-z0-9\\-_=A-Z]{64}","flags":"","keywords":["fio-u-"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"freshbooks-access-token","regex":"[\\w.\\-]{0,50}?(?:freshbooks)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{64})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["freshbooks"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"gcp-api-key","regex":"\\b(AIza[\\w\\-]{35})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["aiza"],"entropy":4,"secretGroup":0,"allowlists":[{"condition":"OR","regexTarget":"secret","regexes":[{"regex":"AIzaSyabcdefghijklmnopqrstuvwxyz1234567","flags":""},{"regex":"AIzaSyAnLA7NfeLquW1tJFpx_eQCxoX-oo6YyIs","flags":""},{"regex":"AIzaSyCkEhVjf3pduRDt6d1yKOMitrUEke8agEM","flags":""},{"regex":"AIzaSyDMAScliyLx7F0NPDEJi1QmyCgHIAODrlU","flags":""},{"regex":"AIzaSyD3asb-2pEZVqMkmL6M9N6nHZRR_znhrh0","flags":""},{"regex":"AIzayDNSXIbFmlXbIE6mCzDLQAqITYefhixbX4A","flags":""},{"regex":"AIzaSyAdOS2zB6NCsk1pCdZ4-P6GBdi_UUPwX7c","flags":""},{"regex":"AIzaSyASWm6HmTMdYWpgMnjRBjxcQ9CKctWmLd4","flags":""},{"regex":"AIzaSyANUvH9H9BsUccjsu2pCmEkOPjjaXeDQgY","flags":""},{"regex":"AIzaSyA5_iVawFQ8ABuTZNUdcwERLJv_a_p4wtM","flags":""},{"regex":"AIzaSyA4UrcGxgwQFTfaI3no3t7Lt1sjmdnP5sQ","flags":""},{"regex":"AIzaSyDSb51JiIcB6OJpwwMicseKRhhrOq1cS7g","flags":""},{"regex":"AIzaSyBF2RrAIm4a0mO64EShQfqfd2AFnzAvvuU","flags":""},{"regex":"AIzaSyBcE-OOIbhjyR83gm4r2MFCu4MJmprNXsw","flags":""},{"regex":"AIzaSyB8qGxt4ec15vitgn44duC5ucxaOi4FmqE","flags":""},{"regex":"AIzaSyA8vmApnrHNFE0bApF4hoZ11srVL_n0nvY","flags":""}],"stopwords":[]}],"tier":"standard"},
- {"id":"generic-api-key","regex":"[\\w.\\-]{0,50}?(?:[aA][cC][cC][eE][sS][sS]|[aA][uU][tT][hH]|(?:[Aa]pi|API)|[cC][rR][eE][dD][eE][nN][tT][iI][aA][lL]|[cC][rR][eE][dD][sS]|[kK][eE][yY]|[pP][aA][sS][sS][wW](?:[oO][rR])?[dD]|[sS][eE][cC][rR][eE][tT]|[tT][oO][kK][eE][nN])(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([\\w.=\\-]{10,150}|[a-z0-9A-Z][a-z0-9+/A-Z]{11,}={0,3})(?:[\\x60'\"\\s;]|\\\\[nrNR]|$)","flags":"","keywords":["access","api","auth","key","credential","creds","passwd","password","secret","token"],"entropy":3.5,"secretGroup":0,"allowlists":[{"condition":"OR","regexTarget":"secret","regexes":[{"regex":"^[a-zA-Z_.\\-]+$","flags":""}],"stopwords":[]},{"condition":"OR","regexTarget":"match","regexes":[{"regex":"(?:[aA][cC][cC][eE][sS][sS](?:[iI][bB][iI][lL][iI][tT][yY]|[oO][rR])|[aA][cC][cC][eE][sS][sS][_.\\-]?[iI][dD]|[rR][aA][nN][dD][oO][mM][_.\\-]?[aA][cC][cC][eE][sS][sS]|[aA][pP][iI][_.\\-]?(?:[iI][dD]|[nN][aA][mM][eE]|[vV][eE][rR][sS][iI][oO][nN])|[rR][aA][pP][iI][dD]|[cC][aA][pP][iI][tT][aA][lL]|[a-z0-9\\-A-Z]*?[aA][pP][iI][a-z0-9\\-A-Z]*?:[jJ][aA][rR]:|[aA][uU][tT][hH][oO][rR]|[Xx]-[Mm][Ss]-[Ee][xX][cC][hH][aA][nN][gG][eE]-[Oo][rR][gG][aA][nN][iI][zZ][aA][tT][iI][oO][nN]-[Aa][uU][tT][hH]|[Aa][uU][tT][hH][eE][nN][tT][iI][cC][aA][tT][iI][oO][nN]-[Rr][eE][sS][uU][lL][tT][sS]|(?:[cC][rR][eE][dD][eE][nN][tT][iI][aA][lL][sS]?[_.\\-]?[iI][dD]|[wW][iI][tT][hH][Cc][rR][eE][dD][eE][nN][tT][iI][aA][lL][sS])|(?:[bB][uU][cC][kK][eE][tT]|[fF][oO][rR][eE][iI][gG][nN]|[hH][oO][tT]|[iI][dD][xX]|[nN][aA][tT][uU][rR][aA][lL]|[pP][rR][iI][mM][aA][rR][yY]|[pP][uU][bB](?:[lL][iI][cC])?|[sS][cC][hH][eE][mM][aA]|[sS][eE][qQ][uU][eE][nN][cC][eE])[_.\\-]?[kK][eE][yY]|(?:[tT][uU][rR][kK][eE][yY])|[kK][eE][yY][_.\\-]?(?:[aA][lL][iI][aA][sS]|[bB][oO][aA][rR][dD]|[cC][oO][dD][eE]|[fF][rR][aA][mM][eE]|[iI][dD]|[lL][eE][nN][gG][tT][hH]|[mM][eE][sS][hH]|[nN][aA][mM][eE]|[pP][aA][iI][rR]|[pP][rR][eE][sS][sS](?:[eE][dD])?|[rR][iI][nN][gG]|[sS][eE][lL][eE][cC][tT][oO][rR]|[sS][iI][gG][nN][aA][tT][uU][rR][eE]|[sS][iI][zZ][eE]|[sS][tT][oO][nN][eE]|[sS][tT][oO][rR][eE][tT][yY][pP][eE]|[wW][oO][rR][dD]|[uU][pP]|[dD][oO][wW][nN]|[lL][eE][fF][tT]|[rR][iI][gG][hH][tT])|[kK][eE][yY][_.\\-]?[vV][aA][uU][lL][tT][_.\\-]?(?:[iI][dD]|[nN][aA][mM][eE])|[kK][eE][yY][Vv][aA][uU][lL][tT][Tt][oO][Ss][tT][oO][rR][eE][Ss][eE][cC][rR][eE][tT][sS]|[kK][eE][yY](?:[sS][tT][oO][rR][eE]|[tT][aA][bB])[_.\\-]?(?:[fF][iI][lL][eE]|[pP][aA][tT][hH])|[iI][sS][sS][uU][eE][rR][kK][eE][yY][hH][aA][sS][hH]|(?:[DdMm]onkey|[DM]ONKEY)|[kK][eE][yY][iI][nN][gG]|(?:[sS][eE][cC][rR][eE][tT])[_.\\-]?(?:[lL][eE][nN][gG][tT][hH]|[nN][aA][mM][eE]|[sS][iI][zZ][eE])|[Uu][sS][eE][rR][Ss][eE][cC][rR][eE][tT][sS][Ii][dD]|(?:[cC][sS][rR][fF])[_.\\-]?[tT][oO][kK][eE][nN]|(?:[iI][oO]\\.[jJ][sS][oO][nN][wW][eE][bB][tT][oO][kK][eE][nN][ \\t]?:[ \\t]?[\\w\\-]+)|(?:[aA][pP][iI]|[cC][rR][eE][dD][eE][nN][tT][iI][aA][lL][sS]|[tT][oO][kK][eE][nN])[_.\\-]?(?:[eE][nN][dD][pP][oO][iI][nN][tT]|[uU][rR][ilIL])|[pP][uU][bB][lL][iI][cC][_.\\-]?[tT][oO][kK][eE][nN]|(?:[kK][eE][yY]|[tT][oO][kK][eE][nN])[_.\\-]?[fF][iI][lL][eE]|(?:(?:[A-Z_]+=\\n[A-Z_]+=|[a-z_]+=\\n[a-z_]+=)(?:\\n|$))|(?:(?:[A-Z.]+=\\n[A-Z.]+=|[a-z.]+=\\n[a-z.]+=)(?:\\n|$)))","flags":""}],"stopwords":["000000","6fe4476ee5a1832882e326b506d14126","_ec2_","aaaaaa","about","abstract","academy","acces","account","act-","act.","act_","action","active","actively","activity","adapter","add-","add-on","add.","add_","addon","addres","admin","adobe","advanced","adventure","agent","agile","air-","air.","air_","ajax","akka","alert","alfred","algorithm","all-","all.","all_","alloy","alpha","amazon","amqp","analysi","analytic","analyzer","android","angular","angularj","animate","animation","another","ansible","answer","ant-","ant.","ant_","any-","any.","any_","apache","app-","app.","app_","apple","arch","archive","archived","arduino","array","art-","art.","art_","article","asp-","asp.","asp_","asset","async","atom","attention","audio","audit","aura","auth","author","authorize","auto","automated","automatic","awesome","aws_","azure","back","backbone","backend","backup","bar-","bar.","bar_","base","based","bash","basic","batch","been","beer","behavior","being","benchmark","best","beta","better","big-","big.","big_","binary","binding","bit-","bit.","bit_","bitcoin","block","blog","board","book","bookmark","boost","boot","bootstrap","bosh","bot-","bot.","bot_","bower","box-","box.","box_","boxen","bracket","branch","bridge","browser","brunch","buffer","bug-","bug.","bug_","build","builder","building","buildout","buildpack","built","bundle","busines","but-","but.","but_","button","cache","caching","cakephp","calendar","call","camera","campfire","can-","can.","can_","canva","captcha","capture","card","carousel","case","cassandra","cat-","cat.","cat_","category","center","cento","challenge","change","changelog","channel","chart","chat","cheat","check","checker","chef","ches","chinese","chosen","chrome","ckeditor","clas","classe","classic","clean","cli-","cli.","cli_","client","clojure","clone","closure","cloud","club","cluster","cms-","cms_","coco","code","coding","coffee","color","combination","combo","command","commander","comment","commit","common","community","compas","compiler","complete","component","composer","computer","computing","con-","con.","con_","concept","conf","config","connect","connector","console","contact","container","contao","content","contest","context","control","convert","converter","conway'","cookbook","cookie","cool","copy","cordova","core","couchbase","couchdb","countdown","counter","course","craft","crawler","create","creating","creator","credential","crm-","crm.","crm_","cros","crud","csv-","csv.","csv_","cube","cucumber","cuda","current","currently","custom","daemon","dark","dart","dash","dashboard","data","database","date","day-","day.","day_","dead","debian","debug","debugger","deck","define","del-","del.","del_","delete","demo","deploy","design","designer","desktop","detection","detector","dev-","dev.","dev_","develop","developer","device","devise","diff","digital","directive","directory","discovery","display","django","dns-","dns_","doc-","doc.","doc_","docker","docpad","doctrine","document","doe-","doe.","doe_","dojo","dom-","dom.","dom_","domain","don't","done","dot-","dot.","dot_","dotfile","download","draft","drag","drill","drive","driven","driver","drop","dropbox","drupal","dsl-","dsl.","dsl_","dynamic","easy","ecdsa","eclipse","edit","editing","edition","editor","element","emac","email","embed","embedded","ember","emitter","emulator","encoding","endpoint","engine","english","enhanced","entity","entry","env_","episode","erlang","error","espresso","event","evented","example","exchange","exercise","experiment","expire","exploit","explorer","export","exporter","expres","ext-","ext.","ext_","extended","extension","external","extra","extractor","fabric","facebook","factory","fake","fast","feature","feed","fewfwef","ffmpeg","field","file","filter","find","finder","firefox","firmware","first","fish","fix-","fix_","flash","flask","flat","flex","flexible","flickr","flow","fluent","fluentd","fluid","folder","font","force","foreman","fork","form","format","formatter","forum","foundry","framework","free","friend","friendly","front-end","frontend","ftp-","ftp.","ftp_","fuel","full","fun-","fun.","fun_","func","future","gaia","gallery","game","gateway","gem-","gem.","gem_","gen-","gen.","gen_","general","generator","generic","genetic","get-","get.","get_","getenv","getting","ghost","gist","git-","git.","git_","github","gitignore","gitlab","glas","gmail","gnome","gnu-","gnu.","gnu_","goal","golang","gollum","good","google","gpu-","gpu.","gpu_","gradle","grail","graph","graphic","great","grid","groovy","group","grunt","guard","gui-","gui.","gui_","guide","guideline","gulp","gwt-","gwt.","gwt_","hack","hackathon","hacker","hacking","hadoop","haml","handler","hardware","has-","has_","hash","haskell","have","haxe","hello","help","helper","here","hero","heroku","high","hipchat","history","home","homebrew","homepage","hook","host","hosting","hot-","hot.","hot_","house","how-","how.","how_","html","http","hub-","hub.","hub_","hubot","human","icon","ide-","ide.","ide_","idea","identity","idiomatic","image","impact","import","important","importer","impres","index","infinite","info","injection","inline","input","inside","inspector","instagram","install","installer","instant","intellij","interface","internet","interview","into","intro","ionic","iphone","ipython","irc-","irc_","iso-","iso.","iso_","issue","jade","jasmine","java","jbos","jekyll","jenkin","jetbrains","job-","job.","job_","joomla","jpa-","jpa.","jpa_","jquery","json","just","kafka","karma","kata","kernel","keyboard","kindle","kit-","kit.","kit_","kitchen","knife","koan","kohana","lab-","lab.","lab_","lambda","lamp","language","laravel","last","latest","latex","launcher","layer","layout","lazy","ldap","leaflet","league","learn","learning","led-","led.","led_","leetcode","les-","les.","les_","level","leveldb","lib-","lib.","lib_","librarie","library","license","life","liferay","light","lightbox","like","line","link","linked","linkedin","linux","lisp","list","lite","little","load","loader","local","location","lock","log-","log.","log_","logger","logging","logic","login","logstash","longer","look","love","lua-","lua.","lua_","mac-","mac.","mac_","machine","made","magento","magic","mail","make","maker","making","man-","man.","man_","manage","manager","manifest","manual","map-","map.","map_","mapper","mapping","markdown","markup","master","math","matrix","maven","md5","mean","media","mediawiki","meetup","memcached","memory","menu","merchant","message","messaging","meta","metadata","meteor","method","metric","micro","middleman","migration","minecraft","miner","mini","minimal","mirror","mit-","mit.","mit_","mobile","mocha","mock","mod-","mod.","mod_","mode","model","modern","modular","module","modx","money","mongo","mongodb","mongoid","mongoose","monitor","monkey","more","motion","moved","movie","mozilla","mqtt","mule","multi","multiple","music","mustache","mvc-","mvc.","mvc_","mysql","nagio","name","native","need","neo-","neo.","neo_","nest","nested","net-","net.","net_","nette","network","new-","new.","new_","next","nginx","ninja","nlp-","nlp.","nlp_","node","nodej","nosql","not-","not.","not_","note","notebook","notepad","notice","notifier","now-","now.","now_","number","oauth","object","objective","obsolete","ocaml","octopres","official","old-","old.","old_","onboard","online","only","open","opencv","opengl","openshift","openwrt","option","oracle","org-","org.","org_","origin","original","orm-","orm.","orm_","osx-","osx_","our-","our.","our_","out-","out.","out_","output","over","overview","own-","own.","own_","pack","package","packet","page","panel","paper","paperclip","para","parallax","parallel","parse","parser","parsing","particle","party","password","patch","path","pattern","payment","paypal","pdf-","pdf.","pdf_","pebble","people","perl","personal","phalcon","phoenix","phone","phonegap","photo","php-","php.","php_","physic","picker","pipeline","platform","play","player","please","plu-","plu.","plu_","plug-in","plugin","plupload","png-","png.","png_","poker","polyfill","polymer","pool","pop-","pop.","pop_","popcorn","popup","port","portable","portal","portfolio","post","power","powered","powerful","prelude","pretty","preview","principle","print","pro-","pro.","pro_","problem","proc","product","profile","profiler","program","progres","project","protocol","prototype","provider","proxy","public","pull","puppet","pure","purpose","push","pusher","pyramid","python","quality","query","queue","quick","rabbitmq","rack","radio","rail","railscast","random","range","raspberry","rdf-","rdf.","rdf_","react","reactive","read","reader","readme","ready","real","real-time","reality","realtime","recipe","recorder","red-","red.","red_","reddit","redi","redmine","reference","refinery","refresh","registry","related","release","remote","rendering","repo","report","request","require","required","requirej","research","resource","response","resque","rest","restful","resume","reveal","reverse","review","riak","rich","right","ring","robot","role","room","router","routing","rpc-","rpc.","rpc_","rpg-","rpg.","rpg_","rspec","ruby-","ruby.","ruby_","rule","run-","run.","run_","runner","running","runtime","rust","rvm-","rvm.","rvm_","salt","sample","sandbox","sas-","sas.","sas_","sbt-","sbt.","sbt_","scala","scalable","scanner","schema","scheme","school","science","scraper","scratch","screen","script","scroll","scs-","scs.","scs_","sdk-","sdk.","sdk_","sdl-","sdl.","sdl_","search","secure","security","see-","see.","see_","seed","select","selector","selenium","semantic","sencha","send","sentiment","serie","server","service","session","set-","set.","set_","setting","setup","sha1","sha2","sha256","share","shared","sharing","sheet","shell","shield","shipping","shop","shopify","shortener","should","show","showcase","side","silex","simple","simulator","single","site","skeleton","sketch","skin","slack","slide","slider","slim","small","smart","smtp","snake","snapshot","snippet","soap","social","socket","software","solarized","solr","solution","solver","some","soon","source","space","spark","spatial","spec","sphinx","spine","spotify","spree","spring","sprite","sql-","sql.","sql_","sqlite","ssh-","ssh.","ssh_","stack","staging","standard","stanford","start","started","starter","startup","stat","statamic","state","static","statistic","statsd","statu","steam","step","still","stm-","stm.","stm_","storage","store","storm","story","strategy","stream","streaming","string","stripe","structure","studio","study","stuff","style","sublime","sugar","suite","summary","super","support","supported","svg-","svg.","svg_","svn-","svn.","svn_","swagger","swift","switch","switcher","symfony","symphony","sync","synopsi","syntax","system","tab-","tab.","tab_","table","tag-","tag.","tag_","talk","target","task","tcp-","tcp.","tcp_","tdd-","tdd.","tdd_","team","tech","template","term","terminal","testing","tetri","text","textmate","theme","theory","three","thrift","time","timeline","timer","tiny","tinymce","tip-","tip.","tip_","title","todo","todomvc","token","tool","toolbox","toolkit","top-","top.","top_","tornado","touch","tower","tracker","tracking","traffic","training","transfer","translate","transport","tree","trello","try-","try.","try_","tumblr","tut-","tut.","tut_","tutorial","tweet","twig","twitter","type","typo","ubuntu","uiview","ultimate","under","unit","unity","universal","unix","update","updated","upgrade","upload","uploader","uri-","uri.","uri_","url-","url.","url_","usage","usb-","usb.","usb_","use-","use.","use_","used","useful","user","using","util","utilitie","utility","vagrant","validator","value","variou","varnish","version","via-","via.","via_","video","view","viewer","vim-","vim.","vim_","vimrc","virtual","vision","visual","vpn","want","warning","watch","watcher","wave","way-","way.","way_","weather","web-","web_","webapp","webgl","webhook","webkit","webrtc","website","websocket","welcome","what","what'","when","where","which","why-","why.","why_","widget","wifi","wiki","win-","win.","win_","window","wip-","wip.","wip_","within","without","wizard","word","wordpres","work","worker","workflow","working","workshop","world","wrapper","write","writer","writing","written","www-","www.","www_","xamarin","xcode","xml-","xml.","xml_","xmpp","xxxxxx","yahoo","yaml","yandex","yeoman","yet-","yet.","yet_","yii-","yii.","yii_","youtube","yui-","yui.","yui_","zend","zero","zip-","zip.","zip_","zsh-","zsh.","zsh_"]},{"condition":"OR","regexTarget":"line","regexes":[{"regex":"--mount=type=secret,","flags":""},{"regex":"import[ \\t]+{[ \\t\\w,]+}[ \\t]+from[ \\t]+['\"][^'\"]+['\"]","flags":""}],"stopwords":[]}],"tier":"strict"},
- {"id":"github-app-token","regex":"(?:ghu|ghs)_[0-9a-zA-Z]{36}","flags":"","keywords":["ghu_","ghs_"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"github-fine-grained-pat","regex":"github_pat_\\w{82}","flags":"","keywords":["github_pat_"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"github-oauth","regex":"gho_[0-9a-zA-Z]{36}","flags":"","keywords":["gho_"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"github-pat","regex":"ghp_[0-9a-zA-Z]{36}","flags":"","keywords":["ghp_"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"github-refresh-token","regex":"ghr_[0-9a-zA-Z]{36}","flags":"","keywords":["ghr_"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"gitlab-cicd-job-token","regex":"glcbt-[0-9a-zA-Z]{1,5}_[0-9a-zA-Z_\\-]{20}","flags":"","keywords":["glcbt-"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"gitlab-deploy-token","regex":"gldt-[0-9a-zA-Z_\\-]{20}","flags":"","keywords":["gldt-"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"gitlab-feature-flag-client-token","regex":"glffct-[0-9a-zA-Z_\\-]{20}","flags":"","keywords":["glffct-"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"gitlab-feed-token","regex":"glft-[0-9a-zA-Z_\\-]{20}","flags":"","keywords":["glft-"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"gitlab-incoming-mail-token","regex":"glimt-[0-9a-zA-Z_\\-]{25}","flags":"","keywords":["glimt-"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"gitlab-kubernetes-agent-token","regex":"glagent-[0-9a-zA-Z_\\-]{50}","flags":"","keywords":["glagent-"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"gitlab-oauth-app-secret","regex":"gloas-[0-9a-zA-Z_\\-]{64}","flags":"","keywords":["gloas-"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"gitlab-pat","regex":"glpat-[\\w\\-]{20}","flags":"","keywords":["glpat-"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"gitlab-pat-routable","regex":"\\bglpat-[0-9a-zA-Z_\\-]{27,300}\\.[0-9a-z]{2}[0-9a-z]{7}\\b","flags":"","keywords":["glpat-"],"entropy":4,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"gitlab-ptt","regex":"glptt-[0-9a-f]{40}","flags":"","keywords":["glptt-"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"gitlab-rrt","regex":"GR1348941[\\w\\-]{20}","flags":"","keywords":["gr1348941"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"gitlab-runner-authentication-token","regex":"glrt-[0-9a-zA-Z_\\-]{20}","flags":"","keywords":["glrt-"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"gitlab-runner-authentication-token-routable","regex":"\\bglrt-t\\d_[0-9a-zA-Z_\\-]{27,300}\\.[0-9a-z]{2}[0-9a-z]{7}\\b","flags":"","keywords":["glrt-"],"entropy":4,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"gitlab-scim-token","regex":"glsoat-[0-9a-zA-Z_\\-]{20}","flags":"","keywords":["glsoat-"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"gitlab-session-cookie","regex":"_gitlab_session=[0-9a-z]{32}","flags":"","keywords":["_gitlab_session="],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"gitter-access-token","regex":"[\\w.\\-]{0,50}?(?:gitter)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9_\\-]{40})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["gitter"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"gocardless-api-token","regex":"[\\w.\\-]{0,50}?(?:gocardless)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}(live_[a-z0-9\\-_=A-Z]{40})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["live_","gocardless"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"grafana-api-key","regex":"\\b(eyJrIjoi[A-Za-z0-9]{70,400}={0,3})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["eyjrijoi"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"grafana-cloud-api-token","regex":"\\b(glc_[A-Za-z0-9+/]{32,400}={0,3})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["glc_"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"grafana-service-account-token","regex":"\\b(glsa_[A-Za-z0-9]{32}_[A-Fa-f0-9]{8})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["glsa_"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"harness-api-key","regex":"(?:pat|sat)\\.[a-zA-Z0-9_\\-]{22}\\.[a-zA-Z0-9]{24}\\.[a-zA-Z0-9]{20}","flags":"","keywords":["pat.","sat."],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"hashicorp-tf-api-token","regex":"[a-z0-9A-Z]{14}\\.(?:atlasv1)\\.[a-z0-9\\-_=A-Z]{60,70}","flags":"","keywords":["atlasv1"],"entropy":3.5,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"heroku-api-key","regex":"[\\w.\\-]{0,50}?(?:heroku)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["heroku"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"heroku-api-key-v2","regex":"\\b((HRKU-AA[0-9a-zA-Z_\\-]{58}))(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["hrku-aa"],"entropy":4,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"hubspot-api-key","regex":"[\\w.\\-]{0,50}?(?:hubspot)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["hubspot"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"huggingface-access-token","regex":"\\b(hf_(?:[a-zA-Z]{34}))(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["hf_"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"huggingface-organization-api-token","regex":"\\b(api_org_(?:[a-zA-Z]{34}))(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["api_org_"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"infracost-api-token","regex":"\\b(ico-[a-zA-Z0-9]{32})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["ico-"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"intercom-api-key","regex":"[\\w.\\-]{0,50}?(?:intercom)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9=_\\-]{60})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["intercom"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"intra42-client-secret","regex":"\\b(s-s4t2(?:ud|af)-[abcdef0123456789ABCDEF]{64})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["intra","s-s4t2ud-","s-s4t2af-"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"jfrog-api-key","regex":"[\\w.\\-]{0,50}?(?:jfrog|artifactory|bintray|xray)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{73})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["jfrog","artifactory","bintray","xray"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"jfrog-identity-token","regex":"[\\w.\\-]{0,50}?(?:jfrog|artifactory|bintray|xray)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{64})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["jfrog","artifactory","bintray","xray"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"jwt","regex":"\\b(ey[a-zA-Z0-9]{17,}\\.ey[a-zA-Z0-9\\/\\\\_\\-]{17,}\\.(?:[a-zA-Z0-9\\/\\\\_\\-]{10,}={0,2})?)(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["ey"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"jwt-base64","regex":"\\bZXlK(?:(?<alg>aGJHY2lPaU)|(?<apu>aGNIVWlPaU)|(?<apv>aGNIWWlPaU)|(?<aud>aGRXUWlPaU)|(?<b64>aU5qUWlP)|(?<crit>amNtbDBJanBi)|(?<cty>amRIa2lPaU)|(?<epk>bGNHc2lPbn)|(?<enc>bGJtTWlPaU)|(?<jku>cWEzVWlPaU)|(?<jwk>cWQyc2lPb)|(?<iss>cGMzTWlPaU)|(?<iv>cGRpSTZJ)|(?<kid>cmFXUWlP)|(?<key_ops>clpYbGZiM0J6SWpwY)|(?<kty>cmRIa2lPaUp)|(?<nonce>dWIyNWpaU0k2)|(?<p2c>d01tTWlP)|(?<p2s>d01uTWlPaU)|(?<ppt>d2NIUWlPaU)|(?<sub>emRXSWlPaU)|(?<svt>emRuUWlP)|(?<tag>MFlXY2lPaU)|(?<typ>MGVYQWlPaUp)|(?<url>MWNtd2l)|(?<use>MWMyVWlPaUp)|(?<ver>MlpYSWlPaU)|(?<version>MlpYSnphVzl1SWpv)|(?<x>NElqb2)|(?<x5c>NE5XTWlP)|(?<x5t>NE5YUWlPaU)|(?<x5ts256>NE5YUWpVekkxTmlJNkl)|(?<x5u>NE5YVWlPaU)|(?<zip>NmFYQWlPaU))[a-zA-Z0-9\\/\\\\_+\\-\\r\\n]{40,}={0,2}","flags":"","keywords":["zxlk"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"kraken-access-token","regex":"[\\w.\\-]{0,50}?(?:kraken)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9\\/=_\\+\\-]{80,90})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["kraken"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"kucoin-access-token","regex":"[\\w.\\-]{0,50}?(?:kucoin)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-f0-9]{24})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["kucoin"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"kucoin-secret-key","regex":"[\\w.\\-]{0,50}?(?:kucoin)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["kucoin"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"launchdarkly-access-token","regex":"[\\w.\\-]{0,50}?(?:launchdarkly)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9=_\\-]{40})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["launchdarkly"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"linear-api-key","regex":"lin_api_[a-z0-9A-Z]{40}","flags":"","keywords":["lin_api_"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"linear-client-secret","regex":"[\\w.\\-]{0,50}?(?:linear)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-f0-9]{32})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["linear"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"linkedin-client-id","regex":"[\\w.\\-]{0,50}?(?:linked[_\\-]?in)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{14})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["linkedin","linked_in","linked-in"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"linkedin-client-secret","regex":"[\\w.\\-]{0,50}?(?:linked[_\\-]?in)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{16})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["linkedin","linked_in","linked-in"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"lob-api-key","regex":"[\\w.\\-]{0,50}?(?:lob)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}((live|test)_[a-f0-9]{35})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["test_","live_"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"lob-pub-api-key","regex":"[\\w.\\-]{0,50}?(?:lob)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}((test|live)_pub_[a-f0-9]{31})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["test_pub","live_pub","_pub"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"looker-client-id","regex":"[\\w.\\-]{0,50}?(?:looker)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{20})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["looker"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"looker-client-secret","regex":"[\\w.\\-]{0,50}?(?:looker)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{24})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["looker"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"mailchimp-api-key","regex":"[\\w.\\-]{0,50}?(?:MailchimpSDK[^\\n]initialize|mailchimp)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-f0-9]{32}-us\\d\\d)(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["mailchimp"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"mailgun-private-api-token","regex":"[\\w.\\-]{0,50}?(?:mailgun)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}(key-[a-f0-9]{32})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["mailgun"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"mailgun-pub-key","regex":"[\\w.\\-]{0,50}?(?:mailgun)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}(pubkey-[a-f0-9]{32})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["mailgun"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"mailgun-signing-key","regex":"[\\w.\\-]{0,50}?(?:mailgun)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-h0-9]{32}-[a-h0-9]{8}-[a-h0-9]{8})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["mailgun"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"mapbox-api-token","regex":"[\\w.\\-]{0,50}?(?:mapbox)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}(pk\\.[a-z0-9]{60}\\.[a-z0-9]{22})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["mapbox"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"mattermost-access-token","regex":"[\\w.\\-]{0,50}?(?:mattermost)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{26})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["mattermost"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"maxmind-license-key","regex":"\\b([A-Za-z0-9]{6}_[A-Za-z0-9]{29}_mmk)(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["_mmk"],"entropy":4,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"messagebird-api-token","regex":"[\\w.\\-]{0,50}?(?:message[_\\-]?bird)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{25})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["messagebird","message-bird","message_bird"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"messagebird-client-id","regex":"[\\w.\\-]{0,50}?(?:message[_\\-]?bird)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["messagebird","message-bird","message_bird"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"microsoft-teams-webhook","regex":"https://[a-z0-9]+\\.webhook\\.office\\.com/webhookb2/[a-z0-9]{8}-([a-z0-9]{4}-){3}[a-z0-9]{12}@[a-z0-9]{8}-([a-z0-9]{4}-){3}[a-z0-9]{12}/IncomingWebhook/[a-z0-9]{32}/[a-z0-9]{8}-([a-z0-9]{4}-){3}[a-z0-9]{12}","flags":"","keywords":["webhook.office.com","webhookb2","incomingwebhook"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"netlify-access-token","regex":"[\\w.\\-]{0,50}?(?:netlify)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9=_\\-]{40,46})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["netlify"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"new-relic-browser-api-token","regex":"[\\w.\\-]{0,50}?(?:new-relic|newrelic|new_relic)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}(NRJS-[a-f0-9]{19})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["nrjs-"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"new-relic-insert-key","regex":"[\\w.\\-]{0,50}?(?:new-relic|newrelic|new_relic)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}(NRII-[a-z0-9\\-]{32})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["nrii-"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"new-relic-user-api-id","regex":"[\\w.\\-]{0,50}?(?:new-relic|newrelic|new_relic)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{64})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["new-relic","newrelic","new_relic"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"new-relic-user-api-key","regex":"[\\w.\\-]{0,50}?(?:new-relic|newrelic|new_relic)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}(NRAK-[a-z0-9]{27})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["nrak"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"notion-api-token","regex":"\\b(ntn_[0-9]{11}[A-Za-z0-9]{32}[A-Za-z0-9]{3})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["ntn_"],"entropy":4,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"npm-access-token","regex":"\\b(npm_[a-z0-9]{36})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["npm_"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"nytimes-access-token","regex":"[\\w.\\-]{0,50}?(?:nytimes|new-york-times,|newyorktimes)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9=_\\-]{32})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["nytimes","new-york-times","newyorktimes"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"octopus-deploy-api-key","regex":"\\b(API-[A-Z0-9]{26})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["api-"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"openai-api-key","regex":"\\b(sk-(?:proj|svcacct|admin)-(?:[A-Za-z0-9_\\-]{74}|[A-Za-z0-9_\\-]{58})T3BlbkFJ(?:[A-Za-z0-9_\\-]{74}|[A-Za-z0-9_\\-]{58})\\b|sk-[a-zA-Z0-9]{20}T3BlbkFJ[a-zA-Z0-9]{20})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["t3blbkfj"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"openshift-user-token","regex":"\\b(sha256~[\\w\\-]{43})(?:[^\\w\\-]|$)","flags":"","keywords":["sha256~"],"entropy":3.5,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"perplexity-api-key","regex":"\\b(pplx-[a-zA-Z0-9]{48})(?:[\\x60'\"\\s;]|\\\\[nr]|$|\\b)","flags":"","keywords":["pplx-"],"entropy":4,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"plaid-api-token","regex":"[\\w.\\-]{0,50}?(?:plaid)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}(access-(?:sandbox|development|production)-[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["plaid"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"plaid-client-id","regex":"[\\w.\\-]{0,50}?(?:plaid)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{24})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["plaid"],"entropy":3.5,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"plaid-secret-key","regex":"[\\w.\\-]{0,50}?(?:plaid)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{30})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["plaid"],"entropy":3.5,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"planetscale-api-token","regex":"\\b(pscale_tkn_[\\w=\\.\\-]{32,64})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["pscale_tkn_"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"planetscale-oauth-token","regex":"\\b(pscale_oauth_[\\w=\\.\\-]{32,64})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["pscale_oauth_"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"planetscale-password","regex":"\\b(pscale_pw_[\\w=\\.\\-]{32,64})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["pscale_pw_"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"postman-api-token","regex":"\\b(PMAK-[a-f0-9A-F]{24}\\-[a-f0-9A-F]{34})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["pmak-"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"prefect-api-token","regex":"\\b(pnu_[a-zA-Z0-9]{36})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["pnu_"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"private-key","regex":"-----BEGIN[ A-Z0-9_\\-]{0,100}PRIVATE KEY(?: BLOCK)?-----[\\s\\S\\-]{64,}?KEY(?: BLOCK)?-----","flags":"i","keywords":["-----begin"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"pulumi-api-token","regex":"\\b(pul-[a-f0-9]{40})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["pul-"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"pypi-upload-token","regex":"pypi-AgEIcHlwaS5vcmc[\\w\\-]{50,1000}","flags":"","keywords":["pypi-ageichlwas5vcmc"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"rapidapi-access-token","regex":"[\\w.\\-]{0,50}?(?:rapidapi)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9_\\-]{50})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["rapidapi"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"readme-api-token","regex":"\\b(rdme_[a-z0-9]{70})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["rdme_"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"rubygems-api-token","regex":"\\b(rubygems_[a-f0-9]{48})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["rubygems_"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"scalingo-api-token","regex":"\\b(tk-us-[\\w\\-]{48})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["tk-us-"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"sendbird-access-id","regex":"[\\w.\\-]{0,50}?(?:sendbird)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["sendbird"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"sendbird-access-token","regex":"[\\w.\\-]{0,50}?(?:sendbird)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-f0-9]{40})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["sendbird"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"sendgrid-api-token","regex":"\\b(SG\\.[a-z0-9=_\\-\\.A-Z]{66})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["sg."],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"sendinblue-api-token","regex":"\\b(xkeysib-[a-f0-9]{64}\\-[a-z0-9A-Z]{16})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["xkeysib-"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"sentry-access-token","regex":"[\\w.\\-]{0,50}?(?:sentry)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-f0-9]{64})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["sentry"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"sentry-org-token","regex":"\\bsntrys_eyJpYXQiO[a-zA-Z0-9+/]{10,200}(?:LCJyZWdpb25fdXJs|InJlZ2lvbl91cmwi|cmVnaW9uX3VybCI6)[a-zA-Z0-9+/]{10,200}={0,2}_[a-zA-Z0-9+/]{43}(?:[^a-zA-Z0-9+/]|$)","flags":"","keywords":["sntrys_eyjpyxqio"],"entropy":4.5,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"sentry-user-token","regex":"\\b(sntryu_[a-f0-9]{64})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["sntryu_"],"entropy":3.5,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"settlemint-application-access-token","regex":"\\b(sm_aat_[a-zA-Z0-9]{16})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["sm_aat"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"settlemint-personal-access-token","regex":"\\b(sm_pat_[a-zA-Z0-9]{16})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["sm_pat"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"settlemint-service-access-token","regex":"\\b(sm_sat_[a-zA-Z0-9]{16})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["sm_sat"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"shippo-api-token","regex":"\\b(shippo_(?:live|test)_[a-fA-F0-9]{40})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["shippo_"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"shopify-access-token","regex":"shpat_[a-fA-F0-9]{32}","flags":"","keywords":["shpat_"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"shopify-custom-access-token","regex":"shpca_[a-fA-F0-9]{32}","flags":"","keywords":["shpca_"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"shopify-private-app-access-token","regex":"shppa_[a-fA-F0-9]{32}","flags":"","keywords":["shppa_"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"shopify-shared-secret","regex":"shpss_[a-fA-F0-9]{32}","flags":"","keywords":["shpss_"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"sidekiq-secret","regex":"[\\w.\\-]{0,50}?(?:BUNDLE_ENTERPRISE__CONTRIBSYS__COM|BUNDLE_GEMS__CONTRIBSYS__COM)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-f0-9]{8}:[a-f0-9]{8})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["bundle_enterprise__contribsys__com","bundle_gems__contribsys__com"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"sidekiq-sensitive-url","regex":"\\bhttps?://([a-f0-9]{8}:[a-f0-9]{8})@(?:gems[^\\n]contribsys[^\\n]com|enterprise[^\\n]contribsys[^\\n]com)(?:[\\/|\\#|\\?|:]|$)","flags":"i","keywords":["gems.contribsys.com","enterprise.contribsys.com"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"slack-app-token","regex":"xapp-\\d-[A-Z0-9]+-\\d+-[a-z0-9]+","flags":"i","keywords":["xapp"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"slack-bot-token","regex":"xoxb-[0-9]{10,13}-[0-9]{10,13}[a-zA-Z0-9\\-]*","flags":"","keywords":["xoxb"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"slack-config-access-token","regex":"xoxe[^\\n]xox[bp]-\\d-[A-Z0-9]{163,166}","flags":"i","keywords":["xoxe.xoxb-","xoxe.xoxp-"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"slack-config-refresh-token","regex":"xoxe-\\d-[A-Z0-9]{146}","flags":"i","keywords":["xoxe-"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"slack-legacy-bot-token","regex":"xoxb-[0-9]{8,14}-[a-zA-Z0-9]{18,26}","flags":"","keywords":["xoxb"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"slack-legacy-token","regex":"xox[os]-\\d+-\\d+-\\d+-[a-fA-F\\d]+","flags":"","keywords":["xoxo","xoxs"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"slack-legacy-workspace-token","regex":"xox[ar]-(?:\\d-)?[0-9a-zA-Z]{8,48}","flags":"","keywords":["xoxa","xoxr"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"slack-user-token","regex":"xox[pe](?:-[0-9]{10,13}){3}-[a-zA-Z0-9\\-]{28,34}","flags":"","keywords":["xoxp-","xoxe-"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"slack-webhook-url","regex":"(?:https?://)?hooks[^\\n]slack[^\\n]com/(?:services|workflows|triggers)/[A-Za-z0-9+/]{43,56}","flags":"","keywords":["hooks.slack.com"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"snyk-api-token","regex":"[\\w.\\-]{0,50}?(?:snyk[_.\\-]?(?:(?:api|oauth)[_.\\-]?)?(?:key|token))(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["snyk"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"sonar-api-token","regex":"[\\w.\\-]{0,50}?(?:sonar[_.\\-]?(login|token))(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}((?:squ_|sqp_|sqa_)?[a-z0-9=_\\-]{40})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["sonar"],"entropy":0,"secretGroup":2,"allowlists":[],"tier":"standard"},
- {"id":"sourcegraph-access-token","regex":"\\b(\\b(sgp_(?:[a-fA-F0-9]{16}|local)_[a-fA-F0-9]{40}|sgp_[a-fA-F0-9]{40}|[a-fA-F0-9]{40})\\b)(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["sgp_","sourcegraph"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"square-access-token","regex":"\\b((?:EAAA|sq0atp-)[\\w\\-]{22,60})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["sq0atp-","eaaa"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"squarespace-access-token","regex":"[\\w.\\-]{0,50}?(?:squarespace)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["squarespace"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"stripe-access-token","regex":"\\b((?:sk|rk)_(?:test|live|prod)_[a-zA-Z0-9]{10,99})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["sk_test","sk_live","sk_prod","rk_test","rk_live","rk_prod"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"sumologic-access-token","regex":"[\\w.\\-]{0,50}?(?:(?:[Ss]umo|SUMO))(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9A-Z]{64})(?:[\\x60'\"\\s;]|\\\\[nrNR]|$)","flags":"","keywords":["sumo"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"telegram-bot-api-token","regex":"[\\w.\\-]{0,50}?(?:[tT][eE][lL][eE][gG][rR])(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([0-9]{5,16}:(?:A)[a-z0-9_\\-A-Z]{34})(?:[\\x60'\"\\s;]|\\\\[nrNR]|$)","flags":"","keywords":["telegr"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"travisci-access-token","regex":"[\\w.\\-]{0,50}?(?:travis)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{22})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["travis"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"twilio-api-key","regex":"SK[0-9a-fA-F]{32}","flags":"","keywords":["sk"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"twitch-api-token","regex":"[\\w.\\-]{0,50}?(?:twitch)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{30})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["twitch"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"twitter-access-secret","regex":"[\\w.\\-]{0,50}?(?:twitter)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{45})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["twitter"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"twitter-access-token","regex":"[\\w.\\-]{0,50}?(?:twitter)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([0-9]{15,25}-[a-zA-Z0-9]{20,40})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["twitter"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"twitter-api-key","regex":"[\\w.\\-]{0,50}?(?:twitter)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{25})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["twitter"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"twitter-api-secret","regex":"[\\w.\\-]{0,50}?(?:twitter)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{50})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["twitter"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"twitter-bearer-token","regex":"[\\w.\\-]{0,50}?(?:twitter)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}(A{22}[a-zA-Z0-9%]{80,100})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["twitter"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"typeform-api-token","regex":"[\\w.\\-]{0,50}?(?:typeform)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}(tfp_[a-z0-9\\-_\\.=]{59})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["tfp_"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"vault-batch-token","regex":"\\b(hvb\\.[\\w\\-]{138,300})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["hvb."],"entropy":4,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"vault-service-token","regex":"\\b((?:hvs\\.[\\w\\-]{90,120}|s\\.(?:[a-z0-9A-Z]{24})))(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["hvs.","s."],"entropy":3.5,"secretGroup":0,"allowlists":[{"condition":"OR","regexTarget":"secret","regexes":[{"regex":"s\\.[A-Za-z]{24}","flags":""}],"stopwords":[]}],"tier":"standard"},
- {"id":"yandex-access-token","regex":"[\\w.\\-]{0,50}?(?:yandex)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}(t1\\.[A-Z0-9a-z_\\-]+[=]{0,2}\\.[A-Z0-9a-z_\\-]{86}[=]{0,2})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["yandex"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"yandex-api-key","regex":"[\\w.\\-]{0,50}?(?:yandex)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}(AQVN[A-Za-z0-9_\\-]{35,38})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["yandex"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"yandex-aws-access-token","regex":"[\\w.\\-]{0,50}?(?:yandex)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}(YC[a-zA-Z0-9_\\-]{38})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["yandex"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"zendesk-secret-key","regex":"[\\w.\\-]{0,50}?(?:zendesk)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{40})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["zendesk"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"openviking-gateway-key","regex":"(?<![A-Za-z0-9_-])(ovgw_[A-Za-z0-9_-]{43})(?![A-Za-z0-9_-])","flags":"","keywords":["ovgw_"],"entropy":3,"secretGroup":1,"allowlists":[],"tier":"standard"},
- {"id":"openviking-gateway-management-key","regex":"(?<![A-Za-z0-9_-])(ovgm_[A-Za-z0-9_-]{43})(?![A-Za-z0-9_-])","flags":"","keywords":["ovgm_"],"entropy":3,"secretGroup":1,"allowlists":[],"tier":"standard"},
- {"id":"openviking-oauth-access-token","regex":"(?<![A-Za-z0-9_-])(ovat_[A-Za-z0-9_-]{54})(?![A-Za-z0-9_-])","flags":"","keywords":["ovat_"],"entropy":3,"secretGroup":1,"allowlists":[],"tier":"standard"},
- {"id":"openviking-oauth-refresh-token","regex":"(?<![A-Za-z0-9_-])(ovrt_[A-Za-z0-9_-]{54})(?![A-Za-z0-9_-])","flags":"","keywords":["ovrt_"],"entropy":3,"secretGroup":1,"allowlists":[],"tier":"standard"},
- {"id":"openviking-oauth-auth-code","regex":"(?<![A-Za-z0-9_-])(ovac_[A-Za-z0-9_-]{54})(?![A-Za-z0-9_-])","flags":"","keywords":["ovac_"],"entropy":3,"secretGroup":1,"allowlists":[],"tier":"standard"},
-];
diff --git a/examples/claude-code-memory-plugin/scripts/subagent-stop.mjs b/examples/claude-code-memory-plugin/scripts/subagent-stop.mjs
index 8f68228f5..23f11d07f 100644
--- a/examples/claude-code-memory-plugin/scripts/subagent-stop.mjs
+++ b/examples/claude-code-memory-plugin/scripts/subagent-stop.mjs
@@ -101,9 +101,7 @@ async function pushTurns(cfg, ovSessionId, turns, { peerId = null, enqueueOnly =
const payload = { role: turn.role, parts };
if (peerId) payload.peer_id = peerId;
if (enqueueOnly) {
- const res = await enqueuePendingDirectly("addMessage", ovSessionId, payload, {
- redactTier: cfg.captureRedact,
- });
+ const res = await enqueuePendingDirectly("addMessage", ovSessionId, payload);
if (res.ok) queued++;
else enqueueFailed++;
} else {
@@ -113,7 +111,6 @@ async function pushTurns(cfg, ovSessionId, turns, { peerId = null, enqueueOnly =
if (!enqueueOnly) {
const res = await sendSessionMessages(fetchJSON, ovSessionId, payloads, {
enqueueOnRetryable: true,
- redactTier: cfg.captureRedact,
});
ok = res.sent;
queued = res.queued;
diff --git a/examples/codex-memory-plugin/.codex-plugin/plugin.json b/examples/codex-memory-plugin/.codex-plugin/plugin.json
index 8c73112e4..e15fee9af 100644
--- a/examples/codex-memory-plugin/.codex-plugin/plugin.json
+++ b/examples/codex-memory-plugin/.codex-plugin/plugin.json
@@ -1,6 +1,6 @@
{
"name": "openviking-memory",
- "version": "0.11.15",
+ "version": "0.11.14",
"description": "Long-term semantic memory for Codex, powered by OpenViking. Recall on UserPromptSubmit, incremental add_message on Stop (per turn), commit on SessionEnd (Codex >= 0.145) and on PreCompact, with an idle/ended sweep on SessionStart as the fallback for signals, crashes and older Codex builds. Includes a local stdio MCP proxy that reads OpenViking credentials from env/ovcli.conf.",
"author": {
"name": "OpenViking",
diff --git a/examples/codex-memory-plugin/README.md b/examples/codex-memory-plugin/README.md
index 28776a382..cf42effc9 100644
--- a/examples/codex-memory-plugin/README.md
+++ b/examples/codex-memory-plugin/README.md
@@ -207,12 +207,6 @@ The env vars are comma-separated lists, split before parsing, so a rule needing
Rules run top to bottom and the first `d` that matches (or `k` that does not) ends the decision; text a substitution empties is not a drop, just too short to recall on. Filters run before `OPENVIKING_MIN_QUERY_LENGTH` and before the built-in ack / slash-command heuristics. A capture rule shapes what is sent, not what is already stored, and anything already in the pending queue carries the rules that were in effect when it was enqueued; adding a `d`/`k` rule mid-session also shortens the turn list the cursor counts, which reads as a transcript rewrite and replays from the last user turn. On the capture path an `s` rule also rewrites every string value in a tool call's input and a tool result's output, so a redaction rule covers a secret that reached a command or its output; `d`/`k` rules look only at the turn's text. A rule that fails to compile is skipped, never fatal — `ov-memory-doctor` lists the active rules and reports the exact error for the ones it could not parse.
-#### Secret redaction
-
-Before a captured turn is sent — or parked in the local pending queue — the plugin replaces credentials in it with `{{ov_redacted:<rule>:<tag>}}`, keeping the text around them (`API_KEY={{ov_redacted:…}}`). Detection is the [gitleaks](https://github.com/gitleaks/gitleaks) default rule set as gitleaks ships it, plus rules for OpenViking's own keys, run locally, over every text field of the message including tool input and output. `<tag>` is 8 hex characters of an HMAC under a per-install key in `~/.openviking/state/redact/`, so one secret always gets the same tag on this machine.
-
-`captureRedact` / `OPENVIKING_CAPTURE_REDACT` picks the tier: `standard` (default) runs every provider-specific rule (GitHub, AWS, OpenAI, Anthropic, Slack, Stripe, private keys, JWTs, …) plus OpenViking's own keys (`ovgw_`, `ovgm_`, `ovat_`, `ovrt_`, `ovac_`); `strict` adds gitleaks' `generic-api-key`, which catches any high-entropy value after a key-ish name like `password=` and is the only rule for a `.env` value with no provider format; `off` (or `false`/`0`/`no`) disables it. It is user-level only — `ovcli.conf` or the environment; a workspace file cannot change it — and an unknown tier name means `standard`. Redaction runs after `captureFilters`. A string the scanner fails on is replaced whole with `{{ov_redacted:scan-failed:<tag>}}`, and text past a string's first 1,000,000 characters, or past 2,000,000 characters scanned in one send, with `{{ov_redacted:scan-oversize:<tag>}}`, rather than sent unscanned.
-
#### Workspace configuration files
A repository can carry its own plugin settings in `<repo-root>/.openviking/config.json`, which the team commits, and `<repo-root>/.openviking/config.local.json`, which stays private and gitignored. A third layer, this machine's entry under `~/.openviking/workspaces/`, outranks both, and all three outrank `ovcli.conf`.
diff --git a/examples/codex-memory-plugin/scripts/ov-session.mjs b/examples/codex-memory-plugin/scripts/ov-session.mjs
index 2413df5d0..e762c9448 100644
--- a/examples/codex-memory-plugin/scripts/ov-session.mjs
+++ b/examples/codex-memory-plugin/scripts/ov-session.mjs
@@ -181,7 +181,6 @@ export async function catchUpTurns({
});
const r = await sendSessionMessages(fetchJSONRes, ovSessionId, payloads, {
- redactTier: cfg?.captureRedact,
// The transcript and persisted cursor own retries, including SessionStart
// catch-up. Queueing the same tail would create a second retry owner.
onSent: async (n) => {
diff --git a/examples/codex-memory-plugin/scripts/session-start-commit.mjs b/examples/codex-memory-plugin/scripts/session-start-commit.mjs
index ca9e3155f..37221b141 100644
--- a/examples/codex-memory-plugin/scripts/session-start-commit.mjs
+++ b/examples/codex-memory-plugin/scripts/session-start-commit.mjs
@@ -115,7 +115,7 @@ function emitSessionStartOutput({ contexts = [], systemMessage = "" } = {}) {
*/
async function replayPendingWrites() {
try {
- const result = await replayPending(fetchJSONRes, log, { redactTier: cfg.captureRedact });
+ const result = await replayPending(fetchJSONRes, log);
if (result.replayed > 0 || result.failed > 0 || result.deferred > 0) {
log("pending-replay", result);
}
diff --git a/examples/codex-memory-plugin/scripts/shared/agent-hook-runtime.mjs b/examples/codex-memory-plugin/scripts/shared/agent-hook-runtime.mjs
index fc5f67eff..6018494cf 100644
--- a/examples/codex-memory-plugin/scripts/shared/agent-hook-runtime.mjs
+++ b/examples/codex-memory-plugin/scripts/shared/agent-hook-runtime.mjs
@@ -11,7 +11,6 @@ import { enqueue, replayPending } from "./pending-queue.mjs";
import { buildProfileBlock } from "./profile-inject.mjs";
import { buildRecallBlock, isRecallEnabled } from "./recall-core.mjs";
import { buildPluginConfig } from "./plugin-config.mjs";
-import { redactPayload } from "./redact.mjs";
import { isRetryableFailure } from "./retryable.mjs";
import { deriveHarnessSessionId, isBypassed } from "./session-model.mjs";
import { resolveEffectivePeerId } from "./workspace-peer.mjs";
@@ -183,14 +182,10 @@ export function makeAgentFetchJSON(cfg, cwd = process.cwd(), {
return { fetchJSON, get effectivePeer() { return workspacePeer(); } };
}
-/**
- * Park a write for the next hook to replay. Never throws: the caller is a hook.
- * An addMessage payload is redacted under `options.redactTier` on its way to
- * disk unless `options.redacted` says the caller already did it.
- */
-export async function enqueueAgentPending(type, sessionId, payload = {}, options = {}) {
+/** Park a write for the next hook to replay. Never throws: the caller is a hook. */
+export async function enqueueAgentPending(type, sessionId, payload = {}) {
try {
- return await enqueue(type, sessionId, payload, options);
+ return await enqueue(type, sessionId, payload);
} catch {
return { ok: false };
}
@@ -201,7 +196,7 @@ export async function enqueueAgentPending(type, sessionId, payload = {}, options
* stderr when no retry can help. `pendingQueued` / `pendingEnqueueFailed` are
* what the capture hooks log and what decides whether a turn is lost.
*/
-async function notePendingWrite(type, sessionId, payload, result, enqueueOptions = {}) {
+async function notePendingWrite(type, sessionId, payload, result) {
if (result.ok) return result;
if (!isRetryableFailure(result)) {
const detail = result.error?.message || result.error?.code || "";
@@ -211,38 +206,30 @@ async function notePendingWrite(type, sessionId, payload, result, enqueueOptions
);
return result;
}
- const pending = await enqueueAgentPending(type, sessionId, payload, enqueueOptions);
+ const pending = await enqueueAgentPending(type, sessionId, payload);
if (pending.ok) result.pendingQueued = true;
else result.pendingEnqueueFailed = true;
return result;
}
-/**
- * Add one message. The payload is secret-redacted under `redactTier` (the
- * caller's resolved `captureRedact`, default "standard") before the POST, and
- * the same redacted copy is what a retryable failure parks in the queue.
- */
-export async function addAgentMessage(fetchJSON, sessionId, payload, { redactTier } = {}) {
- const body = redactPayload(payload, { tier: redactTier });
+export async function addAgentMessage(fetchJSON, sessionId, payload) {
const result = await fetchJSON(`/api/v1/sessions/${encodeURIComponent(sessionId)}/messages`, {
method: "POST",
- body: JSON.stringify(body),
+ body: JSON.stringify(payload),
});
- return notePendingWrite("addMessage", sessionId, body, result, { redacted: true });
+ return notePendingWrite("addMessage", sessionId, payload, result);
}
/**
* Session routes attribute a message by its body `peer_id` alone: the
* actor-peer header scopes reads, not session writes. A payload that already
* names its peer keeps it; an empty `peerId` (peer mode off) stamps nothing.
- * `redactTier` is the caller's resolved `captureRedact`; sendSessionMessages
- * redacts under it before anything is sent or queued.
*/
-export async function addAgentMessages(fetchJSON, sessionId, payloads, peerId = "", { redactTier } = {}) {
+export async function addAgentMessages(fetchJSON, sessionId, payloads, peerId = "") {
const stamped = peerId
? payloads.map((payload) => (payload.peer_id ? payload : { ...payload, peer_id: peerId }))
: payloads;
- return sendSessionMessages(fetchJSON, sessionId, stamped, { enqueueOnRetryable: true, redactTier });
+ return sendSessionMessages(fetchJSON, sessionId, stamped, { enqueueOnRetryable: true });
}
export async function commitAgentSession(fetchJSON, sessionId, log = () => {}, payload = {}) {
@@ -278,9 +265,8 @@ export async function getAgentSessionContext(fetchJSON, sessionId, tokenBudget =
return result.ok ? result.result : null;
}
-/** Replay the pending queue; `options.redactTier` is the caller's `captureRedact`. */
-export async function replayAgentPending(fetchJSON, log = () => {}, options = {}) {
- return replayPending(fetchJSON, log, options);
+export async function replayAgentPending(fetchJSON, log = () => {}) {
+ return replayPending(fetchJSON, log);
}
export async function recallForPrompt(fetchJSON, cfg, prompt, cwd, log = () => {}, options = {}) {
diff --git a/examples/codex-memory-plugin/scripts/shared/batch-send.mjs b/examples/codex-memory-plugin/scripts/shared/batch-send.mjs
index 253e7713f..d7ec355cc 100644
--- a/examples/codex-memory-plugin/scripts/shared/batch-send.mjs
+++ b/examples/codex-memory-plugin/scripts/shared/batch-send.mjs
@@ -1,6 +1,5 @@
// GENERATED FROM examples/memory-plugin-shared/lib. DO NOT EDIT.
import { enqueue } from "./pending-queue.mjs";
-import { redactPayloads } from "./redact.mjs";
import { isRetryableFailure } from "./retryable.mjs";
export const BATCH_LIMIT = 100;
@@ -34,8 +33,6 @@ async function enqueueRemainder(sessionId, payloads, startIndex, result, retryab
for (let i = startIndex; i < payloads.length; i++) {
const queued = await enqueue("addMessage", sessionId, payloads[i], {
createdAt: baseCreatedAt + (i - startIndex),
- // sendSessionMessages redacted every payload under the caller's tier.
- redacted: true,
});
if (!queued.ok) {
// Stop at the first enqueue failure so queued entries stay a contiguous
@@ -78,24 +75,18 @@ async function sendSerial(fetchJSON, sessionId, payloads, startIndex, opts, resu
/**
* Send add-message payloads in server-sized batches with serial fallback.
*
- * Every payload is secret-redacted (lib/redact.mjs) once, up front, under
- * `opts.redactTier`; the batch POST, the serial fallback and the pending queue
- * all carry that redacted copy, so no path out of here holds the plaintext.
- * The caller's payload objects are never mutated.
- *
* @param {Function} fetchJSON - (path, init) => { ok, status, result?, error? }
* @param {string} sessionId - OpenViking session id
* @param {Array<object>} payloads - sanitized add-message request bodies
* @param {object} opts
* @param {boolean} opts.enqueueOnRetryable - enqueue unsent payloads after a retryable failure
* @param {Function} opts.onSent - called with the number of messages durably sent after each success
- * @param {string} [opts.redactTier="standard"] - the caller's resolved `captureRedact`
* @returns {Promise<{sent:number,queued:number,enqueueFailed:number,failed:number,retryable:boolean,usedBatch:boolean,lastError:any}>}
*/
export async function sendSessionMessages(fetchJSON, sessionId, payloads, opts = {}) {
const result = makeResult();
- if (!Array.isArray(payloads) || payloads.length === 0) return result;
- const messages = redactPayloads(payloads, { tier: opts.redactTier });
+ const messages = Array.isArray(payloads) ? payloads : [];
+ if (messages.length === 0) return result;
const encodedSid = encodeURIComponent(sessionId);
for (let start = 0; start < messages.length; start += BATCH_LIMIT) {
diff --git a/examples/codex-memory-plugin/scripts/shared/config-schema.mjs b/examples/codex-memory-plugin/scripts/shared/config-schema.mjs
index bb8cf7a00..cc7152fbb 100644
--- a/examples/codex-memory-plugin/scripts/shared/config-schema.mjs
+++ b/examples/codex-memory-plugin/scripts/shared/config-schema.mjs
@@ -24,11 +24,6 @@
* harness per-harness default, where one genuinely differs
* min/max clamped, not rejected: a config file must not kill a hook
* values the enum's members; anything else falls back to the default
- * boolValues enum only: the member a boolean-ish value (`true`/`yes`/`on`,
- * `false`/`no`/`off`/`0`) stands for, so `false` can mean "off"
- * unknownToDefault
- * enum only: a value naming no member resolves to the default
- * instead of leaving the lower layer's value standing
* env OPENVIKING_* variable, the highest-priority layer
* aliases older spellings, honoured forever; the doctor names them
* workspace dotted key in `.openviking/config.json`
@@ -156,23 +151,6 @@ export const KNOBS = [
// tool results, so it captures them by default.
{ name: "captureToolResults", type: "bool", default: false, harness: { dsh: true }, env: "OPENVIKING_CAPTURE_TOOL_RESULTS", capability: "capture" },
{ name: "captureFilters", type: "list", default: [], env: "OPENVIKING_CAPTURE_FILTERS", capability: "capture" },
- // Secret redaction of every captured payload before it is sent or queued
- // (lib/redact.mjs); the tiers are REDACT_TIERS there, in the same order.
- // User-level only — deliberately no `workspace` key, so a repository's
- // `.openviking/config.json` cannot switch redaction off for whoever opens it.
- // `false` means off rather than "unparseable"; a tier this build does not
- // know (a newer config read by an older plugin) means the default, never a
- // weaker value left over from a lower layer.
- {
- name: "captureRedact",
- type: "enum",
- values: ["off", "standard", "strict"],
- default: "standard",
- boolValues: { true: "standard", false: "off" },
- unknownToDefault: true,
- env: "OPENVIKING_CAPTURE_REDACT",
- capability: "capture",
- },
// 0 means "derive from timeoutMs": a write gets a longer budget than a read.
{ name: "captureTimeoutMs", type: "int", default: 0, min: 0, max: 600000, env: "OPENVIKING_CAPTURE_TIMEOUT_MS", capability: "capture" },
{ name: "commitTokenThreshold", type: "int", default: 20000, min: 1000, max: 1000000, env: "OPENVIKING_COMMIT_TOKEN_THRESHOLD", workspace: "capture.commit_token_threshold", capability: "capture" },
@@ -339,16 +317,8 @@ export function coerceKnobValue(knob, raw, fallback) {
return knob.max === undefined ? floored : Math.min(knob.max, floored);
}
case "enum": {
- const values = knob.values || [];
const word = String(raw ?? "").trim();
- if (values.includes(word)) return word;
- if (knob.boolValues) {
- const lower = word.toLowerCase();
- if (values.includes(lower)) return lower;
- if (raw === true || TRUE_WORDS.includes(lower)) return knob.boolValues.true;
- if (raw === false || FALSE_WORDS.includes(lower)) return knob.boolValues.false;
- }
- return knob.unknownToDefault && word ? knobDefault(knob) : fallback;
+ return (knob.values || []).includes(word) ? word : fallback;
}
// A peer template may be one string or an ordered list of fallbacks, and
// `String([a, b])` would quietly turn the list into one bogus template.
diff --git a/examples/codex-memory-plugin/scripts/shared/doctor-core.mjs b/examples/codex-memory-plugin/scripts/shared/doctor-core.mjs
index 319d1d354..107ed1db1 100644
--- a/examples/codex-memory-plugin/scripts/shared/doctor-core.mjs
+++ b/examples/codex-memory-plugin/scripts/shared/doctor-core.mjs
@@ -1326,20 +1326,11 @@ export function reportTimeouts(report, cfg, { pluginRoot = "", hooksTemplate = "
/** The switches that decide whether anything is injected at all. */
export function reportToggles(report, cfg, { harness = "" } = {}, toggles = []) {
- // Every host captures through the shared send layer, so the redaction tier
- // (already resolved to a tier name by the config knob) is reported here
- // rather than by each doctor.
- const redact = typeof cfg.captureRedact === "string" ? cfg.captureRedact : "";
- const all = redact ? [...toggles, `capture redaction ${redact === "off" ? "OFF" : redact}`] : toggles;
- report.info(`toggles ${all.join(", ")}`);
+ report.info(`toggles ${toggles.join(", ")}`);
if (!cfg.autoRecall || !cfg.autoCapture || cfg.noAutoInject) {
report.warn("one or more injection paths are switched off", toggles.join(", "),
`check OPENVIKING_AUTO_RECALL / OPENVIKING_AUTO_CAPTURE / OPENVIKING_NO_AUTO_INJECT and ovcli.conf plugin.${harnessKey(harness)}`);
}
- if (redact === "off" && cfg.autoCapture) {
- report.warn("capture redaction is off — secrets in captured turns are sent to OpenViking as they are", "",
- "unset OPENVIKING_CAPTURE_REDACT, or set plugin.captureRedact in ovcli.conf to \"standard\" (the default) or \"strict\"");
- }
}
/**
diff --git a/examples/codex-memory-plugin/scripts/shared/pending-queue.mjs b/examples/codex-memory-plugin/scripts/shared/pending-queue.mjs
index 1f75ac423..e86f59b00 100644
--- a/examples/codex-memory-plugin/scripts/shared/pending-queue.mjs
+++ b/examples/codex-memory-plugin/scripts/shared/pending-queue.mjs
@@ -11,12 +11,6 @@
*
* Each file contains: { type, sessionId, payload, createdAt, retries, dedupKey }
*
- * An addMessage payload is secret-redacted (lib/redact.mjs) before it is
- * written, and again before it is replayed: the queue is plaintext on disk, and
- * an entry written by an older plugin, or by a caller that skipped redaction,
- * must not reach the server as it was. Redaction is idempotent, so replaying an
- * already-redacted entry sends the same bytes.
- *
* Config (env vars):
* OPENVIKING_PENDING_DIR pending queue directory
* (default: ~/.openviking/pending)
@@ -31,7 +25,6 @@ import { mkdir, readdir, readFile, rename, writeFile, unlink, stat, chmod, utime
import { createHash } from "node:crypto";
import { join } from "node:path";
import { homedir } from "node:os";
-import { redactPayload } from "./redact.mjs";
import { isRetryableFailure } from "./retryable.mjs";
const DEFAULT_MAX_RETRIES = 3;
@@ -191,21 +184,8 @@ async function recoverStaleProcessing(dir) {
* @param {object} payload - the data that failed to send
* @param {object} options
* @param {number} options.createdAt - optional queue timestamp override
- * @param {string} [options.redactTier] - the captureRedact tier an addMessage
- * payload is redacted under before it is written (default "standard")
- * @param {boolean} [options.redacted] - the caller already redacted `payload`
- * under its configured tier, so it is written as it is
*/
export async function enqueue(type, sessionId, payload, options = {}) {
- if (type === "addMessage" && options.redacted !== true) {
- try {
- payload = redactPayload(payload, { tier: options.redactTier });
- } catch (err) {
- // redactPayload fails closed on its own; this is the last line before
- // plaintext would be written to disk, so refuse rather than write it.
- return { ok: false, error: `redaction failed: ${err?.message || String(err)}` };
- }
- }
const dir = getPendingDir();
const now = Number.isFinite(options.createdAt) ? options.createdAt : Date.now();
const dedupKey = makeDedupKey(type, sessionId, payload);
@@ -398,8 +378,6 @@ export async function cleanStale() {
* a background drainer can keep retrying a transient failure without
* burning the session-start retry budget. Exhausted and non-retryable
* entries are deleted exactly as in the default mode.
- * @param {string} [options.redactTier="standard"] - the captureRedact tier
- * every replayed addMessage payload is redacted under before it is sent
* @returns {{ replayed: number, failed: number, skipped: number, deferred: number }}
*/
export async function replayPending(fetchJSON, log, options = {}) {
@@ -444,7 +422,7 @@ export async function replayPending(fetchJSON, log, options = {}) {
if (entry.type === "addMessage") {
res = await fetchJSON(`/api/v1/sessions/${encodedSid}/messages`, {
method: "POST",
- body: JSON.stringify(redactPayload(entry.payload, { tier: options.redactTier })),
+ body: JSON.stringify(entry.payload),
});
} else if (entry.type === "commitSession") {
res = await fetchJSON(`/api/v1/sessions/${encodedSid}/commit`, {
diff --git a/examples/codex-memory-plugin/scripts/shared/redact.mjs b/examples/codex-memory-plugin/scripts/shared/redact.mjs
deleted file mode 100644
index 727178ee7..000000000
--- a/examples/codex-memory-plugin/scripts/shared/redact.mjs
+++ /dev/null
@@ -1,522 +0,0 @@
-// GENERATED FROM examples/memory-plugin-shared/lib. DO NOT EDIT.
-/**
- * Client-side secret redaction for captured transcripts.
- *
- * An agent that runs `cat .env` or prints a token puts that credential in the
- * transcript the memory plugins capture. This module replaces such secrets
- * before a payload leaves the machine — before the POST to OpenViking and
- * before the local pending queue writes it to disk — so the server, its
- * extractor and the memories it writes never see the plaintext.
- *
- * The rules are gitleaks' default rule set plus OpenViking's own key formats
- * (lib/secret-rules.mjs, generated), and detection follows gitleaks: a
- * case-insensitive keyword prefilter, the rule regex, the secret taken from
- * the rule's `secretGroup` or else the first non-empty capture group, the
- * Shannon entropy threshold, then the global and the rule's allowlists and
- * stopwords. Only the secret span is replaced, so `API_KEY=sk-...` becomes
- * `API_KEY={{ov_redacted:<rule>:<tag>}}` and the turn still reads as what
- * happened.
- *
- * The tag is the first 8 hex characters of HMAC-SHA256(install key, secret):
- * the same secret gets the same tag across turns and sessions on one machine,
- * but the tag cannot be checked against a guessed secret without the key,
- * which never leaves the machine.
- *
- * Failure policy: redaction fails closed per string. A scan that throws
- * replaces the whole string with `{{ov_redacted:scan-failed:<tag>}}`; it never
- * throws to the hook and never lets the string through unscanned. Text past
- * `maxChars` (MAX_SCAN_CHARS by default) is not scanned either: it is cut at a
- * whitespace boundary (before an unterminated `-----BEGIN` line) and replaced
- * with `{{ov_redacted:scan-oversize:<tag>}}`. The same happens once one call
- * has scanned `maxTotalChars` (MAX_SCAN_TOTAL_CHARS) across all its strings,
- * which keeps a hook's redaction time bounded however large the batch.
- * A missing or unwritable key file only costs tag stability (an in-process
- * random key is used), never redaction itself.
- *
- * Redaction is idempotent: existing `{{ov_redacted:<rule>:<tag>}}`
- * placeholders and well-formed `{{ov_privacy:...}}` references are never
- * scanned or touched, so replaying a pending entry or redacting twice changes
- * nothing.
- */
-
-import { createHmac, randomBytes } from "node:crypto";
-import { linkSync, mkdirSync, readFileSync, renameSync, unlinkSync, writeFileSync } from "node:fs";
-import { dirname, join } from "node:path";
-
-import SECRET_RULES, { GLOBAL_ALLOWLISTS, TIERS } from "./secret-rules.mjs";
-import { stateDir } from "./workspace-identity.mjs";
-
-/** Ordered, cumulative: each tier runs its own rules and every earlier tier's. */
-export const REDACT_TIERS = Object.freeze([...TIERS]);
-export const DEFAULT_REDACT_TIER = "standard";
-
-/**
- * The most characters of one string that are scanned. It matches the
- * largest tool output a plugin captures (`captureToolMaxChars`, at most
- * 1,000,000), so nothing a plugin builds by default is cut.
- */
-export const MAX_SCAN_CHARS = 1_000_000;
-
-/**
- * The most characters scanned in one redactText / redactPayload /
- * redactPayloads call, summed over every string in it. Ordinary text scans at
- * well under 1 s per MB, but keyword-dense data (hashes, base64) can take
- * 10-20 s per MB, and a hook that times out re-sends the same turns next time.
- */
-export const MAX_SCAN_TOTAL_CHARS = 2_000_000;
-
-const OFF_WORDS = new Set(["off", "false", "0", "no"]);
-const ON_WORDS = new Set(["on", "true", "1", "yes"]);
-
-/**
- * Map a configured value onto a tier name. Anything that says "no" (`false`,
- * `0`, `"off"`, any case) is `off`; a value naming no tier this build knows (a
- * newer config, a typo) falls back to the default, so it can only redact more.
- */
-export function normalizeRedactTier(value, fallback = DEFAULT_REDACT_TIER) {
- const safeFallback = REDACT_TIERS.includes(fallback) ? fallback : DEFAULT_REDACT_TIER;
- if (value === false || value === 0) return "off";
- if (value === true || value === 1) return DEFAULT_REDACT_TIER;
- if (typeof value !== "string") return safeFallback;
- const word = value.trim().toLowerCase();
- if (!word) return safeFallback;
- if (OFF_WORDS.has(word)) return "off";
- if (REDACT_TIERS.includes(word)) return word;
- if (ON_WORDS.has(word)) return DEFAULT_REDACT_TIER;
- return safeFallback;
-}
-
-// ---------------------------------------------------------------------------
-// Install key
-// ---------------------------------------------------------------------------
-
-const KEY_HEX_RE = /^[0-9a-f]{64}$/;
-let cachedKey = null;
-let processKey = null;
-
-function readKeyFile(file) {
- try {
- const text = readFileSync(file, "utf8").trim();
- return KEY_HEX_RE.test(text) ? Buffer.from(text, "hex") : null;
- } catch {
- return null;
- }
-}
-
-/**
- * Create the key file without exposing a half-written one: a private temp
- * file is hard-linked into place, which fails if a concurrent hook got there
- * first (its key is then the one read back). A garbage key file, or a
- * filesystem without hard links, gets the temp file renamed over it.
- */
-function createKeyFile(file) {
- mkdirSync(dirname(file), { recursive: true, mode: 0o700 });
- const tmp = `${file}.${process.pid}.${randomBytes(6).toString("hex")}`;
- writeFileSync(tmp, `${randomBytes(32).toString("hex")}\n`, { mode: 0o600, flag: "wx" });
- try {
- linkSync(tmp, file);
- } catch (error) {
- if (error?.code !== "EEXIST" || !readKeyFile(file)) renameSync(tmp, file);
- } finally {
- try { unlinkSync(tmp); } catch { /* renamed into place */ }
- }
- return readKeyFile(file);
-}
-
-/**
- * The per-install HMAC key: 32 random bytes in `<state dir>/redact/install-key`
- * (dir 0700, file 0600). When it cannot be read or created, a random key for
- * this process is used: tags then differ between processes, nothing else.
- */
-export function loadInstallKey({ env = process.env } = {}) {
- let file = "";
- try {
- file = join(stateDir(env), "redact", "install-key");
- } catch {
- // No state dir: process key.
- }
- if (cachedKey && cachedKey.file === file) return cachedKey.key;
- let key = file ? readKeyFile(file) : null;
- if (!key && file) {
- try {
- key = createKeyFile(file);
- } catch {
- key = null;
- }
- }
- key ||= processKey ||= randomBytes(32);
- cachedKey = { file, key };
- return key;
-}
-
-function placeholder(ruleId, key, secret) {
- const tag = createHmac("sha256", key).update(String(secret), "utf8").digest("hex").slice(0, 8);
- return `{{ov_redacted:${ruleId}:${tag}}}`;
-}
-
-// ---------------------------------------------------------------------------
-// Detection (gitleaks semantics)
-// ---------------------------------------------------------------------------
-
-function compileAllowlists(list) {
- return (list || []).map((al) => ({
- and: al.condition === "AND",
- target: al.regexTarget || "secret",
- regexes: (al.regexes || []).map((r) => new RegExp(r.regex, r.flags)),
- stopwords: (al.stopwords || []).map((w) => String(w).toLowerCase()),
- }));
-}
-
-const compiledCache = new Map();
-
-/** Compile the rules once per process; throws if a rule does not compile. */
-export function compileRuleSet(rules = SECRET_RULES, globalAllowlists = GLOBAL_ALLOWLISTS) {
- const hit = compiledCache.get(rules);
- if (hit && hit.globalsSource === globalAllowlists) return hit;
- const set = {
- globalsSource: globalAllowlists,
- globals: compileAllowlists(globalAllowlists),
- rules: rules.map((rule) => ({
- id: rule.id,
- tierIndex: REDACT_TIERS.indexOf(rule.tier || DEFAULT_REDACT_TIER),
- keywords: (rule.keywords || []).map((k) => String(k).toLowerCase()),
- entropy: Number(rule.entropy) || 0,
- secretGroup: Number(rule.secretGroup) || 0,
- scan: new RegExp(rule.regex, `${rule.flags || ""}g`),
- groups: new RegExp(rule.regex, `${rule.flags || ""}d`),
- allowlists: compileAllowlists(rule.allowlists),
- generic: rule.id.includes("generic"),
- })),
- };
- compiledCache.set(rules, set);
- return set;
-}
-
-/**
- * Shannon entropy as gitleaks computes it: symbol frequencies over code
- * points, divided by the UTF-8 byte length (Go's `len(string)`).
- */
-export function shannonEntropy(data) {
- if (!data) return 0;
- const counts = new Map();
- let bytes = 0;
- for (const ch of data) {
- counts.set(ch, (counts.get(ch) || 0) + 1);
- const cp = ch.codePointAt(0);
- bytes += cp < 0x80 ? 1 : cp < 0x800 ? 2 : cp < 0x10000 ? 3 : 4;
- }
- let entropy = 0;
- for (const count of counts.values()) entropy -= (count / bytes) * Math.log2(count / bytes);
- return entropy;
-}
-
-function isAllowed(allowlists, secret, match, line) {
- const secretLower = secret.toLowerCase();
- for (const al of allowlists) {
- const target = al.target === "match" ? match : al.target === "line" ? line() : secret;
- const checks = [];
- if (al.regexes.length) checks.push(target !== "" && al.regexes.some((re) => re.test(target)));
- if (al.stopwords.length) checks.push(al.stopwords.some((word) => secretLower.includes(word)));
- if (al.and ? checks.every(Boolean) : checks.some(Boolean)) return true;
- }
- return false;
-}
-
-/**
- * The secret spans gitleaks would report in `text`. The `gitleaks:allow`
- * marker is deliberately not honoured: in a transcript it would be a way to
- * opt a line out of redaction.
- */
-function detect(text, rules, globals) {
- const findings = [];
- const lower = text.toLowerCase();
- for (const rule of rules) {
- if (rule.keywords.length && !rule.keywords.some((kw) => lower.includes(kw))) continue;
- const re = rule.scan;
- re.lastIndex = 0;
- for (let m; (m = re.exec(text)) !== null;) {
- if (m[0].length === 0) {
- re.lastIndex++;
- continue;
- }
- // gitleaks trims newlines off the match and re-runs the regex on it.
- let start = m.index;
- let end = m.index + m[0].length;
- while (start < end && text.charCodeAt(start) === 10) start++;
- while (end > start && text.charCodeAt(end - 1) === 10) end--;
- const match = text.slice(start, end);
- let span = [0, match.length];
- const sub = match ? rule.groups.exec(match) : null;
- if (sub && sub.length >= 2) {
- if (rule.secretGroup > 0) span = sub.indices[rule.secretGroup] || [0, 0];
- else span = sub.indices.slice(1).find((idx) => idx && idx[1] > idx[0]) || span;
- }
- const secret = match.slice(span[0], span[1]);
- if (!secret) continue;
- if (rule.entropy && shannonEntropy(secret) <= rule.entropy) continue;
- const line = () => {
- const from = text.lastIndexOf("\n", start - 1) + 1;
- const to = text.indexOf("\n", end);
- return text.slice(from, to < 0 ? text.length : to);
- };
- if (isAllowed(globals, secret, match, line) || isAllowed(rule.allowlists, secret, match, line)) continue;
- findings.push({ start: start + span[0], end: start + span[1], id: rule.id, secret, generic: rule.generic });
- }
- }
- return findings;
-}
-
-// ---------------------------------------------------------------------------
-// Redaction
-// ---------------------------------------------------------------------------
-
-/**
- * Spans that are already placeholders and are never scanned: exactly the
- * placeholders this module writes, and OpenViking privacy references in the
- * grammar the server parses (openviking/privacy/reference.py). Anything else
- * that merely starts with `{{ov_` is scanned like any other text.
- */
-const PROTECTED_RE = new RegExp(
- [
- "\\{\\{ov_redacted:[a-z0-9][a-z0-9-]{0,99}:[0-9a-f]{8}\\}\\}",
- "\\{\\{[ \\t]*ov_privacy:(?:" +
- "ambiguous" +
- "|skill:[A-Za-z0-9_.@-]{1,255}:[^\\s:{}]{1,255}" +
- "|[^\\s:{}]{1,255}:viking://~/privacy/[^/\\s{}]{1,255}/[^#\\s{}]{1,1024}#/values/[^\\s{}]{1,1024}" +
- ")[ \\t]*\\}\\}",
- ].join("|"),
- "g",
-);
-// One pass is not always a fixed point: a placeholder can give the text after
-// it a word boundary it lacked (`ghp_<36>AKIA<16>`: aws-access-token needs
-// `\bAKIA`, which only exists once the GitHub token is replaced). Passes repeat
-// until nothing changes, so a replayed entry is sent byte for byte; a string
-// with no finding costs one pass.
-const MAX_PASSES = 3;
-
-/** The [start, end) stretches of `text` outside existing placeholders. */
-function scannableSegments(text) {
- const segments = [];
- let last = 0;
- for (const m of text.matchAll(PROTECTED_RE)) {
- if (m.index > last) segments.push([last, m.index]);
- last = m.index + m[0].length;
- }
- if (last < text.length) segments.push([last, text.length]);
- return segments;
-}
-
-/**
- * Where scanning stops in a string with more than `max` scannable characters:
- * the `max`-th one, pulled back to whitespace within 4 KiB so a token is not
- * split with its head left in the scanned part. A `-----BEGIN` block whose
- * `-----END ...-----` line lies past the cut cannot match the private-key rule,
- * so the cut moves to the start of the BEGIN line instead.
- */
-function cutPoint(text, segments, max) {
- let budget = max;
- for (const [a, b] of segments) {
- if (b - a <= budget) {
- budget -= b - a;
- continue;
- }
- const hard = a + budget;
- const head = text.slice(a, hard).toLowerCase();
- const begin = head.lastIndexOf("-----begin");
- if (begin >= 0 && !/-----end[^\n]*-----/.test(head.slice(begin))) return a + head.lastIndexOf("\n", begin) + 1;
- for (let k = hard; k > Math.max(a, hard - 4096); k--) if (/\s/.test(text[k - 1])) return k;
- return hard;
- }
- return text.length;
-}
-
-/** Overlapping findings become one span, named by a provider rule over the generic one. */
-function mergeFindings(findings) {
- findings.sort((x, y) => x.start - y.start || y.end - x.end || Number(x.generic) - Number(y.generic));
- const merged = [];
- for (const f of findings) {
- const last = merged[merged.length - 1];
- if (last && f.start < last.end) {
- last.end = Math.max(last.end, f.end);
- if (last.rep.generic && !f.generic) last.rep = f;
- } else {
- merged.push({ start: f.start, end: f.end, rep: f });
- }
- }
- return merged;
-}
-
-/**
- * One scan-and-replace pass over `full`; `base` is where the value starts
- * after a key prefix, and `max` how many characters of the value to scan.
- * Returns the redacted value and how many of its characters were scanned.
- */
-function redactOnce(full, base, ctx, max) {
- const segments = scannableSegments(full);
- const scannable = segments.reduce((n, [a, b]) => n + (b - a), 0);
- const limit = scannable > base + max ? Math.max(base, cutPoint(full, segments, base + max)) : full.length;
- const findings = [];
- for (const [a, b] of segments) {
- if (Math.min(b, limit) <= a) continue;
- for (const f of detect(full.slice(a, Math.min(b, limit)), ctx.rules, ctx.globals)) {
- const start = Math.max(a + f.start, base);
- if (a + f.end > start) findings.push({ ...f, start, end: a + f.end });
- }
- }
- let out = "";
- let pos = base;
- for (const span of mergeFindings(findings)) {
- out += full.slice(pos, span.start) + placeholder(span.rep.id, ctx.key(), span.rep.secret);
- pos = span.end;
- }
- out += full.slice(pos, limit);
- if (limit < full.length) out += placeholder("scan-oversize", ctx.key(), full.slice(limit));
- return { text: out, scanned: Math.max(0, Math.min(scannable, base + max) - base) };
-}
-
-function makeContext(opts = {}) {
- const tier = normalizeRedactTier(opts.tier ?? DEFAULT_REDACT_TIER);
- let key = opts.key ? Buffer.from(opts.key) : null;
- const ctx = {
- tier,
- rules: [],
- globals: [],
- maxChars: Number.isFinite(opts.maxChars) && opts.maxChars > 0 ? opts.maxChars : MAX_SCAN_CHARS,
- // What is left of the call's scan budget; every string's first pass draws on it.
- budget: Number.isFinite(opts.maxTotalChars) && opts.maxTotalChars > 0 ? opts.maxTotalChars : MAX_SCAN_TOTAL_CHARS,
- key: () => (key ||= loadInstallKey(opts.env ? { env: opts.env } : undefined)),
- };
- if (tier === "off") return ctx;
- try {
- const set = compileRuleSet(opts.rules || SECRET_RULES, opts.globalAllowlists || GLOBAL_ALLOWLISTS);
- const index = REDACT_TIERS.indexOf(tier);
- ctx.rules = set.rules.filter((rule) => rule.tierIndex > 0 && rule.tierIndex <= index);
- ctx.globals = set.globals;
- } catch (error) {
- ctx.broken = error;
- }
- return ctx;
-}
-
-function failClosed(text, ctx) {
- try {
- return placeholder("scan-failed", ctx.key(), text);
- } catch {
- return "{{ov_redacted:scan-failed:00000000}}";
- }
-}
-
-function redactStringIn(text, ctx, keyName = null) {
- if (typeof text !== "string" || text === "") return text;
- if (ctx.broken) return failClosed(text, ctx);
- const prefix = keyName ? `${keyName}=` : "";
- // Fixed for every pass, so a later pass never cuts what the first one scanned.
- const max = Math.min(ctx.maxChars, ctx.budget);
- try {
- let current = text;
- for (let pass = 0; pass < MAX_PASSES; pass++) {
- const { text: next, scanned } = redactOnce(prefix + current, prefix.length, ctx, max);
- if (pass === 0) ctx.budget -= scanned;
- if (next === current) return current;
- current = next;
- }
- // Still changing after several passes: not a state to send.
- return failClosed(text, ctx);
- } catch {
- return failClosed(text, ctx);
- }
-}
-
-/**
- * Redact the secrets in one string.
- *
- * @param {string} text
- * @param {object} [opts]
- * @param {string} [opts.tier="standard"] - one of REDACT_TIERS; "off" returns the input
- * @param {string} [opts.keyName] - a field name to scan the value under, as `keyName=value`
- * @param {number} [opts.maxChars] - scannable characters of one string before the rest is cut
- * @param {number} [opts.maxTotalChars] - the same, summed over every string in the call
- * @returns {string}
- */
-export function redactText(text, opts = {}) {
- const ctx = makeContext(opts);
- if (ctx.tier === "off") return text;
- return redactStringIn(text, ctx, opts.keyName || null);
-}
-
-// Message and part fields that identify or describe rather than carry text.
-const META_KEYS = new Set([
- "role", "type", "id", "uri", "peer_id", "session_id", "created_at", "tool_id", "tool_name", "tool_status",
- "context_type", "tool_output_mime_type", "tool_output_externalized_reason",
-]);
-const META_SUFFIX_RE = /_(?:id|uri|ref|sha256|at)$/;
-const KEY_CONTEXT_RE = /^[A-Za-z_][\w.-]{0,63}$/;
-
-const isObject = (value) => value !== null && typeof value === "object" && !Array.isArray(value);
-
-/**
- * Redact every string under `value`. Inside an object each value is scanned
- * as `<key>=<value>`, so a rule that needs a key-ish word (generic-api-key)
- * sees `{ "API_TOKEN": "..." }` as it would see `API_TOKEN=...` in a file;
- * only the value is replaced. Keys are scanned as text of their own.
- */
-function redactDeep(value, ctx, keyName) {
- if (typeof value === "string") return redactStringIn(value, ctx, keyName);
- if (Array.isArray(value)) return value.map((item) => redactDeep(item, ctx, keyName));
- if (!isObject(value)) return value;
- const out = {};
- for (const [k, v] of Object.entries(value)) {
- const key = redactStringIn(k, ctx, null);
- out[key] = redactDeep(v, ctx, key === k && KEY_CONTEXT_RE.test(k) ? k : null);
- }
- return out;
-}
-
-/** A message or part: its fields, metadata copied and the rest redacted. */
-function redactFields(value, ctx) {
- if (!isObject(value)) return redactDeep(value, ctx, null);
- const out = {};
- for (const [k, v] of Object.entries(value)) {
- if (k === "parts" && Array.isArray(v)) out[k] = v.map((part) => redactFields(part, ctx));
- else if (META_KEYS.has(k) || META_SUFFIX_RE.test(k)) out[k] = v;
- else out[k] = redactDeep(v, ctx, null);
- }
- return out;
-}
-
-/**
- * Redact one session add-message payload — `{ role, content }` or
- * `{ role, parts: [...] }` — and return a redacted copy. Text-bearing fields
- * are scanned (`content`, `parts[].text`, `parts[].tool_output`, every leaf of
- * `parts[].tool_input`, `abstract`, any other non-metadata field); ids, URIs,
- * roles, statuses and timestamps are copied. The caller's object is never
- * mutated.
- */
-export function redactPayload(payload, opts = {}) {
- const ctx = makeContext(opts);
- if (ctx.tier === "off") return payload;
- return redactPayloadIn(payload, ctx);
-}
-
-function redactPayloadIn(payload, ctx) {
- if (payload == null) return payload;
- if (typeof payload === "string") return redactStringIn(payload, ctx, null);
- if (typeof payload !== "object") return payload;
- // Walk the data the payload is on the wire (class instances, `toJSON`), as a
- // copy; a payload that cannot be serialised could not be sent either.
- let data;
- try {
- data = JSON.parse(JSON.stringify(payload));
- } catch {
- return failClosed("", ctx);
- }
- return redactFields(data, ctx);
-}
-
-/** redactPayload over a list, with one scan budget (maxTotalChars) for the whole list. */
-export function redactPayloads(payloads, opts = {}) {
- if (!Array.isArray(payloads)) return payloads;
- const ctx = makeContext(opts);
- if (ctx.tier === "off") return payloads;
- return payloads.map((payload) => redactPayloadIn(payload, ctx));
-}
diff --git a/examples/codex-memory-plugin/scripts/shared/secret-rules.mjs b/examples/codex-memory-plugin/scripts/shared/secret-rules.mjs
deleted file mode 100644
index 1348a0c71..000000000
--- a/examples/codex-memory-plugin/scripts/shared/secret-rules.mjs
+++ /dev/null
@@ -1,294 +0,0 @@
-// GENERATED FROM examples/memory-plugin-shared/lib. DO NOT EDIT.
-// GENERATED by examples/memory-plugin-shared/scripts/update-secret-rules.mjs. DO NOT EDIT.
-//
-// Secret detection rules for lib/redact.mjs: the gitleaks v8.30.1 default
-// configuration (config/gitleaks.toml, https://github.com/gitleaks/gitleaks),
-// converted from Go to JavaScript regex syntax and otherwise unchanged, plus
-// the rules for OpenViking's own key formats.
-// Source file sha256: e163e53b9e7e8a8511e77271e2b323ed057759542a6d988258afe3a1fa329caf
-//
-// Tier `strict`: generic-api-key. Every other rule is tier `standard`.
-// Skipped gitleaks rules:
-// cisco-meraki-api-key: nested [\w.-]{0,50}? prefixes: ~3-11 s per MB of hashes or base64url
-// cohere-api-token: nested [\w.-]{0,50}? prefixes: ~3-11 s per MB of hashes or base64url
-// curl-auth-header: time quadratic in line length: minutes for a 1 MB line of `curl ...;` commands
-// curl-auth-user: time quadratic in line length: minutes for a 1 MB line of `curl ...;` commands
-// freemius-secret-key: path-scoped rule; captured text has no file path
-// hashicorp-tf-password: path-scoped rule; captured text has no file path
-// kubernetes-secret-yaml: path-scoped rule; captured text has no file path
-// nuget-config-password: path-scoped rule; captured text has no file path
-// okta-access-token: nested [\w.-]{0,50}? prefixes: ~3-11 s per MB of hashes or base64url
-// pkcs12-file: path-scoped rule; captured text has no file path
-// privateai-api-token: nested [\w.-]{0,50}? prefixes: ~3-11 s per MB of hashes or base64url
-// sumologic-access-id: nested [\w.-]{0,50}? prefixes: ~3-11 s per MB of hashes or base64url
-// OpenViking rules (not from gitleaks):
-// openviking-gateway-key: ovgw_... issued by openviking_gateway/management.py
-// openviking-gateway-management-key: ovgm_... issued by openviking_gateway/cli.py
-// openviking-oauth-access-token: ovat_... issued by openviking/server/oauth/provider.py
-// openviking-oauth-refresh-token: ovrt_... issued by openviking/server/oauth/provider.py
-// openviking-oauth-auth-code: ovac_... issued by openviking/server/oauth/provider.py
-//
-// The gitleaks rule data is used under its license:
-//
-// MIT License
-//
-// Copyright (c) 2019 Zachary Rice
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in all
-// copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-// SOFTWARE.
-
-export const GITLEAKS_VERSION = "v8.30.1";
-
-export const TIERS = ["off","standard","strict"];
-
-export const SKIPPED_RULES = [
- {"id":"cisco-meraki-api-key","reason":"nested [\\w.-]{0,50}? prefixes: ~3-11 s per MB of hashes or base64url"},
- {"id":"cohere-api-token","reason":"nested [\\w.-]{0,50}? prefixes: ~3-11 s per MB of hashes or base64url"},
- {"id":"curl-auth-header","reason":"time quadratic in line length: minutes for a 1 MB line of `curl ...;` commands"},
- {"id":"curl-auth-user","reason":"time quadratic in line length: minutes for a 1 MB line of `curl ...;` commands"},
- {"id":"freemius-secret-key","reason":"path-scoped rule; captured text has no file path"},
- {"id":"hashicorp-tf-password","reason":"path-scoped rule; captured text has no file path"},
- {"id":"kubernetes-secret-yaml","reason":"path-scoped rule; captured text has no file path"},
- {"id":"nuget-config-password","reason":"path-scoped rule; captured text has no file path"},
- {"id":"okta-access-token","reason":"nested [\\w.-]{0,50}? prefixes: ~3-11 s per MB of hashes or base64url"},
- {"id":"pkcs12-file","reason":"path-scoped rule; captured text has no file path"},
- {"id":"privateai-api-token","reason":"nested [\\w.-]{0,50}? prefixes: ~3-11 s per MB of hashes or base64url"},
- {"id":"sumologic-access-id","reason":"nested [\\w.-]{0,50}? prefixes: ~3-11 s per MB of hashes or base64url"},
-];
-
-export const GLOBAL_ALLOWLISTS = [
- {"condition":"OR","regexTarget":"secret","regexes":[{"regex":"^true|false|null$","flags":"i"},{"regex":"^(?:[aA]+|[bB]+|[cC]+|[dD]+|[eE]+|[fF]+|[gG]+|[hH]+|[iI]+|[jJ]+|[kK]+|[lL]+|[mM]+|[nN]+|[oO]+|[pP]+|[qQ]+|[rR]+|[sS]+|[tT]+|[uU]+|[vV]+|[wW]+|[xX]+|[yY]+|[zZ]+|\\*+|\\.+)$","flags":""},{"regex":"^\\$(?:\\d+|{\\d+})$","flags":""},{"regex":"^\\$(?:[A-Z_]+|[a-z_]+)$","flags":""},{"regex":"^\\${(?:[A-Z_]+|[a-z_]+)}$","flags":""},{"regex":"^\\{\\{[ \\t]*[\\w ().|]+[ \\t]*}}$","flags":""},{"regex":"^\\$\\{\\{[ \\t]*(?:(?:env|github|secrets|vars)(?:\\.[A-Za-z]\\w+)+[\\w \"'&./=|]*)[ \\t]*}}$","flags":""},{"regex":"^%(?:[A-Z_]+|[a-z_]+)%$","flags":""},{"regex":"^%[+\\-# 0]?[bcdeEfFgGoOpqstTUvxX]$","flags":""},{"regex":"^\\{\\d{0,2}}$","flags":""},{"regex":"^@(?:[A-Z_]+|[a-z_]+)@$","flags":""},{"regex":"^/Users/[a-z0-9A-Z]+/[\\w .-/]+$","flags":""},{"regex":"^/(?:bin|etc|home|opt|tmp|usr|var)/[\\w ./\\-]+$","flags":""}],"stopwords":["014df517-39d1-4453-b7b3-9930c563627c","abcdefghijklmnopqrstuvwxyz"]},
-];
-
-export default [
- {"id":"1password-secret-key","regex":"\\bA3-[A-Z0-9]{6}-(?:(?:[A-Z0-9]{11})|(?:[A-Z0-9]{6}-[A-Z0-9]{5}))-[A-Z0-9]{5}-[A-Z0-9]{5}-[A-Z0-9]{5}\\b","flags":"","keywords":["a3-"],"entropy":3.8,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"1password-service-account-token","regex":"ops_eyJ[a-zA-Z0-9+/]{250,}={0,3}","flags":"","keywords":["ops_"],"entropy":4,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"adafruit-api-key","regex":"[\\w.\\-]{0,50}?(?:adafruit)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9_\\-]{32})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["adafruit"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"adobe-client-id","regex":"[\\w.\\-]{0,50}?(?:adobe)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-f0-9]{32})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["adobe"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"adobe-client-secret","regex":"\\b(p8e-[a-z0-9A-Z]{32})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["p8e-"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"age-secret-key","regex":"AGE-SECRET-KEY-1[QPZRY9X8GF2TVDW0S3JN54KHCE6MUA7L]{58}","flags":"","keywords":["age-secret-key-1"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"airtable-api-key","regex":"[\\w.\\-]{0,50}?(?:airtable)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{17})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["airtable"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"airtable-personnal-access-token","regex":"\\b(pat[0-9A-Za-z]{14}\\.[a-f0-9]{64})\\b","flags":"","keywords":["airtable"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"algolia-api-key","regex":"[\\w.\\-]{0,50}?(?:algolia)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{32})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["algolia"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"alibaba-access-key-id","regex":"\\b(LTAI[a-z0-9A-Z]{20})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["ltai"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"alibaba-secret-key","regex":"[\\w.\\-]{0,50}?(?:alibaba)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{30})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["alibaba"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"anthropic-admin-api-key","regex":"\\b(sk-ant-admin01-[a-zA-Z0-9_\\-]{93}AA)(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["sk-ant-admin01"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"anthropic-api-key","regex":"\\b(sk-ant-api03-[a-zA-Z0-9_\\-]{93}AA)(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["sk-ant-api03"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"artifactory-api-key","regex":"\\bAKCp[A-Za-z0-9]{69}\\b","flags":"","keywords":["akcp"],"entropy":4.5,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"artifactory-reference-token","regex":"\\bcmVmd[A-Za-z0-9]{59}\\b","flags":"","keywords":["cmvmd"],"entropy":4.5,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"asana-client-id","regex":"[\\w.\\-]{0,50}?(?:asana)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([0-9]{16})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["asana"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"asana-client-secret","regex":"[\\w.\\-]{0,50}?(?:asana)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{32})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["asana"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"atlassian-api-token","regex":"[\\w.\\-]{0,50}?(?:(?:ATLASSIAN|[Aa]tlassian)|(?:CONFLUENCE|[Cc]onfluence)|(?:JIRA|[Jj]ira))(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9A-Z]{20}[a-f0-9A-F]{4})(?:[\\x60'\"\\s;]|\\\\[nrNR]|$)|\\b([Aa][Tt][Aa][Tt][Tt]3[A-Za-z0-9_\\-=a-zA-Z]{186})(?:[\\x60'\"\\s;]|\\\\[nrNR]|$)","flags":"","keywords":["atlassian","confluence","jira","atatt3"],"entropy":3.5,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"authress-service-client-access-key","regex":"\\b((?:sc|ext|scauth|authress)_[a-z0-9A-Z]{5,30}\\.[a-z0-9A-Z]{4,6}\\.(?:acc)[_\\-][a-z0-9\\-A-Z]{10,32}\\.[a-z0-9+/_=\\-A-Z]{30,120})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["sc_","ext_","scauth_","authress_"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"aws-access-token","regex":"\\b((?:A3T[A-Z0-9]|AKIA|ASIA|ABIA|ACCA)[A-Z2-7]{16})\\b","flags":"","keywords":["a3t","akia","asia","abia","acca"],"entropy":3,"secretGroup":0,"allowlists":[{"condition":"OR","regexTarget":"secret","regexes":[{"regex":"[^\\n]+EXAMPLE$","flags":""}],"stopwords":[]}],"tier":"standard"},
- {"id":"aws-amazon-bedrock-api-key-long-lived","regex":"\\b(ABSK[A-Za-z0-9+/]{109,269}={0,2})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["absk"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"aws-amazon-bedrock-api-key-short-lived","regex":"bedrock-api-key-YmVkcm9jay5hbWF6b25hd3MuY29t","flags":"","keywords":["bedrock-api-key-"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"azure-ad-client-secret","regex":"(?:^|[\\\\'\"\\x60\\s>=:(,)])([a-zA-Z0-9_~.]{3}\\dQ~[a-zA-Z0-9_~.\\-]{31,34})(?:$|[\\\\'\"\\x60\\s<),])","flags":"","keywords":["q~"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"beamer-api-token","regex":"[\\w.\\-]{0,50}?(?:beamer)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}(b_[a-z0-9=_\\-]{44})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["beamer"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"bitbucket-client-id","regex":"[\\w.\\-]{0,50}?(?:bitbucket)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{32})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["bitbucket"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"bitbucket-client-secret","regex":"[\\w.\\-]{0,50}?(?:bitbucket)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9=_\\-]{64})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["bitbucket"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"bittrex-access-key","regex":"[\\w.\\-]{0,50}?(?:bittrex)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{32})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["bittrex"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"bittrex-secret-key","regex":"[\\w.\\-]{0,50}?(?:bittrex)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{32})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["bittrex"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"clickhouse-cloud-api-secret-key","regex":"\\b(4b1d[A-Za-z0-9]{38})\\b","flags":"","keywords":["4b1d"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"clojars-api-token","regex":"CLOJARS_[a-z0-9]{60}","flags":"i","keywords":["clojars_"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"cloudflare-api-key","regex":"[\\w.\\-]{0,50}?(?:cloudflare)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9_\\-]{40})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["cloudflare"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"cloudflare-global-api-key","regex":"[\\w.\\-]{0,50}?(?:cloudflare)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-f0-9]{37})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["cloudflare"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"cloudflare-origin-ca-key","regex":"\\b(v1\\.0-[a-f0-9]{24}-[a-f0-9]{146})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["cloudflare","v1.0-"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"codecov-access-token","regex":"[\\w.\\-]{0,50}?(?:codecov)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{32})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["codecov"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"coinbase-access-token","regex":"[\\w.\\-]{0,50}?(?:coinbase)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9_\\-]{64})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["coinbase"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"confluent-access-token","regex":"[\\w.\\-]{0,50}?(?:confluent)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{16})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["confluent"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"confluent-secret-key","regex":"[\\w.\\-]{0,50}?(?:confluent)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{64})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["confluent"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"contentful-delivery-api-token","regex":"[\\w.\\-]{0,50}?(?:contentful)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9=_\\-]{43})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["contentful"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"databricks-api-token","regex":"\\b(dapi[a-f0-9]{32}(?:-\\d)?)(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["dapi"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"datadog-access-token","regex":"[\\w.\\-]{0,50}?(?:datadog)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{40})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["datadog"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"defined-networking-api-token","regex":"[\\w.\\-]{0,50}?(?:dnkey)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}(dnkey-[a-z0-9=_\\-]{26}-[a-z0-9=_\\-]{52})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["dnkey"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"digitalocean-access-token","regex":"\\b(doo_v1_[a-f0-9]{64})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["doo_v1_"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"digitalocean-pat","regex":"\\b(dop_v1_[a-f0-9]{64})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["dop_v1_"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"digitalocean-refresh-token","regex":"\\b(dor_v1_[a-f0-9]{64})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["dor_v1_"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"discord-api-token","regex":"[\\w.\\-]{0,50}?(?:discord)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-f0-9]{64})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["discord"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"discord-client-id","regex":"[\\w.\\-]{0,50}?(?:discord)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([0-9]{18})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["discord"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"discord-client-secret","regex":"[\\w.\\-]{0,50}?(?:discord)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9=_\\-]{32})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["discord"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"doppler-api-token","regex":"dp\\.pt\\.[a-z0-9A-Z]{43}","flags":"","keywords":["dp.pt."],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"droneci-access-token","regex":"[\\w.\\-]{0,50}?(?:droneci)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{32})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["droneci"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"dropbox-api-token","regex":"[\\w.\\-]{0,50}?(?:dropbox)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{15})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["dropbox"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"dropbox-long-lived-api-token","regex":"[\\w.\\-]{0,50}?(?:dropbox)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{11}(AAAAAAAAAA)[a-z0-9\\-_=]{43})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["dropbox"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"dropbox-short-lived-api-token","regex":"[\\w.\\-]{0,50}?(?:dropbox)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}(sl\\.[a-z0-9\\-=_]{135})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["dropbox"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"duffel-api-token","regex":"duffel_(?:test|live)_[a-z0-9_\\-=A-Z]{43}","flags":"","keywords":["duffel_"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"dynatrace-api-token","regex":"dt0c01\\.[a-z0-9A-Z]{24}\\.[a-z0-9A-Z]{64}","flags":"","keywords":["dt0c01."],"entropy":4,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"easypost-api-token","regex":"\\bEZAK[a-z0-9A-Z]{54}\\b","flags":"","keywords":["ezak"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"easypost-test-api-token","regex":"\\bEZTK[a-z0-9A-Z]{54}\\b","flags":"","keywords":["eztk"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"etsy-access-token","regex":"[\\w.\\-]{0,50}?(?:(?:ETSY|[Ee]tsy))(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9A-Z]{24})(?:[\\x60'\"\\s;]|\\\\[nrNR]|$)","flags":"","keywords":["etsy"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"facebook-access-token","regex":"\\b(\\d{15,16}(\\||%)[0-9a-z\\-_]{27,40})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["facebook"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"facebook-page-access-token","regex":"\\b(EAA[MC][a-z0-9A-Z]{100,})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["eaam","eaac"],"entropy":4,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"facebook-secret","regex":"[\\w.\\-]{0,50}?(?:facebook)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-f0-9]{32})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["facebook"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"fastly-api-token","regex":"[\\w.\\-]{0,50}?(?:fastly)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9=_\\-]{32})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["fastly"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"finicity-api-token","regex":"[\\w.\\-]{0,50}?(?:finicity)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-f0-9]{32})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["finicity"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"finicity-client-secret","regex":"[\\w.\\-]{0,50}?(?:finicity)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{20})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["finicity"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"finnhub-access-token","regex":"[\\w.\\-]{0,50}?(?:finnhub)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{20})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["finnhub"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"flickr-access-token","regex":"[\\w.\\-]{0,50}?(?:flickr)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{32})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["flickr"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"flutterwave-encryption-key","regex":"FLWSECK_TEST-[a-h0-9A-H]{12}","flags":"","keywords":["flwseck_test"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"flutterwave-public-key","regex":"FLWPUBK_TEST-[a-h0-9A-H]{32}-[Xx]","flags":"","keywords":["flwpubk_test"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"flutterwave-secret-key","regex":"FLWSECK_TEST-[a-h0-9A-H]{32}-[Xx]","flags":"","keywords":["flwseck_test"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"flyio-access-token","regex":"\\b((?:fo1_[\\w\\-]{43}|fm1[ar]_[a-zA-Z0-9+\\/]{100,}={0,3}|fm2_[a-zA-Z0-9+\\/]{100,}={0,3}))(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["fo1_","fm1","fm2_"],"entropy":4,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"frameio-api-token","regex":"fio-u-[a-z0-9\\-_=A-Z]{64}","flags":"","keywords":["fio-u-"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"freshbooks-access-token","regex":"[\\w.\\-]{0,50}?(?:freshbooks)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{64})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["freshbooks"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"gcp-api-key","regex":"\\b(AIza[\\w\\-]{35})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["aiza"],"entropy":4,"secretGroup":0,"allowlists":[{"condition":"OR","regexTarget":"secret","regexes":[{"regex":"AIzaSyabcdefghijklmnopqrstuvwxyz1234567","flags":""},{"regex":"AIzaSyAnLA7NfeLquW1tJFpx_eQCxoX-oo6YyIs","flags":""},{"regex":"AIzaSyCkEhVjf3pduRDt6d1yKOMitrUEke8agEM","flags":""},{"regex":"AIzaSyDMAScliyLx7F0NPDEJi1QmyCgHIAODrlU","flags":""},{"regex":"AIzaSyD3asb-2pEZVqMkmL6M9N6nHZRR_znhrh0","flags":""},{"regex":"AIzayDNSXIbFmlXbIE6mCzDLQAqITYefhixbX4A","flags":""},{"regex":"AIzaSyAdOS2zB6NCsk1pCdZ4-P6GBdi_UUPwX7c","flags":""},{"regex":"AIzaSyASWm6HmTMdYWpgMnjRBjxcQ9CKctWmLd4","flags":""},{"regex":"AIzaSyANUvH9H9BsUccjsu2pCmEkOPjjaXeDQgY","flags":""},{"regex":"AIzaSyA5_iVawFQ8ABuTZNUdcwERLJv_a_p4wtM","flags":""},{"regex":"AIzaSyA4UrcGxgwQFTfaI3no3t7Lt1sjmdnP5sQ","flags":""},{"regex":"AIzaSyDSb51JiIcB6OJpwwMicseKRhhrOq1cS7g","flags":""},{"regex":"AIzaSyBF2RrAIm4a0mO64EShQfqfd2AFnzAvvuU","flags":""},{"regex":"AIzaSyBcE-OOIbhjyR83gm4r2MFCu4MJmprNXsw","flags":""},{"regex":"AIzaSyB8qGxt4ec15vitgn44duC5ucxaOi4FmqE","flags":""},{"regex":"AIzaSyA8vmApnrHNFE0bApF4hoZ11srVL_n0nvY","flags":""}],"stopwords":[]}],"tier":"standard"},
- {"id":"generic-api-key","regex":"[\\w.\\-]{0,50}?(?:[aA][cC][cC][eE][sS][sS]|[aA][uU][tT][hH]|(?:[Aa]pi|API)|[cC][rR][eE][dD][eE][nN][tT][iI][aA][lL]|[cC][rR][eE][dD][sS]|[kK][eE][yY]|[pP][aA][sS][sS][wW](?:[oO][rR])?[dD]|[sS][eE][cC][rR][eE][tT]|[tT][oO][kK][eE][nN])(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([\\w.=\\-]{10,150}|[a-z0-9A-Z][a-z0-9+/A-Z]{11,}={0,3})(?:[\\x60'\"\\s;]|\\\\[nrNR]|$)","flags":"","keywords":["access","api","auth","key","credential","creds","passwd","password","secret","token"],"entropy":3.5,"secretGroup":0,"allowlists":[{"condition":"OR","regexTarget":"secret","regexes":[{"regex":"^[a-zA-Z_.\\-]+$","flags":""}],"stopwords":[]},{"condition":"OR","regexTarget":"match","regexes":[{"regex":"(?:[aA][cC][cC][eE][sS][sS](?:[iI][bB][iI][lL][iI][tT][yY]|[oO][rR])|[aA][cC][cC][eE][sS][sS][_.\\-]?[iI][dD]|[rR][aA][nN][dD][oO][mM][_.\\-]?[aA][cC][cC][eE][sS][sS]|[aA][pP][iI][_.\\-]?(?:[iI][dD]|[nN][aA][mM][eE]|[vV][eE][rR][sS][iI][oO][nN])|[rR][aA][pP][iI][dD]|[cC][aA][pP][iI][tT][aA][lL]|[a-z0-9\\-A-Z]*?[aA][pP][iI][a-z0-9\\-A-Z]*?:[jJ][aA][rR]:|[aA][uU][tT][hH][oO][rR]|[Xx]-[Mm][Ss]-[Ee][xX][cC][hH][aA][nN][gG][eE]-[Oo][rR][gG][aA][nN][iI][zZ][aA][tT][iI][oO][nN]-[Aa][uU][tT][hH]|[Aa][uU][tT][hH][eE][nN][tT][iI][cC][aA][tT][iI][oO][nN]-[Rr][eE][sS][uU][lL][tT][sS]|(?:[cC][rR][eE][dD][eE][nN][tT][iI][aA][lL][sS]?[_.\\-]?[iI][dD]|[wW][iI][tT][hH][Cc][rR][eE][dD][eE][nN][tT][iI][aA][lL][sS])|(?:[bB][uU][cC][kK][eE][tT]|[fF][oO][rR][eE][iI][gG][nN]|[hH][oO][tT]|[iI][dD][xX]|[nN][aA][tT][uU][rR][aA][lL]|[pP][rR][iI][mM][aA][rR][yY]|[pP][uU][bB](?:[lL][iI][cC])?|[sS][cC][hH][eE][mM][aA]|[sS][eE][qQ][uU][eE][nN][cC][eE])[_.\\-]?[kK][eE][yY]|(?:[tT][uU][rR][kK][eE][yY])|[kK][eE][yY][_.\\-]?(?:[aA][lL][iI][aA][sS]|[bB][oO][aA][rR][dD]|[cC][oO][dD][eE]|[fF][rR][aA][mM][eE]|[iI][dD]|[lL][eE][nN][gG][tT][hH]|[mM][eE][sS][hH]|[nN][aA][mM][eE]|[pP][aA][iI][rR]|[pP][rR][eE][sS][sS](?:[eE][dD])?|[rR][iI][nN][gG]|[sS][eE][lL][eE][cC][tT][oO][rR]|[sS][iI][gG][nN][aA][tT][uU][rR][eE]|[sS][iI][zZ][eE]|[sS][tT][oO][nN][eE]|[sS][tT][oO][rR][eE][tT][yY][pP][eE]|[wW][oO][rR][dD]|[uU][pP]|[dD][oO][wW][nN]|[lL][eE][fF][tT]|[rR][iI][gG][hH][tT])|[kK][eE][yY][_.\\-]?[vV][aA][uU][lL][tT][_.\\-]?(?:[iI][dD]|[nN][aA][mM][eE])|[kK][eE][yY][Vv][aA][uU][lL][tT][Tt][oO][Ss][tT][oO][rR][eE][Ss][eE][cC][rR][eE][tT][sS]|[kK][eE][yY](?:[sS][tT][oO][rR][eE]|[tT][aA][bB])[_.\\-]?(?:[fF][iI][lL][eE]|[pP][aA][tT][hH])|[iI][sS][sS][uU][eE][rR][kK][eE][yY][hH][aA][sS][hH]|(?:[DdMm]onkey|[DM]ONKEY)|[kK][eE][yY][iI][nN][gG]|(?:[sS][eE][cC][rR][eE][tT])[_.\\-]?(?:[lL][eE][nN][gG][tT][hH]|[nN][aA][mM][eE]|[sS][iI][zZ][eE])|[Uu][sS][eE][rR][Ss][eE][cC][rR][eE][tT][sS][Ii][dD]|(?:[cC][sS][rR][fF])[_.\\-]?[tT][oO][kK][eE][nN]|(?:[iI][oO]\\.[jJ][sS][oO][nN][wW][eE][bB][tT][oO][kK][eE][nN][ \\t]?:[ \\t]?[\\w\\-]+)|(?:[aA][pP][iI]|[cC][rR][eE][dD][eE][nN][tT][iI][aA][lL][sS]|[tT][oO][kK][eE][nN])[_.\\-]?(?:[eE][nN][dD][pP][oO][iI][nN][tT]|[uU][rR][ilIL])|[pP][uU][bB][lL][iI][cC][_.\\-]?[tT][oO][kK][eE][nN]|(?:[kK][eE][yY]|[tT][oO][kK][eE][nN])[_.\\-]?[fF][iI][lL][eE]|(?:(?:[A-Z_]+=\\n[A-Z_]+=|[a-z_]+=\\n[a-z_]+=)(?:\\n|$))|(?:(?:[A-Z.]+=\\n[A-Z.]+=|[a-z.]+=\\n[a-z.]+=)(?:\\n|$)))","flags":""}],"stopwords":["000000","6fe4476ee5a1832882e326b506d14126","_ec2_","aaaaaa","about","abstract","academy","acces","account","act-","act.","act_","action","active","actively","activity","adapter","add-","add-on","add.","add_","addon","addres","admin","adobe","advanced","adventure","agent","agile","air-","air.","air_","ajax","akka","alert","alfred","algorithm","all-","all.","all_","alloy","alpha","amazon","amqp","analysi","analytic","analyzer","android","angular","angularj","animate","animation","another","ansible","answer","ant-","ant.","ant_","any-","any.","any_","apache","app-","app.","app_","apple","arch","archive","archived","arduino","array","art-","art.","art_","article","asp-","asp.","asp_","asset","async","atom","attention","audio","audit","aura","auth","author","authorize","auto","automated","automatic","awesome","aws_","azure","back","backbone","backend","backup","bar-","bar.","bar_","base","based","bash","basic","batch","been","beer","behavior","being","benchmark","best","beta","better","big-","big.","big_","binary","binding","bit-","bit.","bit_","bitcoin","block","blog","board","book","bookmark","boost","boot","bootstrap","bosh","bot-","bot.","bot_","bower","box-","box.","box_","boxen","bracket","branch","bridge","browser","brunch","buffer","bug-","bug.","bug_","build","builder","building","buildout","buildpack","built","bundle","busines","but-","but.","but_","button","cache","caching","cakephp","calendar","call","camera","campfire","can-","can.","can_","canva","captcha","capture","card","carousel","case","cassandra","cat-","cat.","cat_","category","center","cento","challenge","change","changelog","channel","chart","chat","cheat","check","checker","chef","ches","chinese","chosen","chrome","ckeditor","clas","classe","classic","clean","cli-","cli.","cli_","client","clojure","clone","closure","cloud","club","cluster","cms-","cms_","coco","code","coding","coffee","color","combination","combo","command","commander","comment","commit","common","community","compas","compiler","complete","component","composer","computer","computing","con-","con.","con_","concept","conf","config","connect","connector","console","contact","container","contao","content","contest","context","control","convert","converter","conway'","cookbook","cookie","cool","copy","cordova","core","couchbase","couchdb","countdown","counter","course","craft","crawler","create","creating","creator","credential","crm-","crm.","crm_","cros","crud","csv-","csv.","csv_","cube","cucumber","cuda","current","currently","custom","daemon","dark","dart","dash","dashboard","data","database","date","day-","day.","day_","dead","debian","debug","debugger","deck","define","del-","del.","del_","delete","demo","deploy","design","designer","desktop","detection","detector","dev-","dev.","dev_","develop","developer","device","devise","diff","digital","directive","directory","discovery","display","django","dns-","dns_","doc-","doc.","doc_","docker","docpad","doctrine","document","doe-","doe.","doe_","dojo","dom-","dom.","dom_","domain","don't","done","dot-","dot.","dot_","dotfile","download","draft","drag","drill","drive","driven","driver","drop","dropbox","drupal","dsl-","dsl.","dsl_","dynamic","easy","ecdsa","eclipse","edit","editing","edition","editor","element","emac","email","embed","embedded","ember","emitter","emulator","encoding","endpoint","engine","english","enhanced","entity","entry","env_","episode","erlang","error","espresso","event","evented","example","exchange","exercise","experiment","expire","exploit","explorer","export","exporter","expres","ext-","ext.","ext_","extended","extension","external","extra","extractor","fabric","facebook","factory","fake","fast","feature","feed","fewfwef","ffmpeg","field","file","filter","find","finder","firefox","firmware","first","fish","fix-","fix_","flash","flask","flat","flex","flexible","flickr","flow","fluent","fluentd","fluid","folder","font","force","foreman","fork","form","format","formatter","forum","foundry","framework","free","friend","friendly","front-end","frontend","ftp-","ftp.","ftp_","fuel","full","fun-","fun.","fun_","func","future","gaia","gallery","game","gateway","gem-","gem.","gem_","gen-","gen.","gen_","general","generator","generic","genetic","get-","get.","get_","getenv","getting","ghost","gist","git-","git.","git_","github","gitignore","gitlab","glas","gmail","gnome","gnu-","gnu.","gnu_","goal","golang","gollum","good","google","gpu-","gpu.","gpu_","gradle","grail","graph","graphic","great","grid","groovy","group","grunt","guard","gui-","gui.","gui_","guide","guideline","gulp","gwt-","gwt.","gwt_","hack","hackathon","hacker","hacking","hadoop","haml","handler","hardware","has-","has_","hash","haskell","have","haxe","hello","help","helper","here","hero","heroku","high","hipchat","history","home","homebrew","homepage","hook","host","hosting","hot-","hot.","hot_","house","how-","how.","how_","html","http","hub-","hub.","hub_","hubot","human","icon","ide-","ide.","ide_","idea","identity","idiomatic","image","impact","import","important","importer","impres","index","infinite","info","injection","inline","input","inside","inspector","instagram","install","installer","instant","intellij","interface","internet","interview","into","intro","ionic","iphone","ipython","irc-","irc_","iso-","iso.","iso_","issue","jade","jasmine","java","jbos","jekyll","jenkin","jetbrains","job-","job.","job_","joomla","jpa-","jpa.","jpa_","jquery","json","just","kafka","karma","kata","kernel","keyboard","kindle","kit-","kit.","kit_","kitchen","knife","koan","kohana","lab-","lab.","lab_","lambda","lamp","language","laravel","last","latest","latex","launcher","layer","layout","lazy","ldap","leaflet","league","learn","learning","led-","led.","led_","leetcode","les-","les.","les_","level","leveldb","lib-","lib.","lib_","librarie","library","license","life","liferay","light","lightbox","like","line","link","linked","linkedin","linux","lisp","list","lite","little","load","loader","local","location","lock","log-","log.","log_","logger","logging","logic","login","logstash","longer","look","love","lua-","lua.","lua_","mac-","mac.","mac_","machine","made","magento","magic","mail","make","maker","making","man-","man.","man_","manage","manager","manifest","manual","map-","map.","map_","mapper","mapping","markdown","markup","master","math","matrix","maven","md5","mean","media","mediawiki","meetup","memcached","memory","menu","merchant","message","messaging","meta","metadata","meteor","method","metric","micro","middleman","migration","minecraft","miner","mini","minimal","mirror","mit-","mit.","mit_","mobile","mocha","mock","mod-","mod.","mod_","mode","model","modern","modular","module","modx","money","mongo","mongodb","mongoid","mongoose","monitor","monkey","more","motion","moved","movie","mozilla","mqtt","mule","multi","multiple","music","mustache","mvc-","mvc.","mvc_","mysql","nagio","name","native","need","neo-","neo.","neo_","nest","nested","net-","net.","net_","nette","network","new-","new.","new_","next","nginx","ninja","nlp-","nlp.","nlp_","node","nodej","nosql","not-","not.","not_","note","notebook","notepad","notice","notifier","now-","now.","now_","number","oauth","object","objective","obsolete","ocaml","octopres","official","old-","old.","old_","onboard","online","only","open","opencv","opengl","openshift","openwrt","option","oracle","org-","org.","org_","origin","original","orm-","orm.","orm_","osx-","osx_","our-","our.","our_","out-","out.","out_","output","over","overview","own-","own.","own_","pack","package","packet","page","panel","paper","paperclip","para","parallax","parallel","parse","parser","parsing","particle","party","password","patch","path","pattern","payment","paypal","pdf-","pdf.","pdf_","pebble","people","perl","personal","phalcon","phoenix","phone","phonegap","photo","php-","php.","php_","physic","picker","pipeline","platform","play","player","please","plu-","plu.","plu_","plug-in","plugin","plupload","png-","png.","png_","poker","polyfill","polymer","pool","pop-","pop.","pop_","popcorn","popup","port","portable","portal","portfolio","post","power","powered","powerful","prelude","pretty","preview","principle","print","pro-","pro.","pro_","problem","proc","product","profile","profiler","program","progres","project","protocol","prototype","provider","proxy","public","pull","puppet","pure","purpose","push","pusher","pyramid","python","quality","query","queue","quick","rabbitmq","rack","radio","rail","railscast","random","range","raspberry","rdf-","rdf.","rdf_","react","reactive","read","reader","readme","ready","real","real-time","reality","realtime","recipe","recorder","red-","red.","red_","reddit","redi","redmine","reference","refinery","refresh","registry","related","release","remote","rendering","repo","report","request","require","required","requirej","research","resource","response","resque","rest","restful","resume","reveal","reverse","review","riak","rich","right","ring","robot","role","room","router","routing","rpc-","rpc.","rpc_","rpg-","rpg.","rpg_","rspec","ruby-","ruby.","ruby_","rule","run-","run.","run_","runner","running","runtime","rust","rvm-","rvm.","rvm_","salt","sample","sandbox","sas-","sas.","sas_","sbt-","sbt.","sbt_","scala","scalable","scanner","schema","scheme","school","science","scraper","scratch","screen","script","scroll","scs-","scs.","scs_","sdk-","sdk.","sdk_","sdl-","sdl.","sdl_","search","secure","security","see-","see.","see_","seed","select","selector","selenium","semantic","sencha","send","sentiment","serie","server","service","session","set-","set.","set_","setting","setup","sha1","sha2","sha256","share","shared","sharing","sheet","shell","shield","shipping","shop","shopify","shortener","should","show","showcase","side","silex","simple","simulator","single","site","skeleton","sketch","skin","slack","slide","slider","slim","small","smart","smtp","snake","snapshot","snippet","soap","social","socket","software","solarized","solr","solution","solver","some","soon","source","space","spark","spatial","spec","sphinx","spine","spotify","spree","spring","sprite","sql-","sql.","sql_","sqlite","ssh-","ssh.","ssh_","stack","staging","standard","stanford","start","started","starter","startup","stat","statamic","state","static","statistic","statsd","statu","steam","step","still","stm-","stm.","stm_","storage","store","storm","story","strategy","stream","streaming","string","stripe","structure","studio","study","stuff","style","sublime","sugar","suite","summary","super","support","supported","svg-","svg.","svg_","svn-","svn.","svn_","swagger","swift","switch","switcher","symfony","symphony","sync","synopsi","syntax","system","tab-","tab.","tab_","table","tag-","tag.","tag_","talk","target","task","tcp-","tcp.","tcp_","tdd-","tdd.","tdd_","team","tech","template","term","terminal","testing","tetri","text","textmate","theme","theory","three","thrift","time","timeline","timer","tiny","tinymce","tip-","tip.","tip_","title","todo","todomvc","token","tool","toolbox","toolkit","top-","top.","top_","tornado","touch","tower","tracker","tracking","traffic","training","transfer","translate","transport","tree","trello","try-","try.","try_","tumblr","tut-","tut.","tut_","tutorial","tweet","twig","twitter","type","typo","ubuntu","uiview","ultimate","under","unit","unity","universal","unix","update","updated","upgrade","upload","uploader","uri-","uri.","uri_","url-","url.","url_","usage","usb-","usb.","usb_","use-","use.","use_","used","useful","user","using","util","utilitie","utility","vagrant","validator","value","variou","varnish","version","via-","via.","via_","video","view","viewer","vim-","vim.","vim_","vimrc","virtual","vision","visual","vpn","want","warning","watch","watcher","wave","way-","way.","way_","weather","web-","web_","webapp","webgl","webhook","webkit","webrtc","website","websocket","welcome","what","what'","when","where","which","why-","why.","why_","widget","wifi","wiki","win-","win.","win_","window","wip-","wip.","wip_","within","without","wizard","word","wordpres","work","worker","workflow","working","workshop","world","wrapper","write","writer","writing","written","www-","www.","www_","xamarin","xcode","xml-","xml.","xml_","xmpp","xxxxxx","yahoo","yaml","yandex","yeoman","yet-","yet.","yet_","yii-","yii.","yii_","youtube","yui-","yui.","yui_","zend","zero","zip-","zip.","zip_","zsh-","zsh.","zsh_"]},{"condition":"OR","regexTarget":"line","regexes":[{"regex":"--mount=type=secret,","flags":""},{"regex":"import[ \\t]+{[ \\t\\w,]+}[ \\t]+from[ \\t]+['\"][^'\"]+['\"]","flags":""}],"stopwords":[]}],"tier":"strict"},
- {"id":"github-app-token","regex":"(?:ghu|ghs)_[0-9a-zA-Z]{36}","flags":"","keywords":["ghu_","ghs_"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"github-fine-grained-pat","regex":"github_pat_\\w{82}","flags":"","keywords":["github_pat_"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"github-oauth","regex":"gho_[0-9a-zA-Z]{36}","flags":"","keywords":["gho_"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"github-pat","regex":"ghp_[0-9a-zA-Z]{36}","flags":"","keywords":["ghp_"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"github-refresh-token","regex":"ghr_[0-9a-zA-Z]{36}","flags":"","keywords":["ghr_"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"gitlab-cicd-job-token","regex":"glcbt-[0-9a-zA-Z]{1,5}_[0-9a-zA-Z_\\-]{20}","flags":"","keywords":["glcbt-"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"gitlab-deploy-token","regex":"gldt-[0-9a-zA-Z_\\-]{20}","flags":"","keywords":["gldt-"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"gitlab-feature-flag-client-token","regex":"glffct-[0-9a-zA-Z_\\-]{20}","flags":"","keywords":["glffct-"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"gitlab-feed-token","regex":"glft-[0-9a-zA-Z_\\-]{20}","flags":"","keywords":["glft-"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"gitlab-incoming-mail-token","regex":"glimt-[0-9a-zA-Z_\\-]{25}","flags":"","keywords":["glimt-"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"gitlab-kubernetes-agent-token","regex":"glagent-[0-9a-zA-Z_\\-]{50}","flags":"","keywords":["glagent-"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"gitlab-oauth-app-secret","regex":"gloas-[0-9a-zA-Z_\\-]{64}","flags":"","keywords":["gloas-"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"gitlab-pat","regex":"glpat-[\\w\\-]{20}","flags":"","keywords":["glpat-"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"gitlab-pat-routable","regex":"\\bglpat-[0-9a-zA-Z_\\-]{27,300}\\.[0-9a-z]{2}[0-9a-z]{7}\\b","flags":"","keywords":["glpat-"],"entropy":4,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"gitlab-ptt","regex":"glptt-[0-9a-f]{40}","flags":"","keywords":["glptt-"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"gitlab-rrt","regex":"GR1348941[\\w\\-]{20}","flags":"","keywords":["gr1348941"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"gitlab-runner-authentication-token","regex":"glrt-[0-9a-zA-Z_\\-]{20}","flags":"","keywords":["glrt-"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"gitlab-runner-authentication-token-routable","regex":"\\bglrt-t\\d_[0-9a-zA-Z_\\-]{27,300}\\.[0-9a-z]{2}[0-9a-z]{7}\\b","flags":"","keywords":["glrt-"],"entropy":4,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"gitlab-scim-token","regex":"glsoat-[0-9a-zA-Z_\\-]{20}","flags":"","keywords":["glsoat-"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"gitlab-session-cookie","regex":"_gitlab_session=[0-9a-z]{32}","flags":"","keywords":["_gitlab_session="],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"gitter-access-token","regex":"[\\w.\\-]{0,50}?(?:gitter)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9_\\-]{40})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["gitter"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"gocardless-api-token","regex":"[\\w.\\-]{0,50}?(?:gocardless)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}(live_[a-z0-9\\-_=A-Z]{40})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["live_","gocardless"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"grafana-api-key","regex":"\\b(eyJrIjoi[A-Za-z0-9]{70,400}={0,3})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["eyjrijoi"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"grafana-cloud-api-token","regex":"\\b(glc_[A-Za-z0-9+/]{32,400}={0,3})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["glc_"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"grafana-service-account-token","regex":"\\b(glsa_[A-Za-z0-9]{32}_[A-Fa-f0-9]{8})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["glsa_"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"harness-api-key","regex":"(?:pat|sat)\\.[a-zA-Z0-9_\\-]{22}\\.[a-zA-Z0-9]{24}\\.[a-zA-Z0-9]{20}","flags":"","keywords":["pat.","sat."],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"hashicorp-tf-api-token","regex":"[a-z0-9A-Z]{14}\\.(?:atlasv1)\\.[a-z0-9\\-_=A-Z]{60,70}","flags":"","keywords":["atlasv1"],"entropy":3.5,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"heroku-api-key","regex":"[\\w.\\-]{0,50}?(?:heroku)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["heroku"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"heroku-api-key-v2","regex":"\\b((HRKU-AA[0-9a-zA-Z_\\-]{58}))(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["hrku-aa"],"entropy":4,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"hubspot-api-key","regex":"[\\w.\\-]{0,50}?(?:hubspot)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["hubspot"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"huggingface-access-token","regex":"\\b(hf_(?:[a-zA-Z]{34}))(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["hf_"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"huggingface-organization-api-token","regex":"\\b(api_org_(?:[a-zA-Z]{34}))(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["api_org_"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"infracost-api-token","regex":"\\b(ico-[a-zA-Z0-9]{32})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["ico-"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"intercom-api-key","regex":"[\\w.\\-]{0,50}?(?:intercom)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9=_\\-]{60})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["intercom"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"intra42-client-secret","regex":"\\b(s-s4t2(?:ud|af)-[abcdef0123456789ABCDEF]{64})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["intra","s-s4t2ud-","s-s4t2af-"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"jfrog-api-key","regex":"[\\w.\\-]{0,50}?(?:jfrog|artifactory|bintray|xray)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{73})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["jfrog","artifactory","bintray","xray"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"jfrog-identity-token","regex":"[\\w.\\-]{0,50}?(?:jfrog|artifactory|bintray|xray)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{64})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["jfrog","artifactory","bintray","xray"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"jwt","regex":"\\b(ey[a-zA-Z0-9]{17,}\\.ey[a-zA-Z0-9\\/\\\\_\\-]{17,}\\.(?:[a-zA-Z0-9\\/\\\\_\\-]{10,}={0,2})?)(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["ey"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"jwt-base64","regex":"\\bZXlK(?:(?<alg>aGJHY2lPaU)|(?<apu>aGNIVWlPaU)|(?<apv>aGNIWWlPaU)|(?<aud>aGRXUWlPaU)|(?<b64>aU5qUWlP)|(?<crit>amNtbDBJanBi)|(?<cty>amRIa2lPaU)|(?<epk>bGNHc2lPbn)|(?<enc>bGJtTWlPaU)|(?<jku>cWEzVWlPaU)|(?<jwk>cWQyc2lPb)|(?<iss>cGMzTWlPaU)|(?<iv>cGRpSTZJ)|(?<kid>cmFXUWlP)|(?<key_ops>clpYbGZiM0J6SWpwY)|(?<kty>cmRIa2lPaUp)|(?<nonce>dWIyNWpaU0k2)|(?<p2c>d01tTWlP)|(?<p2s>d01uTWlPaU)|(?<ppt>d2NIUWlPaU)|(?<sub>emRXSWlPaU)|(?<svt>emRuUWlP)|(?<tag>MFlXY2lPaU)|(?<typ>MGVYQWlPaUp)|(?<url>MWNtd2l)|(?<use>MWMyVWlPaUp)|(?<ver>MlpYSWlPaU)|(?<version>MlpYSnphVzl1SWpv)|(?<x>NElqb2)|(?<x5c>NE5XTWlP)|(?<x5t>NE5YUWlPaU)|(?<x5ts256>NE5YUWpVekkxTmlJNkl)|(?<x5u>NE5YVWlPaU)|(?<zip>NmFYQWlPaU))[a-zA-Z0-9\\/\\\\_+\\-\\r\\n]{40,}={0,2}","flags":"","keywords":["zxlk"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"kraken-access-token","regex":"[\\w.\\-]{0,50}?(?:kraken)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9\\/=_\\+\\-]{80,90})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["kraken"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"kucoin-access-token","regex":"[\\w.\\-]{0,50}?(?:kucoin)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-f0-9]{24})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["kucoin"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"kucoin-secret-key","regex":"[\\w.\\-]{0,50}?(?:kucoin)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["kucoin"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"launchdarkly-access-token","regex":"[\\w.\\-]{0,50}?(?:launchdarkly)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9=_\\-]{40})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["launchdarkly"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"linear-api-key","regex":"lin_api_[a-z0-9A-Z]{40}","flags":"","keywords":["lin_api_"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"linear-client-secret","regex":"[\\w.\\-]{0,50}?(?:linear)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-f0-9]{32})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["linear"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"linkedin-client-id","regex":"[\\w.\\-]{0,50}?(?:linked[_\\-]?in)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{14})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["linkedin","linked_in","linked-in"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"linkedin-client-secret","regex":"[\\w.\\-]{0,50}?(?:linked[_\\-]?in)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{16})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["linkedin","linked_in","linked-in"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"lob-api-key","regex":"[\\w.\\-]{0,50}?(?:lob)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}((live|test)_[a-f0-9]{35})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["test_","live_"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"lob-pub-api-key","regex":"[\\w.\\-]{0,50}?(?:lob)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}((test|live)_pub_[a-f0-9]{31})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["test_pub","live_pub","_pub"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"looker-client-id","regex":"[\\w.\\-]{0,50}?(?:looker)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{20})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["looker"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"looker-client-secret","regex":"[\\w.\\-]{0,50}?(?:looker)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{24})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["looker"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"mailchimp-api-key","regex":"[\\w.\\-]{0,50}?(?:MailchimpSDK[^\\n]initialize|mailchimp)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-f0-9]{32}-us\\d\\d)(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["mailchimp"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"mailgun-private-api-token","regex":"[\\w.\\-]{0,50}?(?:mailgun)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}(key-[a-f0-9]{32})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["mailgun"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"mailgun-pub-key","regex":"[\\w.\\-]{0,50}?(?:mailgun)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}(pubkey-[a-f0-9]{32})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["mailgun"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"mailgun-signing-key","regex":"[\\w.\\-]{0,50}?(?:mailgun)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-h0-9]{32}-[a-h0-9]{8}-[a-h0-9]{8})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["mailgun"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"mapbox-api-token","regex":"[\\w.\\-]{0,50}?(?:mapbox)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}(pk\\.[a-z0-9]{60}\\.[a-z0-9]{22})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["mapbox"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"mattermost-access-token","regex":"[\\w.\\-]{0,50}?(?:mattermost)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{26})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["mattermost"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"maxmind-license-key","regex":"\\b([A-Za-z0-9]{6}_[A-Za-z0-9]{29}_mmk)(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["_mmk"],"entropy":4,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"messagebird-api-token","regex":"[\\w.\\-]{0,50}?(?:message[_\\-]?bird)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{25})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["messagebird","message-bird","message_bird"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"messagebird-client-id","regex":"[\\w.\\-]{0,50}?(?:message[_\\-]?bird)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["messagebird","message-bird","message_bird"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"microsoft-teams-webhook","regex":"https://[a-z0-9]+\\.webhook\\.office\\.com/webhookb2/[a-z0-9]{8}-([a-z0-9]{4}-){3}[a-z0-9]{12}@[a-z0-9]{8}-([a-z0-9]{4}-){3}[a-z0-9]{12}/IncomingWebhook/[a-z0-9]{32}/[a-z0-9]{8}-([a-z0-9]{4}-){3}[a-z0-9]{12}","flags":"","keywords":["webhook.office.com","webhookb2","incomingwebhook"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"netlify-access-token","regex":"[\\w.\\-]{0,50}?(?:netlify)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9=_\\-]{40,46})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["netlify"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"new-relic-browser-api-token","regex":"[\\w.\\-]{0,50}?(?:new-relic|newrelic|new_relic)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}(NRJS-[a-f0-9]{19})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["nrjs-"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"new-relic-insert-key","regex":"[\\w.\\-]{0,50}?(?:new-relic|newrelic|new_relic)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}(NRII-[a-z0-9\\-]{32})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["nrii-"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"new-relic-user-api-id","regex":"[\\w.\\-]{0,50}?(?:new-relic|newrelic|new_relic)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{64})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["new-relic","newrelic","new_relic"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"new-relic-user-api-key","regex":"[\\w.\\-]{0,50}?(?:new-relic|newrelic|new_relic)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}(NRAK-[a-z0-9]{27})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["nrak"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"notion-api-token","regex":"\\b(ntn_[0-9]{11}[A-Za-z0-9]{32}[A-Za-z0-9]{3})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["ntn_"],"entropy":4,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"npm-access-token","regex":"\\b(npm_[a-z0-9]{36})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["npm_"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"nytimes-access-token","regex":"[\\w.\\-]{0,50}?(?:nytimes|new-york-times,|newyorktimes)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9=_\\-]{32})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["nytimes","new-york-times","newyorktimes"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"octopus-deploy-api-key","regex":"\\b(API-[A-Z0-9]{26})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["api-"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"openai-api-key","regex":"\\b(sk-(?:proj|svcacct|admin)-(?:[A-Za-z0-9_\\-]{74}|[A-Za-z0-9_\\-]{58})T3BlbkFJ(?:[A-Za-z0-9_\\-]{74}|[A-Za-z0-9_\\-]{58})\\b|sk-[a-zA-Z0-9]{20}T3BlbkFJ[a-zA-Z0-9]{20})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["t3blbkfj"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"openshift-user-token","regex":"\\b(sha256~[\\w\\-]{43})(?:[^\\w\\-]|$)","flags":"","keywords":["sha256~"],"entropy":3.5,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"perplexity-api-key","regex":"\\b(pplx-[a-zA-Z0-9]{48})(?:[\\x60'\"\\s;]|\\\\[nr]|$|\\b)","flags":"","keywords":["pplx-"],"entropy":4,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"plaid-api-token","regex":"[\\w.\\-]{0,50}?(?:plaid)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}(access-(?:sandbox|development|production)-[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["plaid"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"plaid-client-id","regex":"[\\w.\\-]{0,50}?(?:plaid)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{24})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["plaid"],"entropy":3.5,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"plaid-secret-key","regex":"[\\w.\\-]{0,50}?(?:plaid)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{30})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["plaid"],"entropy":3.5,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"planetscale-api-token","regex":"\\b(pscale_tkn_[\\w=\\.\\-]{32,64})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["pscale_tkn_"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"planetscale-oauth-token","regex":"\\b(pscale_oauth_[\\w=\\.\\-]{32,64})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["pscale_oauth_"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"planetscale-password","regex":"\\b(pscale_pw_[\\w=\\.\\-]{32,64})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["pscale_pw_"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"postman-api-token","regex":"\\b(PMAK-[a-f0-9A-F]{24}\\-[a-f0-9A-F]{34})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["pmak-"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"prefect-api-token","regex":"\\b(pnu_[a-zA-Z0-9]{36})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["pnu_"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"private-key","regex":"-----BEGIN[ A-Z0-9_\\-]{0,100}PRIVATE KEY(?: BLOCK)?-----[\\s\\S\\-]{64,}?KEY(?: BLOCK)?-----","flags":"i","keywords":["-----begin"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"pulumi-api-token","regex":"\\b(pul-[a-f0-9]{40})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["pul-"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"pypi-upload-token","regex":"pypi-AgEIcHlwaS5vcmc[\\w\\-]{50,1000}","flags":"","keywords":["pypi-ageichlwas5vcmc"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"rapidapi-access-token","regex":"[\\w.\\-]{0,50}?(?:rapidapi)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9_\\-]{50})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["rapidapi"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"readme-api-token","regex":"\\b(rdme_[a-z0-9]{70})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["rdme_"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"rubygems-api-token","regex":"\\b(rubygems_[a-f0-9]{48})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["rubygems_"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"scalingo-api-token","regex":"\\b(tk-us-[\\w\\-]{48})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["tk-us-"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"sendbird-access-id","regex":"[\\w.\\-]{0,50}?(?:sendbird)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["sendbird"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"sendbird-access-token","regex":"[\\w.\\-]{0,50}?(?:sendbird)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-f0-9]{40})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["sendbird"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"sendgrid-api-token","regex":"\\b(SG\\.[a-z0-9=_\\-\\.A-Z]{66})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["sg."],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"sendinblue-api-token","regex":"\\b(xkeysib-[a-f0-9]{64}\\-[a-z0-9A-Z]{16})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["xkeysib-"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"sentry-access-token","regex":"[\\w.\\-]{0,50}?(?:sentry)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-f0-9]{64})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["sentry"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"sentry-org-token","regex":"\\bsntrys_eyJpYXQiO[a-zA-Z0-9+/]{10,200}(?:LCJyZWdpb25fdXJs|InJlZ2lvbl91cmwi|cmVnaW9uX3VybCI6)[a-zA-Z0-9+/]{10,200}={0,2}_[a-zA-Z0-9+/]{43}(?:[^a-zA-Z0-9+/]|$)","flags":"","keywords":["sntrys_eyjpyxqio"],"entropy":4.5,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"sentry-user-token","regex":"\\b(sntryu_[a-f0-9]{64})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["sntryu_"],"entropy":3.5,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"settlemint-application-access-token","regex":"\\b(sm_aat_[a-zA-Z0-9]{16})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["sm_aat"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"settlemint-personal-access-token","regex":"\\b(sm_pat_[a-zA-Z0-9]{16})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["sm_pat"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"settlemint-service-access-token","regex":"\\b(sm_sat_[a-zA-Z0-9]{16})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["sm_sat"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"shippo-api-token","regex":"\\b(shippo_(?:live|test)_[a-fA-F0-9]{40})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["shippo_"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"shopify-access-token","regex":"shpat_[a-fA-F0-9]{32}","flags":"","keywords":["shpat_"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"shopify-custom-access-token","regex":"shpca_[a-fA-F0-9]{32}","flags":"","keywords":["shpca_"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"shopify-private-app-access-token","regex":"shppa_[a-fA-F0-9]{32}","flags":"","keywords":["shppa_"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"shopify-shared-secret","regex":"shpss_[a-fA-F0-9]{32}","flags":"","keywords":["shpss_"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"sidekiq-secret","regex":"[\\w.\\-]{0,50}?(?:BUNDLE_ENTERPRISE__CONTRIBSYS__COM|BUNDLE_GEMS__CONTRIBSYS__COM)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-f0-9]{8}:[a-f0-9]{8})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["bundle_enterprise__contribsys__com","bundle_gems__contribsys__com"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"sidekiq-sensitive-url","regex":"\\bhttps?://([a-f0-9]{8}:[a-f0-9]{8})@(?:gems[^\\n]contribsys[^\\n]com|enterprise[^\\n]contribsys[^\\n]com)(?:[\\/|\\#|\\?|:]|$)","flags":"i","keywords":["gems.contribsys.com","enterprise.contribsys.com"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"slack-app-token","regex":"xapp-\\d-[A-Z0-9]+-\\d+-[a-z0-9]+","flags":"i","keywords":["xapp"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"slack-bot-token","regex":"xoxb-[0-9]{10,13}-[0-9]{10,13}[a-zA-Z0-9\\-]*","flags":"","keywords":["xoxb"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"slack-config-access-token","regex":"xoxe[^\\n]xox[bp]-\\d-[A-Z0-9]{163,166}","flags":"i","keywords":["xoxe.xoxb-","xoxe.xoxp-"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"slack-config-refresh-token","regex":"xoxe-\\d-[A-Z0-9]{146}","flags":"i","keywords":["xoxe-"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"slack-legacy-bot-token","regex":"xoxb-[0-9]{8,14}-[a-zA-Z0-9]{18,26}","flags":"","keywords":["xoxb"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"slack-legacy-token","regex":"xox[os]-\\d+-\\d+-\\d+-[a-fA-F\\d]+","flags":"","keywords":["xoxo","xoxs"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"slack-legacy-workspace-token","regex":"xox[ar]-(?:\\d-)?[0-9a-zA-Z]{8,48}","flags":"","keywords":["xoxa","xoxr"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"slack-user-token","regex":"xox[pe](?:-[0-9]{10,13}){3}-[a-zA-Z0-9\\-]{28,34}","flags":"","keywords":["xoxp-","xoxe-"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"slack-webhook-url","regex":"(?:https?://)?hooks[^\\n]slack[^\\n]com/(?:services|workflows|triggers)/[A-Za-z0-9+/]{43,56}","flags":"","keywords":["hooks.slack.com"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"snyk-api-token","regex":"[\\w.\\-]{0,50}?(?:snyk[_.\\-]?(?:(?:api|oauth)[_.\\-]?)?(?:key|token))(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["snyk"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"sonar-api-token","regex":"[\\w.\\-]{0,50}?(?:sonar[_.\\-]?(login|token))(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}((?:squ_|sqp_|sqa_)?[a-z0-9=_\\-]{40})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["sonar"],"entropy":0,"secretGroup":2,"allowlists":[],"tier":"standard"},
- {"id":"sourcegraph-access-token","regex":"\\b(\\b(sgp_(?:[a-fA-F0-9]{16}|local)_[a-fA-F0-9]{40}|sgp_[a-fA-F0-9]{40}|[a-fA-F0-9]{40})\\b)(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["sgp_","sourcegraph"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"square-access-token","regex":"\\b((?:EAAA|sq0atp-)[\\w\\-]{22,60})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["sq0atp-","eaaa"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"squarespace-access-token","regex":"[\\w.\\-]{0,50}?(?:squarespace)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["squarespace"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"stripe-access-token","regex":"\\b((?:sk|rk)_(?:test|live|prod)_[a-zA-Z0-9]{10,99})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["sk_test","sk_live","sk_prod","rk_test","rk_live","rk_prod"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"sumologic-access-token","regex":"[\\w.\\-]{0,50}?(?:(?:[Ss]umo|SUMO))(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9A-Z]{64})(?:[\\x60'\"\\s;]|\\\\[nrNR]|$)","flags":"","keywords":["sumo"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"telegram-bot-api-token","regex":"[\\w.\\-]{0,50}?(?:[tT][eE][lL][eE][gG][rR])(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([0-9]{5,16}:(?:A)[a-z0-9_\\-A-Z]{34})(?:[\\x60'\"\\s;]|\\\\[nrNR]|$)","flags":"","keywords":["telegr"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"travisci-access-token","regex":"[\\w.\\-]{0,50}?(?:travis)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{22})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["travis"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"twilio-api-key","regex":"SK[0-9a-fA-F]{32}","flags":"","keywords":["sk"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"twitch-api-token","regex":"[\\w.\\-]{0,50}?(?:twitch)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{30})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["twitch"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"twitter-access-secret","regex":"[\\w.\\-]{0,50}?(?:twitter)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{45})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["twitter"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"twitter-access-token","regex":"[\\w.\\-]{0,50}?(?:twitter)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([0-9]{15,25}-[a-zA-Z0-9]{20,40})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["twitter"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"twitter-api-key","regex":"[\\w.\\-]{0,50}?(?:twitter)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{25})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["twitter"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"twitter-api-secret","regex":"[\\w.\\-]{0,50}?(?:twitter)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{50})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["twitter"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"twitter-bearer-token","regex":"[\\w.\\-]{0,50}?(?:twitter)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}(A{22}[a-zA-Z0-9%]{80,100})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["twitter"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"typeform-api-token","regex":"[\\w.\\-]{0,50}?(?:typeform)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}(tfp_[a-z0-9\\-_\\.=]{59})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["tfp_"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"vault-batch-token","regex":"\\b(hvb\\.[\\w\\-]{138,300})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["hvb."],"entropy":4,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"vault-service-token","regex":"\\b((?:hvs\\.[\\w\\-]{90,120}|s\\.(?:[a-z0-9A-Z]{24})))(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["hvs.","s."],"entropy":3.5,"secretGroup":0,"allowlists":[{"condition":"OR","regexTarget":"secret","regexes":[{"regex":"s\\.[A-Za-z]{24}","flags":""}],"stopwords":[]}],"tier":"standard"},
- {"id":"yandex-access-token","regex":"[\\w.\\-]{0,50}?(?:yandex)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}(t1\\.[A-Z0-9a-z_\\-]+[=]{0,2}\\.[A-Z0-9a-z_\\-]{86}[=]{0,2})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["yandex"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"yandex-api-key","regex":"[\\w.\\-]{0,50}?(?:yandex)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}(AQVN[A-Za-z0-9_\\-]{35,38})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["yandex"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"yandex-aws-access-token","regex":"[\\w.\\-]{0,50}?(?:yandex)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}(YC[a-zA-Z0-9_\\-]{38})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["yandex"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"zendesk-secret-key","regex":"[\\w.\\-]{0,50}?(?:zendesk)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{40})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["zendesk"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"openviking-gateway-key","regex":"(?<![A-Za-z0-9_-])(ovgw_[A-Za-z0-9_-]{43})(?![A-Za-z0-9_-])","flags":"","keywords":["ovgw_"],"entropy":3,"secretGroup":1,"allowlists":[],"tier":"standard"},
- {"id":"openviking-gateway-management-key","regex":"(?<![A-Za-z0-9_-])(ovgm_[A-Za-z0-9_-]{43})(?![A-Za-z0-9_-])","flags":"","keywords":["ovgm_"],"entropy":3,"secretGroup":1,"allowlists":[],"tier":"standard"},
- {"id":"openviking-oauth-access-token","regex":"(?<![A-Za-z0-9_-])(ovat_[A-Za-z0-9_-]{54})(?![A-Za-z0-9_-])","flags":"","keywords":["ovat_"],"entropy":3,"secretGroup":1,"allowlists":[],"tier":"standard"},
- {"id":"openviking-oauth-refresh-token","regex":"(?<![A-Za-z0-9_-])(ovrt_[A-Za-z0-9_-]{54})(?![A-Za-z0-9_-])","flags":"","keywords":["ovrt_"],"entropy":3,"secretGroup":1,"allowlists":[],"tier":"standard"},
- {"id":"openviking-oauth-auth-code","regex":"(?<![A-Za-z0-9_-])(ovac_[A-Za-z0-9_-]{54})(?![A-Za-z0-9_-])","flags":"","keywords":["ovac_"],"entropy":3,"secretGroup":1,"allowlists":[],"tier":"standard"},
-];
diff --git a/examples/dsh-memory-plugin/client.mjs b/examples/dsh-memory-plugin/client.mjs
index 53ad1f343..a97d15221 100644
--- a/examples/dsh-memory-plugin/client.mjs
+++ b/examples/dsh-memory-plugin/client.mjs
@@ -1,5 +1,4 @@
import { createOvHttp } from "./shared/ov-http.mjs";
-import { redactPayload } from "./shared/redact.mjs";
export class OpenVikingClient {
constructor(config) {
@@ -34,20 +33,12 @@ export class OpenVikingClient {
return response.ok ? response.result : null;
}
- /**
- * POST one captured message. The payload is secret-redacted first under
- * `options.redactTier` (default: this client's `captureRedact`), unless
- * `options.redacted` says the caller already did it with its own tier.
- */
- async addMessage(sessionId, payload, actorPeerId, options = {}) {
- const body = options.redacted === true
- ? payload
- : redactPayload(payload, { tier: options.redactTier ?? this.config.captureRedact });
+ async addMessage(sessionId, payload, actorPeerId) {
return this.fetchJSON(
`/api/v1/sessions/${encodeURIComponent(sessionId)}/messages`,
{
method: "POST",
- body: JSON.stringify(body),
+ body: JSON.stringify(payload),
},
{ actorPeerId },
);
diff --git a/examples/dsh-memory-plugin/package-lock.json b/examples/dsh-memory-plugin/package-lock.json
index 169737ecb..513cf5b81 100644
--- a/examples/dsh-memory-plugin/package-lock.json
+++ b/examples/dsh-memory-plugin/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "@openviking/dsh-memory-plugin",
- "version": "0.5.29",
+ "version": "0.5.28",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@openviking/dsh-memory-plugin",
- "version": "0.5.29",
+ "version": "0.5.28",
"license": "Apache-2.0",
"devDependencies": {
"@deepseek-ai/dsh-llm": "0.1.0-rc.6",
diff --git a/examples/dsh-memory-plugin/package.json b/examples/dsh-memory-plugin/package.json
index 788d24c41..69a56e3ec 100644
--- a/examples/dsh-memory-plugin/package.json
+++ b/examples/dsh-memory-plugin/package.json
@@ -1,6 +1,6 @@
{
"name": "@openviking/dsh-memory-plugin",
- "version": "0.5.29",
+ "version": "0.5.28",
"description": "OpenViking memory and context bundle for DeepSeek Harness",
"icon": "./icon.svg",
"type": "module",
diff --git a/examples/dsh-memory-plugin/redact.test.mjs b/examples/dsh-memory-plugin/redact.test.mjs
deleted file mode 100644
index 1e4ea4b60..000000000
--- a/examples/dsh-memory-plugin/redact.test.mjs
+++ /dev/null
@@ -1,166 +0,0 @@
-import assert from "node:assert/strict";
-import { mkdtemp, readFile, readdir, rm } from "node:fs/promises";
-import { tmpdir } from "node:os";
-import { join } from "node:path";
-import { afterEach, beforeEach, test } from "node:test";
-
-import { OpenVikingClient } from "./client.mjs";
-import { resolveConfig } from "./config.mjs";
-import { OpenVikingRuntime } from "./runtime.mjs";
-import { enqueue } from "./shared/pending-queue.mjs";
-
-// Assembled at runtime so this file holds no contiguous token for a scanner.
-const GITHUB_PAT = ["ghp", "_", "a1B2c3D4e5F6g7H8i9J0", "k1L2m3N4o5P6q7R8"].join("");
-const GENERIC = ["Zq8", "xW2", "pL5", "mN7", "rT4", "vB9", "kH3", "jF6"].join("");
-
-const ENV_KEYS = ["OPENVIKING_PENDING_DIR", "OPENVIKING_STATE_DIR", "OPENVIKING_CAPTURE_REDACT"];
-const originalFetch = globalThis.fetch;
-let saved;
-let dir;
-
-beforeEach(async () => {
- saved = Object.fromEntries(ENV_KEYS.map((key) => [key, process.env[key]]));
- dir = await mkdtemp(join(tmpdir(), "dsh-redact-"));
- process.env.OPENVIKING_PENDING_DIR = join(dir, "pending");
- process.env.OPENVIKING_STATE_DIR = join(dir, "state");
- delete process.env.OPENVIKING_CAPTURE_REDACT;
-});
-
-afterEach(async () => {
- globalThis.fetch = originalFetch;
- for (const [key, value] of Object.entries(saved)) {
- if (value === undefined) delete process.env[key];
- else process.env[key] = value;
- }
- await rm(dir, { recursive: true, force: true });
-});
-
-function clientConfig(extra = {}) {
- return {
- endpoint: "http://127.0.0.1:1933",
- apiKey: "",
- peerId: "",
- requestTimeoutMs: 1000,
- ...extra,
- };
-}
-
-function recordFetch() {
- const bodies = [];
- globalThis.fetch = async (_url, init) => {
- if (init?.body) bodies.push(String(init.body));
- return new Response(JSON.stringify({ status: "ok", result: {} }), {
- status: 200,
- headers: { "Content-Type": "application/json" },
- });
- };
- return bodies;
-}
-
-async function queued() {
- const pending = join(dir, "pending");
- const names = await readdir(pending).catch(() => []);
- return Promise.all(names.map((name) => readFile(join(pending, name), "utf8")));
-}
-
-function runtimeConfig(extra = {}) {
- return {
- explicitPeerId: "",
- workspacePeer: false,
- peerId: "",
- syncTurns: true,
- captureAssistantTurns: true,
- captureToolResults: false,
- captureToolMaxChars: 1000000,
- captureMaxLength: 24000,
- captureMode: "semantic",
- commitKeepRecentCount: 10,
- ...extra,
- };
-}
-
-function userEvent(text) {
- return {
- type: "user/message",
- data: { role: "user", content: [{ type: "text", text }], source: { kind: "user" } },
- };
-}
-
-test("the client redacts before it posts, at its configured tier or an explicit one", async () => {
- const bodies = recordFetch();
- const payload = { role: "user", content: `token ${GITHUB_PAT}` };
- const line = { role: "user", content: `API_TOKEN=${GENERIC}` };
- await new OpenVikingClient(clientConfig()).addMessage("dsh-1", payload);
- await new OpenVikingClient(clientConfig()).addMessage("dsh-1", line);
- await new OpenVikingClient(clientConfig({ captureRedact: "strict" })).addMessage("dsh-1", line);
- await new OpenVikingClient(clientConfig({ captureRedact: "strict" })).addMessage("dsh-1", line, "", { redactTier: "off" });
- await new OpenVikingClient(clientConfig({ captureRedact: "off" })).addMessage("dsh-1", payload);
- assert.equal(payload.content, `token ${GITHUB_PAT}`, "the caller's payload is not mutated");
- assert.match(JSON.parse(bodies[0]).content, /^token \{\{ov_redacted:github-pat:[0-9a-f]{8}\}\}$/);
- assert.ok(bodies[1].includes(GENERIC), "standard leaves a generic key=value alone");
- assert.ok(!bodies[2].includes(GENERIC), "strict redacts it");
- assert.ok(bodies[3].includes(GENERIC), "an explicit tier wins over the client's");
- assert.ok(bodies[4].includes(GITHUB_PAT), "off sends the payload as it is");
-});
-
-test("resolveConfig reads captureRedact from the host input and the environment", () => {
- const env = { OPENVIKING_CLI_CONFIG_FILE: join(dir, "none.conf"), OPENVIKING_CONFIG_FILE: join(dir, "none.json"), OPENVIKING_HOME: join(dir, "home") };
- assert.equal(resolveConfig({}, env, dir).captureRedact, "standard");
- assert.equal(resolveConfig({ captureRedact: "strict" }, env, dir).captureRedact, "strict");
- assert.equal(resolveConfig({ captureRedact: false }, env, dir).captureRedact, "off");
- assert.equal(resolveConfig({ captureRedact: "strict" }, { ...env, OPENVIKING_CAPTURE_REDACT: "0" }, dir).captureRedact, "off");
-});
-
-test("a captured turn is redacted on the direct POST and in the pending queue", async () => {
- const posted = [];
- const runtime = new OpenVikingRuntime({
- async addMessage(_sessionId, payload, _peer, options) {
- posted.push({ payload, options });
- return { ok: false, status: 503, error: { code: "UNAVAILABLE" } };
- },
- }, runtimeConfig(), { debug() {} });
- const session = { id: "redact-capture", header: { cwd: dir } };
- runtime.stateFor(session).ready = true;
-
- runtime.capture(session, userEvent(`my token is ${GITHUB_PAT}`));
- await runtime.flush(session);
-
- assert.equal(posted.length, 1);
- assert.ok(!JSON.stringify(posted[0].payload).includes(GITHUB_PAT));
- assert.equal(posted[0].options?.redacted, true, "the client is told not to scan it again");
- const files = await queued();
- assert.equal(files.length, 1);
- assert.ok(!files[0].includes(GITHUB_PAT));
-});
-
-test("captureRedact off leaves the captured turn as it is", async () => {
- const posted = [];
- const runtime = new OpenVikingRuntime({
- async addMessage(_sessionId, payload) {
- posted.push(payload);
- return { ok: false, status: 503, error: { code: "UNAVAILABLE" } };
- },
- }, runtimeConfig({ captureRedact: "off" }), { debug() {} });
- const session = { id: "redact-off", header: { cwd: dir } };
- runtime.stateFor(session).ready = true;
-
- runtime.capture(session, userEvent(`my token is ${GITHUB_PAT}`));
- await runtime.flush(session);
-
- assert.ok(JSON.stringify(posted[0]).includes(GITHUB_PAT));
- assert.ok((await queued())[0].includes(GITHUB_PAT));
-});
-
-test("the runtime's replay redacts an entry queued before redaction existed", async () => {
- await enqueue("addMessage", "dsh-old", { role: "user", content: `token ${GITHUB_PAT}` }, { redacted: true });
- const bodies = [];
- const runtime = new OpenVikingRuntime({
- async fetchJSON(_path, init) {
- if (init?.body) bodies.push(String(init.body));
- return { ok: true, status: 200, result: {} };
- },
- }, runtimeConfig(), { debug() {} });
- await runtime.replayPendingQueue();
- assert.equal(bodies.length, 1);
- assert.ok(!bodies[0].includes(GITHUB_PAT));
-});
diff --git a/examples/dsh-memory-plugin/runtime.mjs b/examples/dsh-memory-plugin/runtime.mjs
index e7557112d..636e4b783 100644
--- a/examples/dsh-memory-plugin/runtime.mjs
+++ b/examples/dsh-memory-plugin/runtime.mjs
@@ -7,7 +7,6 @@ import {
listPending,
replayPending,
} from "./shared/pending-queue.mjs";
-import { redactPayload } from "./shared/redact.mjs";
import { isRetryableFailure } from "./shared/retryable.mjs";
import { resolveEffectivePeerId } from "./shared/workspace-peer.mjs";
import {
@@ -151,13 +150,9 @@ export class OpenVikingRuntime {
capture(session, event) {
const state = this.stateFor(session);
if (!isCaptureEnabled(state.config)) return;
- const captured = captureEvent(event, state.config, state.toolNames);
- if (!captured) return;
+ const payload = captureEvent(event, state.config, state.toolNames);
+ if (!payload) return;
this.enqueueWrite(state, async () => {
- // Redacted once, inside the write chain so a slow scan never blocks the
- // host's event: the direct POST and the pending queue both carry this
- // copy, never the plaintext.
- const payload = redactPayload(captured, { tier: state.config.captureRedact });
if (state.hasPendingWrites) {
await this.enqueuePendingMessage(state, payload);
return;
@@ -176,7 +171,6 @@ export class OpenVikingRuntime {
state.ovSessionId,
payload,
state.config.peerId,
- { redacted: true },
);
if (isRetryableFailure(response)) {
await this.enqueuePendingMessage(state, payload);
@@ -271,10 +265,7 @@ export class OpenVikingRuntime {
async enqueuePending(state, type, payload) {
const createdAt = Math.max(Date.now(), state.pendingCreatedAt + 1);
state.pendingCreatedAt = createdAt;
- const result = await enqueue(type, state.ovSessionId, payload, {
- createdAt,
- redactTier: state.config.captureRedact,
- });
+ const result = await enqueue(type, state.ovSessionId, payload, { createdAt });
if (result.ok) {
// Log the latch transition only: every message that follows while the
// latch holds takes the cheap enqueue path, so this fires once per
@@ -343,7 +334,7 @@ export class OpenVikingRuntime {
await replayPending(
(path, init) => this.client.fetchJSON(path, init),
(stage, data) => this.log(stage, data),
- { redactTier: this.config.captureRedact, ...options },
+ options,
);
}
diff --git a/examples/memory-plugin-shared/README.md b/examples/memory-plugin-shared/README.md
index 7de34c36c..7b5526fe0 100644
--- a/examples/memory-plugin-shared/README.md
+++ b/examples/memory-plugin-shared/README.md
@@ -138,24 +138,3 @@ These settings apply to automatic recall. Explicit MCP search calls retain the
arguments supplied by the caller. Cloud compression requires a server that
supports the context-search rewrite API; older-server fallback behavior remains
specific to each integration.
-
-## Secret redaction rules
-
-`lib/redact.mjs` replaces credentials in captured payloads with
-`{{ov_redacted:<rule>:<tag>}}` before they are sent or queued. Its rules,
-`lib/secret-rules.mjs`, are generated from the gitleaks default configuration
-at a pinned release tag, used as gitleaks ships it, plus `OV_RULES` for
-OpenViking's own key formats; do not edit them by hand.
-
-```bash
-# Regenerate (downloads config/gitleaks.toml at the pinned tag, or pass --toml <path>)
-node examples/memory-plugin-shared/scripts/update-secret-rules.mjs
-# Verify the committed file matches the generator
-node examples/memory-plugin-shared/scripts/update-secret-rules.mjs --check
-```
-
-The generator converts each Go regex to JavaScript without changing what it
-matches; a rule it cannot convert simply, or one too slow for JavaScript's
-backtracking regex engine, is skipped and listed in the generated header.
-The only other judgement is the tier: `generic-api-key` is `strict`, every
-other rule `standard`. The generator is development-time only and never ships.
diff --git a/examples/memory-plugin-shared/capture-redact-callsites.test.mjs b/examples/memory-plugin-shared/capture-redact-callsites.test.mjs
deleted file mode 100644
index dca5a57c4..000000000
--- a/examples/memory-plugin-shared/capture-redact-callsites.test.mjs
+++ /dev/null
@@ -1,83 +0,0 @@
-/**
- * Every harness hands its resolved `captureRedact` to the shared send layer.
- *
- * The send layer redacts whatever it is given, so a call site that forgets the
- * tier still redacts — at "standard". That is safe, but it quietly ignores a
- * user who chose "strict" (or "off"), and nothing at runtime would notice. This
- * reads each plugin's own sources and fails on any call into the send layer
- * that names neither a tier nor an already-redacted payload.
- */
-
-import assert from "node:assert/strict";
-import { readFileSync, readdirSync, statSync } from "node:fs";
-import { join, relative } from "node:path";
-import test from "node:test";
-import { fileURLToPath } from "node:url";
-
-const ROOT = fileURLToPath(new URL("../..", import.meta.url));
-
-// The plugins' own code: never the vendored shared copies, tests or packages.
-const SOURCE_ROOTS = [
- "examples/claude-code-memory-plugin/scripts",
- "examples/codex-memory-plugin/scripts",
- "examples/agent-hook-plugin/hosts",
- "examples/agent-hook-plugin/scripts",
- "examples/opencode-plugin",
- "examples/pi-coding-agent-extension",
- "examples/dsh-memory-plugin",
-];
-const SKIP_DIRS = new Set(["shared", "node_modules", "tests", "test", "skills", "servers", "dist"]);
-
-// A call into the send layer whose argument list must say which tier applies.
-const CALL_RE = /(?<![.\w])(sendSessionMessages|addAgentMessages|addAgentMessage|replayPending|replayAgentPending)\s*\(|(?<![.\w])(enqueue|enqueuePendingDirectly|enqueueAgentPending)\s*\(\s*["']addMessage["']/g;
-const TIER_RE = /\bredactTier\b|\bredacted\s*:\s*true\b/;
-
-function sourceFiles(dir, out = []) {
- for (const name of readdirSync(dir)) {
- const path = join(dir, name);
- if (statSync(path).isDirectory()) {
- if (!SKIP_DIRS.has(name)) sourceFiles(path, out);
- } else if (/\.(mjs|ts)$/.test(name) && !/\.test\.(mjs|ts)$/.test(name) && !name.endsWith(".d.mts")) {
- out.push(path);
- }
- }
- return out;
-}
-
-/** The argument text of the call whose `(` is at `open`. */
-function argumentsAt(text, open) {
- let depth = 0;
- for (let i = open; i < text.length; i++) {
- const c = text[i];
- if (c === "(") depth++;
- else if (c === ")" && --depth === 0) return text.slice(open + 1, i);
- }
- return text.slice(open + 1);
-}
-
-test("every send-layer call in a plugin passes the configured captureRedact tier", () => {
- const missing = [];
- let calls = 0;
- for (const root of SOURCE_ROOTS) {
- for (const file of sourceFiles(join(ROOT, root))) {
- // Comments blanked out in place, so offsets and line numbers still hold.
- const text = readFileSync(file, "utf8")
- .replace(/\/\*[\s\S]*?\*\//g, (c) => c.replace(/[^\n]/g, " "))
- .replace(/(^|[ \t])\/\/.*$/gm, (c) => c.replace(/./g, " "));
- for (const match of text.matchAll(CALL_RE)) {
- const head = text.slice(Math.max(0, match.index - 16), match.index);
- // Definitions and imports are not calls.
- if (/(function|async)\s+$/.test(head)) continue;
- const open = match.index + match[0].indexOf("(");
- const args = argumentsAt(text, open);
- calls++;
- if (!TIER_RE.test(args)) {
- const line = text.slice(0, match.index).split("\n").length;
- missing.push(`${relative(ROOT, file)}:${line} ${match[0].trim()}`);
- }
- }
- }
- }
- assert.ok(calls >= 15, `found only ${calls} send-layer calls; the scan has gone blind`);
- assert.deepEqual(missing, [], "these calls fall back to the default tier instead of the user's");
-});
diff --git a/examples/memory-plugin-shared/capture-redact-wiring.test.mjs b/examples/memory-plugin-shared/capture-redact-wiring.test.mjs
deleted file mode 100644
index 9236abb3c..000000000
--- a/examples/memory-plugin-shared/capture-redact-wiring.test.mjs
+++ /dev/null
@@ -1,268 +0,0 @@
-/**
- * captureRedact end to end: the knob, and every shared path a captured message
- * leaves by — the batch and serial POSTs, the single-message POST, the pending
- * queue on disk and its replay. The engine itself is covered by redact.test.mjs;
- * this file only asserts that no send path skips it and that the tier the
- * caller resolved is the one applied.
- */
-
-import assert from "node:assert/strict";
-import { mkdirSync, mkdtempSync, readFileSync, readdirSync, rmSync, writeFileSync } from "node:fs";
-import { tmpdir } from "node:os";
-import { join } from "node:path";
-import test from "node:test";
-
-import { addAgentMessage, addAgentMessages, loadAgentHookConfig } from "./lib/agent-hook-runtime.mjs";
-import { sendSessionMessages } from "./lib/batch-send.mjs";
-import { KNOB_BY_NAME, WORKSPACE_KNOB_MAP, pluginConfigKeys, resolveKnobs } from "./lib/config-schema.mjs";
-import { enqueue, listPending, replayPending } from "./lib/pending-queue.mjs";
-import { REDACT_TIERS } from "./lib/redact.mjs";
-
-// Assembled at runtime so this file holds no contiguous token for a secret
-// scanner to trip on.
-const GITHUB_PAT = ["ghp", "_", "a1B2c3D4e5F6g7H8i9J0", "k1L2m3N4o5P6q7R8"].join("");
-// Matches only generic-api-key (the strict tier): no provider prefix.
-const GENERIC = ["Zq8", "xW2", "pL5", "mN7", "rT4", "vB9", "kH3", "jF6"].join("");
-const REDACTED_RE = /\{\{ov_redacted:[a-z0-9-]+:[0-9a-f]{8}\}\}/;
-
-const ENV_KEYS = ["OPENVIKING_PENDING_DIR", "OPENVIKING_STATE_DIR", "OPENVIKING_CAPTURE_REDACT"];
-
-/** A private pending dir and state dir (the install key lives there) per test. */
-function withScratch(fn) {
- return async () => {
- const dir = mkdtempSync(join(tmpdir(), "ov-redact-wiring-"));
- const saved = Object.fromEntries(ENV_KEYS.map((key) => [key, process.env[key]]));
- process.env.OPENVIKING_PENDING_DIR = join(dir, "pending");
- process.env.OPENVIKING_STATE_DIR = join(dir, "state");
- delete process.env.OPENVIKING_CAPTURE_REDACT;
- try {
- return await fn(dir);
- } finally {
- for (const [key, value] of Object.entries(saved)) {
- if (value === undefined) delete process.env[key];
- else process.env[key] = value;
- }
- rmSync(dir, { recursive: true, force: true });
- }
- };
-}
-
-function toolPayload(secret = GITHUB_PAT) {
- return {
- role: "assistant",
- peer_id: "peer-1",
- parts: [
- { type: "text", text: `export GITHUB_TOKEN=${secret}` },
- {
- type: "tool",
- tool_id: "call_1",
- tool_name: "bash",
- tool_status: "completed",
- tool_input: { command: "cat .env" },
- tool_output: JSON.stringify({ stdout: `GITHUB_TOKEN=${secret}\nDEBUG=1\n` }),
- },
- ],
- };
-}
-
-function queuedFiles(dir) {
- const pending = join(dir, "pending");
- try {
- return readdirSync(pending).map((name) => readFileSync(join(pending, name), "utf8"));
- } catch {
- return [];
- }
-}
-
-function recorder(respond = () => ({ ok: true, status: 200, result: {} })) {
- const bodies = [];
- const fetchJSON = async (path, init = {}) => {
- if (init.body) bodies.push({ path, body: init.body });
- return respond(path, init);
- };
- return { bodies, fetchJSON };
-}
-
-const RETRYABLE = () => ({ ok: false, status: 503, error: { code: "UNAVAILABLE" } });
-
-// ── the knob ────────────────────────────────────────────────────────────────
-
-test("captureRedact is a user-level capture knob whose tiers are the engine's", () => {
- const knob = KNOB_BY_NAME.get("captureRedact");
- assert.ok(knob, "declared in KNOBS");
- assert.equal(knob.default, "standard");
- assert.equal(knob.env, "OPENVIKING_CAPTURE_REDACT");
- assert.equal(knob.capability, "capture");
- assert.deepEqual(knob.values, [...REDACT_TIERS], "the enum and the engine agree on the tiers");
- assert.equal(knob.workspace, undefined, "no workspace key");
- assert.ok(!Object.values(WORKSPACE_KNOB_MAP).includes("captureRedact"));
- assert.ok(pluginConfigKeys().has("captureRedact"), "the doctor knows the key");
-});
-
-test("captureRedact parses false-ish values as off and unknown tiers as the default", () => {
- const resolve = (env, data = null) => resolveKnobs({
- env,
- layers: data ? [{ name: "file", data }] : [],
- }).settings.captureRedact;
-
- assert.equal(resolve({}), "standard");
- for (const value of ["off", "OFF", "false", "False", "0", "no", " no "]) {
- assert.equal(resolve({ OPENVIKING_CAPTURE_REDACT: value }), "off", `env ${JSON.stringify(value)}`);
- }
- for (const value of [false, 0, "off", "false"]) {
- assert.equal(resolve({}, { captureRedact: value }), "off", `file ${JSON.stringify(value)}`);
- }
- assert.equal(resolve({ OPENVIKING_CAPTURE_REDACT: "strict" }), "strict");
- assert.equal(resolve({ OPENVIKING_CAPTURE_REDACT: "Strict" }), "strict");
- assert.equal(resolve({}, { captureRedact: true }), "standard");
- assert.equal(resolve({}, { captureRedact: "yes" }), "standard");
- // A tier this build does not know redacts at the default rather than keeping
- // a weaker value from a lower layer.
- assert.equal(resolve({ OPENVIKING_CAPTURE_REDACT: "paranoid" }, { captureRedact: "off" }), "standard");
- assert.equal(resolve({}, { captureRedact: "paranoid" }), "standard");
- // The environment outranks the file.
- assert.equal(resolve({ OPENVIKING_CAPTURE_REDACT: "off" }, { captureRedact: "strict" }), "off");
-});
-
-test("a repository's workspace file cannot turn captureRedact off", () => {
- const dir = mkdtempSync(join(tmpdir(), "ov-redact-workspace-"));
- const workspace = join(dir, "workspace");
- const keys = ["OPENVIKING_CLI_CONFIG_FILE", "OPENVIKING_CONFIG_FILE", "OPENVIKING_HOME", "OPENVIKING_CAPTURE_REDACT"];
- const saved = Object.fromEntries(keys.map((key) => [key, process.env[key]]));
- try {
- mkdirSync(join(workspace, ".openviking"), { recursive: true });
- mkdirSync(join(workspace, ".git"), { recursive: true });
- writeFileSync(join(dir, "ovcli.conf"), JSON.stringify({ url: "http://127.0.0.1:1933", plugin: { captureRedact: "strict" } }));
- process.env.OPENVIKING_CLI_CONFIG_FILE = join(dir, "ovcli.conf");
- process.env.OPENVIKING_CONFIG_FILE = join(dir, "ov.conf");
- process.env.OPENVIKING_HOME = join(dir, "home");
- delete process.env.OPENVIKING_CAPTURE_REDACT;
- for (const file of ["config.json", "config.local.json"]) {
- writeFileSync(
- join(workspace, ".openviking", file),
- JSON.stringify({ version: 1, captureRedact: "off", capture: { redact: "off", captureRedact: "off" } }),
- );
- }
- assert.equal(loadAgentHookConfig("cursor", workspace).captureRedact, "strict");
- assert.equal(loadAgentHookConfig("cursor", dir).captureRedact, "strict");
- } finally {
- for (const [key, value] of Object.entries(saved)) {
- if (value === undefined) delete process.env[key];
- else process.env[key] = value;
- }
- rmSync(dir, { recursive: true, force: true });
- }
-});
-
-// ── batch-send ──────────────────────────────────────────────────────────────
-
-const BATCH_SENDERS = {
- batch: (fetchJSON, payloads, opts) => sendSessionMessages(fetchJSON, "s-1", payloads, opts),
- "serial fallback": (fetchJSON, payloads, opts) => sendSessionMessages(
- (path, init) => (path.endsWith("/batch") ? { ok: false, status: 404 } : fetchJSON(path, init)),
- "s-1",
- payloads,
- opts,
- ),
- addAgentMessages: (fetchJSON, payloads, opts) => addAgentMessages(fetchJSON, "s-1", payloads, "peer-2", opts),
-};
-
-for (const [name, send] of Object.entries(BATCH_SENDERS)) {
- test(`${name} posts redacted copies at the caller's tier (standard by default)`, withScratch(async () => {
- const generic = { role: "user", content: `API_TOKEN=${GENERIC}` };
- const wire = async (redactTier) => {
- const { bodies, fetchJSON } = recorder();
- const payloads = [toolPayload(), generic];
- const before = JSON.stringify(payloads);
- const res = await send(fetchJSON, payloads, redactTier ? { redactTier } : {});
- assert.equal(res.sent ?? payloads.length, payloads.length);
- assert.equal(JSON.stringify(payloads), before, "the caller's objects are not mutated");
- return bodies.map(({ body }) => body).join("\n");
- };
-
- const standard = await wire();
- assert.ok(!standard.includes(GITHUB_PAT), "no plaintext on the wire");
- assert.match(standard, /export GITHUB_TOKEN=\{\{ov_redacted:github-pat:[0-9a-f]{8}\}\}"/);
- assert.ok(standard.includes('"tool_id":"call_1"') && standard.includes('"tool_name":"bash"'), "metadata is kept");
- assert.ok(standard.includes(GENERIC), "generic-api-key is not a standard rule");
-
- const strict = await wire("strict");
- assert.ok(!strict.includes(GITHUB_PAT) && !strict.includes(GENERIC));
- assert.match(strict, /API_TOKEN=\{\{ov_redacted:generic-api-key:/);
-
- const off = await wire("off");
- assert.ok(off.includes(GITHUB_PAT) && off.includes(GENERIC), "off sends the payloads as they are");
- }));
-}
-
-test("sendSessionMessages queues the redacted copy after a retryable failure", withScratch(async (dir) => {
- const { bodies, fetchJSON } = recorder(RETRYABLE);
- const res = await sendSessionMessages(fetchJSON, "s-1", [toolPayload(), toolPayload()], {
- enqueueOnRetryable: true,
- });
- assert.equal(res.queued, 2);
- assert.ok(bodies.every(({ body }) => !body.includes(GITHUB_PAT)));
- const files = queuedFiles(dir);
- assert.equal(files.length, 1, "identical redacted payloads dedupe to one entry");
- assert.ok(!files[0].includes(GITHUB_PAT), "no plaintext on disk");
- assert.match(files[0], REDACTED_RE);
-}));
-
-// ── agent-hook-runtime ──────────────────────────────────────────────────────
-
-test("addAgentMessage redacts the POST and the entry it parks", withScratch(async (dir) => {
- const { bodies, fetchJSON } = recorder(RETRYABLE);
- const result = await addAgentMessage(fetchJSON, "s-1", toolPayload());
- assert.equal(result.pendingQueued, true);
- assert.ok(!bodies[0].body.includes(GITHUB_PAT));
- const files = queuedFiles(dir);
- assert.equal(files.length, 1);
- assert.ok(!files[0].includes(GITHUB_PAT));
-
- const off = recorder();
- await addAgentMessage(off.fetchJSON, "s-1", toolPayload(), { redactTier: "off" });
- assert.ok(off.bodies[0].body.includes(GITHUB_PAT));
-}));
-
-// ── pending queue ───────────────────────────────────────────────────────────
-
-test("enqueue redacts an addMessage payload unless the caller already did", withScratch(async (dir) => {
- assert.equal((await enqueue("addMessage", "s-1", toolPayload())).ok, true);
- assert.ok(!queuedFiles(dir)[0].includes(GITHUB_PAT), "default tier is standard");
-
- rmSync(join(dir, "pending"), { recursive: true, force: true });
- await enqueue("addMessage", "s-1", { role: "user", content: `API_TOKEN=${GENERIC}` }, { redactTier: "strict" });
- assert.ok(!queuedFiles(dir)[0].includes(GENERIC));
-
- rmSync(join(dir, "pending"), { recursive: true, force: true });
- await enqueue("addMessage", "s-1", toolPayload(), { redactTier: "off" });
- assert.ok(queuedFiles(dir)[0].includes(GITHUB_PAT), "off writes it as it is");
-}));
-
-test("replayPending sends a plaintext entry from an older plugin redacted", withScratch(async () => {
- // `redacted: true` writes the payload as it is, standing in for an entry an
- // older plugin queued before redaction existed.
- await enqueue("addMessage", "s-1", toolPayload(), { redacted: true });
- assert.equal((await listPending()).length, 1);
-
- const { bodies, fetchJSON } = recorder();
- const result = await replayPending(fetchJSON, () => {});
- assert.equal(result.replayed, 1);
- assert.ok(!bodies[0].body.includes(GITHUB_PAT));
- assert.match(bodies[0].body, REDACTED_RE);
-
- await enqueue("addMessage", "s-2", toolPayload(), { redacted: true });
- const off = recorder();
- await replayPending(off.fetchJSON, () => {}, { redactTier: "off" });
- assert.ok(off.bodies[0].body.includes(GITHUB_PAT), "off replays the entry as it is");
-}));
-
-test("a redacted entry replays byte-for-byte: redaction is idempotent", withScratch(async (dir) => {
- const first = recorder(RETRYABLE);
- await sendSessionMessages(first.fetchJSON, "s-1", [toolPayload()], { enqueueOnRetryable: true });
- const queued = JSON.parse(queuedFiles(dir)[0]).payload;
-
- const replay = recorder();
- await replayPending(replay.fetchJSON, () => {});
- assert.deepEqual(JSON.parse(replay.bodies[0].body), queued);
-}));
diff --git a/examples/memory-plugin-shared/doctor-core.test.mjs b/examples/memory-plugin-shared/doctor-core.test.mjs
index 844284ed0..86d8bf55b 100644
--- a/examples/memory-plugin-shared/doctor-core.test.mjs
+++ b/examples/memory-plugin-shared/doctor-core.test.mjs
@@ -19,7 +19,6 @@ import {
lintBaseUrl,
lintServerConf,
readyCheckState,
- reportToggles,
scanDebugLog,
unknownOvcliKeys,
whichCommand,
@@ -215,22 +214,6 @@ test("report render lists problems in the summary and sets the exit code", () =>
assert.match(text, /⚠ meh → do this/);
});
-test("reportToggles shows the capture redaction tier and warns when it is off", () => {
- const base = { autoRecall: true, autoCapture: true, noAutoInject: false };
- const on = createReport();
- reportToggles(on, { ...base, captureRedact: "standard" }, { harness: "claude-code" }, ["auto-capture on"]);
- assert.equal(on.sections[0].findings[0].title, "toggles auto-capture on, capture redaction standard");
- assert.equal(on.sections[0].findings.length, 1);
-
- const off = createReport();
- reportToggles(off, { ...base, captureRedact: "off" }, { harness: "claude-code" }, ["auto-capture on"]);
- assert.match(off.sections[0].findings[0].title, /capture redaction OFF$/);
- const warn = off.sections[0].findings.find((f) => f.level === "warn");
- assert.match(warn.title, /capture redaction is off/);
- assert.match(warn.fix, /OPENVIKING_CAPTURE_REDACT/);
- assert.match(warn.fix, /plugin\.captureRedact/);
-});
-
test("lintServerConf flags the plugin-only ov.conf keys a server refuses to start on", () => {
const findings = lintServerConf({ claude_code: { enabled: true }, codex: {}, server: { url: "http://x", port: 1933 } });
assert.deepEqual(findings.map((f) => f.level), ["warn", "warn", "warn"]);
diff --git a/examples/memory-plugin-shared/lib/MANIFEST b/examples/memory-plugin-shared/lib/MANIFEST
index db6972eb8..fdb9638c5 100644
--- a/examples/memory-plugin-shared/lib/MANIFEST
+++ b/examples/memory-plugin-shared/lib/MANIFEST
@@ -15,9 +15,7 @@ plugin-config.mjs
profile-inject.mjs
recall-compress-core.mjs
recall-core.mjs
-redact.mjs
retryable.mjs
-secret-rules.mjs
session-model.mjs
uri-guard.mjs
workspace-config.mjs
diff --git a/examples/memory-plugin-shared/lib/agent-hook-runtime.mjs b/examples/memory-plugin-shared/lib/agent-hook-runtime.mjs
index a076e5520..200a5d864 100644
--- a/examples/memory-plugin-shared/lib/agent-hook-runtime.mjs
+++ b/examples/memory-plugin-shared/lib/agent-hook-runtime.mjs
@@ -10,7 +10,6 @@ import { enqueue, replayPending } from "./pending-queue.mjs";
import { buildProfileBlock } from "./profile-inject.mjs";
import { buildRecallBlock, isRecallEnabled } from "./recall-core.mjs";
import { buildPluginConfig } from "./plugin-config.mjs";
-import { redactPayload } from "./redact.mjs";
import { isRetryableFailure } from "./retryable.mjs";
import { deriveHarnessSessionId, isBypassed } from "./session-model.mjs";
import { resolveEffectivePeerId } from "./workspace-peer.mjs";
@@ -182,14 +181,10 @@ export function makeAgentFetchJSON(cfg, cwd = process.cwd(), {
return { fetchJSON, get effectivePeer() { return workspacePeer(); } };
}
-/**
- * Park a write for the next hook to replay. Never throws: the caller is a hook.
- * An addMessage payload is redacted under `options.redactTier` on its way to
- * disk unless `options.redacted` says the caller already did it.
- */
-export async function enqueueAgentPending(type, sessionId, payload = {}, options = {}) {
+/** Park a write for the next hook to replay. Never throws: the caller is a hook. */
+export async function enqueueAgentPending(type, sessionId, payload = {}) {
try {
- return await enqueue(type, sessionId, payload, options);
+ return await enqueue(type, sessionId, payload);
} catch {
return { ok: false };
}
@@ -200,7 +195,7 @@ export async function enqueueAgentPending(type, sessionId, payload = {}, options
* stderr when no retry can help. `pendingQueued` / `pendingEnqueueFailed` are
* what the capture hooks log and what decides whether a turn is lost.
*/
-async function notePendingWrite(type, sessionId, payload, result, enqueueOptions = {}) {
+async function notePendingWrite(type, sessionId, payload, result) {
if (result.ok) return result;
if (!isRetryableFailure(result)) {
const detail = result.error?.message || result.error?.code || "";
@@ -210,38 +205,30 @@ async function notePendingWrite(type, sessionId, payload, result, enqueueOptions
);
return result;
}
- const pending = await enqueueAgentPending(type, sessionId, payload, enqueueOptions);
+ const pending = await enqueueAgentPending(type, sessionId, payload);
if (pending.ok) result.pendingQueued = true;
else result.pendingEnqueueFailed = true;
return result;
}
-/**
- * Add one message. The payload is secret-redacted under `redactTier` (the
- * caller's resolved `captureRedact`, default "standard") before the POST, and
- * the same redacted copy is what a retryable failure parks in the queue.
- */
-export async function addAgentMessage(fetchJSON, sessionId, payload, { redactTier } = {}) {
- const body = redactPayload(payload, { tier: redactTier });
+export async function addAgentMessage(fetchJSON, sessionId, payload) {
const result = await fetchJSON(`/api/v1/sessions/${encodeURIComponent(sessionId)}/messages`, {
method: "POST",
- body: JSON.stringify(body),
+ body: JSON.stringify(payload),
});
- return notePendingWrite("addMessage", sessionId, body, result, { redacted: true });
+ return notePendingWrite("addMessage", sessionId, payload, result);
}
/**
* Session routes attribute a message by its body `peer_id` alone: the
* actor-peer header scopes reads, not session writes. A payload that already
* names its peer keeps it; an empty `peerId` (peer mode off) stamps nothing.
- * `redactTier` is the caller's resolved `captureRedact`; sendSessionMessages
- * redacts under it before anything is sent or queued.
*/
-export async function addAgentMessages(fetchJSON, sessionId, payloads, peerId = "", { redactTier } = {}) {
+export async function addAgentMessages(fetchJSON, sessionId, payloads, peerId = "") {
const stamped = peerId
? payloads.map((payload) => (payload.peer_id ? payload : { ...payload, peer_id: peerId }))
: payloads;
- return sendSessionMessages(fetchJSON, sessionId, stamped, { enqueueOnRetryable: true, redactTier });
+ return sendSessionMessages(fetchJSON, sessionId, stamped, { enqueueOnRetryable: true });
}
export async function commitAgentSession(fetchJSON, sessionId, log = () => {}, payload = {}) {
@@ -277,9 +264,8 @@ export async function getAgentSessionContext(fetchJSON, sessionId, tokenBudget =
return result.ok ? result.result : null;
}
-/** Replay the pending queue; `options.redactTier` is the caller's `captureRedact`. */
-export async function replayAgentPending(fetchJSON, log = () => {}, options = {}) {
- return replayPending(fetchJSON, log, options);
+export async function replayAgentPending(fetchJSON, log = () => {}) {
+ return replayPending(fetchJSON, log);
}
export async function recallForPrompt(fetchJSON, cfg, prompt, cwd, log = () => {}, options = {}) {
diff --git a/examples/memory-plugin-shared/lib/batch-send.d.mts b/examples/memory-plugin-shared/lib/batch-send.d.mts
index be089b371..3e7bb6739 100644
--- a/examples/memory-plugin-shared/lib/batch-send.d.mts
+++ b/examples/memory-plugin-shared/lib/batch-send.d.mts
@@ -3,7 +3,7 @@ export function sendSessionMessages(
fetchJSON: (path: string, init?: any) => Promise<{ ok: boolean; status?: number; result?: any; error?: any }>,
sessionId: string,
payloads: Array<Record<string, any>>,
- opts?: { enqueueOnRetryable?: boolean; onSent?: (count: number) => void | Promise<void>; redactTier?: string },
+ opts?: { enqueueOnRetryable?: boolean; onSent?: (count: number) => void | Promise<void> },
): Promise<{
sent: number;
queued: number;
diff --git a/examples/memory-plugin-shared/lib/batch-send.mjs b/examples/memory-plugin-shared/lib/batch-send.mjs
index 829c9ae5b..473c35290 100644
--- a/examples/memory-plugin-shared/lib/batch-send.mjs
+++ b/examples/memory-plugin-shared/lib/batch-send.mjs
@@ -1,5 +1,4 @@
import { enqueue } from "./pending-queue.mjs";
-import { redactPayloads } from "./redact.mjs";
import { isRetryableFailure } from "./retryable.mjs";
export const BATCH_LIMIT = 100;
@@ -33,8 +32,6 @@ async function enqueueRemainder(sessionId, payloads, startIndex, result, retryab
for (let i = startIndex; i < payloads.length; i++) {
const queued = await enqueue("addMessage", sessionId, payloads[i], {
createdAt: baseCreatedAt + (i - startIndex),
- // sendSessionMessages redacted every payload under the caller's tier.
- redacted: true,
});
if (!queued.ok) {
// Stop at the first enqueue failure so queued entries stay a contiguous
@@ -77,24 +74,18 @@ async function sendSerial(fetchJSON, sessionId, payloads, startIndex, opts, resu
/**
* Send add-message payloads in server-sized batches with serial fallback.
*
- * Every payload is secret-redacted (lib/redact.mjs) once, up front, under
- * `opts.redactTier`; the batch POST, the serial fallback and the pending queue
- * all carry that redacted copy, so no path out of here holds the plaintext.
- * The caller's payload objects are never mutated.
- *
* @param {Function} fetchJSON - (path, init) => { ok, status, result?, error? }
* @param {string} sessionId - OpenViking session id
* @param {Array<object>} payloads - sanitized add-message request bodies
* @param {object} opts
* @param {boolean} opts.enqueueOnRetryable - enqueue unsent payloads after a retryable failure
* @param {Function} opts.onSent - called with the number of messages durably sent after each success
- * @param {string} [opts.redactTier="standard"] - the caller's resolved `captureRedact`
* @returns {Promise<{sent:number,queued:number,enqueueFailed:number,failed:number,retryable:boolean,usedBatch:boolean,lastError:any}>}
*/
export async function sendSessionMessages(fetchJSON, sessionId, payloads, opts = {}) {
const result = makeResult();
- if (!Array.isArray(payloads) || payloads.length === 0) return result;
- const messages = redactPayloads(payloads, { tier: opts.redactTier });
+ const messages = Array.isArray(payloads) ? payloads : [];
+ if (messages.length === 0) return result;
const encodedSid = encodeURIComponent(sessionId);
for (let start = 0; start < messages.length; start += BATCH_LIMIT) {
diff --git a/examples/memory-plugin-shared/lib/config-schema.d.mts b/examples/memory-plugin-shared/lib/config-schema.d.mts
index 09d8e583f..e232edbbb 100644
--- a/examples/memory-plugin-shared/lib/config-schema.d.mts
+++ b/examples/memory-plugin-shared/lib/config-schema.d.mts
@@ -6,8 +6,6 @@ export interface Knob {
min?: number;
max?: number;
values?: string[];
- boolValues?: { true: string; false: string };
- unknownToDefault?: boolean;
env?: string;
aliases?: string[];
workspace?: string;
diff --git a/examples/memory-plugin-shared/lib/config-schema.mjs b/examples/memory-plugin-shared/lib/config-schema.mjs
index 8cc448cd2..342278219 100644
--- a/examples/memory-plugin-shared/lib/config-schema.mjs
+++ b/examples/memory-plugin-shared/lib/config-schema.mjs
@@ -23,11 +23,6 @@
* harness per-harness default, where one genuinely differs
* min/max clamped, not rejected: a config file must not kill a hook
* values the enum's members; anything else falls back to the default
- * boolValues enum only: the member a boolean-ish value (`true`/`yes`/`on`,
- * `false`/`no`/`off`/`0`) stands for, so `false` can mean "off"
- * unknownToDefault
- * enum only: a value naming no member resolves to the default
- * instead of leaving the lower layer's value standing
* env OPENVIKING_* variable, the highest-priority layer
* aliases older spellings, honoured forever; the doctor names them
* workspace dotted key in `.openviking/config.json`
@@ -155,23 +150,6 @@ export const KNOBS = [
// tool results, so it captures them by default.
{ name: "captureToolResults", type: "bool", default: false, harness: { dsh: true }, env: "OPENVIKING_CAPTURE_TOOL_RESULTS", capability: "capture" },
{ name: "captureFilters", type: "list", default: [], env: "OPENVIKING_CAPTURE_FILTERS", capability: "capture" },
- // Secret redaction of every captured payload before it is sent or queued
- // (lib/redact.mjs); the tiers are REDACT_TIERS there, in the same order.
- // User-level only — deliberately no `workspace` key, so a repository's
- // `.openviking/config.json` cannot switch redaction off for whoever opens it.
- // `false` means off rather than "unparseable"; a tier this build does not
- // know (a newer config read by an older plugin) means the default, never a
- // weaker value left over from a lower layer.
- {
- name: "captureRedact",
- type: "enum",
- values: ["off", "standard", "strict"],
- default: "standard",
- boolValues: { true: "standard", false: "off" },
- unknownToDefault: true,
- env: "OPENVIKING_CAPTURE_REDACT",
- capability: "capture",
- },
// 0 means "derive from timeoutMs": a write gets a longer budget than a read.
{ name: "captureTimeoutMs", type: "int", default: 0, min: 0, max: 600000, env: "OPENVIKING_CAPTURE_TIMEOUT_MS", capability: "capture" },
{ name: "commitTokenThreshold", type: "int", default: 20000, min: 1000, max: 1000000, env: "OPENVIKING_COMMIT_TOKEN_THRESHOLD", workspace: "capture.commit_token_threshold", capability: "capture" },
@@ -338,16 +316,8 @@ export function coerceKnobValue(knob, raw, fallback) {
return knob.max === undefined ? floored : Math.min(knob.max, floored);
}
case "enum": {
- const values = knob.values || [];
const word = String(raw ?? "").trim();
- if (values.includes(word)) return word;
- if (knob.boolValues) {
- const lower = word.toLowerCase();
- if (values.includes(lower)) return lower;
- if (raw === true || TRUE_WORDS.includes(lower)) return knob.boolValues.true;
- if (raw === false || FALSE_WORDS.includes(lower)) return knob.boolValues.false;
- }
- return knob.unknownToDefault && word ? knobDefault(knob) : fallback;
+ return (knob.values || []).includes(word) ? word : fallback;
}
// A peer template may be one string or an ordered list of fallbacks, and
// `String([a, b])` would quietly turn the list into one bogus template.
diff --git a/examples/memory-plugin-shared/lib/doctor-core.mjs b/examples/memory-plugin-shared/lib/doctor-core.mjs
index 4b5bd1133..e9b0d684e 100644
--- a/examples/memory-plugin-shared/lib/doctor-core.mjs
+++ b/examples/memory-plugin-shared/lib/doctor-core.mjs
@@ -1325,20 +1325,11 @@ export function reportTimeouts(report, cfg, { pluginRoot = "", hooksTemplate = "
/** The switches that decide whether anything is injected at all. */
export function reportToggles(report, cfg, { harness = "" } = {}, toggles = []) {
- // Every host captures through the shared send layer, so the redaction tier
- // (already resolved to a tier name by the config knob) is reported here
- // rather than by each doctor.
- const redact = typeof cfg.captureRedact === "string" ? cfg.captureRedact : "";
- const all = redact ? [...toggles, `capture redaction ${redact === "off" ? "OFF" : redact}`] : toggles;
- report.info(`toggles ${all.join(", ")}`);
+ report.info(`toggles ${toggles.join(", ")}`);
if (!cfg.autoRecall || !cfg.autoCapture || cfg.noAutoInject) {
report.warn("one or more injection paths are switched off", toggles.join(", "),
`check OPENVIKING_AUTO_RECALL / OPENVIKING_AUTO_CAPTURE / OPENVIKING_NO_AUTO_INJECT and ovcli.conf plugin.${harnessKey(harness)}`);
}
- if (redact === "off" && cfg.autoCapture) {
- report.warn("capture redaction is off — secrets in captured turns are sent to OpenViking as they are", "",
- "unset OPENVIKING_CAPTURE_REDACT, or set plugin.captureRedact in ovcli.conf to \"standard\" (the default) or \"strict\"");
- }
}
/**
diff --git a/examples/memory-plugin-shared/lib/pending-queue.d.mts b/examples/memory-plugin-shared/lib/pending-queue.d.mts
index 756fd3c16..9051bdcdb 100644
--- a/examples/memory-plugin-shared/lib/pending-queue.d.mts
+++ b/examples/memory-plugin-shared/lib/pending-queue.d.mts
@@ -1,14 +1,8 @@
-export function enqueue(
- type: string,
- sessionId: string,
- payload: Record<string, any>,
- options?: { createdAt?: number; redactTier?: string; redacted?: boolean },
-): Promise<{ ok: boolean; path?: string; error?: string }>;
+export function enqueue(type: string, sessionId: string, payload: Record<string, any>): Promise<{ ok: boolean; path?: string; error?: string }>;
export function listPending(): Promise<Array<{ filename: string; entry: Record<string, any> }>>;
export function replayPending(
fetchJSON: (path: string, init?: any) => Promise<{ ok: boolean; status?: number; result?: any; error?: any }>,
log: (stage: string, data?: any) => void,
- options?: { consumeRetries?: boolean; redactTier?: string },
): Promise<{ replayed: number; failed: number; skipped: number; deferred: number }>;
export function claimForReplay(filename: string): Promise<string | null>;
export function dequeue(filename: string): Promise<boolean>;
diff --git a/examples/memory-plugin-shared/lib/pending-queue.mjs b/examples/memory-plugin-shared/lib/pending-queue.mjs
index 5b0d00144..83ec54d71 100644
--- a/examples/memory-plugin-shared/lib/pending-queue.mjs
+++ b/examples/memory-plugin-shared/lib/pending-queue.mjs
@@ -10,12 +10,6 @@
*
* Each file contains: { type, sessionId, payload, createdAt, retries, dedupKey }
*
- * An addMessage payload is secret-redacted (lib/redact.mjs) before it is
- * written, and again before it is replayed: the queue is plaintext on disk, and
- * an entry written by an older plugin, or by a caller that skipped redaction,
- * must not reach the server as it was. Redaction is idempotent, so replaying an
- * already-redacted entry sends the same bytes.
- *
* Config (env vars):
* OPENVIKING_PENDING_DIR pending queue directory
* (default: ~/.openviking/pending)
@@ -30,7 +24,6 @@ import { mkdir, readdir, readFile, rename, writeFile, unlink, stat, chmod, utime
import { createHash } from "node:crypto";
import { join } from "node:path";
import { homedir } from "node:os";
-import { redactPayload } from "./redact.mjs";
import { isRetryableFailure } from "./retryable.mjs";
const DEFAULT_MAX_RETRIES = 3;
@@ -190,21 +183,8 @@ async function recoverStaleProcessing(dir) {
* @param {object} payload - the data that failed to send
* @param {object} options
* @param {number} options.createdAt - optional queue timestamp override
- * @param {string} [options.redactTier] - the captureRedact tier an addMessage
- * payload is redacted under before it is written (default "standard")
- * @param {boolean} [options.redacted] - the caller already redacted `payload`
- * under its configured tier, so it is written as it is
*/
export async function enqueue(type, sessionId, payload, options = {}) {
- if (type === "addMessage" && options.redacted !== true) {
- try {
- payload = redactPayload(payload, { tier: options.redactTier });
- } catch (err) {
- // redactPayload fails closed on its own; this is the last line before
- // plaintext would be written to disk, so refuse rather than write it.
- return { ok: false, error: `redaction failed: ${err?.message || String(err)}` };
- }
- }
const dir = getPendingDir();
const now = Number.isFinite(options.createdAt) ? options.createdAt : Date.now();
const dedupKey = makeDedupKey(type, sessionId, payload);
@@ -397,8 +377,6 @@ export async function cleanStale() {
* a background drainer can keep retrying a transient failure without
* burning the session-start retry budget. Exhausted and non-retryable
* entries are deleted exactly as in the default mode.
- * @param {string} [options.redactTier="standard"] - the captureRedact tier
- * every replayed addMessage payload is redacted under before it is sent
* @returns {{ replayed: number, failed: number, skipped: number, deferred: number }}
*/
export async function replayPending(fetchJSON, log, options = {}) {
@@ -443,7 +421,7 @@ export async function replayPending(fetchJSON, log, options = {}) {
if (entry.type === "addMessage") {
res = await fetchJSON(`/api/v1/sessions/${encodedSid}/messages`, {
method: "POST",
- body: JSON.stringify(redactPayload(entry.payload, { tier: options.redactTier })),
+ body: JSON.stringify(entry.payload),
});
} else if (entry.type === "commitSession") {
res = await fetchJSON(`/api/v1/sessions/${encodedSid}/commit`, {
diff --git a/examples/memory-plugin-shared/lib/redact.d.mts b/examples/memory-plugin-shared/lib/redact.d.mts
deleted file mode 100644
index 3a65cfb77..000000000
--- a/examples/memory-plugin-shared/lib/redact.d.mts
+++ /dev/null
@@ -1,25 +0,0 @@
-export type RedactTier = "off" | "standard" | "strict";
-
-export interface RedactOptions {
- /** One of REDACT_TIERS; anything else is normalised (unknown names mean "standard"). */
- tier?: string;
- /** Override the per-install HMAC key (tests). */
- key?: string | Uint8Array;
- /** Where the install key's state directory is looked up. */
- env?: Record<string, string | undefined>;
- /** Scannable characters per string before the rest is cut (default MAX_SCAN_CHARS). */
- maxChars?: number;
- /** A field name to scan the value under, as `keyName=value`. */
- keyName?: string;
-}
-
-export const REDACT_TIERS: readonly string[];
-export const DEFAULT_REDACT_TIER: "standard";
-export const MAX_SCAN_CHARS: number;
-
-export function normalizeRedactTier(value: unknown, fallback?: string): string;
-export function redactText(text: string, opts?: RedactOptions): string;
-export function redactPayload<T>(payload: T, opts?: RedactOptions): T;
-export function redactPayloads<T>(payloads: T[], opts?: RedactOptions): T[];
-export function loadInstallKey(opts?: { env?: Record<string, string | undefined> }): Uint8Array;
-export function shannonEntropy(data: string): number;
diff --git a/examples/memory-plugin-shared/lib/redact.mjs b/examples/memory-plugin-shared/lib/redact.mjs
deleted file mode 100644
index fdff734c4..000000000
--- a/examples/memory-plugin-shared/lib/redact.mjs
+++ /dev/null
@@ -1,521 +0,0 @@
-/**
- * Client-side secret redaction for captured transcripts.
- *
- * An agent that runs `cat .env` or prints a token puts that credential in the
- * transcript the memory plugins capture. This module replaces such secrets
- * before a payload leaves the machine — before the POST to OpenViking and
- * before the local pending queue writes it to disk — so the server, its
- * extractor and the memories it writes never see the plaintext.
- *
- * The rules are gitleaks' default rule set plus OpenViking's own key formats
- * (lib/secret-rules.mjs, generated), and detection follows gitleaks: a
- * case-insensitive keyword prefilter, the rule regex, the secret taken from
- * the rule's `secretGroup` or else the first non-empty capture group, the
- * Shannon entropy threshold, then the global and the rule's allowlists and
- * stopwords. Only the secret span is replaced, so `API_KEY=sk-...` becomes
- * `API_KEY={{ov_redacted:<rule>:<tag>}}` and the turn still reads as what
- * happened.
- *
- * The tag is the first 8 hex characters of HMAC-SHA256(install key, secret):
- * the same secret gets the same tag across turns and sessions on one machine,
- * but the tag cannot be checked against a guessed secret without the key,
- * which never leaves the machine.
- *
- * Failure policy: redaction fails closed per string. A scan that throws
- * replaces the whole string with `{{ov_redacted:scan-failed:<tag>}}`; it never
- * throws to the hook and never lets the string through unscanned. Text past
- * `maxChars` (MAX_SCAN_CHARS by default) is not scanned either: it is cut at a
- * whitespace boundary (before an unterminated `-----BEGIN` line) and replaced
- * with `{{ov_redacted:scan-oversize:<tag>}}`. The same happens once one call
- * has scanned `maxTotalChars` (MAX_SCAN_TOTAL_CHARS) across all its strings,
- * which keeps a hook's redaction time bounded however large the batch.
- * A missing or unwritable key file only costs tag stability (an in-process
- * random key is used), never redaction itself.
- *
- * Redaction is idempotent: existing `{{ov_redacted:<rule>:<tag>}}`
- * placeholders and well-formed `{{ov_privacy:...}}` references are never
- * scanned or touched, so replaying a pending entry or redacting twice changes
- * nothing.
- */
-
-import { createHmac, randomBytes } from "node:crypto";
-import { linkSync, mkdirSync, readFileSync, renameSync, unlinkSync, writeFileSync } from "node:fs";
-import { dirname, join } from "node:path";
-
-import SECRET_RULES, { GLOBAL_ALLOWLISTS, TIERS } from "./secret-rules.mjs";
-import { stateDir } from "./workspace-identity.mjs";
-
-/** Ordered, cumulative: each tier runs its own rules and every earlier tier's. */
-export const REDACT_TIERS = Object.freeze([...TIERS]);
-export const DEFAULT_REDACT_TIER = "standard";
-
-/**
- * The most characters of one string that are scanned. It matches the
- * largest tool output a plugin captures (`captureToolMaxChars`, at most
- * 1,000,000), so nothing a plugin builds by default is cut.
- */
-export const MAX_SCAN_CHARS = 1_000_000;
-
-/**
- * The most characters scanned in one redactText / redactPayload /
- * redactPayloads call, summed over every string in it. Ordinary text scans at
- * well under 1 s per MB, but keyword-dense data (hashes, base64) can take
- * 10-20 s per MB, and a hook that times out re-sends the same turns next time.
- */
-export const MAX_SCAN_TOTAL_CHARS = 2_000_000;
-
-const OFF_WORDS = new Set(["off", "false", "0", "no"]);
-const ON_WORDS = new Set(["on", "true", "1", "yes"]);
-
-/**
- * Map a configured value onto a tier name. Anything that says "no" (`false`,
- * `0`, `"off"`, any case) is `off`; a value naming no tier this build knows (a
- * newer config, a typo) falls back to the default, so it can only redact more.
- */
-export function normalizeRedactTier(value, fallback = DEFAULT_REDACT_TIER) {
- const safeFallback = REDACT_TIERS.includes(fallback) ? fallback : DEFAULT_REDACT_TIER;
- if (value === false || value === 0) return "off";
- if (value === true || value === 1) return DEFAULT_REDACT_TIER;
- if (typeof value !== "string") return safeFallback;
- const word = value.trim().toLowerCase();
- if (!word) return safeFallback;
- if (OFF_WORDS.has(word)) return "off";
- if (REDACT_TIERS.includes(word)) return word;
- if (ON_WORDS.has(word)) return DEFAULT_REDACT_TIER;
- return safeFallback;
-}
-
-// ---------------------------------------------------------------------------
-// Install key
-// ---------------------------------------------------------------------------
-
-const KEY_HEX_RE = /^[0-9a-f]{64}$/;
-let cachedKey = null;
-let processKey = null;
-
-function readKeyFile(file) {
- try {
- const text = readFileSync(file, "utf8").trim();
- return KEY_HEX_RE.test(text) ? Buffer.from(text, "hex") : null;
- } catch {
- return null;
- }
-}
-
-/**
- * Create the key file without exposing a half-written one: a private temp
- * file is hard-linked into place, which fails if a concurrent hook got there
- * first (its key is then the one read back). A garbage key file, or a
- * filesystem without hard links, gets the temp file renamed over it.
- */
-function createKeyFile(file) {
- mkdirSync(dirname(file), { recursive: true, mode: 0o700 });
- const tmp = `${file}.${process.pid}.${randomBytes(6).toString("hex")}`;
- writeFileSync(tmp, `${randomBytes(32).toString("hex")}\n`, { mode: 0o600, flag: "wx" });
- try {
- linkSync(tmp, file);
- } catch (error) {
- if (error?.code !== "EEXIST" || !readKeyFile(file)) renameSync(tmp, file);
- } finally {
- try { unlinkSync(tmp); } catch { /* renamed into place */ }
- }
- return readKeyFile(file);
-}
-
-/**
- * The per-install HMAC key: 32 random bytes in `<state dir>/redact/install-key`
- * (dir 0700, file 0600). When it cannot be read or created, a random key for
- * this process is used: tags then differ between processes, nothing else.
- */
-export function loadInstallKey({ env = process.env } = {}) {
- let file = "";
- try {
- file = join(stateDir(env), "redact", "install-key");
- } catch {
- // No state dir: process key.
- }
- if (cachedKey && cachedKey.file === file) return cachedKey.key;
- let key = file ? readKeyFile(file) : null;
- if (!key && file) {
- try {
- key = createKeyFile(file);
- } catch {
- key = null;
- }
- }
- key ||= processKey ||= randomBytes(32);
- cachedKey = { file, key };
- return key;
-}
-
-function placeholder(ruleId, key, secret) {
- const tag = createHmac("sha256", key).update(String(secret), "utf8").digest("hex").slice(0, 8);
- return `{{ov_redacted:${ruleId}:${tag}}}`;
-}
-
-// ---------------------------------------------------------------------------
-// Detection (gitleaks semantics)
-// ---------------------------------------------------------------------------
-
-function compileAllowlists(list) {
- return (list || []).map((al) => ({
- and: al.condition === "AND",
- target: al.regexTarget || "secret",
- regexes: (al.regexes || []).map((r) => new RegExp(r.regex, r.flags)),
- stopwords: (al.stopwords || []).map((w) => String(w).toLowerCase()),
- }));
-}
-
-const compiledCache = new Map();
-
-/** Compile the rules once per process; throws if a rule does not compile. */
-export function compileRuleSet(rules = SECRET_RULES, globalAllowlists = GLOBAL_ALLOWLISTS) {
- const hit = compiledCache.get(rules);
- if (hit && hit.globalsSource === globalAllowlists) return hit;
- const set = {
- globalsSource: globalAllowlists,
- globals: compileAllowlists(globalAllowlists),
- rules: rules.map((rule) => ({
- id: rule.id,
- tierIndex: REDACT_TIERS.indexOf(rule.tier || DEFAULT_REDACT_TIER),
- keywords: (rule.keywords || []).map((k) => String(k).toLowerCase()),
- entropy: Number(rule.entropy) || 0,
- secretGroup: Number(rule.secretGroup) || 0,
- scan: new RegExp(rule.regex, `${rule.flags || ""}g`),
- groups: new RegExp(rule.regex, `${rule.flags || ""}d`),
- allowlists: compileAllowlists(rule.allowlists),
- generic: rule.id.includes("generic"),
- })),
- };
- compiledCache.set(rules, set);
- return set;
-}
-
-/**
- * Shannon entropy as gitleaks computes it: symbol frequencies over code
- * points, divided by the UTF-8 byte length (Go's `len(string)`).
- */
-export function shannonEntropy(data) {
- if (!data) return 0;
- const counts = new Map();
- let bytes = 0;
- for (const ch of data) {
- counts.set(ch, (counts.get(ch) || 0) + 1);
- const cp = ch.codePointAt(0);
- bytes += cp < 0x80 ? 1 : cp < 0x800 ? 2 : cp < 0x10000 ? 3 : 4;
- }
- let entropy = 0;
- for (const count of counts.values()) entropy -= (count / bytes) * Math.log2(count / bytes);
- return entropy;
-}
-
-function isAllowed(allowlists, secret, match, line) {
- const secretLower = secret.toLowerCase();
- for (const al of allowlists) {
- const target = al.target === "match" ? match : al.target === "line" ? line() : secret;
- const checks = [];
- if (al.regexes.length) checks.push(target !== "" && al.regexes.some((re) => re.test(target)));
- if (al.stopwords.length) checks.push(al.stopwords.some((word) => secretLower.includes(word)));
- if (al.and ? checks.every(Boolean) : checks.some(Boolean)) return true;
- }
- return false;
-}
-
-/**
- * The secret spans gitleaks would report in `text`. The `gitleaks:allow`
- * marker is deliberately not honoured: in a transcript it would be a way to
- * opt a line out of redaction.
- */
-function detect(text, rules, globals) {
- const findings = [];
- const lower = text.toLowerCase();
- for (const rule of rules) {
- if (rule.keywords.length && !rule.keywords.some((kw) => lower.includes(kw))) continue;
- const re = rule.scan;
- re.lastIndex = 0;
- for (let m; (m = re.exec(text)) !== null;) {
- if (m[0].length === 0) {
- re.lastIndex++;
- continue;
- }
- // gitleaks trims newlines off the match and re-runs the regex on it.
- let start = m.index;
- let end = m.index + m[0].length;
- while (start < end && text.charCodeAt(start) === 10) start++;
- while (end > start && text.charCodeAt(end - 1) === 10) end--;
- const match = text.slice(start, end);
- let span = [0, match.length];
- const sub = match ? rule.groups.exec(match) : null;
- if (sub && sub.length >= 2) {
- if (rule.secretGroup > 0) span = sub.indices[rule.secretGroup] || [0, 0];
- else span = sub.indices.slice(1).find((idx) => idx && idx[1] > idx[0]) || span;
- }
- const secret = match.slice(span[0], span[1]);
- if (!secret) continue;
- if (rule.entropy && shannonEntropy(secret) <= rule.entropy) continue;
- const line = () => {
- const from = text.lastIndexOf("\n", start - 1) + 1;
- const to = text.indexOf("\n", end);
- return text.slice(from, to < 0 ? text.length : to);
- };
- if (isAllowed(globals, secret, match, line) || isAllowed(rule.allowlists, secret, match, line)) continue;
- findings.push({ start: start + span[0], end: start + span[1], id: rule.id, secret, generic: rule.generic });
- }
- }
- return findings;
-}
-
-// ---------------------------------------------------------------------------
-// Redaction
-// ---------------------------------------------------------------------------
-
-/**
- * Spans that are already placeholders and are never scanned: exactly the
- * placeholders this module writes, and OpenViking privacy references in the
- * grammar the server parses (openviking/privacy/reference.py). Anything else
- * that merely starts with `{{ov_` is scanned like any other text.
- */
-const PROTECTED_RE = new RegExp(
- [
- "\\{\\{ov_redacted:[a-z0-9][a-z0-9-]{0,99}:[0-9a-f]{8}\\}\\}",
- "\\{\\{[ \\t]*ov_privacy:(?:" +
- "ambiguous" +
- "|skill:[A-Za-z0-9_.@-]{1,255}:[^\\s:{}]{1,255}" +
- "|[^\\s:{}]{1,255}:viking://~/privacy/[^/\\s{}]{1,255}/[^#\\s{}]{1,1024}#/values/[^\\s{}]{1,1024}" +
- ")[ \\t]*\\}\\}",
- ].join("|"),
- "g",
-);
-// One pass is not always a fixed point: a placeholder can give the text after
-// it a word boundary it lacked (`ghp_<36>AKIA<16>`: aws-access-token needs
-// `\bAKIA`, which only exists once the GitHub token is replaced). Passes repeat
-// until nothing changes, so a replayed entry is sent byte for byte; a string
-// with no finding costs one pass.
-const MAX_PASSES = 3;
-
-/** The [start, end) stretches of `text` outside existing placeholders. */
-function scannableSegments(text) {
- const segments = [];
- let last = 0;
- for (const m of text.matchAll(PROTECTED_RE)) {
- if (m.index > last) segments.push([last, m.index]);
- last = m.index + m[0].length;
- }
- if (last < text.length) segments.push([last, text.length]);
- return segments;
-}
-
-/**
- * Where scanning stops in a string with more than `max` scannable characters:
- * the `max`-th one, pulled back to whitespace within 4 KiB so a token is not
- * split with its head left in the scanned part. A `-----BEGIN` block whose
- * `-----END ...-----` line lies past the cut cannot match the private-key rule,
- * so the cut moves to the start of the BEGIN line instead.
- */
-function cutPoint(text, segments, max) {
- let budget = max;
- for (const [a, b] of segments) {
- if (b - a <= budget) {
- budget -= b - a;
- continue;
- }
- const hard = a + budget;
- const head = text.slice(a, hard).toLowerCase();
- const begin = head.lastIndexOf("-----begin");
- if (begin >= 0 && !/-----end[^\n]*-----/.test(head.slice(begin))) return a + head.lastIndexOf("\n", begin) + 1;
- for (let k = hard; k > Math.max(a, hard - 4096); k--) if (/\s/.test(text[k - 1])) return k;
- return hard;
- }
- return text.length;
-}
-
-/** Overlapping findings become one span, named by a provider rule over the generic one. */
-function mergeFindings(findings) {
- findings.sort((x, y) => x.start - y.start || y.end - x.end || Number(x.generic) - Number(y.generic));
- const merged = [];
- for (const f of findings) {
- const last = merged[merged.length - 1];
- if (last && f.start < last.end) {
- last.end = Math.max(last.end, f.end);
- if (last.rep.generic && !f.generic) last.rep = f;
- } else {
- merged.push({ start: f.start, end: f.end, rep: f });
- }
- }
- return merged;
-}
-
-/**
- * One scan-and-replace pass over `full`; `base` is where the value starts
- * after a key prefix, and `max` how many characters of the value to scan.
- * Returns the redacted value and how many of its characters were scanned.
- */
-function redactOnce(full, base, ctx, max) {
- const segments = scannableSegments(full);
- const scannable = segments.reduce((n, [a, b]) => n + (b - a), 0);
- const limit = scannable > base + max ? Math.max(base, cutPoint(full, segments, base + max)) : full.length;
- const findings = [];
- for (const [a, b] of segments) {
- if (Math.min(b, limit) <= a) continue;
- for (const f of detect(full.slice(a, Math.min(b, limit)), ctx.rules, ctx.globals)) {
- const start = Math.max(a + f.start, base);
- if (a + f.end > start) findings.push({ ...f, start, end: a + f.end });
- }
- }
- let out = "";
- let pos = base;
- for (const span of mergeFindings(findings)) {
- out += full.slice(pos, span.start) + placeholder(span.rep.id, ctx.key(), span.rep.secret);
- pos = span.end;
- }
- out += full.slice(pos, limit);
- if (limit < full.length) out += placeholder("scan-oversize", ctx.key(), full.slice(limit));
- return { text: out, scanned: Math.max(0, Math.min(scannable, base + max) - base) };
-}
-
-function makeContext(opts = {}) {
- const tier = normalizeRedactTier(opts.tier ?? DEFAULT_REDACT_TIER);
- let key = opts.key ? Buffer.from(opts.key) : null;
- const ctx = {
- tier,
- rules: [],
- globals: [],
- maxChars: Number.isFinite(opts.maxChars) && opts.maxChars > 0 ? opts.maxChars : MAX_SCAN_CHARS,
- // What is left of the call's scan budget; every string's first pass draws on it.
- budget: Number.isFinite(opts.maxTotalChars) && opts.maxTotalChars > 0 ? opts.maxTotalChars : MAX_SCAN_TOTAL_CHARS,
- key: () => (key ||= loadInstallKey(opts.env ? { env: opts.env } : undefined)),
- };
- if (tier === "off") return ctx;
- try {
- const set = compileRuleSet(opts.rules || SECRET_RULES, opts.globalAllowlists || GLOBAL_ALLOWLISTS);
- const index = REDACT_TIERS.indexOf(tier);
- ctx.rules = set.rules.filter((rule) => rule.tierIndex > 0 && rule.tierIndex <= index);
- ctx.globals = set.globals;
- } catch (error) {
- ctx.broken = error;
- }
- return ctx;
-}
-
-function failClosed(text, ctx) {
- try {
- return placeholder("scan-failed", ctx.key(), text);
- } catch {
- return "{{ov_redacted:scan-failed:00000000}}";
- }
-}
-
-function redactStringIn(text, ctx, keyName = null) {
- if (typeof text !== "string" || text === "") return text;
- if (ctx.broken) return failClosed(text, ctx);
- const prefix = keyName ? `${keyName}=` : "";
- // Fixed for every pass, so a later pass never cuts what the first one scanned.
- const max = Math.min(ctx.maxChars, ctx.budget);
- try {
- let current = text;
- for (let pass = 0; pass < MAX_PASSES; pass++) {
- const { text: next, scanned } = redactOnce(prefix + current, prefix.length, ctx, max);
- if (pass === 0) ctx.budget -= scanned;
- if (next === current) return current;
- current = next;
- }
- // Still changing after several passes: not a state to send.
- return failClosed(text, ctx);
- } catch {
- return failClosed(text, ctx);
- }
-}
-
-/**
- * Redact the secrets in one string.
- *
- * @param {string} text
- * @param {object} [opts]
- * @param {string} [opts.tier="standard"] - one of REDACT_TIERS; "off" returns the input
- * @param {string} [opts.keyName] - a field name to scan the value under, as `keyName=value`
- * @param {number} [opts.maxChars] - scannable characters of one string before the rest is cut
- * @param {number} [opts.maxTotalChars] - the same, summed over every string in the call
- * @returns {string}
- */
-export function redactText(text, opts = {}) {
- const ctx = makeContext(opts);
- if (ctx.tier === "off") return text;
- return redactStringIn(text, ctx, opts.keyName || null);
-}
-
-// Message and part fields that identify or describe rather than carry text.
-const META_KEYS = new Set([
- "role", "type", "id", "uri", "peer_id", "session_id", "created_at", "tool_id", "tool_name", "tool_status",
- "context_type", "tool_output_mime_type", "tool_output_externalized_reason",
-]);
-const META_SUFFIX_RE = /_(?:id|uri|ref|sha256|at)$/;
-const KEY_CONTEXT_RE = /^[A-Za-z_][\w.-]{0,63}$/;
-
-const isObject = (value) => value !== null && typeof value === "object" && !Array.isArray(value);
-
-/**
- * Redact every string under `value`. Inside an object each value is scanned
- * as `<key>=<value>`, so a rule that needs a key-ish word (generic-api-key)
- * sees `{ "API_TOKEN": "..." }` as it would see `API_TOKEN=...` in a file;
- * only the value is replaced. Keys are scanned as text of their own.
- */
-function redactDeep(value, ctx, keyName) {
- if (typeof value === "string") return redactStringIn(value, ctx, keyName);
- if (Array.isArray(value)) return value.map((item) => redactDeep(item, ctx, keyName));
- if (!isObject(value)) return value;
- const out = {};
- for (const [k, v] of Object.entries(value)) {
- const key = redactStringIn(k, ctx, null);
- out[key] = redactDeep(v, ctx, key === k && KEY_CONTEXT_RE.test(k) ? k : null);
- }
- return out;
-}
-
-/** A message or part: its fields, metadata copied and the rest redacted. */
-function redactFields(value, ctx) {
- if (!isObject(value)) return redactDeep(value, ctx, null);
- const out = {};
- for (const [k, v] of Object.entries(value)) {
- if (k === "parts" && Array.isArray(v)) out[k] = v.map((part) => redactFields(part, ctx));
- else if (META_KEYS.has(k) || META_SUFFIX_RE.test(k)) out[k] = v;
- else out[k] = redactDeep(v, ctx, null);
- }
- return out;
-}
-
-/**
- * Redact one session add-message payload — `{ role, content }` or
- * `{ role, parts: [...] }` — and return a redacted copy. Text-bearing fields
- * are scanned (`content`, `parts[].text`, `parts[].tool_output`, every leaf of
- * `parts[].tool_input`, `abstract`, any other non-metadata field); ids, URIs,
- * roles, statuses and timestamps are copied. The caller's object is never
- * mutated.
- */
-export function redactPayload(payload, opts = {}) {
- const ctx = makeContext(opts);
- if (ctx.tier === "off") return payload;
- return redactPayloadIn(payload, ctx);
-}
-
-function redactPayloadIn(payload, ctx) {
- if (payload == null) return payload;
- if (typeof payload === "string") return redactStringIn(payload, ctx, null);
- if (typeof payload !== "object") return payload;
- // Walk the data the payload is on the wire (class instances, `toJSON`), as a
- // copy; a payload that cannot be serialised could not be sent either.
- let data;
- try {
- data = JSON.parse(JSON.stringify(payload));
- } catch {
- return failClosed("", ctx);
- }
- return redactFields(data, ctx);
-}
-
-/** redactPayload over a list, with one scan budget (maxTotalChars) for the whole list. */
-export function redactPayloads(payloads, opts = {}) {
- if (!Array.isArray(payloads)) return payloads;
- const ctx = makeContext(opts);
- if (ctx.tier === "off") return payloads;
- return payloads.map((payload) => redactPayloadIn(payload, ctx));
-}
diff --git a/examples/memory-plugin-shared/lib/secret-rules.mjs b/examples/memory-plugin-shared/lib/secret-rules.mjs
deleted file mode 100644
index ce7712188..000000000
--- a/examples/memory-plugin-shared/lib/secret-rules.mjs
+++ /dev/null
@@ -1,293 +0,0 @@
-// GENERATED by examples/memory-plugin-shared/scripts/update-secret-rules.mjs. DO NOT EDIT.
-//
-// Secret detection rules for lib/redact.mjs: the gitleaks v8.30.1 default
-// configuration (config/gitleaks.toml, https://github.com/gitleaks/gitleaks),
-// converted from Go to JavaScript regex syntax and otherwise unchanged, plus
-// the rules for OpenViking's own key formats.
-// Source file sha256: e163e53b9e7e8a8511e77271e2b323ed057759542a6d988258afe3a1fa329caf
-//
-// Tier `strict`: generic-api-key. Every other rule is tier `standard`.
-// Skipped gitleaks rules:
-// cisco-meraki-api-key: nested [\w.-]{0,50}? prefixes: ~3-11 s per MB of hashes or base64url
-// cohere-api-token: nested [\w.-]{0,50}? prefixes: ~3-11 s per MB of hashes or base64url
-// curl-auth-header: time quadratic in line length: minutes for a 1 MB line of `curl ...;` commands
-// curl-auth-user: time quadratic in line length: minutes for a 1 MB line of `curl ...;` commands
-// freemius-secret-key: path-scoped rule; captured text has no file path
-// hashicorp-tf-password: path-scoped rule; captured text has no file path
-// kubernetes-secret-yaml: path-scoped rule; captured text has no file path
-// nuget-config-password: path-scoped rule; captured text has no file path
-// okta-access-token: nested [\w.-]{0,50}? prefixes: ~3-11 s per MB of hashes or base64url
-// pkcs12-file: path-scoped rule; captured text has no file path
-// privateai-api-token: nested [\w.-]{0,50}? prefixes: ~3-11 s per MB of hashes or base64url
-// sumologic-access-id: nested [\w.-]{0,50}? prefixes: ~3-11 s per MB of hashes or base64url
-// OpenViking rules (not from gitleaks):
-// openviking-gateway-key: ovgw_... issued by openviking_gateway/management.py
-// openviking-gateway-management-key: ovgm_... issued by openviking_gateway/cli.py
-// openviking-oauth-access-token: ovat_... issued by openviking/server/oauth/provider.py
-// openviking-oauth-refresh-token: ovrt_... issued by openviking/server/oauth/provider.py
-// openviking-oauth-auth-code: ovac_... issued by openviking/server/oauth/provider.py
-//
-// The gitleaks rule data is used under its license:
-//
-// MIT License
-//
-// Copyright (c) 2019 Zachary Rice
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in all
-// copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-// SOFTWARE.
-
-export const GITLEAKS_VERSION = "v8.30.1";
-
-export const TIERS = ["off","standard","strict"];
-
-export const SKIPPED_RULES = [
- {"id":"cisco-meraki-api-key","reason":"nested [\\w.-]{0,50}? prefixes: ~3-11 s per MB of hashes or base64url"},
- {"id":"cohere-api-token","reason":"nested [\\w.-]{0,50}? prefixes: ~3-11 s per MB of hashes or base64url"},
- {"id":"curl-auth-header","reason":"time quadratic in line length: minutes for a 1 MB line of `curl ...;` commands"},
- {"id":"curl-auth-user","reason":"time quadratic in line length: minutes for a 1 MB line of `curl ...;` commands"},
- {"id":"freemius-secret-key","reason":"path-scoped rule; captured text has no file path"},
- {"id":"hashicorp-tf-password","reason":"path-scoped rule; captured text has no file path"},
- {"id":"kubernetes-secret-yaml","reason":"path-scoped rule; captured text has no file path"},
- {"id":"nuget-config-password","reason":"path-scoped rule; captured text has no file path"},
- {"id":"okta-access-token","reason":"nested [\\w.-]{0,50}? prefixes: ~3-11 s per MB of hashes or base64url"},
- {"id":"pkcs12-file","reason":"path-scoped rule; captured text has no file path"},
- {"id":"privateai-api-token","reason":"nested [\\w.-]{0,50}? prefixes: ~3-11 s per MB of hashes or base64url"},
- {"id":"sumologic-access-id","reason":"nested [\\w.-]{0,50}? prefixes: ~3-11 s per MB of hashes or base64url"},
-];
-
-export const GLOBAL_ALLOWLISTS = [
- {"condition":"OR","regexTarget":"secret","regexes":[{"regex":"^true|false|null$","flags":"i"},{"regex":"^(?:[aA]+|[bB]+|[cC]+|[dD]+|[eE]+|[fF]+|[gG]+|[hH]+|[iI]+|[jJ]+|[kK]+|[lL]+|[mM]+|[nN]+|[oO]+|[pP]+|[qQ]+|[rR]+|[sS]+|[tT]+|[uU]+|[vV]+|[wW]+|[xX]+|[yY]+|[zZ]+|\\*+|\\.+)$","flags":""},{"regex":"^\\$(?:\\d+|{\\d+})$","flags":""},{"regex":"^\\$(?:[A-Z_]+|[a-z_]+)$","flags":""},{"regex":"^\\${(?:[A-Z_]+|[a-z_]+)}$","flags":""},{"regex":"^\\{\\{[ \\t]*[\\w ().|]+[ \\t]*}}$","flags":""},{"regex":"^\\$\\{\\{[ \\t]*(?:(?:env|github|secrets|vars)(?:\\.[A-Za-z]\\w+)+[\\w \"'&./=|]*)[ \\t]*}}$","flags":""},{"regex":"^%(?:[A-Z_]+|[a-z_]+)%$","flags":""},{"regex":"^%[+\\-# 0]?[bcdeEfFgGoOpqstTUvxX]$","flags":""},{"regex":"^\\{\\d{0,2}}$","flags":""},{"regex":"^@(?:[A-Z_]+|[a-z_]+)@$","flags":""},{"regex":"^/Users/[a-z0-9A-Z]+/[\\w .-/]+$","flags":""},{"regex":"^/(?:bin|etc|home|opt|tmp|usr|var)/[\\w ./\\-]+$","flags":""}],"stopwords":["014df517-39d1-4453-b7b3-9930c563627c","abcdefghijklmnopqrstuvwxyz"]},
-];
-
-export default [
- {"id":"1password-secret-key","regex":"\\bA3-[A-Z0-9]{6}-(?:(?:[A-Z0-9]{11})|(?:[A-Z0-9]{6}-[A-Z0-9]{5}))-[A-Z0-9]{5}-[A-Z0-9]{5}-[A-Z0-9]{5}\\b","flags":"","keywords":["a3-"],"entropy":3.8,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"1password-service-account-token","regex":"ops_eyJ[a-zA-Z0-9+/]{250,}={0,3}","flags":"","keywords":["ops_"],"entropy":4,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"adafruit-api-key","regex":"[\\w.\\-]{0,50}?(?:adafruit)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9_\\-]{32})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["adafruit"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"adobe-client-id","regex":"[\\w.\\-]{0,50}?(?:adobe)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-f0-9]{32})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["adobe"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"adobe-client-secret","regex":"\\b(p8e-[a-z0-9A-Z]{32})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["p8e-"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"age-secret-key","regex":"AGE-SECRET-KEY-1[QPZRY9X8GF2TVDW0S3JN54KHCE6MUA7L]{58}","flags":"","keywords":["age-secret-key-1"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"airtable-api-key","regex":"[\\w.\\-]{0,50}?(?:airtable)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{17})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["airtable"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"airtable-personnal-access-token","regex":"\\b(pat[0-9A-Za-z]{14}\\.[a-f0-9]{64})\\b","flags":"","keywords":["airtable"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"algolia-api-key","regex":"[\\w.\\-]{0,50}?(?:algolia)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{32})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["algolia"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"alibaba-access-key-id","regex":"\\b(LTAI[a-z0-9A-Z]{20})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["ltai"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"alibaba-secret-key","regex":"[\\w.\\-]{0,50}?(?:alibaba)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{30})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["alibaba"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"anthropic-admin-api-key","regex":"\\b(sk-ant-admin01-[a-zA-Z0-9_\\-]{93}AA)(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["sk-ant-admin01"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"anthropic-api-key","regex":"\\b(sk-ant-api03-[a-zA-Z0-9_\\-]{93}AA)(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["sk-ant-api03"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"artifactory-api-key","regex":"\\bAKCp[A-Za-z0-9]{69}\\b","flags":"","keywords":["akcp"],"entropy":4.5,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"artifactory-reference-token","regex":"\\bcmVmd[A-Za-z0-9]{59}\\b","flags":"","keywords":["cmvmd"],"entropy":4.5,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"asana-client-id","regex":"[\\w.\\-]{0,50}?(?:asana)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([0-9]{16})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["asana"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"asana-client-secret","regex":"[\\w.\\-]{0,50}?(?:asana)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{32})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["asana"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"atlassian-api-token","regex":"[\\w.\\-]{0,50}?(?:(?:ATLASSIAN|[Aa]tlassian)|(?:CONFLUENCE|[Cc]onfluence)|(?:JIRA|[Jj]ira))(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9A-Z]{20}[a-f0-9A-F]{4})(?:[\\x60'\"\\s;]|\\\\[nrNR]|$)|\\b([Aa][Tt][Aa][Tt][Tt]3[A-Za-z0-9_\\-=a-zA-Z]{186})(?:[\\x60'\"\\s;]|\\\\[nrNR]|$)","flags":"","keywords":["atlassian","confluence","jira","atatt3"],"entropy":3.5,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"authress-service-client-access-key","regex":"\\b((?:sc|ext|scauth|authress)_[a-z0-9A-Z]{5,30}\\.[a-z0-9A-Z]{4,6}\\.(?:acc)[_\\-][a-z0-9\\-A-Z]{10,32}\\.[a-z0-9+/_=\\-A-Z]{30,120})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["sc_","ext_","scauth_","authress_"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"aws-access-token","regex":"\\b((?:A3T[A-Z0-9]|AKIA|ASIA|ABIA|ACCA)[A-Z2-7]{16})\\b","flags":"","keywords":["a3t","akia","asia","abia","acca"],"entropy":3,"secretGroup":0,"allowlists":[{"condition":"OR","regexTarget":"secret","regexes":[{"regex":"[^\\n]+EXAMPLE$","flags":""}],"stopwords":[]}],"tier":"standard"},
- {"id":"aws-amazon-bedrock-api-key-long-lived","regex":"\\b(ABSK[A-Za-z0-9+/]{109,269}={0,2})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["absk"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"aws-amazon-bedrock-api-key-short-lived","regex":"bedrock-api-key-YmVkcm9jay5hbWF6b25hd3MuY29t","flags":"","keywords":["bedrock-api-key-"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"azure-ad-client-secret","regex":"(?:^|[\\\\'\"\\x60\\s>=:(,)])([a-zA-Z0-9_~.]{3}\\dQ~[a-zA-Z0-9_~.\\-]{31,34})(?:$|[\\\\'\"\\x60\\s<),])","flags":"","keywords":["q~"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"beamer-api-token","regex":"[\\w.\\-]{0,50}?(?:beamer)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}(b_[a-z0-9=_\\-]{44})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["beamer"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"bitbucket-client-id","regex":"[\\w.\\-]{0,50}?(?:bitbucket)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{32})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["bitbucket"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"bitbucket-client-secret","regex":"[\\w.\\-]{0,50}?(?:bitbucket)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9=_\\-]{64})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["bitbucket"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"bittrex-access-key","regex":"[\\w.\\-]{0,50}?(?:bittrex)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{32})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["bittrex"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"bittrex-secret-key","regex":"[\\w.\\-]{0,50}?(?:bittrex)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{32})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["bittrex"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"clickhouse-cloud-api-secret-key","regex":"\\b(4b1d[A-Za-z0-9]{38})\\b","flags":"","keywords":["4b1d"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"clojars-api-token","regex":"CLOJARS_[a-z0-9]{60}","flags":"i","keywords":["clojars_"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"cloudflare-api-key","regex":"[\\w.\\-]{0,50}?(?:cloudflare)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9_\\-]{40})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["cloudflare"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"cloudflare-global-api-key","regex":"[\\w.\\-]{0,50}?(?:cloudflare)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-f0-9]{37})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["cloudflare"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"cloudflare-origin-ca-key","regex":"\\b(v1\\.0-[a-f0-9]{24}-[a-f0-9]{146})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["cloudflare","v1.0-"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"codecov-access-token","regex":"[\\w.\\-]{0,50}?(?:codecov)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{32})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["codecov"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"coinbase-access-token","regex":"[\\w.\\-]{0,50}?(?:coinbase)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9_\\-]{64})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["coinbase"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"confluent-access-token","regex":"[\\w.\\-]{0,50}?(?:confluent)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{16})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["confluent"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"confluent-secret-key","regex":"[\\w.\\-]{0,50}?(?:confluent)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{64})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["confluent"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"contentful-delivery-api-token","regex":"[\\w.\\-]{0,50}?(?:contentful)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9=_\\-]{43})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["contentful"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"databricks-api-token","regex":"\\b(dapi[a-f0-9]{32}(?:-\\d)?)(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["dapi"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"datadog-access-token","regex":"[\\w.\\-]{0,50}?(?:datadog)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{40})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["datadog"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"defined-networking-api-token","regex":"[\\w.\\-]{0,50}?(?:dnkey)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}(dnkey-[a-z0-9=_\\-]{26}-[a-z0-9=_\\-]{52})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["dnkey"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"digitalocean-access-token","regex":"\\b(doo_v1_[a-f0-9]{64})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["doo_v1_"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"digitalocean-pat","regex":"\\b(dop_v1_[a-f0-9]{64})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["dop_v1_"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"digitalocean-refresh-token","regex":"\\b(dor_v1_[a-f0-9]{64})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["dor_v1_"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"discord-api-token","regex":"[\\w.\\-]{0,50}?(?:discord)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-f0-9]{64})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["discord"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"discord-client-id","regex":"[\\w.\\-]{0,50}?(?:discord)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([0-9]{18})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["discord"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"discord-client-secret","regex":"[\\w.\\-]{0,50}?(?:discord)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9=_\\-]{32})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["discord"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"doppler-api-token","regex":"dp\\.pt\\.[a-z0-9A-Z]{43}","flags":"","keywords":["dp.pt."],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"droneci-access-token","regex":"[\\w.\\-]{0,50}?(?:droneci)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{32})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["droneci"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"dropbox-api-token","regex":"[\\w.\\-]{0,50}?(?:dropbox)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{15})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["dropbox"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"dropbox-long-lived-api-token","regex":"[\\w.\\-]{0,50}?(?:dropbox)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{11}(AAAAAAAAAA)[a-z0-9\\-_=]{43})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["dropbox"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"dropbox-short-lived-api-token","regex":"[\\w.\\-]{0,50}?(?:dropbox)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}(sl\\.[a-z0-9\\-=_]{135})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["dropbox"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"duffel-api-token","regex":"duffel_(?:test|live)_[a-z0-9_\\-=A-Z]{43}","flags":"","keywords":["duffel_"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"dynatrace-api-token","regex":"dt0c01\\.[a-z0-9A-Z]{24}\\.[a-z0-9A-Z]{64}","flags":"","keywords":["dt0c01."],"entropy":4,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"easypost-api-token","regex":"\\bEZAK[a-z0-9A-Z]{54}\\b","flags":"","keywords":["ezak"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"easypost-test-api-token","regex":"\\bEZTK[a-z0-9A-Z]{54}\\b","flags":"","keywords":["eztk"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"etsy-access-token","regex":"[\\w.\\-]{0,50}?(?:(?:ETSY|[Ee]tsy))(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9A-Z]{24})(?:[\\x60'\"\\s;]|\\\\[nrNR]|$)","flags":"","keywords":["etsy"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"facebook-access-token","regex":"\\b(\\d{15,16}(\\||%)[0-9a-z\\-_]{27,40})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["facebook"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"facebook-page-access-token","regex":"\\b(EAA[MC][a-z0-9A-Z]{100,})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["eaam","eaac"],"entropy":4,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"facebook-secret","regex":"[\\w.\\-]{0,50}?(?:facebook)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-f0-9]{32})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["facebook"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"fastly-api-token","regex":"[\\w.\\-]{0,50}?(?:fastly)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9=_\\-]{32})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["fastly"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"finicity-api-token","regex":"[\\w.\\-]{0,50}?(?:finicity)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-f0-9]{32})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["finicity"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"finicity-client-secret","regex":"[\\w.\\-]{0,50}?(?:finicity)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{20})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["finicity"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"finnhub-access-token","regex":"[\\w.\\-]{0,50}?(?:finnhub)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{20})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["finnhub"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"flickr-access-token","regex":"[\\w.\\-]{0,50}?(?:flickr)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{32})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["flickr"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"flutterwave-encryption-key","regex":"FLWSECK_TEST-[a-h0-9A-H]{12}","flags":"","keywords":["flwseck_test"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"flutterwave-public-key","regex":"FLWPUBK_TEST-[a-h0-9A-H]{32}-[Xx]","flags":"","keywords":["flwpubk_test"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"flutterwave-secret-key","regex":"FLWSECK_TEST-[a-h0-9A-H]{32}-[Xx]","flags":"","keywords":["flwseck_test"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"flyio-access-token","regex":"\\b((?:fo1_[\\w\\-]{43}|fm1[ar]_[a-zA-Z0-9+\\/]{100,}={0,3}|fm2_[a-zA-Z0-9+\\/]{100,}={0,3}))(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["fo1_","fm1","fm2_"],"entropy":4,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"frameio-api-token","regex":"fio-u-[a-z0-9\\-_=A-Z]{64}","flags":"","keywords":["fio-u-"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"freshbooks-access-token","regex":"[\\w.\\-]{0,50}?(?:freshbooks)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{64})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["freshbooks"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"gcp-api-key","regex":"\\b(AIza[\\w\\-]{35})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["aiza"],"entropy":4,"secretGroup":0,"allowlists":[{"condition":"OR","regexTarget":"secret","regexes":[{"regex":"AIzaSyabcdefghijklmnopqrstuvwxyz1234567","flags":""},{"regex":"AIzaSyAnLA7NfeLquW1tJFpx_eQCxoX-oo6YyIs","flags":""},{"regex":"AIzaSyCkEhVjf3pduRDt6d1yKOMitrUEke8agEM","flags":""},{"regex":"AIzaSyDMAScliyLx7F0NPDEJi1QmyCgHIAODrlU","flags":""},{"regex":"AIzaSyD3asb-2pEZVqMkmL6M9N6nHZRR_znhrh0","flags":""},{"regex":"AIzayDNSXIbFmlXbIE6mCzDLQAqITYefhixbX4A","flags":""},{"regex":"AIzaSyAdOS2zB6NCsk1pCdZ4-P6GBdi_UUPwX7c","flags":""},{"regex":"AIzaSyASWm6HmTMdYWpgMnjRBjxcQ9CKctWmLd4","flags":""},{"regex":"AIzaSyANUvH9H9BsUccjsu2pCmEkOPjjaXeDQgY","flags":""},{"regex":"AIzaSyA5_iVawFQ8ABuTZNUdcwERLJv_a_p4wtM","flags":""},{"regex":"AIzaSyA4UrcGxgwQFTfaI3no3t7Lt1sjmdnP5sQ","flags":""},{"regex":"AIzaSyDSb51JiIcB6OJpwwMicseKRhhrOq1cS7g","flags":""},{"regex":"AIzaSyBF2RrAIm4a0mO64EShQfqfd2AFnzAvvuU","flags":""},{"regex":"AIzaSyBcE-OOIbhjyR83gm4r2MFCu4MJmprNXsw","flags":""},{"regex":"AIzaSyB8qGxt4ec15vitgn44duC5ucxaOi4FmqE","flags":""},{"regex":"AIzaSyA8vmApnrHNFE0bApF4hoZ11srVL_n0nvY","flags":""}],"stopwords":[]}],"tier":"standard"},
- {"id":"generic-api-key","regex":"[\\w.\\-]{0,50}?(?:[aA][cC][cC][eE][sS][sS]|[aA][uU][tT][hH]|(?:[Aa]pi|API)|[cC][rR][eE][dD][eE][nN][tT][iI][aA][lL]|[cC][rR][eE][dD][sS]|[kK][eE][yY]|[pP][aA][sS][sS][wW](?:[oO][rR])?[dD]|[sS][eE][cC][rR][eE][tT]|[tT][oO][kK][eE][nN])(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([\\w.=\\-]{10,150}|[a-z0-9A-Z][a-z0-9+/A-Z]{11,}={0,3})(?:[\\x60'\"\\s;]|\\\\[nrNR]|$)","flags":"","keywords":["access","api","auth","key","credential","creds","passwd","password","secret","token"],"entropy":3.5,"secretGroup":0,"allowlists":[{"condition":"OR","regexTarget":"secret","regexes":[{"regex":"^[a-zA-Z_.\\-]+$","flags":""}],"stopwords":[]},{"condition":"OR","regexTarget":"match","regexes":[{"regex":"(?:[aA][cC][cC][eE][sS][sS](?:[iI][bB][iI][lL][iI][tT][yY]|[oO][rR])|[aA][cC][cC][eE][sS][sS][_.\\-]?[iI][dD]|[rR][aA][nN][dD][oO][mM][_.\\-]?[aA][cC][cC][eE][sS][sS]|[aA][pP][iI][_.\\-]?(?:[iI][dD]|[nN][aA][mM][eE]|[vV][eE][rR][sS][iI][oO][nN])|[rR][aA][pP][iI][dD]|[cC][aA][pP][iI][tT][aA][lL]|[a-z0-9\\-A-Z]*?[aA][pP][iI][a-z0-9\\-A-Z]*?:[jJ][aA][rR]:|[aA][uU][tT][hH][oO][rR]|[Xx]-[Mm][Ss]-[Ee][xX][cC][hH][aA][nN][gG][eE]-[Oo][rR][gG][aA][nN][iI][zZ][aA][tT][iI][oO][nN]-[Aa][uU][tT][hH]|[Aa][uU][tT][hH][eE][nN][tT][iI][cC][aA][tT][iI][oO][nN]-[Rr][eE][sS][uU][lL][tT][sS]|(?:[cC][rR][eE][dD][eE][nN][tT][iI][aA][lL][sS]?[_.\\-]?[iI][dD]|[wW][iI][tT][hH][Cc][rR][eE][dD][eE][nN][tT][iI][aA][lL][sS])|(?:[bB][uU][cC][kK][eE][tT]|[fF][oO][rR][eE][iI][gG][nN]|[hH][oO][tT]|[iI][dD][xX]|[nN][aA][tT][uU][rR][aA][lL]|[pP][rR][iI][mM][aA][rR][yY]|[pP][uU][bB](?:[lL][iI][cC])?|[sS][cC][hH][eE][mM][aA]|[sS][eE][qQ][uU][eE][nN][cC][eE])[_.\\-]?[kK][eE][yY]|(?:[tT][uU][rR][kK][eE][yY])|[kK][eE][yY][_.\\-]?(?:[aA][lL][iI][aA][sS]|[bB][oO][aA][rR][dD]|[cC][oO][dD][eE]|[fF][rR][aA][mM][eE]|[iI][dD]|[lL][eE][nN][gG][tT][hH]|[mM][eE][sS][hH]|[nN][aA][mM][eE]|[pP][aA][iI][rR]|[pP][rR][eE][sS][sS](?:[eE][dD])?|[rR][iI][nN][gG]|[sS][eE][lL][eE][cC][tT][oO][rR]|[sS][iI][gG][nN][aA][tT][uU][rR][eE]|[sS][iI][zZ][eE]|[sS][tT][oO][nN][eE]|[sS][tT][oO][rR][eE][tT][yY][pP][eE]|[wW][oO][rR][dD]|[uU][pP]|[dD][oO][wW][nN]|[lL][eE][fF][tT]|[rR][iI][gG][hH][tT])|[kK][eE][yY][_.\\-]?[vV][aA][uU][lL][tT][_.\\-]?(?:[iI][dD]|[nN][aA][mM][eE])|[kK][eE][yY][Vv][aA][uU][lL][tT][Tt][oO][Ss][tT][oO][rR][eE][Ss][eE][cC][rR][eE][tT][sS]|[kK][eE][yY](?:[sS][tT][oO][rR][eE]|[tT][aA][bB])[_.\\-]?(?:[fF][iI][lL][eE]|[pP][aA][tT][hH])|[iI][sS][sS][uU][eE][rR][kK][eE][yY][hH][aA][sS][hH]|(?:[DdMm]onkey|[DM]ONKEY)|[kK][eE][yY][iI][nN][gG]|(?:[sS][eE][cC][rR][eE][tT])[_.\\-]?(?:[lL][eE][nN][gG][tT][hH]|[nN][aA][mM][eE]|[sS][iI][zZ][eE])|[Uu][sS][eE][rR][Ss][eE][cC][rR][eE][tT][sS][Ii][dD]|(?:[cC][sS][rR][fF])[_.\\-]?[tT][oO][kK][eE][nN]|(?:[iI][oO]\\.[jJ][sS][oO][nN][wW][eE][bB][tT][oO][kK][eE][nN][ \\t]?:[ \\t]?[\\w\\-]+)|(?:[aA][pP][iI]|[cC][rR][eE][dD][eE][nN][tT][iI][aA][lL][sS]|[tT][oO][kK][eE][nN])[_.\\-]?(?:[eE][nN][dD][pP][oO][iI][nN][tT]|[uU][rR][ilIL])|[pP][uU][bB][lL][iI][cC][_.\\-]?[tT][oO][kK][eE][nN]|(?:[kK][eE][yY]|[tT][oO][kK][eE][nN])[_.\\-]?[fF][iI][lL][eE]|(?:(?:[A-Z_]+=\\n[A-Z_]+=|[a-z_]+=\\n[a-z_]+=)(?:\\n|$))|(?:(?:[A-Z.]+=\\n[A-Z.]+=|[a-z.]+=\\n[a-z.]+=)(?:\\n|$)))","flags":""}],"stopwords":["000000","6fe4476ee5a1832882e326b506d14126","_ec2_","aaaaaa","about","abstract","academy","acces","account","act-","act.","act_","action","active","actively","activity","adapter","add-","add-on","add.","add_","addon","addres","admin","adobe","advanced","adventure","agent","agile","air-","air.","air_","ajax","akka","alert","alfred","algorithm","all-","all.","all_","alloy","alpha","amazon","amqp","analysi","analytic","analyzer","android","angular","angularj","animate","animation","another","ansible","answer","ant-","ant.","ant_","any-","any.","any_","apache","app-","app.","app_","apple","arch","archive","archived","arduino","array","art-","art.","art_","article","asp-","asp.","asp_","asset","async","atom","attention","audio","audit","aura","auth","author","authorize","auto","automated","automatic","awesome","aws_","azure","back","backbone","backend","backup","bar-","bar.","bar_","base","based","bash","basic","batch","been","beer","behavior","being","benchmark","best","beta","better","big-","big.","big_","binary","binding","bit-","bit.","bit_","bitcoin","block","blog","board","book","bookmark","boost","boot","bootstrap","bosh","bot-","bot.","bot_","bower","box-","box.","box_","boxen","bracket","branch","bridge","browser","brunch","buffer","bug-","bug.","bug_","build","builder","building","buildout","buildpack","built","bundle","busines","but-","but.","but_","button","cache","caching","cakephp","calendar","call","camera","campfire","can-","can.","can_","canva","captcha","capture","card","carousel","case","cassandra","cat-","cat.","cat_","category","center","cento","challenge","change","changelog","channel","chart","chat","cheat","check","checker","chef","ches","chinese","chosen","chrome","ckeditor","clas","classe","classic","clean","cli-","cli.","cli_","client","clojure","clone","closure","cloud","club","cluster","cms-","cms_","coco","code","coding","coffee","color","combination","combo","command","commander","comment","commit","common","community","compas","compiler","complete","component","composer","computer","computing","con-","con.","con_","concept","conf","config","connect","connector","console","contact","container","contao","content","contest","context","control","convert","converter","conway'","cookbook","cookie","cool","copy","cordova","core","couchbase","couchdb","countdown","counter","course","craft","crawler","create","creating","creator","credential","crm-","crm.","crm_","cros","crud","csv-","csv.","csv_","cube","cucumber","cuda","current","currently","custom","daemon","dark","dart","dash","dashboard","data","database","date","day-","day.","day_","dead","debian","debug","debugger","deck","define","del-","del.","del_","delete","demo","deploy","design","designer","desktop","detection","detector","dev-","dev.","dev_","develop","developer","device","devise","diff","digital","directive","directory","discovery","display","django","dns-","dns_","doc-","doc.","doc_","docker","docpad","doctrine","document","doe-","doe.","doe_","dojo","dom-","dom.","dom_","domain","don't","done","dot-","dot.","dot_","dotfile","download","draft","drag","drill","drive","driven","driver","drop","dropbox","drupal","dsl-","dsl.","dsl_","dynamic","easy","ecdsa","eclipse","edit","editing","edition","editor","element","emac","email","embed","embedded","ember","emitter","emulator","encoding","endpoint","engine","english","enhanced","entity","entry","env_","episode","erlang","error","espresso","event","evented","example","exchange","exercise","experiment","expire","exploit","explorer","export","exporter","expres","ext-","ext.","ext_","extended","extension","external","extra","extractor","fabric","facebook","factory","fake","fast","feature","feed","fewfwef","ffmpeg","field","file","filter","find","finder","firefox","firmware","first","fish","fix-","fix_","flash","flask","flat","flex","flexible","flickr","flow","fluent","fluentd","fluid","folder","font","force","foreman","fork","form","format","formatter","forum","foundry","framework","free","friend","friendly","front-end","frontend","ftp-","ftp.","ftp_","fuel","full","fun-","fun.","fun_","func","future","gaia","gallery","game","gateway","gem-","gem.","gem_","gen-","gen.","gen_","general","generator","generic","genetic","get-","get.","get_","getenv","getting","ghost","gist","git-","git.","git_","github","gitignore","gitlab","glas","gmail","gnome","gnu-","gnu.","gnu_","goal","golang","gollum","good","google","gpu-","gpu.","gpu_","gradle","grail","graph","graphic","great","grid","groovy","group","grunt","guard","gui-","gui.","gui_","guide","guideline","gulp","gwt-","gwt.","gwt_","hack","hackathon","hacker","hacking","hadoop","haml","handler","hardware","has-","has_","hash","haskell","have","haxe","hello","help","helper","here","hero","heroku","high","hipchat","history","home","homebrew","homepage","hook","host","hosting","hot-","hot.","hot_","house","how-","how.","how_","html","http","hub-","hub.","hub_","hubot","human","icon","ide-","ide.","ide_","idea","identity","idiomatic","image","impact","import","important","importer","impres","index","infinite","info","injection","inline","input","inside","inspector","instagram","install","installer","instant","intellij","interface","internet","interview","into","intro","ionic","iphone","ipython","irc-","irc_","iso-","iso.","iso_","issue","jade","jasmine","java","jbos","jekyll","jenkin","jetbrains","job-","job.","job_","joomla","jpa-","jpa.","jpa_","jquery","json","just","kafka","karma","kata","kernel","keyboard","kindle","kit-","kit.","kit_","kitchen","knife","koan","kohana","lab-","lab.","lab_","lambda","lamp","language","laravel","last","latest","latex","launcher","layer","layout","lazy","ldap","leaflet","league","learn","learning","led-","led.","led_","leetcode","les-","les.","les_","level","leveldb","lib-","lib.","lib_","librarie","library","license","life","liferay","light","lightbox","like","line","link","linked","linkedin","linux","lisp","list","lite","little","load","loader","local","location","lock","log-","log.","log_","logger","logging","logic","login","logstash","longer","look","love","lua-","lua.","lua_","mac-","mac.","mac_","machine","made","magento","magic","mail","make","maker","making","man-","man.","man_","manage","manager","manifest","manual","map-","map.","map_","mapper","mapping","markdown","markup","master","math","matrix","maven","md5","mean","media","mediawiki","meetup","memcached","memory","menu","merchant","message","messaging","meta","metadata","meteor","method","metric","micro","middleman","migration","minecraft","miner","mini","minimal","mirror","mit-","mit.","mit_","mobile","mocha","mock","mod-","mod.","mod_","mode","model","modern","modular","module","modx","money","mongo","mongodb","mongoid","mongoose","monitor","monkey","more","motion","moved","movie","mozilla","mqtt","mule","multi","multiple","music","mustache","mvc-","mvc.","mvc_","mysql","nagio","name","native","need","neo-","neo.","neo_","nest","nested","net-","net.","net_","nette","network","new-","new.","new_","next","nginx","ninja","nlp-","nlp.","nlp_","node","nodej","nosql","not-","not.","not_","note","notebook","notepad","notice","notifier","now-","now.","now_","number","oauth","object","objective","obsolete","ocaml","octopres","official","old-","old.","old_","onboard","online","only","open","opencv","opengl","openshift","openwrt","option","oracle","org-","org.","org_","origin","original","orm-","orm.","orm_","osx-","osx_","our-","our.","our_","out-","out.","out_","output","over","overview","own-","own.","own_","pack","package","packet","page","panel","paper","paperclip","para","parallax","parallel","parse","parser","parsing","particle","party","password","patch","path","pattern","payment","paypal","pdf-","pdf.","pdf_","pebble","people","perl","personal","phalcon","phoenix","phone","phonegap","photo","php-","php.","php_","physic","picker","pipeline","platform","play","player","please","plu-","plu.","plu_","plug-in","plugin","plupload","png-","png.","png_","poker","polyfill","polymer","pool","pop-","pop.","pop_","popcorn","popup","port","portable","portal","portfolio","post","power","powered","powerful","prelude","pretty","preview","principle","print","pro-","pro.","pro_","problem","proc","product","profile","profiler","program","progres","project","protocol","prototype","provider","proxy","public","pull","puppet","pure","purpose","push","pusher","pyramid","python","quality","query","queue","quick","rabbitmq","rack","radio","rail","railscast","random","range","raspberry","rdf-","rdf.","rdf_","react","reactive","read","reader","readme","ready","real","real-time","reality","realtime","recipe","recorder","red-","red.","red_","reddit","redi","redmine","reference","refinery","refresh","registry","related","release","remote","rendering","repo","report","request","require","required","requirej","research","resource","response","resque","rest","restful","resume","reveal","reverse","review","riak","rich","right","ring","robot","role","room","router","routing","rpc-","rpc.","rpc_","rpg-","rpg.","rpg_","rspec","ruby-","ruby.","ruby_","rule","run-","run.","run_","runner","running","runtime","rust","rvm-","rvm.","rvm_","salt","sample","sandbox","sas-","sas.","sas_","sbt-","sbt.","sbt_","scala","scalable","scanner","schema","scheme","school","science","scraper","scratch","screen","script","scroll","scs-","scs.","scs_","sdk-","sdk.","sdk_","sdl-","sdl.","sdl_","search","secure","security","see-","see.","see_","seed","select","selector","selenium","semantic","sencha","send","sentiment","serie","server","service","session","set-","set.","set_","setting","setup","sha1","sha2","sha256","share","shared","sharing","sheet","shell","shield","shipping","shop","shopify","shortener","should","show","showcase","side","silex","simple","simulator","single","site","skeleton","sketch","skin","slack","slide","slider","slim","small","smart","smtp","snake","snapshot","snippet","soap","social","socket","software","solarized","solr","solution","solver","some","soon","source","space","spark","spatial","spec","sphinx","spine","spotify","spree","spring","sprite","sql-","sql.","sql_","sqlite","ssh-","ssh.","ssh_","stack","staging","standard","stanford","start","started","starter","startup","stat","statamic","state","static","statistic","statsd","statu","steam","step","still","stm-","stm.","stm_","storage","store","storm","story","strategy","stream","streaming","string","stripe","structure","studio","study","stuff","style","sublime","sugar","suite","summary","super","support","supported","svg-","svg.","svg_","svn-","svn.","svn_","swagger","swift","switch","switcher","symfony","symphony","sync","synopsi","syntax","system","tab-","tab.","tab_","table","tag-","tag.","tag_","talk","target","task","tcp-","tcp.","tcp_","tdd-","tdd.","tdd_","team","tech","template","term","terminal","testing","tetri","text","textmate","theme","theory","three","thrift","time","timeline","timer","tiny","tinymce","tip-","tip.","tip_","title","todo","todomvc","token","tool","toolbox","toolkit","top-","top.","top_","tornado","touch","tower","tracker","tracking","traffic","training","transfer","translate","transport","tree","trello","try-","try.","try_","tumblr","tut-","tut.","tut_","tutorial","tweet","twig","twitter","type","typo","ubuntu","uiview","ultimate","under","unit","unity","universal","unix","update","updated","upgrade","upload","uploader","uri-","uri.","uri_","url-","url.","url_","usage","usb-","usb.","usb_","use-","use.","use_","used","useful","user","using","util","utilitie","utility","vagrant","validator","value","variou","varnish","version","via-","via.","via_","video","view","viewer","vim-","vim.","vim_","vimrc","virtual","vision","visual","vpn","want","warning","watch","watcher","wave","way-","way.","way_","weather","web-","web_","webapp","webgl","webhook","webkit","webrtc","website","websocket","welcome","what","what'","when","where","which","why-","why.","why_","widget","wifi","wiki","win-","win.","win_","window","wip-","wip.","wip_","within","without","wizard","word","wordpres","work","worker","workflow","working","workshop","world","wrapper","write","writer","writing","written","www-","www.","www_","xamarin","xcode","xml-","xml.","xml_","xmpp","xxxxxx","yahoo","yaml","yandex","yeoman","yet-","yet.","yet_","yii-","yii.","yii_","youtube","yui-","yui.","yui_","zend","zero","zip-","zip.","zip_","zsh-","zsh.","zsh_"]},{"condition":"OR","regexTarget":"line","regexes":[{"regex":"--mount=type=secret,","flags":""},{"regex":"import[ \\t]+{[ \\t\\w,]+}[ \\t]+from[ \\t]+['\"][^'\"]+['\"]","flags":""}],"stopwords":[]}],"tier":"strict"},
- {"id":"github-app-token","regex":"(?:ghu|ghs)_[0-9a-zA-Z]{36}","flags":"","keywords":["ghu_","ghs_"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"github-fine-grained-pat","regex":"github_pat_\\w{82}","flags":"","keywords":["github_pat_"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"github-oauth","regex":"gho_[0-9a-zA-Z]{36}","flags":"","keywords":["gho_"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"github-pat","regex":"ghp_[0-9a-zA-Z]{36}","flags":"","keywords":["ghp_"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"github-refresh-token","regex":"ghr_[0-9a-zA-Z]{36}","flags":"","keywords":["ghr_"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"gitlab-cicd-job-token","regex":"glcbt-[0-9a-zA-Z]{1,5}_[0-9a-zA-Z_\\-]{20}","flags":"","keywords":["glcbt-"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"gitlab-deploy-token","regex":"gldt-[0-9a-zA-Z_\\-]{20}","flags":"","keywords":["gldt-"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"gitlab-feature-flag-client-token","regex":"glffct-[0-9a-zA-Z_\\-]{20}","flags":"","keywords":["glffct-"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"gitlab-feed-token","regex":"glft-[0-9a-zA-Z_\\-]{20}","flags":"","keywords":["glft-"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"gitlab-incoming-mail-token","regex":"glimt-[0-9a-zA-Z_\\-]{25}","flags":"","keywords":["glimt-"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"gitlab-kubernetes-agent-token","regex":"glagent-[0-9a-zA-Z_\\-]{50}","flags":"","keywords":["glagent-"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"gitlab-oauth-app-secret","regex":"gloas-[0-9a-zA-Z_\\-]{64}","flags":"","keywords":["gloas-"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"gitlab-pat","regex":"glpat-[\\w\\-]{20}","flags":"","keywords":["glpat-"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"gitlab-pat-routable","regex":"\\bglpat-[0-9a-zA-Z_\\-]{27,300}\\.[0-9a-z]{2}[0-9a-z]{7}\\b","flags":"","keywords":["glpat-"],"entropy":4,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"gitlab-ptt","regex":"glptt-[0-9a-f]{40}","flags":"","keywords":["glptt-"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"gitlab-rrt","regex":"GR1348941[\\w\\-]{20}","flags":"","keywords":["gr1348941"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"gitlab-runner-authentication-token","regex":"glrt-[0-9a-zA-Z_\\-]{20}","flags":"","keywords":["glrt-"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"gitlab-runner-authentication-token-routable","regex":"\\bglrt-t\\d_[0-9a-zA-Z_\\-]{27,300}\\.[0-9a-z]{2}[0-9a-z]{7}\\b","flags":"","keywords":["glrt-"],"entropy":4,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"gitlab-scim-token","regex":"glsoat-[0-9a-zA-Z_\\-]{20}","flags":"","keywords":["glsoat-"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"gitlab-session-cookie","regex":"_gitlab_session=[0-9a-z]{32}","flags":"","keywords":["_gitlab_session="],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"gitter-access-token","regex":"[\\w.\\-]{0,50}?(?:gitter)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9_\\-]{40})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["gitter"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"gocardless-api-token","regex":"[\\w.\\-]{0,50}?(?:gocardless)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}(live_[a-z0-9\\-_=A-Z]{40})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["live_","gocardless"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"grafana-api-key","regex":"\\b(eyJrIjoi[A-Za-z0-9]{70,400}={0,3})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["eyjrijoi"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"grafana-cloud-api-token","regex":"\\b(glc_[A-Za-z0-9+/]{32,400}={0,3})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["glc_"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"grafana-service-account-token","regex":"\\b(glsa_[A-Za-z0-9]{32}_[A-Fa-f0-9]{8})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["glsa_"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"harness-api-key","regex":"(?:pat|sat)\\.[a-zA-Z0-9_\\-]{22}\\.[a-zA-Z0-9]{24}\\.[a-zA-Z0-9]{20}","flags":"","keywords":["pat.","sat."],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"hashicorp-tf-api-token","regex":"[a-z0-9A-Z]{14}\\.(?:atlasv1)\\.[a-z0-9\\-_=A-Z]{60,70}","flags":"","keywords":["atlasv1"],"entropy":3.5,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"heroku-api-key","regex":"[\\w.\\-]{0,50}?(?:heroku)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["heroku"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"heroku-api-key-v2","regex":"\\b((HRKU-AA[0-9a-zA-Z_\\-]{58}))(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["hrku-aa"],"entropy":4,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"hubspot-api-key","regex":"[\\w.\\-]{0,50}?(?:hubspot)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["hubspot"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"huggingface-access-token","regex":"\\b(hf_(?:[a-zA-Z]{34}))(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["hf_"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"huggingface-organization-api-token","regex":"\\b(api_org_(?:[a-zA-Z]{34}))(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["api_org_"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"infracost-api-token","regex":"\\b(ico-[a-zA-Z0-9]{32})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["ico-"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"intercom-api-key","regex":"[\\w.\\-]{0,50}?(?:intercom)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9=_\\-]{60})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["intercom"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"intra42-client-secret","regex":"\\b(s-s4t2(?:ud|af)-[abcdef0123456789ABCDEF]{64})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["intra","s-s4t2ud-","s-s4t2af-"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"jfrog-api-key","regex":"[\\w.\\-]{0,50}?(?:jfrog|artifactory|bintray|xray)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{73})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["jfrog","artifactory","bintray","xray"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"jfrog-identity-token","regex":"[\\w.\\-]{0,50}?(?:jfrog|artifactory|bintray|xray)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{64})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["jfrog","artifactory","bintray","xray"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"jwt","regex":"\\b(ey[a-zA-Z0-9]{17,}\\.ey[a-zA-Z0-9\\/\\\\_\\-]{17,}\\.(?:[a-zA-Z0-9\\/\\\\_\\-]{10,}={0,2})?)(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["ey"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"jwt-base64","regex":"\\bZXlK(?:(?<alg>aGJHY2lPaU)|(?<apu>aGNIVWlPaU)|(?<apv>aGNIWWlPaU)|(?<aud>aGRXUWlPaU)|(?<b64>aU5qUWlP)|(?<crit>amNtbDBJanBi)|(?<cty>amRIa2lPaU)|(?<epk>bGNHc2lPbn)|(?<enc>bGJtTWlPaU)|(?<jku>cWEzVWlPaU)|(?<jwk>cWQyc2lPb)|(?<iss>cGMzTWlPaU)|(?<iv>cGRpSTZJ)|(?<kid>cmFXUWlP)|(?<key_ops>clpYbGZiM0J6SWpwY)|(?<kty>cmRIa2lPaUp)|(?<nonce>dWIyNWpaU0k2)|(?<p2c>d01tTWlP)|(?<p2s>d01uTWlPaU)|(?<ppt>d2NIUWlPaU)|(?<sub>emRXSWlPaU)|(?<svt>emRuUWlP)|(?<tag>MFlXY2lPaU)|(?<typ>MGVYQWlPaUp)|(?<url>MWNtd2l)|(?<use>MWMyVWlPaUp)|(?<ver>MlpYSWlPaU)|(?<version>MlpYSnphVzl1SWpv)|(?<x>NElqb2)|(?<x5c>NE5XTWlP)|(?<x5t>NE5YUWlPaU)|(?<x5ts256>NE5YUWpVekkxTmlJNkl)|(?<x5u>NE5YVWlPaU)|(?<zip>NmFYQWlPaU))[a-zA-Z0-9\\/\\\\_+\\-\\r\\n]{40,}={0,2}","flags":"","keywords":["zxlk"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"kraken-access-token","regex":"[\\w.\\-]{0,50}?(?:kraken)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9\\/=_\\+\\-]{80,90})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["kraken"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"kucoin-access-token","regex":"[\\w.\\-]{0,50}?(?:kucoin)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-f0-9]{24})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["kucoin"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"kucoin-secret-key","regex":"[\\w.\\-]{0,50}?(?:kucoin)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["kucoin"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"launchdarkly-access-token","regex":"[\\w.\\-]{0,50}?(?:launchdarkly)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9=_\\-]{40})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["launchdarkly"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"linear-api-key","regex":"lin_api_[a-z0-9A-Z]{40}","flags":"","keywords":["lin_api_"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"linear-client-secret","regex":"[\\w.\\-]{0,50}?(?:linear)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-f0-9]{32})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["linear"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"linkedin-client-id","regex":"[\\w.\\-]{0,50}?(?:linked[_\\-]?in)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{14})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["linkedin","linked_in","linked-in"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"linkedin-client-secret","regex":"[\\w.\\-]{0,50}?(?:linked[_\\-]?in)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{16})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["linkedin","linked_in","linked-in"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"lob-api-key","regex":"[\\w.\\-]{0,50}?(?:lob)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}((live|test)_[a-f0-9]{35})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["test_","live_"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"lob-pub-api-key","regex":"[\\w.\\-]{0,50}?(?:lob)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}((test|live)_pub_[a-f0-9]{31})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["test_pub","live_pub","_pub"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"looker-client-id","regex":"[\\w.\\-]{0,50}?(?:looker)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{20})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["looker"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"looker-client-secret","regex":"[\\w.\\-]{0,50}?(?:looker)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{24})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["looker"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"mailchimp-api-key","regex":"[\\w.\\-]{0,50}?(?:MailchimpSDK[^\\n]initialize|mailchimp)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-f0-9]{32}-us\\d\\d)(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["mailchimp"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"mailgun-private-api-token","regex":"[\\w.\\-]{0,50}?(?:mailgun)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}(key-[a-f0-9]{32})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["mailgun"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"mailgun-pub-key","regex":"[\\w.\\-]{0,50}?(?:mailgun)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}(pubkey-[a-f0-9]{32})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["mailgun"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"mailgun-signing-key","regex":"[\\w.\\-]{0,50}?(?:mailgun)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-h0-9]{32}-[a-h0-9]{8}-[a-h0-9]{8})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["mailgun"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"mapbox-api-token","regex":"[\\w.\\-]{0,50}?(?:mapbox)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}(pk\\.[a-z0-9]{60}\\.[a-z0-9]{22})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["mapbox"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"mattermost-access-token","regex":"[\\w.\\-]{0,50}?(?:mattermost)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{26})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["mattermost"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"maxmind-license-key","regex":"\\b([A-Za-z0-9]{6}_[A-Za-z0-9]{29}_mmk)(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["_mmk"],"entropy":4,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"messagebird-api-token","regex":"[\\w.\\-]{0,50}?(?:message[_\\-]?bird)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{25})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["messagebird","message-bird","message_bird"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"messagebird-client-id","regex":"[\\w.\\-]{0,50}?(?:message[_\\-]?bird)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["messagebird","message-bird","message_bird"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"microsoft-teams-webhook","regex":"https://[a-z0-9]+\\.webhook\\.office\\.com/webhookb2/[a-z0-9]{8}-([a-z0-9]{4}-){3}[a-z0-9]{12}@[a-z0-9]{8}-([a-z0-9]{4}-){3}[a-z0-9]{12}/IncomingWebhook/[a-z0-9]{32}/[a-z0-9]{8}-([a-z0-9]{4}-){3}[a-z0-9]{12}","flags":"","keywords":["webhook.office.com","webhookb2","incomingwebhook"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"netlify-access-token","regex":"[\\w.\\-]{0,50}?(?:netlify)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9=_\\-]{40,46})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["netlify"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"new-relic-browser-api-token","regex":"[\\w.\\-]{0,50}?(?:new-relic|newrelic|new_relic)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}(NRJS-[a-f0-9]{19})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["nrjs-"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"new-relic-insert-key","regex":"[\\w.\\-]{0,50}?(?:new-relic|newrelic|new_relic)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}(NRII-[a-z0-9\\-]{32})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["nrii-"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"new-relic-user-api-id","regex":"[\\w.\\-]{0,50}?(?:new-relic|newrelic|new_relic)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{64})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["new-relic","newrelic","new_relic"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"new-relic-user-api-key","regex":"[\\w.\\-]{0,50}?(?:new-relic|newrelic|new_relic)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}(NRAK-[a-z0-9]{27})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["nrak"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"notion-api-token","regex":"\\b(ntn_[0-9]{11}[A-Za-z0-9]{32}[A-Za-z0-9]{3})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["ntn_"],"entropy":4,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"npm-access-token","regex":"\\b(npm_[a-z0-9]{36})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["npm_"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"nytimes-access-token","regex":"[\\w.\\-]{0,50}?(?:nytimes|new-york-times,|newyorktimes)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9=_\\-]{32})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["nytimes","new-york-times","newyorktimes"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"octopus-deploy-api-key","regex":"\\b(API-[A-Z0-9]{26})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["api-"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"openai-api-key","regex":"\\b(sk-(?:proj|svcacct|admin)-(?:[A-Za-z0-9_\\-]{74}|[A-Za-z0-9_\\-]{58})T3BlbkFJ(?:[A-Za-z0-9_\\-]{74}|[A-Za-z0-9_\\-]{58})\\b|sk-[a-zA-Z0-9]{20}T3BlbkFJ[a-zA-Z0-9]{20})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["t3blbkfj"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"openshift-user-token","regex":"\\b(sha256~[\\w\\-]{43})(?:[^\\w\\-]|$)","flags":"","keywords":["sha256~"],"entropy":3.5,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"perplexity-api-key","regex":"\\b(pplx-[a-zA-Z0-9]{48})(?:[\\x60'\"\\s;]|\\\\[nr]|$|\\b)","flags":"","keywords":["pplx-"],"entropy":4,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"plaid-api-token","regex":"[\\w.\\-]{0,50}?(?:plaid)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}(access-(?:sandbox|development|production)-[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["plaid"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"plaid-client-id","regex":"[\\w.\\-]{0,50}?(?:plaid)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{24})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["plaid"],"entropy":3.5,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"plaid-secret-key","regex":"[\\w.\\-]{0,50}?(?:plaid)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{30})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["plaid"],"entropy":3.5,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"planetscale-api-token","regex":"\\b(pscale_tkn_[\\w=\\.\\-]{32,64})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["pscale_tkn_"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"planetscale-oauth-token","regex":"\\b(pscale_oauth_[\\w=\\.\\-]{32,64})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["pscale_oauth_"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"planetscale-password","regex":"\\b(pscale_pw_[\\w=\\.\\-]{32,64})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["pscale_pw_"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"postman-api-token","regex":"\\b(PMAK-[a-f0-9A-F]{24}\\-[a-f0-9A-F]{34})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["pmak-"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"prefect-api-token","regex":"\\b(pnu_[a-zA-Z0-9]{36})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["pnu_"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"private-key","regex":"-----BEGIN[ A-Z0-9_\\-]{0,100}PRIVATE KEY(?: BLOCK)?-----[\\s\\S\\-]{64,}?KEY(?: BLOCK)?-----","flags":"i","keywords":["-----begin"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"pulumi-api-token","regex":"\\b(pul-[a-f0-9]{40})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["pul-"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"pypi-upload-token","regex":"pypi-AgEIcHlwaS5vcmc[\\w\\-]{50,1000}","flags":"","keywords":["pypi-ageichlwas5vcmc"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"rapidapi-access-token","regex":"[\\w.\\-]{0,50}?(?:rapidapi)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9_\\-]{50})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["rapidapi"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"readme-api-token","regex":"\\b(rdme_[a-z0-9]{70})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["rdme_"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"rubygems-api-token","regex":"\\b(rubygems_[a-f0-9]{48})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["rubygems_"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"scalingo-api-token","regex":"\\b(tk-us-[\\w\\-]{48})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["tk-us-"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"sendbird-access-id","regex":"[\\w.\\-]{0,50}?(?:sendbird)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["sendbird"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"sendbird-access-token","regex":"[\\w.\\-]{0,50}?(?:sendbird)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-f0-9]{40})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["sendbird"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"sendgrid-api-token","regex":"\\b(SG\\.[a-z0-9=_\\-\\.A-Z]{66})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["sg."],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"sendinblue-api-token","regex":"\\b(xkeysib-[a-f0-9]{64}\\-[a-z0-9A-Z]{16})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["xkeysib-"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"sentry-access-token","regex":"[\\w.\\-]{0,50}?(?:sentry)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-f0-9]{64})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["sentry"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"sentry-org-token","regex":"\\bsntrys_eyJpYXQiO[a-zA-Z0-9+/]{10,200}(?:LCJyZWdpb25fdXJs|InJlZ2lvbl91cmwi|cmVnaW9uX3VybCI6)[a-zA-Z0-9+/]{10,200}={0,2}_[a-zA-Z0-9+/]{43}(?:[^a-zA-Z0-9+/]|$)","flags":"","keywords":["sntrys_eyjpyxqio"],"entropy":4.5,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"sentry-user-token","regex":"\\b(sntryu_[a-f0-9]{64})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["sntryu_"],"entropy":3.5,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"settlemint-application-access-token","regex":"\\b(sm_aat_[a-zA-Z0-9]{16})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["sm_aat"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"settlemint-personal-access-token","regex":"\\b(sm_pat_[a-zA-Z0-9]{16})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["sm_pat"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"settlemint-service-access-token","regex":"\\b(sm_sat_[a-zA-Z0-9]{16})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["sm_sat"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"shippo-api-token","regex":"\\b(shippo_(?:live|test)_[a-fA-F0-9]{40})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["shippo_"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"shopify-access-token","regex":"shpat_[a-fA-F0-9]{32}","flags":"","keywords":["shpat_"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"shopify-custom-access-token","regex":"shpca_[a-fA-F0-9]{32}","flags":"","keywords":["shpca_"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"shopify-private-app-access-token","regex":"shppa_[a-fA-F0-9]{32}","flags":"","keywords":["shppa_"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"shopify-shared-secret","regex":"shpss_[a-fA-F0-9]{32}","flags":"","keywords":["shpss_"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"sidekiq-secret","regex":"[\\w.\\-]{0,50}?(?:BUNDLE_ENTERPRISE__CONTRIBSYS__COM|BUNDLE_GEMS__CONTRIBSYS__COM)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-f0-9]{8}:[a-f0-9]{8})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["bundle_enterprise__contribsys__com","bundle_gems__contribsys__com"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"sidekiq-sensitive-url","regex":"\\bhttps?://([a-f0-9]{8}:[a-f0-9]{8})@(?:gems[^\\n]contribsys[^\\n]com|enterprise[^\\n]contribsys[^\\n]com)(?:[\\/|\\#|\\?|:]|$)","flags":"i","keywords":["gems.contribsys.com","enterprise.contribsys.com"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"slack-app-token","regex":"xapp-\\d-[A-Z0-9]+-\\d+-[a-z0-9]+","flags":"i","keywords":["xapp"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"slack-bot-token","regex":"xoxb-[0-9]{10,13}-[0-9]{10,13}[a-zA-Z0-9\\-]*","flags":"","keywords":["xoxb"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"slack-config-access-token","regex":"xoxe[^\\n]xox[bp]-\\d-[A-Z0-9]{163,166}","flags":"i","keywords":["xoxe.xoxb-","xoxe.xoxp-"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"slack-config-refresh-token","regex":"xoxe-\\d-[A-Z0-9]{146}","flags":"i","keywords":["xoxe-"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"slack-legacy-bot-token","regex":"xoxb-[0-9]{8,14}-[a-zA-Z0-9]{18,26}","flags":"","keywords":["xoxb"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"slack-legacy-token","regex":"xox[os]-\\d+-\\d+-\\d+-[a-fA-F\\d]+","flags":"","keywords":["xoxo","xoxs"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"slack-legacy-workspace-token","regex":"xox[ar]-(?:\\d-)?[0-9a-zA-Z]{8,48}","flags":"","keywords":["xoxa","xoxr"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"slack-user-token","regex":"xox[pe](?:-[0-9]{10,13}){3}-[a-zA-Z0-9\\-]{28,34}","flags":"","keywords":["xoxp-","xoxe-"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"slack-webhook-url","regex":"(?:https?://)?hooks[^\\n]slack[^\\n]com/(?:services|workflows|triggers)/[A-Za-z0-9+/]{43,56}","flags":"","keywords":["hooks.slack.com"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"snyk-api-token","regex":"[\\w.\\-]{0,50}?(?:snyk[_.\\-]?(?:(?:api|oauth)[_.\\-]?)?(?:key|token))(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["snyk"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"sonar-api-token","regex":"[\\w.\\-]{0,50}?(?:sonar[_.\\-]?(login|token))(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}((?:squ_|sqp_|sqa_)?[a-z0-9=_\\-]{40})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["sonar"],"entropy":0,"secretGroup":2,"allowlists":[],"tier":"standard"},
- {"id":"sourcegraph-access-token","regex":"\\b(\\b(sgp_(?:[a-fA-F0-9]{16}|local)_[a-fA-F0-9]{40}|sgp_[a-fA-F0-9]{40}|[a-fA-F0-9]{40})\\b)(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["sgp_","sourcegraph"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"square-access-token","regex":"\\b((?:EAAA|sq0atp-)[\\w\\-]{22,60})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["sq0atp-","eaaa"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"squarespace-access-token","regex":"[\\w.\\-]{0,50}?(?:squarespace)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["squarespace"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"stripe-access-token","regex":"\\b((?:sk|rk)_(?:test|live|prod)_[a-zA-Z0-9]{10,99})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["sk_test","sk_live","sk_prod","rk_test","rk_live","rk_prod"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"sumologic-access-token","regex":"[\\w.\\-]{0,50}?(?:(?:[Ss]umo|SUMO))(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9A-Z]{64})(?:[\\x60'\"\\s;]|\\\\[nrNR]|$)","flags":"","keywords":["sumo"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"telegram-bot-api-token","regex":"[\\w.\\-]{0,50}?(?:[tT][eE][lL][eE][gG][rR])(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([0-9]{5,16}:(?:A)[a-z0-9_\\-A-Z]{34})(?:[\\x60'\"\\s;]|\\\\[nrNR]|$)","flags":"","keywords":["telegr"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"travisci-access-token","regex":"[\\w.\\-]{0,50}?(?:travis)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{22})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["travis"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"twilio-api-key","regex":"SK[0-9a-fA-F]{32}","flags":"","keywords":["sk"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"twitch-api-token","regex":"[\\w.\\-]{0,50}?(?:twitch)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{30})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["twitch"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"twitter-access-secret","regex":"[\\w.\\-]{0,50}?(?:twitter)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{45})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["twitter"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"twitter-access-token","regex":"[\\w.\\-]{0,50}?(?:twitter)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([0-9]{15,25}-[a-zA-Z0-9]{20,40})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["twitter"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"twitter-api-key","regex":"[\\w.\\-]{0,50}?(?:twitter)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{25})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["twitter"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"twitter-api-secret","regex":"[\\w.\\-]{0,50}?(?:twitter)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{50})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["twitter"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"twitter-bearer-token","regex":"[\\w.\\-]{0,50}?(?:twitter)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}(A{22}[a-zA-Z0-9%]{80,100})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["twitter"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"typeform-api-token","regex":"[\\w.\\-]{0,50}?(?:typeform)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}(tfp_[a-z0-9\\-_\\.=]{59})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["tfp_"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"vault-batch-token","regex":"\\b(hvb\\.[\\w\\-]{138,300})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["hvb."],"entropy":4,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"vault-service-token","regex":"\\b((?:hvs\\.[\\w\\-]{90,120}|s\\.(?:[a-z0-9A-Z]{24})))(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["hvs.","s."],"entropy":3.5,"secretGroup":0,"allowlists":[{"condition":"OR","regexTarget":"secret","regexes":[{"regex":"s\\.[A-Za-z]{24}","flags":""}],"stopwords":[]}],"tier":"standard"},
- {"id":"yandex-access-token","regex":"[\\w.\\-]{0,50}?(?:yandex)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}(t1\\.[A-Z0-9a-z_\\-]+[=]{0,2}\\.[A-Z0-9a-z_\\-]{86}[=]{0,2})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["yandex"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"yandex-api-key","regex":"[\\w.\\-]{0,50}?(?:yandex)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}(AQVN[A-Za-z0-9_\\-]{35,38})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["yandex"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"yandex-aws-access-token","regex":"[\\w.\\-]{0,50}?(?:yandex)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}(YC[a-zA-Z0-9_\\-]{38})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["yandex"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"zendesk-secret-key","regex":"[\\w.\\-]{0,50}?(?:zendesk)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{40})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["zendesk"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"openviking-gateway-key","regex":"(?<![A-Za-z0-9_-])(ovgw_[A-Za-z0-9_-]{43})(?![A-Za-z0-9_-])","flags":"","keywords":["ovgw_"],"entropy":3,"secretGroup":1,"allowlists":[],"tier":"standard"},
- {"id":"openviking-gateway-management-key","regex":"(?<![A-Za-z0-9_-])(ovgm_[A-Za-z0-9_-]{43})(?![A-Za-z0-9_-])","flags":"","keywords":["ovgm_"],"entropy":3,"secretGroup":1,"allowlists":[],"tier":"standard"},
- {"id":"openviking-oauth-access-token","regex":"(?<![A-Za-z0-9_-])(ovat_[A-Za-z0-9_-]{54})(?![A-Za-z0-9_-])","flags":"","keywords":["ovat_"],"entropy":3,"secretGroup":1,"allowlists":[],"tier":"standard"},
- {"id":"openviking-oauth-refresh-token","regex":"(?<![A-Za-z0-9_-])(ovrt_[A-Za-z0-9_-]{54})(?![A-Za-z0-9_-])","flags":"","keywords":["ovrt_"],"entropy":3,"secretGroup":1,"allowlists":[],"tier":"standard"},
- {"id":"openviking-oauth-auth-code","regex":"(?<![A-Za-z0-9_-])(ovac_[A-Za-z0-9_-]{54})(?![A-Za-z0-9_-])","flags":"","keywords":["ovac_"],"entropy":3,"secretGroup":1,"allowlists":[],"tier":"standard"},
-];
diff --git a/examples/memory-plugin-shared/redact.test.mjs b/examples/memory-plugin-shared/redact.test.mjs
deleted file mode 100644
index ee883f0af..000000000
--- a/examples/memory-plugin-shared/redact.test.mjs
+++ /dev/null
@@ -1,308 +0,0 @@
-import assert from "node:assert/strict";
-import { randomBytes } from "node:crypto";
-import { mkdir, mkdtemp, readFile, rm, stat, writeFile } from "node:fs/promises";
-import { tmpdir } from "node:os";
-import { join } from "node:path";
-import test from "node:test";
-
-import {
- DEFAULT_REDACT_TIER,
- REDACT_TIERS,
- compileRuleSet,
- loadInstallKey,
- normalizeRedactTier,
- redactPayload,
- redactPayloads,
- redactText,
- shannonEntropy,
-} from "./lib/redact.mjs";
-import SECRET_RULES, { GLOBAL_ALLOWLISTS } from "./lib/secret-rules.mjs";
-
-// Every fake credential is assembled at runtime so this file holds no
-// contiguous token for a secret scanner (or a push-protection hook) to trip on.
-const KEY = Buffer.alloc(32, 7);
-const opts = (extra = {}) => ({ key: KEY, ...extra });
-
-function randomish(length, alphabet, seed = 1) {
- let x = seed >>> 0;
- let out = "";
- for (let i = 0; i < length; i++) {
- x = (Math.imul(x, 1103515245) + 12345) >>> 0;
- out += alphabet[(x >>> 8) % alphabet.length];
- }
- return out;
-}
-
-const ALNUM = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
-const URLSAFE = `${ALNUM}_-`;
-const S = {
- githubPat: ["ghp", "_", randomish(36, ALNUM, 11)].join(""),
- aws: ["AK", "IA", randomish(16, "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567", 13)].join(""),
- openai: ["sk", "-proj-", randomish(74, URLSAFE, 14), "T3Blbk", "FJ", randomish(74, URLSAFE, 15)].join(""),
- anthropic: ["sk", "-ant-api03-", randomish(93, URLSAFE, 16), "AA"].join(""),
- slackBot: ["xo", "xb-", "1234567890", "-", "1234567890123", "-", randomish(24, ALNUM, 17)].join(""),
- google: ["AI", "za", randomish(35, URLSAFE, 18)].join(""),
- stripe: ["sk", "_live_", randomish(24, ALNUM, 19)].join(""),
- jwt: ["ey", "J", randomish(30, ALNUM, 20), ".ey", "J", randomish(40, ALNUM, 21), ".", randomish(43, URLSAFE, 22)].join(""),
-};
-const OV = {
- gateway: ["ov", "gw_", randomBytes(32).toString("base64url")].join(""),
- management: ["ov", "gm_", randomBytes(32).toString("base64url")].join(""),
- access: ["ov", "at_", randomBytes(40).toString("base64url")].join(""),
- refresh: ["ov", "rt_", randomBytes(40).toString("base64url")].join(""),
- code: ["ov", "ac_", randomBytes(40).toString("base64url")].join(""),
-};
-const PEM = [
- "-----BEGIN RSA ", "PRIVATE KEY-----\n",
- Array.from({ length: 6 }, (_, i) => randomish(64, `${ALNUM}+/`, 30 + i)).join("\n"),
- "\n-----END RSA ", "PRIVATE KEY-----",
-].join("");
-
-const PLACEHOLDER_RE = /\{\{ov_redacted:([a-z0-9-]+):([0-9a-f]{8})\}\}/g;
-const placeholders = (text) => [...String(text).matchAll(PLACEHOLDER_RE)].map((m) => m[1]);
-const tags = (text) => [...String(text).matchAll(PLACEHOLDER_RE)].map((m) => m[2]);
-
-test("every generated rule compiles on this Node", () => {
- assert.equal(compileRuleSet().rules.length, SECRET_RULES.length);
- for (const rule of SECRET_RULES) {
- assert.ok(["standard", "strict"].includes(rule.tier), rule.id);
- new RegExp(rule.regex, `${rule.flags}gd`);
- }
- for (const al of GLOBAL_ALLOWLISTS) for (const r of al.regexes) new RegExp(r.regex, r.flags);
-});
-
-test("gitleaks entropy matches Go's definition", () => {
- assert.equal(shannonEntropy(""), 0);
- assert.equal(shannonEntropy("aaaa"), 0);
- assert.equal(shannonEntropy("ab"), 1);
- // Divided by UTF-8 bytes, as Go's len(string) is.
- assert.ok(Math.abs(shannonEntropy("é") - 0.5) < 1e-12);
-});
-
-const POSITIVES = [
- ["github-pat", (s) => `my token is ${s} ok`, S.githubPat],
- ["aws-access-token", (s) => `export AWS_ACCESS_KEY_ID=${s}`, S.aws],
- ["openai-api-key", (s) => `OPENAI_API_KEY="${s}"`, S.openai],
- ["anthropic-api-key", (s) => `ANTHROPIC_API_KEY=${s}\n`, S.anthropic],
- ["slack-bot-token", (s) => `slack: ${s}`, S.slackBot],
- ["gcp-api-key", (s) => `key=${s};`, S.google],
- ["stripe-access-token", (s) => `stripe ${s} done`, S.stripe],
- ["jwt", (s) => `Authorization: ${s}\n`, S.jwt],
- ["private-key", (s) => `$ cat id_rsa\n${s}\n$ `, PEM],
- ["openviking-gateway-key", (s) => `"key": "${s}"`, OV.gateway],
- ["openviking-gateway-management-key", (s) => `management_key = ${s}\n`, OV.management],
- ["openviking-oauth-access-token", (s) => `Authorization: Bearer ${s}`, OV.access],
- ["openviking-oauth-refresh-token", (s) => `refresh_token=${s}&x=1`, OV.refresh],
- ["openviking-oauth-auth-code", (s) => `?code=${s}`, OV.code],
-];
-
-for (const [id, wrap, secret] of POSITIVES) {
- test(`standard redacts ${id} and keeps the text around it`, () => {
- const input = wrap(secret);
- const out = redactText(input, opts());
- assert.ok(!out.includes(secret), out);
- assert.deepEqual(placeholders(out), [id]);
- const [before, after] = input.split(secret);
- assert.ok(out.startsWith(before) && out.endsWith(after), out);
- });
-}
-
-test("OpenViking rules match only the exact token", () => {
- const body = OV.gateway.slice(5);
- for (const text of [
- `x${OV.gateway}`, // glued to a longer word
- `${OV.gateway}A`, // one character too long
- `ovgw_${body.slice(1)}`, // one too short
- `ovgw_${"Ab".repeat(21)}A`, // right shape, no entropy
- `ovat_${body}`, // a 43-character body is a gateway length, not an OAuth one
- ]) {
- assert.equal(redactText(text, opts()), text, text);
- }
-});
-
-test("hashes, ids and documented example keys are left alone", () => {
- for (const text of [
- "Merge commit 4b825dc642cb6eb9a060e54bf8d69288fbee4904 into main",
- "request id 123e4567-e89b-12d3-a456-426614174000 failed",
- "aws_access_key_id = AKIAIOSFODNN7EXAMPLE",
- "token: xxxxxxxxxxxxxxxxxxxxxxxx",
- "password = ${DB_PASSWORD}",
- ]) {
- assert.equal(redactText(text, opts({ tier: "strict" })), text, text);
- }
-});
-
-test("tiers: standard leaves KEY=value alone, strict adds generic-api-key, off does nothing", () => {
- assert.deepEqual(REDACT_TIERS, ["off", "standard", "strict"]);
- assert.equal(DEFAULT_REDACT_TIER, "standard");
- const env = `DATABASE_PASSWORD=${randomish(24, ALNUM, 40)}\nPORT=5432\n`;
- assert.equal(redactText(env, opts()), env);
- assert.match(redactText(env, opts({ tier: "strict" })), /^DATABASE_PASSWORD=\{\{ov_redacted:generic-api-key:[0-9a-f]{8}\}\}\nPORT=5432\n$/);
- const all = POSITIVES.map(([, wrap, s]) => wrap(s)).join("\n");
- assert.equal(redactText(all, opts({ tier: "off" })), all);
- // Cumulative: nothing standard redacts survives strict.
- const strict = redactText(all, opts({ tier: "strict" }));
- for (const [, , secret] of POSITIVES) assert.ok(!strict.includes(secret));
-});
-
-test("normalizeRedactTier maps off-ish values to off and unknown names to the default", () => {
- for (const v of [false, 0, "false", "0", "no", "off", " Off "]) assert.equal(normalizeRedactTier(v), "off", String(v));
- for (const v of ["standard", " STRICT "]) assert.equal(normalizeRedactTier(v), v.trim().toLowerCase());
- for (const v of [true, 1, "yes", "on", undefined, null, "", "paranoid", {}]) {
- assert.equal(normalizeRedactTier(v), "standard", String(v));
- }
- assert.equal(normalizeRedactTier("bogus", "strict"), "strict");
-});
-
-test("redaction is idempotent and the tag is stable per secret and key", () => {
- for (const tier of ["standard", "strict"]) {
- for (const [, wrap, s] of POSITIVES) {
- const once = redactText(wrap(s), opts({ tier }));
- assert.equal(redactText(once, opts({ tier })), once);
- }
- }
- const a = redactText(`one ${S.githubPat}`, opts());
- assert.deepEqual(tags(redactText(`two\n${S.githubPat}\n`, opts())), tags(a));
- assert.notDeepEqual(tags(redactText(`one ${S.githubPat}`, { key: Buffer.alloc(32, 9) })), tags(a));
- assert.notDeepEqual(tags(redactText(`one ${S.githubPat.slice(0, -1)}Q`, opts())), tags(a));
-});
-
-test("ov_privacy references and ov_redacted placeholders are never touched; look-alikes are", () => {
- for (const text of [
- "Authorization: Bearer {{ov_privacy:alice:viking://~/privacy/credential/github#/values/pat}}",
- "token={{ov_redacted:generic-api-key:0123abcd}}",
- "x {{ov_privacy:ambiguous}} y {{ ov_privacy:skill:github:pat }}",
- ]) {
- assert.equal(redactText(text, opts({ tier: "strict" })), text);
- }
- for (const fake of [`{{ov_privacy:${S.githubPat}}}`, `{{ov_redacted:github-pat:${S.githubPat}}}`]) {
- const out = redactText(fake, opts());
- assert.ok(!out.includes(S.githubPat), out);
- }
-});
-
-test("a scan that throws, or a payload that cannot be serialised, fails closed", () => {
- const broken = [{ id: "broken", regex: "(", flags: "", keywords: [], entropy: 0, secretGroup: 0, allowlists: [], tier: "standard" }];
- assert.match(redactText("hello", opts({ rules: broken })), /^\{\{ov_redacted:scan-failed:[0-9a-f]{8}\}\}$/);
-
- const cyclic = { role: "user", content: S.githubPat };
- cyclic.self = cyclic;
- assert.match(redactPayload(cyclic, opts()), /^\{\{ov_redacted:scan-failed:[0-9a-f]{8}\}\}$/);
-});
-
-test("text past maxChars is cut at whitespace and replaced, never sent unscanned", () => {
- const input = `token ${S.githubPat} ${"word ".repeat(150)}${"tail ".repeat(400)}${S.stripe}`;
- const out = redactText(input, opts({ maxChars: 1000 }));
- assert.ok(out.startsWith("token {{ov_redacted:github-pat:"));
- assert.match(out, / \{\{ov_redacted:scan-oversize:[0-9a-f]{8}\}\}$/);
- assert.ok(!out.includes(S.stripe) && out.length < 1100);
- assert.equal(redactText(out, opts({ maxChars: 1000 })), out);
-
- // A PEM block whose END line is past the cut goes whole into the oversize part.
- const pem = redactText(`${"word ".repeat(100)}\n${PEM}\n`, opts({ maxChars: 800 }));
- assert.match(pem, /^(?:word ){100}\n\{\{ov_redacted:scan-oversize:[0-9a-f]{8}\}\}$/);
-});
-
-test("one call scans at most maxTotalChars across its strings; the rest is cut", () => {
- const list = [
- { role: "user", content: `${"word ".repeat(150)}` },
- { role: "user", content: `token ${S.githubPat} ${"word ".repeat(100)}` },
- { role: "user", content: S.stripe, parts: [{ type: "text", text: "late" }] },
- ];
- const out = redactPayloads(list, opts({ maxTotalChars: 1000 }));
- assert.equal(out[0].content, list[0].content);
- assert.match(out[1].content, /^token \{\{ov_redacted:github-pat:[0-9a-f]{8}\}\} .* \{\{ov_redacted:scan-oversize:[0-9a-f]{8}\}\}$/);
- assert.match(out[2].content, /^\{\{ov_redacted:scan-oversize:[0-9a-f]{8}\}\}$/);
- assert.match(out[2].parts[0].text, /^\{\{ov_redacted:scan-oversize:[0-9a-f]{8}\}\}$/);
- // Replaying the cut payloads changes nothing.
- assert.deepEqual(redactPayloads(out, opts({ maxTotalChars: 1000 })), out);
-});
-
-test("redaction repeats until stable: a placeholder can expose a token glued behind it", () => {
- const out = redactText(`${S.githubPat}${S.aws}`, opts());
- assert.deepEqual(placeholders(out), ["github-pat", "aws-access-token"]);
- assert.equal(redactText(out, opts()), out);
-});
-
-test("redactPayload redacts text-bearing fields, copies metadata, and never mutates", () => {
- const input = Object.freeze({
- role: "user",
- peer_id: "peer-1",
- content: `here ${S.githubPat}`,
- parts: Object.freeze([
- Object.freeze({
- type: "tool",
- tool_id: "call_1",
- tool_name: "Bash",
- tool_input: Object.freeze({ command: `echo ${S.stripe}`, env: { DB_PASSWORD: randomish(24, ALNUM, 50), retries: 3 } }),
- tool_output: `OPENAI_API_KEY="${S.openai}"\n`,
- tool_output_sha256: "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
- }),
- Object.freeze({ type: "context", uri: "viking://user/memories/x", abstract: `note ${S.slackBot}` }),
- ]),
- });
- const out = redactPayload(input, opts());
- assert.equal(out.role, "user");
- assert.equal(out.peer_id, "peer-1");
- assert.deepEqual(placeholders(out.content), ["github-pat"]);
- const tool = out.parts[0];
- assert.equal(tool.tool_id, "call_1");
- assert.equal(tool.tool_output_sha256, input.parts[0].tool_output_sha256);
- assert.deepEqual(placeholders(tool.tool_input.command), ["stripe-access-token"]);
- assert.equal(tool.tool_input.env.retries, 3);
- assert.deepEqual(placeholders(tool.tool_output), ["openai-api-key"]);
- assert.equal(out.parts[1].uri, "viking://user/memories/x");
- assert.deepEqual(placeholders(out.parts[1].abstract), ["slack-bot-token"]);
- assert.ok(input.content.includes(S.githubPat));
- // Nested values are scanned as KEY=value, so strict catches a bare password.
- assert.equal(tool.tool_input.env.DB_PASSWORD, input.parts[0].tool_input.env.DB_PASSWORD);
- const strict = redactPayload(input, opts({ tier: "strict" }));
- assert.deepEqual(placeholders(strict.parts[0].tool_input.env.DB_PASSWORD), ["generic-api-key"]);
-});
-
-test("class instances are redacted as the data they serialise to", () => {
- class Args {
- constructor() {
- this.cmd = `echo ${S.githubPat}`;
- }
- }
- const out = redactPayload({ role: "assistant", parts: [{ type: "tool", tool_input: new Args(), tool_output: new String(S.githubPat) }] }, opts());
- assert.deepEqual(placeholders(JSON.stringify(out)), ["github-pat", "github-pat"]);
-});
-
-test("off leaves payloads as they are; redactPayloads maps a list", () => {
- const list = [{ role: "user", content: `t ${S.githubPat}` }, { role: "assistant", content: "fine" }];
- assert.equal(redactPayloads(list, opts({ tier: "off" })), list);
- assert.equal(redactPayload(list[0], opts({ tier: "off" })), list[0]);
- const out = redactPayloads(list, opts());
- assert.deepEqual(placeholders(out[0].content), ["github-pat"]);
- assert.equal(out[1].content, "fine");
-});
-
-test("the install key is created once, private, and reused; failures still redact", async () => {
- const dir = await mkdtemp(join(tmpdir(), "ov-redact-key-"));
- try {
- const env = { OPENVIKING_STATE_DIR: dir };
- const key = loadInstallKey({ env });
- const file = join(dir, "redact", "install-key");
- assert.equal((await readFile(file, "utf8")).trim(), key.toString("hex"));
- if (process.platform !== "win32") {
- assert.equal((await stat(file)).mode & 0o777, 0o600);
- assert.equal((await stat(join(dir, "redact"))).mode & 0o777, 0o700);
- }
- assert.equal(redactText(`t ${S.githubPat}`, { env }), redactText(`t ${S.githubPat}`, { key }));
-
- const other = join(dir, "other");
- await mkdir(join(other, "redact"), { recursive: true });
- await writeFile(join(other, "redact", "install-key"), "not a key\n");
- loadInstallKey({ env: { OPENVIKING_STATE_DIR: other } });
- assert.match((await readFile(join(other, "redact", "install-key"), "utf8")).trim(), /^[0-9a-f]{64}$/);
-
- await writeFile(join(dir, "blocker"), "");
- const blocked = { OPENVIKING_STATE_DIR: join(dir, "blocker", "state") };
- assert.equal(loadInstallKey({ env: blocked }).length, 32);
- assert.deepEqual(placeholders(redactText(`t ${S.githubPat}`, { env: blocked })), ["github-pat"]);
- } finally {
- await rm(dir, { recursive: true, force: true });
- }
-});
diff --git a/examples/memory-plugin-shared/scripts/update-secret-rules.mjs b/examples/memory-plugin-shared/scripts/update-secret-rules.mjs
deleted file mode 100644
index 854ba78a9..000000000
--- a/examples/memory-plugin-shared/scripts/update-secret-rules.mjs
+++ /dev/null
@@ -1,488 +0,0 @@
-#!/usr/bin/env node
-/**
- * Regenerate `lib/secret-rules.mjs` from a pinned gitleaks release.
- *
- * node examples/memory-plugin-shared/scripts/update-secret-rules.mjs
- * node examples/memory-plugin-shared/scripts/update-secret-rules.mjs --toml ./gitleaks.toml
- * node examples/memory-plugin-shared/scripts/update-secret-rules.mjs --check [--toml ./gitleaks.toml]
- *
- * The rules are gitleaks' default rule set, used as it is: no rule is added
- * to, changed or allowlisted beyond what gitleaks ships. The only judgement
- * here is the tier (generic-api-key is `strict`, everything else `standard`)
- * and the rules for OpenViking's own key formats (OV_RULES). A gitleaks rule
- * whose Go regex has no simple JavaScript spelling, or that is too slow for a
- * backtracking engine (SLOW_RULES), is skipped and listed in the generated
- * header, never rewritten by hand. Runs at development time
- * only; nothing in `lib/` imports it, so it is never vendored.
- */
-
-import { createHash } from "node:crypto";
-import { readFile, writeFile } from "node:fs/promises";
-import { dirname, join } from "node:path";
-import { fileURLToPath } from "node:url";
-
-const HERE = dirname(fileURLToPath(import.meta.url));
-export const OUTPUT_PATH = join(HERE, "..", "lib", "secret-rules.mjs");
-
-export const GITLEAKS_TAG = "v8.30.1";
-export const GITLEAKS_TOML_URL =
- `https://raw.githubusercontent.com/gitleaks/gitleaks/${GITLEAKS_TAG}/config/gitleaks.toml`;
-
-/** Cumulative and ordered: a tier runs its own rules and every earlier tier's. */
-export const TIERS = ["off", "standard", "strict"];
-
-/** generic-api-key matches any high-entropy value after a key-like word. */
-const STRICT_RULES = new Set(["generic-api-key"]);
-
-const URLSAFE = "[A-Za-z0-9_-]";
-const ovRule = (id, prefix, length, source) => ({
- id,
- regex: `(?<![A-Za-z0-9_-])(${prefix}${URLSAFE}{${length}})(?![A-Za-z0-9_-])`,
- flags: "",
- keywords: [prefix],
- entropy: 3,
- secretGroup: 1,
- allowlists: [],
- tier: "standard",
- source,
-});
-
-/**
- * Keys OpenViking itself issues: a fixed prefix plus `secrets.token_urlsafe(n)`
- * (43 characters for n=32, 54 for n=40, alphabet [A-Za-z0-9_-]).
- */
-export const OV_RULES = [
- ovRule("openviking-gateway-key", "ovgw_", 43, "openviking_gateway/management.py"),
- ovRule("openviking-gateway-management-key", "ovgm_", 43, "openviking_gateway/cli.py"),
- ovRule("openviking-oauth-access-token", "ovat_", 54, "openviking/server/oauth/provider.py"),
- ovRule("openviking-oauth-refresh-token", "ovrt_", 54, "openviking/server/oauth/provider.py"),
- ovRule("openviking-oauth-auth-code", "ovac_", 54, "openviking/server/oauth/provider.py"),
-];
-
-/**
- * gitleaks rules that are pathologically slow under JavaScript's backtracking
- * engine (gitleaks runs them on RE2, which is linear), measured on 1 MB of
- * ordinary tool output (lib/redact.mjs's MAX_SCAN_CHARS). Skipped, not
- * rewritten. Every other rule stays well under a second per MB.
- */
-const NESTED_PREFIX = "nested [\\w.-]{0,50}? prefixes: ~3-11 s per MB of hashes or base64url";
-const CURL = "time quadratic in line length: minutes for a 1 MB line of `curl ...;` commands";
-const SLOW_RULES = {
- "cisco-meraki-api-key": NESTED_PREFIX,
- "cohere-api-token": NESTED_PREFIX,
- "curl-auth-header": CURL,
- "curl-auth-user": CURL,
- "okta-access-token": NESTED_PREFIX,
- "privateai-api-token": NESTED_PREFIX,
- "sumologic-access-id": NESTED_PREFIX,
-};
-
-// ---------------------------------------------------------------------------
-// TOML: the subset gitleaks.toml uses
-// ---------------------------------------------------------------------------
-
-const BASIC_ESCAPES = { b: "\b", t: "\t", n: "\n", f: "\f", r: "\r", '"': '"', "\\": "\\" };
-
-/**
- * `[table]` / `[[array.of.tables]]` headers, `key = value` with strings
- * ('...', '''...''', "..."), numbers, booleans and (multi-line) arrays of
- * those, and `#` comments. Anything else throws, so an upstream format change
- * fails here instead of being misread.
- */
-export function parseToml(text) {
- const root = {};
- let table = root;
- let i = 0;
- const fail = (msg) => {
- throw new Error(`gitleaks.toml line ${text.slice(0, i).split("\n").length}: ${msg}`);
- };
- const skip = (newlines) => {
- for (;;) {
- while (" \t\r".includes(text[i]) || (newlines && text[i] === "\n")) i++;
- if (text[i] !== "#") return;
- while (i < text.length && text[i] !== "\n") i++;
- }
- };
- const value = () => {
- skip(false);
- if (text.startsWith("'''", i)) {
- const end = text.indexOf("'''", i + 3);
- if (end < 0) fail("unterminated '''");
- const s = text.slice(i + 3, end).replace(/^\r?\n/, "");
- i = end + 3;
- return s;
- }
- if (text[i] === "'") {
- const end = text.indexOf("'", i + 1);
- if (end < 0) fail("unterminated '");
- const s = text.slice(i + 1, end);
- i = end + 1;
- return s;
- }
- if (text[i] === '"') {
- let s = "";
- for (i++; text[i] !== '"'; i++) {
- if (i >= text.length || text[i] === "\n") fail("unterminated string");
- if (text[i] !== "\\") s += text[i];
- else if (text[++i] in BASIC_ESCAPES) s += BASIC_ESCAPES[text[i]];
- else if (text[i] === "u" && /^[0-9a-fA-F]{4}$/.test(text.slice(i + 1, i + 5))) {
- s += String.fromCharCode(parseInt(text.slice(i + 1, i + 5), 16));
- i += 4;
- } else fail(`bad escape \\${text[i]}`);
- }
- i++;
- return s;
- }
- if (text[i] === "[") {
- const arr = [];
- for (i++; ;) {
- skip(true);
- if (text[i] === "]") break;
- arr.push(value());
- skip(true);
- if (text[i] === ",") i++;
- else if (text[i] !== "]") fail("expected , or ]");
- }
- i++;
- return arr;
- }
- const m = /^(?:true|false|-?\d+(?:\.\d+)?)/.exec(text.slice(i, i + 32));
- if (!m) fail("unsupported value");
- i += m[0].length;
- return m[0] === "true" ? true : m[0] === "false" ? false : Number(m[0]);
- };
- for (skip(true); i < text.length; skip(true)) {
- const header = /^(\[\[?)([A-Za-z0-9_.-]+)\]\]?[ \t]*(?=\r?\n|#|$)/.exec(text.slice(i, i + 256));
- if (header) {
- i += header[0].length;
- const path = header[2].split(".");
- let node = root;
- for (const key of path.slice(0, -1)) {
- node = node[key] ??= {};
- if (Array.isArray(node)) node = node[node.length - 1];
- }
- const leaf = path[path.length - 1];
- if (header[1] === "[[") (node[leaf] ??= []).push((table = {}));
- else table = node[leaf] ??= {};
- continue;
- }
- const kv = /^([A-Za-z0-9_-]+)[ \t]*=/.exec(text.slice(i, i + 256));
- if (!kv) fail("expected a key or a table header");
- i += kv[0].length;
- if (kv[1] in table) fail(`duplicate key ${kv[1]}`);
- table[kv[1]] = value();
- skip(false);
- if (i < text.length && text[i] !== "\n") fail("trailing characters");
- }
- return root;
-}
-
-// ---------------------------------------------------------------------------
-// Go (RE2) regex -> JavaScript
-// ---------------------------------------------------------------------------
-
-export class UnsupportedRegexError extends Error {}
-
-const POSIX_CLASSES = { alnum: "0-9A-Za-z", alpha: "A-Za-z", digit: "0-9", lower: "a-z", upper: "A-Z", xdigit: "0-9A-Fa-f" };
-const isLetter = (c) => /^[A-Za-z]$/.test(c);
-const swapCase = (c) => (c === c.toLowerCase() ? c.toUpperCase() : c.toLowerCase());
-
-/** The other-case counterparts of the ASCII letters in the range lo..hi. */
-function otherCase(lo, hi) {
- let out = "";
- for (const [a, z] of [["a", "z"], ["A", "Z"]]) {
- const from = lo > a ? lo : a;
- const to = hi < z ? hi : z;
- if (from <= to) out += from === to ? swapCase(from) : `${swapCase(from)}-${swapCase(to)}`;
- }
- return out;
-}
-
-/** One class member at body[i]: its source text and the character it is (null for \d, \w, \s...). */
-function classAtom(body, i) {
- if (body[i] !== "\\") return { text: body[i], ch: body[i] };
- const e = body[i + 1];
- const hex = /^x([0-9a-fA-F]{2})/.exec(body.slice(i + 1, i + 4));
- if (hex) return { text: `\\${hex[0]}`, ch: String.fromCharCode(parseInt(hex[1], 16)) };
- if (e && "dDwWsS".includes(e)) return { text: `\\${e}`, ch: null };
- const named = { t: "\t", n: "\n", r: "\r", f: "\f", v: "\v" }[e];
- if (named) return { text: `\\${e}`, ch: named };
- if (e === undefined || /[A-Za-z0-9]/.test(e)) throw new UnsupportedRegexError(`\\${e ?? ""} in a class`);
- return { text: `\\${e}`, ch: e };
-}
-
-/**
- * The class starting at body[i] ("["), with the other case of every ASCII
- * letter appended when `ci` is set. Literal "-" and "]" are escaped so the
- * appended ranges cannot fuse with them.
- */
-function convertClass(body, i, ci) {
- let j = i + 1;
- let out = "[";
- let extra = "";
- if (body[j] === "^") out += body[j++];
- for (let first = true; j < body.length && (body[j] !== "]" || first); first = false) {
- const posix = /^\[:([a-z]+):\]/.exec(body.slice(j, j + 12));
- if (posix) {
- if (!POSIX_CLASSES[posix[1]]) throw new UnsupportedRegexError(posix[0]);
- out += POSIX_CLASSES[posix[1]];
- j += posix[0].length;
- continue;
- }
- const lo = classAtom(body, j);
- j += lo.text.length;
- if (lo.ch !== null && body[j] === "-" && j + 1 < body.length && body[j + 1] !== "]") {
- const hi = classAtom(body, j + 1);
- if (hi.ch === null) throw new UnsupportedRegexError(`range ending in ${hi.text}`);
- j += 1 + hi.text.length;
- out += `${lo.text}-${hi.text}`;
- if (ci) extra += otherCase(lo.ch, hi.ch);
- } else {
- out += lo.ch === "-" || lo.ch === "]" ? `\\${lo.ch}` : lo.text;
- if (ci && lo.ch && isLetter(lo.ch)) extra += swapCase(lo.ch);
- }
- }
- if (body[j] !== "]") throw new UnsupportedRegexError(`unterminated class at ${i}`);
- return { text: `${out}${extra}]`, end: j };
-}
-
-/**
- * Rewrite a Go regex as a JavaScript one (no `u` flag). A pattern that is
- * case-insensitive throughout keeps a leading `(?i)` as the `i` flag; any
- * other `(?i)`, `(?i:...)` or `(?-i:...)` is spelled out by giving each ASCII
- * letter its other case. Also: `.` -> `[^\n]` (RE2's dot), `(?s:...)` dots ->
- * `[\s\S]`, `\z` -> `$`, `(?P<name>` -> `(?<name>`, and
- * `[:alnum:]`-style classes. Anything else Go-specific throws.
- */
-export function convertGoRegex(src) {
- let flags = "";
- let body = src;
- if (body.startsWith("(?i)") && !body.includes("(?-i")) {
- flags = "i";
- body = body.slice(4);
- }
- let out = "";
- let ci = false;
- let dotAll = false;
- const stack = [];
- for (let i = 0; i < body.length; i++) {
- const c = body[i];
- if (c === "\\") {
- const e = body[++i];
- if (e === undefined) throw new UnsupportedRegexError("trailing backslash");
- if (e === "z") out += "$";
- else if (e === "x" && /^[0-9a-fA-F]{2}/.test(body.slice(i + 1, i + 3))) {
- out += `\\x${body.slice(i + 1, i + 3)}`;
- i += 2;
- } else if (isLetter(e) && !"dDwWsSbBtnrfv".includes(e)) throw new UnsupportedRegexError(`\\${e}`);
- else if (/[0-9]/.test(e)) throw new UnsupportedRegexError(`\\${e}`);
- else out += `\\${e}`;
- } else if (c === "[") {
- const cls = convertClass(body, i, ci);
- out += cls.text;
- i = cls.end;
- } else if (c === "(") {
- stack.push({ ci, dotAll });
- const group = /^\(\?(?:([a-zA-Z-]*)([:)])|P?<([A-Za-z_]\w*)>)/.exec(body.slice(i));
- if (!group) {
- out += "(";
- continue;
- }
- i += group[0].length - 1;
- if (group[3]) {
- out += `(?<${group[3]}>`;
- continue;
- }
- const [, flagText, end] = group;
- if (!/^(?:i|-i|s|)$/.test(flagText)) throw new UnsupportedRegexError(`(?${flagText}${end}`);
- if (end === ")") {
- stack.pop(); // a bare (?i) sets the flag until the enclosing group ends
- if (flagText === "s") dotAll = true;
- else ci = flagText === "i";
- continue;
- }
- if (flagText === "s") dotAll = true;
- else if (flagText) ci = flagText === "i";
- out += "(?:";
- } else if (c === ")") {
- if (!stack.length) throw new UnsupportedRegexError("unbalanced )");
- ({ ci, dotAll } = stack.pop());
- out += ")";
- } else if (c === ".") {
- out += dotAll ? "[\\s\\S]" : "[^\\n]";
- } else if (ci && isLetter(c)) {
- out += `[${c}${swapCase(c)}]`;
- } else {
- out += c;
- }
- }
- if (stack.length) throw new UnsupportedRegexError("unbalanced (");
- const groups = new RegExp(`${out}|`, flags).exec("").length - 1;
- new RegExp(out, `${flags}gd`);
- return { source: out, flags, groups };
-}
-
-// ---------------------------------------------------------------------------
-// gitleaks config -> rule records
-// ---------------------------------------------------------------------------
-
-/**
- * A gitleaks allowlist as the engine reads it. A transcript has no path or
- * commit: under AND such a check can never pass, so the allowlist is inert;
- * under OR only its regex and stopword checks remain. A regex that does not
- * convert throws, so its rule is skipped rather than run with less allowed.
- */
-function convertAllowlist(raw) {
- const condition = String(raw.condition || "OR").toUpperCase() === "AND" ? "AND" : "OR";
- if (condition === "AND" && (raw.paths?.length || raw.commits?.length)) return null;
- const regexes = (raw.regexes || []).map((pattern) => {
- const { source, flags } = convertGoRegex(pattern);
- return { regex: source, flags };
- });
- const stopwords = [...new Set((raw.stopwords || []).map((w) => String(w).toLowerCase()))].sort();
- if (!regexes.length && !stopwords.length) return null;
- return { condition, regexTarget: raw.regexTarget || "secret", regexes, stopwords };
-}
-
-export function buildRules(config) {
- const rules = [];
- const skipped = [];
- const globalAllowlists = [config.allowlist, ...(config.allowlists || [])]
- .filter(Boolean)
- .map(convertAllowlist)
- .filter(Boolean);
- for (const raw of config.rules || []) {
- const id = String(raw.id || "");
- const skip = (reason) => skipped.push({ id, reason });
- if (raw.path) { skip("path-scoped rule; captured text has no file path"); continue; }
- if (SLOW_RULES[id]) { skip(SLOW_RULES[id]); continue; }
- let converted;
- let allowlists;
- try {
- converted = convertGoRegex(raw.regex);
- allowlists = (raw.allowlists || []).map(convertAllowlist).filter(Boolean);
- } catch (error) {
- skip(`a regex has no simple JavaScript form (${error.message})`);
- continue;
- }
- const secretGroup = Number(raw.secretGroup || 0);
- if (secretGroup > converted.groups) { skip(`secretGroup ${secretGroup} out of range`); continue; }
- rules.push({
- id,
- regex: converted.source,
- flags: converted.flags,
- keywords: [...new Set((raw.keywords || []).map((k) => String(k).toLowerCase()))],
- entropy: Number(raw.entropy || 0),
- secretGroup,
- allowlists,
- tier: STRICT_RULES.has(id) ? "strict" : "standard",
- });
- }
- for (const id of STRICT_RULES) if (!rules.some((r) => r.id === id)) throw new Error(`${id} was not emitted`);
- for (const { source: _source, ...rule } of OV_RULES) {
- if (rules.some((r) => r.id === rule.id)) throw new Error(`${rule.id} collides with a gitleaks rule`);
- new RegExp(rule.regex, "gd");
- rules.push(rule);
- }
- return { rules, skipped, globalAllowlists };
-}
-
-const MIT_LICENSE = `MIT License
-
-Copyright (c) 2019 Zachary Rice
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.`;
-
-/** The generated module. Deterministic for a given input. */
-export function renderModule({ rules, skipped, globalAllowlists }, { tomlSha256 }) {
- const lines = [
- "// GENERATED by examples/memory-plugin-shared/scripts/update-secret-rules.mjs. DO NOT EDIT.",
- "//",
- `// Secret detection rules for lib/redact.mjs: the gitleaks ${GITLEAKS_TAG} default`,
- "// configuration (config/gitleaks.toml, https://github.com/gitleaks/gitleaks),",
- "// converted from Go to JavaScript regex syntax and otherwise unchanged, plus",
- "// the rules for OpenViking's own key formats.",
- `// Source file sha256: ${tomlSha256}`,
- "//",
- "// Tier `strict`: generic-api-key. Every other rule is tier `standard`.",
- "// Skipped gitleaks rules:",
- ...(skipped.length ? skipped.map(({ id, reason }) => `// ${id}: ${reason}`) : ["// (none)"]),
- "// OpenViking rules (not from gitleaks):",
- ...OV_RULES.map(({ id, keywords, source }) => `// ${id}: ${keywords[0]}... issued by ${source}`),
- "//",
- "// The gitleaks rule data is used under its license:",
- "//",
- ...MIT_LICENSE.split("\n").map((line) => (line ? `// ${line}` : "//")),
- "",
- `export const GITLEAKS_VERSION = ${JSON.stringify(GITLEAKS_TAG)};`,
- "",
- `export const TIERS = ${JSON.stringify(TIERS)};`,
- "",
- "export const SKIPPED_RULES = [",
- ...skipped.map((s) => ` ${JSON.stringify(s)},`),
- "];",
- "",
- "export const GLOBAL_ALLOWLISTS = [",
- ...globalAllowlists.map((al) => ` ${JSON.stringify(al)},`),
- "];",
- "",
- "export default [",
- ...rules.map((rule) => ` ${JSON.stringify(rule)},`),
- "];",
- "",
- ];
- return lines.join("\n");
-}
-
-export async function generate({ tomlPath = "" } = {}) {
- let text;
- if (tomlPath) text = await readFile(tomlPath, "utf8");
- else {
- const res = await fetch(GITLEAKS_TOML_URL);
- if (!res.ok) throw new Error(`fetching ${GITLEAKS_TOML_URL}: HTTP ${res.status}`);
- text = await res.text();
- }
- const tomlSha256 = createHash("sha256").update(text).digest("hex");
- const built = buildRules(parseToml(text));
- return { ...built, output: renderModule(built, { tomlSha256 }) };
-}
-
-async function main(args) {
- const tomlIdx = args.indexOf("--toml");
- const { output, rules, skipped } = await generate({ tomlPath: tomlIdx >= 0 ? args[tomlIdx + 1] : "" });
- if (args.includes("--check")) {
- const current = await readFile(OUTPUT_PATH, "utf8").catch(() => "");
- if (current !== output) {
- process.stderr.write(`${OUTPUT_PATH} is stale; rerun without --check\n`);
- process.exitCode = 1;
- } else {
- process.stdout.write("secret-rules.mjs is up to date\n");
- }
- return;
- }
- await writeFile(OUTPUT_PATH, output);
- process.stdout.write(`wrote ${OUTPUT_PATH}: ${rules.length} rules, ${skipped.length} skipped (gitleaks ${GITLEAKS_TAG})\n`);
-}
-
-if (process.argv[1] && fileURLToPath(import.meta.url) === process.argv[1]) {
- main(process.argv.slice(2)).catch((error) => {
- process.stderr.write(`${error.stack || error}\n`);
- process.exitCode = 1;
- });
-}
diff --git a/examples/memory-plugin-shared/secret-rules.test.mjs b/examples/memory-plugin-shared/secret-rules.test.mjs
deleted file mode 100644
index 850c5bc2d..000000000
--- a/examples/memory-plugin-shared/secret-rules.test.mjs
+++ /dev/null
@@ -1,193 +0,0 @@
-import assert from "node:assert/strict";
-import { execFileSync } from "node:child_process";
-import { createHash } from "node:crypto";
-import { mkdtemp, readFile, rm, writeFile } from "node:fs/promises";
-import { tmpdir } from "node:os";
-import { join } from "node:path";
-import test from "node:test";
-import { fileURLToPath } from "node:url";
-
-import SECRET_RULES, { GITLEAKS_VERSION, SKIPPED_RULES, TIERS } from "./lib/secret-rules.mjs";
-import {
- GITLEAKS_TAG,
- GITLEAKS_TOML_URL,
- OUTPUT_PATH,
- OV_RULES,
- UnsupportedRegexError,
- buildRules,
- convertGoRegex,
- parseToml,
- renderModule,
-} from "./scripts/update-secret-rules.mjs";
-
-const SCRIPT = fileURLToPath(new URL("./scripts/update-secret-rules.mjs", import.meta.url));
-const re = (pattern) => {
- const { source, flags } = convertGoRegex(pattern);
- return new RegExp(`^(?:${source})$`, flags);
-};
-
-test("the generated module is gitleaks' rule set plus OV_RULES, tiered, attributed", async () => {
- const text = await readFile(OUTPUT_PATH, "utf8");
- assert.equal(GITLEAKS_VERSION, GITLEAKS_TAG);
- assert.ok(text.includes("// MIT License") && text.includes("Copyright (c) 2019 Zachary Rice"));
- assert.match(text, /\/\/ Source file sha256: [0-9a-f]{64}\n/);
- for (const { id, reason } of SKIPPED_RULES) assert.ok(text.includes(`// ${id}: ${reason}`), id);
- assert.deepEqual(TIERS, ["off", "standard", "strict"]);
- assert.deepEqual(SECRET_RULES.filter((r) => r.tier === "strict").map((r) => r.id), ["generic-api-key"]);
- const ids = SECRET_RULES.map((r) => r.id);
- assert.equal(new Set(ids).size, ids.length);
- assert.ok(ids.length > 200);
- assert.deepEqual(ids.slice(-OV_RULES.length), OV_RULES.map((r) => r.id));
- for (const rule of SECRET_RULES) {
- for (const kw of rule.keywords) assert.equal(kw, kw.toLowerCase(), rule.id);
- }
-});
-
-test("a leading (?i) becomes the i flag; other case scopes are spelled out", () => {
- assert.deepEqual(convertGoRegex("(?i)adafruit[a-z0-9_-]{32}").flags, "i");
- const mid = re("p8e-(?i)[a-z0-9]{2}");
- assert.ok(mid.test("p8e-aZ") && !mid.test("P8E-az"));
- const scoped = re("(?i:[a-z]+(?:(?-i:[Ss]umo|SUMO)))x");
- assert.ok(scoped.test("ABcSumox") && scoped.test("abSUMOx") && !scoped.test("absUMOx") && !scoped.test("abSumoX"));
- // A bare (?i) lasts until its group closes.
- const group = re("(a(?i)b)c");
- assert.ok(group.test("aBc") && !group.test("aBC") && !group.test("ABc"));
- // Case-expanded classes keep literal dashes literal.
- const cls = re("(?-i:x)(?i)[a-c=-]");
- assert.ok(cls.test("xB") && cls.test("x-") && !cls.test("x>"));
-});
-
-test("Go's dot, anchors, POSIX classes and named groups keep their meaning", () => {
- assert.ok(re("a.b").test("a\rb") && !re("a.b").test("a\nb"));
- assert.ok(re("a(?s:.)b").test("a\nb"));
- assert.ok(new RegExp(convertGoRegex("ab\\z").source).test("xab") && !new RegExp(convertGoRegex("ab\\z").source).test("ab\n"));
- assert.ok(re("[[:alnum:]]+").test("aZ9"));
- assert.equal(new RegExp(convertGoRegex("(?P<k>a)(b)").source).exec("ab").length, 3);
- assert.equal(convertGoRegex("(a)(?:b)(c)").groups, 2);
- for (const bad of ["\\pL", "(?m)^a", "\\Qa\\E", "\\Aa", "[[:word:]]", "(a"]) {
- assert.throws(() => convertGoRegex(bad), UnsupportedRegexError, bad);
- }
-});
-
-const MINI_TOML = `title = "mini"
-# comment
-[allowlist]
-description = "global"
-regexes = ['''^true$''']
-stopwords = ["Example"]
-paths = ['''\\.lock$''']
-
-[[rules]]
-id = "demo-token"
-regex = '''(?i)\\b(demo_[a-z0-9]{8})\\b'''
-entropy = 2.5
-keywords = [
- "demo_",
-]
-[[rules.allowlists]]
-condition = "AND"
-paths = ['''x''']
-regexes = ['''y''']
-[[rules.allowlists]]
-regexTarget = "line"
-regexes = ['''fake''']
-
-[[rules]]
-id = "path-only"
-path = '''\\.p12$'''
-
-[[rules]]
-id = "unconvertible"
-regex = '''\\pL{8}'''
-keywords = ["x"]
-
-[[rules]]
-id = "curl-auth-user"
-regex = '''curl (\\w+)'''
-keywords = ["curl"]
-
-[[rules]]
-id = "bad-allowlist"
-regex = '''bad_(\\w{8})'''
-[[rules.allowlists]]
-regexes = ['''\\pL''']
-
-[[rules]]
-id = "generic-api-key"
-regex = '''(?i)key=(\\w+)'''
-secretGroup = 1
-keywords = ["key"]
-`;
-
-test("the TOML subset parser reads what gitleaks.toml uses and refuses the rest", () => {
- const config = parseToml(MINI_TOML);
- assert.equal(config.title, "mini");
- assert.deepEqual(config.allowlist.stopwords, ["Example"]);
- assert.equal(config.rules.length, 6);
- assert.equal(config.rules[0].regex, "(?i)\\b(demo_[a-z0-9]{8})\\b");
- assert.equal(config.rules[0].entropy, 2.5);
- assert.deepEqual(config.rules[0].keywords, ["demo_"]);
- assert.equal(config.rules[0].allowlists.length, 2);
- assert.equal(config.rules[5].secretGroup, 1);
- assert.throws(() => parseToml("a = [1, 2"), /gitleaks\.toml line/);
- assert.throws(() => parseToml("a = 1\na = 2\n"), /duplicate key/);
- assert.throws(() => parseToml("a = {b = 1}\n"), /unsupported value/);
-});
-
-test("buildRules converts, tiers, skips with a reason, and appends OV_RULES", () => {
- const built = buildRules(parseToml(MINI_TOML));
- const demo = built.rules.find((r) => r.id === "demo-token");
- assert.equal(demo.tier, "standard");
- // An AND allowlist with a path can never pass on a transcript: dropped.
- assert.deepEqual(demo.allowlists, [{ condition: "OR", regexTarget: "line", regexes: [{ regex: "fake", flags: "" }], stopwords: [] }]);
- assert.equal(built.rules.find((r) => r.id === "generic-api-key").tier, "strict");
- // A rule whose allowlist will not convert is skipped, not run with less allowed.
- assert.deepEqual(built.skipped.map((s) => s.id), ["path-only", "unconvertible", "curl-auth-user", "bad-allowlist"]);
- assert.deepEqual(built.globalAllowlists, [
- { condition: "OR", regexTarget: "secret", regexes: [{ regex: "^true$", flags: "" }], stopwords: ["example"] },
- ]);
- assert.deepEqual(built.rules.slice(-OV_RULES.length).map((r) => r.id), OV_RULES.map((r) => r.id));
- assert.equal(renderModule(built, { tomlSha256: "x" }), renderModule(buildRules(parseToml(MINI_TOML)), { tomlSha256: "x" }));
- assert.throws(() => buildRules(parseToml(MINI_TOML.replace(/id = "generic-api-key"[\s\S]*$/, ""))), /generic-api-key/);
- assert.throws(() => buildRules(parseToml(MINI_TOML.replace("'''^true$'''", "'''\\pL'''"))), UnsupportedRegexError);
-});
-
-test("--check fails on a stale module", async () => {
- const dir = await mkdtemp(join(tmpdir(), "ov-secret-rules-"));
- try {
- await writeFile(join(dir, "gitleaks.toml"), MINI_TOML);
- assert.throws(
- () => execFileSync(process.execPath, [SCRIPT, "--check", "--toml", join(dir, "gitleaks.toml")], { stdio: "pipe" }),
- /is stale/,
- );
- } finally {
- await rm(dir, { recursive: true, force: true });
- }
-});
-
-test("--check regenerates the committed module byte for byte from the pinned gitleaks.toml", async (t) => {
- // GITLEAKS_TOML points at a local copy; otherwise the pinned file is fetched.
- let tomlPath = process.env.GITLEAKS_TOML || "";
- let dir = "";
- if (!tomlPath) {
- let text;
- try {
- const res = await fetch(GITLEAKS_TOML_URL, { signal: AbortSignal.timeout(15000) });
- text = res.ok ? await res.text() : null;
- } catch {
- text = null;
- }
- if (!text) return t.skip("gitleaks.toml unavailable offline (set GITLEAKS_TOML)");
- dir = await mkdtemp(join(tmpdir(), "ov-secret-rules-"));
- tomlPath = join(dir, "gitleaks.toml");
- await writeFile(tomlPath, text);
- }
- try {
- const sha = createHash("sha256").update(await readFile(tomlPath, "utf8")).digest("hex");
- assert.ok((await readFile(OUTPUT_PATH, "utf8")).includes(`// Source file sha256: ${sha}\n`));
- const out = execFileSync(process.execPath, [SCRIPT, "--check", "--toml", tomlPath], { encoding: "utf8" });
- assert.match(out, /up to date/);
- } finally {
- if (dir) await rm(dir, { recursive: true, force: true });
- }
-});
diff --git a/examples/openclaw-plugin/client.ts b/examples/openclaw-plugin/client.ts
index 39d98bb37..190813afc 100644
--- a/examples/openclaw-plugin/client.ts
+++ b/examples/openclaw-plugin/client.ts
@@ -8,7 +8,6 @@ import {
contextRequestTimeoutMs,
normalizeContextEntry,
} from "./shared/recall-core.mjs";
-import { redactPayload } from "./shared/redact.mjs";
export type FindResultItem = {
uri: string;
@@ -69,8 +68,6 @@ function userSessionUri(sessionId: string): string {
export type OpenVikingClientOptions = {
transport?: HttpTransport;
- /** Secret-redaction tier for session messages (`captureRedact`); default "standard". */
- captureRedact?: string;
headers?: Record<string, string>;
resourcePackager?: ResourcePackager;
now?: () => number;
@@ -254,7 +251,6 @@ export class OpenVikingClient {
private readonly now: () => number;
private readonly sleep: (ms: number) => Promise<void>;
private readonly resourcePackager: ResourcePackager;
- private readonly captureRedact: string | undefined;
constructor(
private readonly baseUrl: string,
@@ -279,7 +275,6 @@ export class OpenVikingClient {
this.now = options.now ?? Date.now;
this.sleep = options.sleep ?? sleep;
this.resourcePackager = options.resourcePackager ?? defaultResourcePackager;
- this.captureRedact = options.captureRedact;
}
getDefaultAgentId(): string {
@@ -792,15 +787,11 @@ export class OpenVikingClient {
},
actorPeerId,
);
- // Secrets in the captured text (a `cat .env`, a token in a tool result)
- // are replaced before the message leaves the machine; ids, roles and
- // URIs are left as they are. The caller's parts are not mutated.
- const redacted = redactPayload(body, { tier: this.captureRedact });
await this.request<{ session_id: string }>(
`/api/v1/sessions/${encodeURIComponent(sessionId)}/messages`,
{
method: "POST",
- body: JSON.stringify(redacted),
+ body: JSON.stringify(body),
},
undefined,
actorPeerId,
diff --git a/examples/openclaw-plugin/commands/setup.ts b/examples/openclaw-plugin/commands/setup.ts
index 3c518ce92..f921f0df0 100644
--- a/examples/openclaw-plugin/commands/setup.ts
+++ b/examples/openclaw-plugin/commands/setup.ts
@@ -73,7 +73,6 @@ const CONFIG_KEYS_TO_PRESERVE = [
"autoCapture",
"captureMode",
"captureMaxLength",
- "captureRedact",
"autoRecall",
"recallResources",
"recallTargetTypes",
diff --git a/examples/openclaw-plugin/config.ts b/examples/openclaw-plugin/config.ts
index 8b191d406..1fd4989c9 100644
--- a/examples/openclaw-plugin/config.ts
+++ b/examples/openclaw-plugin/config.ts
@@ -2,7 +2,6 @@ import { homedir } from "node:os";
import { readFileSync } from "node:fs";
import { getEnv } from "./runtime-utils.js";
-import { normalizeRedactTier } from "./shared/redact.mjs";
/**
* Subset of OpenClaw's standard `SecretRef` shape supported by the OpenViking
@@ -47,12 +46,6 @@ export type MemoryOpenVikingConfig = {
autoCapture?: boolean;
captureMode?: "semantic" | "keyword";
captureMaxLength?: number;
- /**
- * Secret redaction applied to every session message before it is sent:
- * "off", "standard" (default) or "strict". `false` means "off"; an unknown
- * tier name means "standard". OPENVIKING_CAPTURE_REDACT outranks this.
- */
- captureRedact?: "off" | "standard" | "strict" | boolean;
autoRecall?: boolean;
/** Outer time budget for the whole server-assembled auto-recall flow. */
autoRecallTimeoutMs?: number;
@@ -140,10 +133,8 @@ export type MemoryOpenVikingConfig = {
/** Runtime config after memoryOpenVikingConfigSchema.parse() has applied defaults. */
export type ParsedMemoryOpenVikingConfig = Required<
- Omit<MemoryOpenVikingConfig, "agentExperience" | "recallTargetTypes" | "apiKey" | "peer_role" | "captureRedact">
+ Omit<MemoryOpenVikingConfig, "agentExperience" | "recallTargetTypes" | "apiKey" | "peer_role">
> & {
- /** Always a tier name after parse(). */
- captureRedact: "off" | "standard" | "strict";
/** parse() resolves SecretRef values, so the runtime shape is always a plain string. */
apiKey: string;
/** Runtime uses the canonical name; legacy `person` input normalizes to `sender`. */
@@ -545,7 +536,6 @@ export const memoryOpenVikingConfigSchema = {
"autoCapture",
"captureMode",
"captureMaxLength",
- "captureRedact",
"autoRecall",
"autoRecallTimeoutMs",
"recallCompress",
@@ -677,12 +667,6 @@ export const memoryOpenVikingConfigSchema = {
200,
Math.min(200_000, Math.floor(toNumber(cfg.captureMaxLength, DEFAULT_CAPTURE_MAX_LENGTH))),
),
- // The env var outranks the file, as for every other harness. Never
- // throws: an unknown tier redacts at the default rather than failing the
- // plugin's config load.
- captureRedact: normalizeRedactTier(
- getEnv("OPENVIKING_CAPTURE_REDACT")?.trim() || cfg.captureRedact,
- ) as "off" | "standard" | "strict",
autoRecall: cfg.autoRecall !== false,
autoRecallTimeoutMs: Math.max(
1000,
@@ -894,12 +878,6 @@ export const memoryOpenVikingConfigSchema = {
advanced: true,
help: "Maximum sanitized user text length allowed for auto-capture.",
},
- captureRedact: {
- label: "Capture Secret Redaction",
- placeholder: "standard",
- advanced: true,
- help: 'Replace secrets (API keys, tokens, private keys) in captured messages with {{ov_redacted:<rule>:<tag>}} before they are sent. "standard" (default), "strict" (adds the generic key=value rule) or "off". Env: OPENVIKING_CAPTURE_REDACT.',
- },
autoRecall: {
label: "Auto-Recall",
help: "Inject relevant OpenViking memories into agent context",
diff --git a/examples/openclaw-plugin/docs/openviking-openclaw-plugin-guide.md b/examples/openclaw-plugin/docs/openviking-openclaw-plugin-guide.md
index 6a53a9d0b..7c7e2ab1a 100644
--- a/examples/openclaw-plugin/docs/openviking-openclaw-plugin-guide.md
+++ b/examples/openclaw-plugin/docs/openviking-openclaw-plugin-guide.md
@@ -722,7 +722,6 @@ openclaw config get plugins.slots.contextEngine
| `autoCapture` | `true` | 是否每轮后写入 OpenViking session |
| `captureMode` | `semantic` | `semantic` 全量候选;`keyword` 先过触发词 |
| `captureMaxLength` | `24000` | 自动捕获文本最大长度 |
-| `captureRedact` | `standard` | 发送 session 消息前的密钥脱敏:`standard`、`strict`(另加通用 `key=value` 规则)或 `off`;环境变量 `OPENVIKING_CAPTURE_REDACT` 优先 |
| `autoRecall` | `true` | 是否回复前自动召回 |
| `autoRecallTimeoutMs` | `15000` | 服务端组装自动召回的总超时;为 session query expansion 和检索留出预算 |
| `recallTargetTypes` | `["user","agent"]` | 自动召回和默认显式召回目标类型;可选 `resource`、`user`、`agent` |
diff --git a/examples/openclaw-plugin/docs/openviking-plugin-reference.md b/examples/openclaw-plugin/docs/openviking-plugin-reference.md
index 22b70e9c7..cb87ce645 100644
--- a/examples/openclaw-plugin/docs/openviking-plugin-reference.md
+++ b/examples/openclaw-plugin/docs/openviking-plugin-reference.md
@@ -85,7 +85,6 @@ $OPENCLAW_STATE_DIR/openclaw.json
| `autoCapture` | boolean | `true` | — | 是否在会话过程中自动将消息写入 OpenViking session 并触发记忆抽取。 |
| `captureMode` | `"semantic"` \| `"keyword"` | `"semantic"` | — | 捕获模式。非法值会导致配置解析失败。 |
| `captureMaxLength` | number | `24000` | — | 自动捕获文本最大长度,范围 `200` 到 `200000`。 |
-| `captureRedact` | `"off"` \| `"standard"` \| `"strict"` \| boolean | `"standard"` | `OPENVIKING_CAPTURE_REDACT` | 发送 session 消息前的本地密钥脱敏(gitleaks 默认规则)。密钥替换为 `{{ov_redacted:<rule>:<tag>}}`;`strict` 另加通用 `key=value` 规则;`false` 等同 `off`;未知档位按 `standard` 处理,不会导致配置解析失败。环境变量优先于配置。 |
| `commitTokenThreshold` | number | 已废弃 | — | 旧的绝对 token 阈值,已被 `commitTokenThresholdRatio` 取代;为兼容老配置保留(可解析但被忽略,不再生效)。 |
| `commitTokenThresholdRatio` | number | `0.5` | — | afterTurn 中 pending tokens 达到「模型上下文窗口 × 该比例」时触发 commit(0-1,例 `0.5`=50%);`0` 表示每轮都提交。 |
| `commitKeepRecentCount` | number | `10` | — | afterTurn commit 后保留最近消息数,范围 `0` 到 `1000`。compact 路径始终使用 `0`。 |
diff --git a/examples/openclaw-plugin/install-manifest.json b/examples/openclaw-plugin/install-manifest.json
index a9a41bbd0..46c131668 100644
--- a/examples/openclaw-plugin/install-manifest.json
+++ b/examples/openclaw-plugin/install-manifest.json
@@ -1,6 +1,6 @@
{
"manifestVersion": "1.0",
- "pluginVersion": "2026.9.23",
+ "pluginVersion": "2026.9.22",
"plugin": {
"id": "openviking",
"kind": "context-engine",
diff --git a/examples/openclaw-plugin/openclaw.plugin.json b/examples/openclaw-plugin/openclaw.plugin.json
index 214b4205e..181caee89 100644
--- a/examples/openclaw-plugin/openclaw.plugin.json
+++ b/examples/openclaw-plugin/openclaw.plugin.json
@@ -138,12 +138,6 @@
"advanced": true,
"help": "Maximum sanitized user text length allowed for auto-capture"
},
- "captureRedact": {
- "label": "Capture Secret Redaction",
- "placeholder": "standard",
- "advanced": true,
- "help": "Replace secrets in captured messages with {{ov_redacted:<rule>:<tag>}} before they are sent: standard (default), strict (adds the generic key=value rule) or off. Env: OPENVIKING_CAPTURE_REDACT"
- },
"autoRecall": {
"label": "Auto-Recall",
"help": "Inject relevant OpenViking memories into agent context"
@@ -375,14 +369,6 @@
"captureMaxLength": {
"type": "number"
},
- "captureRedact": {
- "oneOf": [
- { "type": "string" },
- { "type": "boolean" }
- ],
- "default": "standard",
- "description": "Secret redaction for captured session messages: off, standard (default) or strict. false means off; any other unknown value means standard (left to the plugin, so a newer tier name never fails the config). OPENVIKING_CAPTURE_REDACT outranks this."
- },
"autoRecall": {
"type": "boolean"
},
diff --git a/examples/openclaw-plugin/package-lock.json b/examples/openclaw-plugin/package-lock.json
index 9af860f56..02f816e11 100644
--- a/examples/openclaw-plugin/package-lock.json
+++ b/examples/openclaw-plugin/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "@openviking/openclaw-plugin",
- "version": "2026.9.23",
+ "version": "2026.9.22",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@openviking/openclaw-plugin",
- "version": "2026.9.23",
+ "version": "2026.9.22",
"license": "MIT",
"dependencies": {
"@sinclair/typebox": "0.34.48",
diff --git a/examples/openclaw-plugin/package.json b/examples/openclaw-plugin/package.json
index 872e7635c..8eb1da5e0 100644
--- a/examples/openclaw-plugin/package.json
+++ b/examples/openclaw-plugin/package.json
@@ -1,6 +1,6 @@
{
"name": "@openviking/openclaw-plugin",
- "version": "2026.9.23",
+ "version": "2026.9.22",
"displayName": "OpenViking",
"description": "OpenClaw context-engine plugin — OpenViking AI memory, long-term memory, knowledge base, semantic search, RAG, context engine. 长期记忆 · 知识库 · 语义检索 · 上下文引擎",
"type": "module",
diff --git a/examples/openclaw-plugin/plugin/openviking-client-runtime.ts b/examples/openclaw-plugin/plugin/openviking-client-runtime.ts
index 60e7c2e64..71a259e0f 100644
--- a/examples/openclaw-plugin/plugin/openviking-client-runtime.ts
+++ b/examples/openclaw-plugin/plugin/openviking-client-runtime.ts
@@ -16,8 +16,6 @@ type ClientRuntimeConfig = {
userId?: string;
headers?: Record<string, string>;
logFindRequests: boolean;
- /** Secret-redaction tier for session messages; the client defaults to "standard". */
- captureRedact?: string;
};
export function createOpenVikingClientRuntime(options: {
@@ -67,7 +65,6 @@ export function createOpenVikingClientRuntime(options: {
routingDebugLog,
{
transport: options.transport,
- captureRedact: cfg.captureRedact,
headers: resolveOpenVikingRequestHeaders({
headers: cfg.headers,
}),
diff --git a/examples/openclaw-plugin/shared/redact.d.mts b/examples/openclaw-plugin/shared/redact.d.mts
deleted file mode 100644
index 065bc11c9..000000000
--- a/examples/openclaw-plugin/shared/redact.d.mts
+++ /dev/null
@@ -1,26 +0,0 @@
-// GENERATED FROM examples/memory-plugin-shared/lib. DO NOT EDIT.
-export type RedactTier = "off" | "standard" | "strict";
-
-export interface RedactOptions {
- /** One of REDACT_TIERS; anything else is normalised (unknown names mean "standard"). */
- tier?: string;
- /** Override the per-install HMAC key (tests). */
- key?: string | Uint8Array;
- /** Where the install key's state directory is looked up. */
- env?: Record<string, string | undefined>;
- /** Scannable characters per string before the rest is cut (default MAX_SCAN_CHARS). */
- maxChars?: number;
- /** A field name to scan the value under, as `keyName=value`. */
- keyName?: string;
-}
-
-export const REDACT_TIERS: readonly string[];
-export const DEFAULT_REDACT_TIER: "standard";
-export const MAX_SCAN_CHARS: number;
-
-export function normalizeRedactTier(value: unknown, fallback?: string): string;
-export function redactText(text: string, opts?: RedactOptions): string;
-export function redactPayload<T>(payload: T, opts?: RedactOptions): T;
-export function redactPayloads<T>(payloads: T[], opts?: RedactOptions): T[];
-export function loadInstallKey(opts?: { env?: Record<string, string | undefined> }): Uint8Array;
-export function shannonEntropy(data: string): number;
diff --git a/examples/openclaw-plugin/shared/redact.mjs b/examples/openclaw-plugin/shared/redact.mjs
deleted file mode 100644
index 727178ee7..000000000
--- a/examples/openclaw-plugin/shared/redact.mjs
+++ /dev/null
@@ -1,522 +0,0 @@
-// GENERATED FROM examples/memory-plugin-shared/lib. DO NOT EDIT.
-/**
- * Client-side secret redaction for captured transcripts.
- *
- * An agent that runs `cat .env` or prints a token puts that credential in the
- * transcript the memory plugins capture. This module replaces such secrets
- * before a payload leaves the machine — before the POST to OpenViking and
- * before the local pending queue writes it to disk — so the server, its
- * extractor and the memories it writes never see the plaintext.
- *
- * The rules are gitleaks' default rule set plus OpenViking's own key formats
- * (lib/secret-rules.mjs, generated), and detection follows gitleaks: a
- * case-insensitive keyword prefilter, the rule regex, the secret taken from
- * the rule's `secretGroup` or else the first non-empty capture group, the
- * Shannon entropy threshold, then the global and the rule's allowlists and
- * stopwords. Only the secret span is replaced, so `API_KEY=sk-...` becomes
- * `API_KEY={{ov_redacted:<rule>:<tag>}}` and the turn still reads as what
- * happened.
- *
- * The tag is the first 8 hex characters of HMAC-SHA256(install key, secret):
- * the same secret gets the same tag across turns and sessions on one machine,
- * but the tag cannot be checked against a guessed secret without the key,
- * which never leaves the machine.
- *
- * Failure policy: redaction fails closed per string. A scan that throws
- * replaces the whole string with `{{ov_redacted:scan-failed:<tag>}}`; it never
- * throws to the hook and never lets the string through unscanned. Text past
- * `maxChars` (MAX_SCAN_CHARS by default) is not scanned either: it is cut at a
- * whitespace boundary (before an unterminated `-----BEGIN` line) and replaced
- * with `{{ov_redacted:scan-oversize:<tag>}}`. The same happens once one call
- * has scanned `maxTotalChars` (MAX_SCAN_TOTAL_CHARS) across all its strings,
- * which keeps a hook's redaction time bounded however large the batch.
- * A missing or unwritable key file only costs tag stability (an in-process
- * random key is used), never redaction itself.
- *
- * Redaction is idempotent: existing `{{ov_redacted:<rule>:<tag>}}`
- * placeholders and well-formed `{{ov_privacy:...}}` references are never
- * scanned or touched, so replaying a pending entry or redacting twice changes
- * nothing.
- */
-
-import { createHmac, randomBytes } from "node:crypto";
-import { linkSync, mkdirSync, readFileSync, renameSync, unlinkSync, writeFileSync } from "node:fs";
-import { dirname, join } from "node:path";
-
-import SECRET_RULES, { GLOBAL_ALLOWLISTS, TIERS } from "./secret-rules.mjs";
-import { stateDir } from "./workspace-identity.mjs";
-
-/** Ordered, cumulative: each tier runs its own rules and every earlier tier's. */
-export const REDACT_TIERS = Object.freeze([...TIERS]);
-export const DEFAULT_REDACT_TIER = "standard";
-
-/**
- * The most characters of one string that are scanned. It matches the
- * largest tool output a plugin captures (`captureToolMaxChars`, at most
- * 1,000,000), so nothing a plugin builds by default is cut.
- */
-export const MAX_SCAN_CHARS = 1_000_000;
-
-/**
- * The most characters scanned in one redactText / redactPayload /
- * redactPayloads call, summed over every string in it. Ordinary text scans at
- * well under 1 s per MB, but keyword-dense data (hashes, base64) can take
- * 10-20 s per MB, and a hook that times out re-sends the same turns next time.
- */
-export const MAX_SCAN_TOTAL_CHARS = 2_000_000;
-
-const OFF_WORDS = new Set(["off", "false", "0", "no"]);
-const ON_WORDS = new Set(["on", "true", "1", "yes"]);
-
-/**
- * Map a configured value onto a tier name. Anything that says "no" (`false`,
- * `0`, `"off"`, any case) is `off`; a value naming no tier this build knows (a
- * newer config, a typo) falls back to the default, so it can only redact more.
- */
-export function normalizeRedactTier(value, fallback = DEFAULT_REDACT_TIER) {
- const safeFallback = REDACT_TIERS.includes(fallback) ? fallback : DEFAULT_REDACT_TIER;
- if (value === false || value === 0) return "off";
- if (value === true || value === 1) return DEFAULT_REDACT_TIER;
- if (typeof value !== "string") return safeFallback;
- const word = value.trim().toLowerCase();
- if (!word) return safeFallback;
- if (OFF_WORDS.has(word)) return "off";
- if (REDACT_TIERS.includes(word)) return word;
- if (ON_WORDS.has(word)) return DEFAULT_REDACT_TIER;
- return safeFallback;
-}
-
-// ---------------------------------------------------------------------------
-// Install key
-// ---------------------------------------------------------------------------
-
-const KEY_HEX_RE = /^[0-9a-f]{64}$/;
-let cachedKey = null;
-let processKey = null;
-
-function readKeyFile(file) {
- try {
- const text = readFileSync(file, "utf8").trim();
- return KEY_HEX_RE.test(text) ? Buffer.from(text, "hex") : null;
- } catch {
- return null;
- }
-}
-
-/**
- * Create the key file without exposing a half-written one: a private temp
- * file is hard-linked into place, which fails if a concurrent hook got there
- * first (its key is then the one read back). A garbage key file, or a
- * filesystem without hard links, gets the temp file renamed over it.
- */
-function createKeyFile(file) {
- mkdirSync(dirname(file), { recursive: true, mode: 0o700 });
- const tmp = `${file}.${process.pid}.${randomBytes(6).toString("hex")}`;
- writeFileSync(tmp, `${randomBytes(32).toString("hex")}\n`, { mode: 0o600, flag: "wx" });
- try {
- linkSync(tmp, file);
- } catch (error) {
- if (error?.code !== "EEXIST" || !readKeyFile(file)) renameSync(tmp, file);
- } finally {
- try { unlinkSync(tmp); } catch { /* renamed into place */ }
- }
- return readKeyFile(file);
-}
-
-/**
- * The per-install HMAC key: 32 random bytes in `<state dir>/redact/install-key`
- * (dir 0700, file 0600). When it cannot be read or created, a random key for
- * this process is used: tags then differ between processes, nothing else.
- */
-export function loadInstallKey({ env = process.env } = {}) {
- let file = "";
- try {
- file = join(stateDir(env), "redact", "install-key");
- } catch {
- // No state dir: process key.
- }
- if (cachedKey && cachedKey.file === file) return cachedKey.key;
- let key = file ? readKeyFile(file) : null;
- if (!key && file) {
- try {
- key = createKeyFile(file);
- } catch {
- key = null;
- }
- }
- key ||= processKey ||= randomBytes(32);
- cachedKey = { file, key };
- return key;
-}
-
-function placeholder(ruleId, key, secret) {
- const tag = createHmac("sha256", key).update(String(secret), "utf8").digest("hex").slice(0, 8);
- return `{{ov_redacted:${ruleId}:${tag}}}`;
-}
-
-// ---------------------------------------------------------------------------
-// Detection (gitleaks semantics)
-// ---------------------------------------------------------------------------
-
-function compileAllowlists(list) {
- return (list || []).map((al) => ({
- and: al.condition === "AND",
- target: al.regexTarget || "secret",
- regexes: (al.regexes || []).map((r) => new RegExp(r.regex, r.flags)),
- stopwords: (al.stopwords || []).map((w) => String(w).toLowerCase()),
- }));
-}
-
-const compiledCache = new Map();
-
-/** Compile the rules once per process; throws if a rule does not compile. */
-export function compileRuleSet(rules = SECRET_RULES, globalAllowlists = GLOBAL_ALLOWLISTS) {
- const hit = compiledCache.get(rules);
- if (hit && hit.globalsSource === globalAllowlists) return hit;
- const set = {
- globalsSource: globalAllowlists,
- globals: compileAllowlists(globalAllowlists),
- rules: rules.map((rule) => ({
- id: rule.id,
- tierIndex: REDACT_TIERS.indexOf(rule.tier || DEFAULT_REDACT_TIER),
- keywords: (rule.keywords || []).map((k) => String(k).toLowerCase()),
- entropy: Number(rule.entropy) || 0,
- secretGroup: Number(rule.secretGroup) || 0,
- scan: new RegExp(rule.regex, `${rule.flags || ""}g`),
- groups: new RegExp(rule.regex, `${rule.flags || ""}d`),
- allowlists: compileAllowlists(rule.allowlists),
- generic: rule.id.includes("generic"),
- })),
- };
- compiledCache.set(rules, set);
- return set;
-}
-
-/**
- * Shannon entropy as gitleaks computes it: symbol frequencies over code
- * points, divided by the UTF-8 byte length (Go's `len(string)`).
- */
-export function shannonEntropy(data) {
- if (!data) return 0;
- const counts = new Map();
- let bytes = 0;
- for (const ch of data) {
- counts.set(ch, (counts.get(ch) || 0) + 1);
- const cp = ch.codePointAt(0);
- bytes += cp < 0x80 ? 1 : cp < 0x800 ? 2 : cp < 0x10000 ? 3 : 4;
- }
- let entropy = 0;
- for (const count of counts.values()) entropy -= (count / bytes) * Math.log2(count / bytes);
- return entropy;
-}
-
-function isAllowed(allowlists, secret, match, line) {
- const secretLower = secret.toLowerCase();
- for (const al of allowlists) {
- const target = al.target === "match" ? match : al.target === "line" ? line() : secret;
- const checks = [];
- if (al.regexes.length) checks.push(target !== "" && al.regexes.some((re) => re.test(target)));
- if (al.stopwords.length) checks.push(al.stopwords.some((word) => secretLower.includes(word)));
- if (al.and ? checks.every(Boolean) : checks.some(Boolean)) return true;
- }
- return false;
-}
-
-/**
- * The secret spans gitleaks would report in `text`. The `gitleaks:allow`
- * marker is deliberately not honoured: in a transcript it would be a way to
- * opt a line out of redaction.
- */
-function detect(text, rules, globals) {
- const findings = [];
- const lower = text.toLowerCase();
- for (const rule of rules) {
- if (rule.keywords.length && !rule.keywords.some((kw) => lower.includes(kw))) continue;
- const re = rule.scan;
- re.lastIndex = 0;
- for (let m; (m = re.exec(text)) !== null;) {
- if (m[0].length === 0) {
- re.lastIndex++;
- continue;
- }
- // gitleaks trims newlines off the match and re-runs the regex on it.
- let start = m.index;
- let end = m.index + m[0].length;
- while (start < end && text.charCodeAt(start) === 10) start++;
- while (end > start && text.charCodeAt(end - 1) === 10) end--;
- const match = text.slice(start, end);
- let span = [0, match.length];
- const sub = match ? rule.groups.exec(match) : null;
- if (sub && sub.length >= 2) {
- if (rule.secretGroup > 0) span = sub.indices[rule.secretGroup] || [0, 0];
- else span = sub.indices.slice(1).find((idx) => idx && idx[1] > idx[0]) || span;
- }
- const secret = match.slice(span[0], span[1]);
- if (!secret) continue;
- if (rule.entropy && shannonEntropy(secret) <= rule.entropy) continue;
- const line = () => {
- const from = text.lastIndexOf("\n", start - 1) + 1;
- const to = text.indexOf("\n", end);
- return text.slice(from, to < 0 ? text.length : to);
- };
- if (isAllowed(globals, secret, match, line) || isAllowed(rule.allowlists, secret, match, line)) continue;
- findings.push({ start: start + span[0], end: start + span[1], id: rule.id, secret, generic: rule.generic });
- }
- }
- return findings;
-}
-
-// ---------------------------------------------------------------------------
-// Redaction
-// ---------------------------------------------------------------------------
-
-/**
- * Spans that are already placeholders and are never scanned: exactly the
- * placeholders this module writes, and OpenViking privacy references in the
- * grammar the server parses (openviking/privacy/reference.py). Anything else
- * that merely starts with `{{ov_` is scanned like any other text.
- */
-const PROTECTED_RE = new RegExp(
- [
- "\\{\\{ov_redacted:[a-z0-9][a-z0-9-]{0,99}:[0-9a-f]{8}\\}\\}",
- "\\{\\{[ \\t]*ov_privacy:(?:" +
- "ambiguous" +
- "|skill:[A-Za-z0-9_.@-]{1,255}:[^\\s:{}]{1,255}" +
- "|[^\\s:{}]{1,255}:viking://~/privacy/[^/\\s{}]{1,255}/[^#\\s{}]{1,1024}#/values/[^\\s{}]{1,1024}" +
- ")[ \\t]*\\}\\}",
- ].join("|"),
- "g",
-);
-// One pass is not always a fixed point: a placeholder can give the text after
-// it a word boundary it lacked (`ghp_<36>AKIA<16>`: aws-access-token needs
-// `\bAKIA`, which only exists once the GitHub token is replaced). Passes repeat
-// until nothing changes, so a replayed entry is sent byte for byte; a string
-// with no finding costs one pass.
-const MAX_PASSES = 3;
-
-/** The [start, end) stretches of `text` outside existing placeholders. */
-function scannableSegments(text) {
- const segments = [];
- let last = 0;
- for (const m of text.matchAll(PROTECTED_RE)) {
- if (m.index > last) segments.push([last, m.index]);
- last = m.index + m[0].length;
- }
- if (last < text.length) segments.push([last, text.length]);
- return segments;
-}
-
-/**
- * Where scanning stops in a string with more than `max` scannable characters:
- * the `max`-th one, pulled back to whitespace within 4 KiB so a token is not
- * split with its head left in the scanned part. A `-----BEGIN` block whose
- * `-----END ...-----` line lies past the cut cannot match the private-key rule,
- * so the cut moves to the start of the BEGIN line instead.
- */
-function cutPoint(text, segments, max) {
- let budget = max;
- for (const [a, b] of segments) {
- if (b - a <= budget) {
- budget -= b - a;
- continue;
- }
- const hard = a + budget;
- const head = text.slice(a, hard).toLowerCase();
- const begin = head.lastIndexOf("-----begin");
- if (begin >= 0 && !/-----end[^\n]*-----/.test(head.slice(begin))) return a + head.lastIndexOf("\n", begin) + 1;
- for (let k = hard; k > Math.max(a, hard - 4096); k--) if (/\s/.test(text[k - 1])) return k;
- return hard;
- }
- return text.length;
-}
-
-/** Overlapping findings become one span, named by a provider rule over the generic one. */
-function mergeFindings(findings) {
- findings.sort((x, y) => x.start - y.start || y.end - x.end || Number(x.generic) - Number(y.generic));
- const merged = [];
- for (const f of findings) {
- const last = merged[merged.length - 1];
- if (last && f.start < last.end) {
- last.end = Math.max(last.end, f.end);
- if (last.rep.generic && !f.generic) last.rep = f;
- } else {
- merged.push({ start: f.start, end: f.end, rep: f });
- }
- }
- return merged;
-}
-
-/**
- * One scan-and-replace pass over `full`; `base` is where the value starts
- * after a key prefix, and `max` how many characters of the value to scan.
- * Returns the redacted value and how many of its characters were scanned.
- */
-function redactOnce(full, base, ctx, max) {
- const segments = scannableSegments(full);
- const scannable = segments.reduce((n, [a, b]) => n + (b - a), 0);
- const limit = scannable > base + max ? Math.max(base, cutPoint(full, segments, base + max)) : full.length;
- const findings = [];
- for (const [a, b] of segments) {
- if (Math.min(b, limit) <= a) continue;
- for (const f of detect(full.slice(a, Math.min(b, limit)), ctx.rules, ctx.globals)) {
- const start = Math.max(a + f.start, base);
- if (a + f.end > start) findings.push({ ...f, start, end: a + f.end });
- }
- }
- let out = "";
- let pos = base;
- for (const span of mergeFindings(findings)) {
- out += full.slice(pos, span.start) + placeholder(span.rep.id, ctx.key(), span.rep.secret);
- pos = span.end;
- }
- out += full.slice(pos, limit);
- if (limit < full.length) out += placeholder("scan-oversize", ctx.key(), full.slice(limit));
- return { text: out, scanned: Math.max(0, Math.min(scannable, base + max) - base) };
-}
-
-function makeContext(opts = {}) {
- const tier = normalizeRedactTier(opts.tier ?? DEFAULT_REDACT_TIER);
- let key = opts.key ? Buffer.from(opts.key) : null;
- const ctx = {
- tier,
- rules: [],
- globals: [],
- maxChars: Number.isFinite(opts.maxChars) && opts.maxChars > 0 ? opts.maxChars : MAX_SCAN_CHARS,
- // What is left of the call's scan budget; every string's first pass draws on it.
- budget: Number.isFinite(opts.maxTotalChars) && opts.maxTotalChars > 0 ? opts.maxTotalChars : MAX_SCAN_TOTAL_CHARS,
- key: () => (key ||= loadInstallKey(opts.env ? { env: opts.env } : undefined)),
- };
- if (tier === "off") return ctx;
- try {
- const set = compileRuleSet(opts.rules || SECRET_RULES, opts.globalAllowlists || GLOBAL_ALLOWLISTS);
- const index = REDACT_TIERS.indexOf(tier);
- ctx.rules = set.rules.filter((rule) => rule.tierIndex > 0 && rule.tierIndex <= index);
- ctx.globals = set.globals;
- } catch (error) {
- ctx.broken = error;
- }
- return ctx;
-}
-
-function failClosed(text, ctx) {
- try {
- return placeholder("scan-failed", ctx.key(), text);
- } catch {
- return "{{ov_redacted:scan-failed:00000000}}";
- }
-}
-
-function redactStringIn(text, ctx, keyName = null) {
- if (typeof text !== "string" || text === "") return text;
- if (ctx.broken) return failClosed(text, ctx);
- const prefix = keyName ? `${keyName}=` : "";
- // Fixed for every pass, so a later pass never cuts what the first one scanned.
- const max = Math.min(ctx.maxChars, ctx.budget);
- try {
- let current = text;
- for (let pass = 0; pass < MAX_PASSES; pass++) {
- const { text: next, scanned } = redactOnce(prefix + current, prefix.length, ctx, max);
- if (pass === 0) ctx.budget -= scanned;
- if (next === current) return current;
- current = next;
- }
- // Still changing after several passes: not a state to send.
- return failClosed(text, ctx);
- } catch {
- return failClosed(text, ctx);
- }
-}
-
-/**
- * Redact the secrets in one string.
- *
- * @param {string} text
- * @param {object} [opts]
- * @param {string} [opts.tier="standard"] - one of REDACT_TIERS; "off" returns the input
- * @param {string} [opts.keyName] - a field name to scan the value under, as `keyName=value`
- * @param {number} [opts.maxChars] - scannable characters of one string before the rest is cut
- * @param {number} [opts.maxTotalChars] - the same, summed over every string in the call
- * @returns {string}
- */
-export function redactText(text, opts = {}) {
- const ctx = makeContext(opts);
- if (ctx.tier === "off") return text;
- return redactStringIn(text, ctx, opts.keyName || null);
-}
-
-// Message and part fields that identify or describe rather than carry text.
-const META_KEYS = new Set([
- "role", "type", "id", "uri", "peer_id", "session_id", "created_at", "tool_id", "tool_name", "tool_status",
- "context_type", "tool_output_mime_type", "tool_output_externalized_reason",
-]);
-const META_SUFFIX_RE = /_(?:id|uri|ref|sha256|at)$/;
-const KEY_CONTEXT_RE = /^[A-Za-z_][\w.-]{0,63}$/;
-
-const isObject = (value) => value !== null && typeof value === "object" && !Array.isArray(value);
-
-/**
- * Redact every string under `value`. Inside an object each value is scanned
- * as `<key>=<value>`, so a rule that needs a key-ish word (generic-api-key)
- * sees `{ "API_TOKEN": "..." }` as it would see `API_TOKEN=...` in a file;
- * only the value is replaced. Keys are scanned as text of their own.
- */
-function redactDeep(value, ctx, keyName) {
- if (typeof value === "string") return redactStringIn(value, ctx, keyName);
- if (Array.isArray(value)) return value.map((item) => redactDeep(item, ctx, keyName));
- if (!isObject(value)) return value;
- const out = {};
- for (const [k, v] of Object.entries(value)) {
- const key = redactStringIn(k, ctx, null);
- out[key] = redactDeep(v, ctx, key === k && KEY_CONTEXT_RE.test(k) ? k : null);
- }
- return out;
-}
-
-/** A message or part: its fields, metadata copied and the rest redacted. */
-function redactFields(value, ctx) {
- if (!isObject(value)) return redactDeep(value, ctx, null);
- const out = {};
- for (const [k, v] of Object.entries(value)) {
- if (k === "parts" && Array.isArray(v)) out[k] = v.map((part) => redactFields(part, ctx));
- else if (META_KEYS.has(k) || META_SUFFIX_RE.test(k)) out[k] = v;
- else out[k] = redactDeep(v, ctx, null);
- }
- return out;
-}
-
-/**
- * Redact one session add-message payload — `{ role, content }` or
- * `{ role, parts: [...] }` — and return a redacted copy. Text-bearing fields
- * are scanned (`content`, `parts[].text`, `parts[].tool_output`, every leaf of
- * `parts[].tool_input`, `abstract`, any other non-metadata field); ids, URIs,
- * roles, statuses and timestamps are copied. The caller's object is never
- * mutated.
- */
-export function redactPayload(payload, opts = {}) {
- const ctx = makeContext(opts);
- if (ctx.tier === "off") return payload;
- return redactPayloadIn(payload, ctx);
-}
-
-function redactPayloadIn(payload, ctx) {
- if (payload == null) return payload;
- if (typeof payload === "string") return redactStringIn(payload, ctx, null);
- if (typeof payload !== "object") return payload;
- // Walk the data the payload is on the wire (class instances, `toJSON`), as a
- // copy; a payload that cannot be serialised could not be sent either.
- let data;
- try {
- data = JSON.parse(JSON.stringify(payload));
- } catch {
- return failClosed("", ctx);
- }
- return redactFields(data, ctx);
-}
-
-/** redactPayload over a list, with one scan budget (maxTotalChars) for the whole list. */
-export function redactPayloads(payloads, opts = {}) {
- if (!Array.isArray(payloads)) return payloads;
- const ctx = makeContext(opts);
- if (ctx.tier === "off") return payloads;
- return payloads.map((payload) => redactPayloadIn(payload, ctx));
-}
diff --git a/examples/openclaw-plugin/shared/secret-rules.mjs b/examples/openclaw-plugin/shared/secret-rules.mjs
deleted file mode 100644
index 1348a0c71..000000000
--- a/examples/openclaw-plugin/shared/secret-rules.mjs
+++ /dev/null
@@ -1,294 +0,0 @@
-// GENERATED FROM examples/memory-plugin-shared/lib. DO NOT EDIT.
-// GENERATED by examples/memory-plugin-shared/scripts/update-secret-rules.mjs. DO NOT EDIT.
-//
-// Secret detection rules for lib/redact.mjs: the gitleaks v8.30.1 default
-// configuration (config/gitleaks.toml, https://github.com/gitleaks/gitleaks),
-// converted from Go to JavaScript regex syntax and otherwise unchanged, plus
-// the rules for OpenViking's own key formats.
-// Source file sha256: e163e53b9e7e8a8511e77271e2b323ed057759542a6d988258afe3a1fa329caf
-//
-// Tier `strict`: generic-api-key. Every other rule is tier `standard`.
-// Skipped gitleaks rules:
-// cisco-meraki-api-key: nested [\w.-]{0,50}? prefixes: ~3-11 s per MB of hashes or base64url
-// cohere-api-token: nested [\w.-]{0,50}? prefixes: ~3-11 s per MB of hashes or base64url
-// curl-auth-header: time quadratic in line length: minutes for a 1 MB line of `curl ...;` commands
-// curl-auth-user: time quadratic in line length: minutes for a 1 MB line of `curl ...;` commands
-// freemius-secret-key: path-scoped rule; captured text has no file path
-// hashicorp-tf-password: path-scoped rule; captured text has no file path
-// kubernetes-secret-yaml: path-scoped rule; captured text has no file path
-// nuget-config-password: path-scoped rule; captured text has no file path
-// okta-access-token: nested [\w.-]{0,50}? prefixes: ~3-11 s per MB of hashes or base64url
-// pkcs12-file: path-scoped rule; captured text has no file path
-// privateai-api-token: nested [\w.-]{0,50}? prefixes: ~3-11 s per MB of hashes or base64url
-// sumologic-access-id: nested [\w.-]{0,50}? prefixes: ~3-11 s per MB of hashes or base64url
-// OpenViking rules (not from gitleaks):
-// openviking-gateway-key: ovgw_... issued by openviking_gateway/management.py
-// openviking-gateway-management-key: ovgm_... issued by openviking_gateway/cli.py
-// openviking-oauth-access-token: ovat_... issued by openviking/server/oauth/provider.py
-// openviking-oauth-refresh-token: ovrt_... issued by openviking/server/oauth/provider.py
-// openviking-oauth-auth-code: ovac_... issued by openviking/server/oauth/provider.py
-//
-// The gitleaks rule data is used under its license:
-//
-// MIT License
-//
-// Copyright (c) 2019 Zachary Rice
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in all
-// copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-// SOFTWARE.
-
-export const GITLEAKS_VERSION = "v8.30.1";
-
-export const TIERS = ["off","standard","strict"];
-
-export const SKIPPED_RULES = [
- {"id":"cisco-meraki-api-key","reason":"nested [\\w.-]{0,50}? prefixes: ~3-11 s per MB of hashes or base64url"},
- {"id":"cohere-api-token","reason":"nested [\\w.-]{0,50}? prefixes: ~3-11 s per MB of hashes or base64url"},
- {"id":"curl-auth-header","reason":"time quadratic in line length: minutes for a 1 MB line of `curl ...;` commands"},
- {"id":"curl-auth-user","reason":"time quadratic in line length: minutes for a 1 MB line of `curl ...;` commands"},
- {"id":"freemius-secret-key","reason":"path-scoped rule; captured text has no file path"},
- {"id":"hashicorp-tf-password","reason":"path-scoped rule; captured text has no file path"},
- {"id":"kubernetes-secret-yaml","reason":"path-scoped rule; captured text has no file path"},
- {"id":"nuget-config-password","reason":"path-scoped rule; captured text has no file path"},
- {"id":"okta-access-token","reason":"nested [\\w.-]{0,50}? prefixes: ~3-11 s per MB of hashes or base64url"},
- {"id":"pkcs12-file","reason":"path-scoped rule; captured text has no file path"},
- {"id":"privateai-api-token","reason":"nested [\\w.-]{0,50}? prefixes: ~3-11 s per MB of hashes or base64url"},
- {"id":"sumologic-access-id","reason":"nested [\\w.-]{0,50}? prefixes: ~3-11 s per MB of hashes or base64url"},
-];
-
-export const GLOBAL_ALLOWLISTS = [
- {"condition":"OR","regexTarget":"secret","regexes":[{"regex":"^true|false|null$","flags":"i"},{"regex":"^(?:[aA]+|[bB]+|[cC]+|[dD]+|[eE]+|[fF]+|[gG]+|[hH]+|[iI]+|[jJ]+|[kK]+|[lL]+|[mM]+|[nN]+|[oO]+|[pP]+|[qQ]+|[rR]+|[sS]+|[tT]+|[uU]+|[vV]+|[wW]+|[xX]+|[yY]+|[zZ]+|\\*+|\\.+)$","flags":""},{"regex":"^\\$(?:\\d+|{\\d+})$","flags":""},{"regex":"^\\$(?:[A-Z_]+|[a-z_]+)$","flags":""},{"regex":"^\\${(?:[A-Z_]+|[a-z_]+)}$","flags":""},{"regex":"^\\{\\{[ \\t]*[\\w ().|]+[ \\t]*}}$","flags":""},{"regex":"^\\$\\{\\{[ \\t]*(?:(?:env|github|secrets|vars)(?:\\.[A-Za-z]\\w+)+[\\w \"'&./=|]*)[ \\t]*}}$","flags":""},{"regex":"^%(?:[A-Z_]+|[a-z_]+)%$","flags":""},{"regex":"^%[+\\-# 0]?[bcdeEfFgGoOpqstTUvxX]$","flags":""},{"regex":"^\\{\\d{0,2}}$","flags":""},{"regex":"^@(?:[A-Z_]+|[a-z_]+)@$","flags":""},{"regex":"^/Users/[a-z0-9A-Z]+/[\\w .-/]+$","flags":""},{"regex":"^/(?:bin|etc|home|opt|tmp|usr|var)/[\\w ./\\-]+$","flags":""}],"stopwords":["014df517-39d1-4453-b7b3-9930c563627c","abcdefghijklmnopqrstuvwxyz"]},
-];
-
-export default [
- {"id":"1password-secret-key","regex":"\\bA3-[A-Z0-9]{6}-(?:(?:[A-Z0-9]{11})|(?:[A-Z0-9]{6}-[A-Z0-9]{5}))-[A-Z0-9]{5}-[A-Z0-9]{5}-[A-Z0-9]{5}\\b","flags":"","keywords":["a3-"],"entropy":3.8,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"1password-service-account-token","regex":"ops_eyJ[a-zA-Z0-9+/]{250,}={0,3}","flags":"","keywords":["ops_"],"entropy":4,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"adafruit-api-key","regex":"[\\w.\\-]{0,50}?(?:adafruit)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9_\\-]{32})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["adafruit"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"adobe-client-id","regex":"[\\w.\\-]{0,50}?(?:adobe)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-f0-9]{32})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["adobe"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"adobe-client-secret","regex":"\\b(p8e-[a-z0-9A-Z]{32})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["p8e-"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"age-secret-key","regex":"AGE-SECRET-KEY-1[QPZRY9X8GF2TVDW0S3JN54KHCE6MUA7L]{58}","flags":"","keywords":["age-secret-key-1"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"airtable-api-key","regex":"[\\w.\\-]{0,50}?(?:airtable)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{17})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["airtable"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"airtable-personnal-access-token","regex":"\\b(pat[0-9A-Za-z]{14}\\.[a-f0-9]{64})\\b","flags":"","keywords":["airtable"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"algolia-api-key","regex":"[\\w.\\-]{0,50}?(?:algolia)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{32})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["algolia"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"alibaba-access-key-id","regex":"\\b(LTAI[a-z0-9A-Z]{20})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["ltai"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"alibaba-secret-key","regex":"[\\w.\\-]{0,50}?(?:alibaba)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{30})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["alibaba"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"anthropic-admin-api-key","regex":"\\b(sk-ant-admin01-[a-zA-Z0-9_\\-]{93}AA)(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["sk-ant-admin01"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"anthropic-api-key","regex":"\\b(sk-ant-api03-[a-zA-Z0-9_\\-]{93}AA)(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["sk-ant-api03"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"artifactory-api-key","regex":"\\bAKCp[A-Za-z0-9]{69}\\b","flags":"","keywords":["akcp"],"entropy":4.5,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"artifactory-reference-token","regex":"\\bcmVmd[A-Za-z0-9]{59}\\b","flags":"","keywords":["cmvmd"],"entropy":4.5,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"asana-client-id","regex":"[\\w.\\-]{0,50}?(?:asana)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([0-9]{16})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["asana"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"asana-client-secret","regex":"[\\w.\\-]{0,50}?(?:asana)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{32})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["asana"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"atlassian-api-token","regex":"[\\w.\\-]{0,50}?(?:(?:ATLASSIAN|[Aa]tlassian)|(?:CONFLUENCE|[Cc]onfluence)|(?:JIRA|[Jj]ira))(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9A-Z]{20}[a-f0-9A-F]{4})(?:[\\x60'\"\\s;]|\\\\[nrNR]|$)|\\b([Aa][Tt][Aa][Tt][Tt]3[A-Za-z0-9_\\-=a-zA-Z]{186})(?:[\\x60'\"\\s;]|\\\\[nrNR]|$)","flags":"","keywords":["atlassian","confluence","jira","atatt3"],"entropy":3.5,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"authress-service-client-access-key","regex":"\\b((?:sc|ext|scauth|authress)_[a-z0-9A-Z]{5,30}\\.[a-z0-9A-Z]{4,6}\\.(?:acc)[_\\-][a-z0-9\\-A-Z]{10,32}\\.[a-z0-9+/_=\\-A-Z]{30,120})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["sc_","ext_","scauth_","authress_"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"aws-access-token","regex":"\\b((?:A3T[A-Z0-9]|AKIA|ASIA|ABIA|ACCA)[A-Z2-7]{16})\\b","flags":"","keywords":["a3t","akia","asia","abia","acca"],"entropy":3,"secretGroup":0,"allowlists":[{"condition":"OR","regexTarget":"secret","regexes":[{"regex":"[^\\n]+EXAMPLE$","flags":""}],"stopwords":[]}],"tier":"standard"},
- {"id":"aws-amazon-bedrock-api-key-long-lived","regex":"\\b(ABSK[A-Za-z0-9+/]{109,269}={0,2})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["absk"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"aws-amazon-bedrock-api-key-short-lived","regex":"bedrock-api-key-YmVkcm9jay5hbWF6b25hd3MuY29t","flags":"","keywords":["bedrock-api-key-"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"azure-ad-client-secret","regex":"(?:^|[\\\\'\"\\x60\\s>=:(,)])([a-zA-Z0-9_~.]{3}\\dQ~[a-zA-Z0-9_~.\\-]{31,34})(?:$|[\\\\'\"\\x60\\s<),])","flags":"","keywords":["q~"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"beamer-api-token","regex":"[\\w.\\-]{0,50}?(?:beamer)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}(b_[a-z0-9=_\\-]{44})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["beamer"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"bitbucket-client-id","regex":"[\\w.\\-]{0,50}?(?:bitbucket)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{32})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["bitbucket"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"bitbucket-client-secret","regex":"[\\w.\\-]{0,50}?(?:bitbucket)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9=_\\-]{64})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["bitbucket"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"bittrex-access-key","regex":"[\\w.\\-]{0,50}?(?:bittrex)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{32})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["bittrex"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"bittrex-secret-key","regex":"[\\w.\\-]{0,50}?(?:bittrex)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{32})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["bittrex"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"clickhouse-cloud-api-secret-key","regex":"\\b(4b1d[A-Za-z0-9]{38})\\b","flags":"","keywords":["4b1d"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"clojars-api-token","regex":"CLOJARS_[a-z0-9]{60}","flags":"i","keywords":["clojars_"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"cloudflare-api-key","regex":"[\\w.\\-]{0,50}?(?:cloudflare)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9_\\-]{40})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["cloudflare"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"cloudflare-global-api-key","regex":"[\\w.\\-]{0,50}?(?:cloudflare)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-f0-9]{37})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["cloudflare"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"cloudflare-origin-ca-key","regex":"\\b(v1\\.0-[a-f0-9]{24}-[a-f0-9]{146})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["cloudflare","v1.0-"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"codecov-access-token","regex":"[\\w.\\-]{0,50}?(?:codecov)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{32})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["codecov"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"coinbase-access-token","regex":"[\\w.\\-]{0,50}?(?:coinbase)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9_\\-]{64})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["coinbase"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"confluent-access-token","regex":"[\\w.\\-]{0,50}?(?:confluent)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{16})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["confluent"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"confluent-secret-key","regex":"[\\w.\\-]{0,50}?(?:confluent)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{64})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["confluent"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"contentful-delivery-api-token","regex":"[\\w.\\-]{0,50}?(?:contentful)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9=_\\-]{43})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["contentful"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"databricks-api-token","regex":"\\b(dapi[a-f0-9]{32}(?:-\\d)?)(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["dapi"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"datadog-access-token","regex":"[\\w.\\-]{0,50}?(?:datadog)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{40})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["datadog"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"defined-networking-api-token","regex":"[\\w.\\-]{0,50}?(?:dnkey)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}(dnkey-[a-z0-9=_\\-]{26}-[a-z0-9=_\\-]{52})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["dnkey"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"digitalocean-access-token","regex":"\\b(doo_v1_[a-f0-9]{64})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["doo_v1_"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"digitalocean-pat","regex":"\\b(dop_v1_[a-f0-9]{64})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["dop_v1_"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"digitalocean-refresh-token","regex":"\\b(dor_v1_[a-f0-9]{64})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["dor_v1_"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"discord-api-token","regex":"[\\w.\\-]{0,50}?(?:discord)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-f0-9]{64})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["discord"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"discord-client-id","regex":"[\\w.\\-]{0,50}?(?:discord)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([0-9]{18})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["discord"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"discord-client-secret","regex":"[\\w.\\-]{0,50}?(?:discord)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9=_\\-]{32})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["discord"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"doppler-api-token","regex":"dp\\.pt\\.[a-z0-9A-Z]{43}","flags":"","keywords":["dp.pt."],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"droneci-access-token","regex":"[\\w.\\-]{0,50}?(?:droneci)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{32})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["droneci"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"dropbox-api-token","regex":"[\\w.\\-]{0,50}?(?:dropbox)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{15})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["dropbox"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"dropbox-long-lived-api-token","regex":"[\\w.\\-]{0,50}?(?:dropbox)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{11}(AAAAAAAAAA)[a-z0-9\\-_=]{43})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["dropbox"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"dropbox-short-lived-api-token","regex":"[\\w.\\-]{0,50}?(?:dropbox)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}(sl\\.[a-z0-9\\-=_]{135})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["dropbox"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"duffel-api-token","regex":"duffel_(?:test|live)_[a-z0-9_\\-=A-Z]{43}","flags":"","keywords":["duffel_"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"dynatrace-api-token","regex":"dt0c01\\.[a-z0-9A-Z]{24}\\.[a-z0-9A-Z]{64}","flags":"","keywords":["dt0c01."],"entropy":4,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"easypost-api-token","regex":"\\bEZAK[a-z0-9A-Z]{54}\\b","flags":"","keywords":["ezak"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"easypost-test-api-token","regex":"\\bEZTK[a-z0-9A-Z]{54}\\b","flags":"","keywords":["eztk"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"etsy-access-token","regex":"[\\w.\\-]{0,50}?(?:(?:ETSY|[Ee]tsy))(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9A-Z]{24})(?:[\\x60'\"\\s;]|\\\\[nrNR]|$)","flags":"","keywords":["etsy"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"facebook-access-token","regex":"\\b(\\d{15,16}(\\||%)[0-9a-z\\-_]{27,40})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["facebook"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"facebook-page-access-token","regex":"\\b(EAA[MC][a-z0-9A-Z]{100,})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["eaam","eaac"],"entropy":4,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"facebook-secret","regex":"[\\w.\\-]{0,50}?(?:facebook)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-f0-9]{32})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["facebook"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"fastly-api-token","regex":"[\\w.\\-]{0,50}?(?:fastly)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9=_\\-]{32})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["fastly"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"finicity-api-token","regex":"[\\w.\\-]{0,50}?(?:finicity)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-f0-9]{32})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["finicity"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"finicity-client-secret","regex":"[\\w.\\-]{0,50}?(?:finicity)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{20})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["finicity"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"finnhub-access-token","regex":"[\\w.\\-]{0,50}?(?:finnhub)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{20})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["finnhub"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"flickr-access-token","regex":"[\\w.\\-]{0,50}?(?:flickr)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{32})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["flickr"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"flutterwave-encryption-key","regex":"FLWSECK_TEST-[a-h0-9A-H]{12}","flags":"","keywords":["flwseck_test"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"flutterwave-public-key","regex":"FLWPUBK_TEST-[a-h0-9A-H]{32}-[Xx]","flags":"","keywords":["flwpubk_test"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"flutterwave-secret-key","regex":"FLWSECK_TEST-[a-h0-9A-H]{32}-[Xx]","flags":"","keywords":["flwseck_test"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"flyio-access-token","regex":"\\b((?:fo1_[\\w\\-]{43}|fm1[ar]_[a-zA-Z0-9+\\/]{100,}={0,3}|fm2_[a-zA-Z0-9+\\/]{100,}={0,3}))(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["fo1_","fm1","fm2_"],"entropy":4,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"frameio-api-token","regex":"fio-u-[a-z0-9\\-_=A-Z]{64}","flags":"","keywords":["fio-u-"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"freshbooks-access-token","regex":"[\\w.\\-]{0,50}?(?:freshbooks)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{64})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["freshbooks"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"gcp-api-key","regex":"\\b(AIza[\\w\\-]{35})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["aiza"],"entropy":4,"secretGroup":0,"allowlists":[{"condition":"OR","regexTarget":"secret","regexes":[{"regex":"AIzaSyabcdefghijklmnopqrstuvwxyz1234567","flags":""},{"regex":"AIzaSyAnLA7NfeLquW1tJFpx_eQCxoX-oo6YyIs","flags":""},{"regex":"AIzaSyCkEhVjf3pduRDt6d1yKOMitrUEke8agEM","flags":""},{"regex":"AIzaSyDMAScliyLx7F0NPDEJi1QmyCgHIAODrlU","flags":""},{"regex":"AIzaSyD3asb-2pEZVqMkmL6M9N6nHZRR_znhrh0","flags":""},{"regex":"AIzayDNSXIbFmlXbIE6mCzDLQAqITYefhixbX4A","flags":""},{"regex":"AIzaSyAdOS2zB6NCsk1pCdZ4-P6GBdi_UUPwX7c","flags":""},{"regex":"AIzaSyASWm6HmTMdYWpgMnjRBjxcQ9CKctWmLd4","flags":""},{"regex":"AIzaSyANUvH9H9BsUccjsu2pCmEkOPjjaXeDQgY","flags":""},{"regex":"AIzaSyA5_iVawFQ8ABuTZNUdcwERLJv_a_p4wtM","flags":""},{"regex":"AIzaSyA4UrcGxgwQFTfaI3no3t7Lt1sjmdnP5sQ","flags":""},{"regex":"AIzaSyDSb51JiIcB6OJpwwMicseKRhhrOq1cS7g","flags":""},{"regex":"AIzaSyBF2RrAIm4a0mO64EShQfqfd2AFnzAvvuU","flags":""},{"regex":"AIzaSyBcE-OOIbhjyR83gm4r2MFCu4MJmprNXsw","flags":""},{"regex":"AIzaSyB8qGxt4ec15vitgn44duC5ucxaOi4FmqE","flags":""},{"regex":"AIzaSyA8vmApnrHNFE0bApF4hoZ11srVL_n0nvY","flags":""}],"stopwords":[]}],"tier":"standard"},
- {"id":"generic-api-key","regex":"[\\w.\\-]{0,50}?(?:[aA][cC][cC][eE][sS][sS]|[aA][uU][tT][hH]|(?:[Aa]pi|API)|[cC][rR][eE][dD][eE][nN][tT][iI][aA][lL]|[cC][rR][eE][dD][sS]|[kK][eE][yY]|[pP][aA][sS][sS][wW](?:[oO][rR])?[dD]|[sS][eE][cC][rR][eE][tT]|[tT][oO][kK][eE][nN])(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([\\w.=\\-]{10,150}|[a-z0-9A-Z][a-z0-9+/A-Z]{11,}={0,3})(?:[\\x60'\"\\s;]|\\\\[nrNR]|$)","flags":"","keywords":["access","api","auth","key","credential","creds","passwd","password","secret","token"],"entropy":3.5,"secretGroup":0,"allowlists":[{"condition":"OR","regexTarget":"secret","regexes":[{"regex":"^[a-zA-Z_.\\-]+$","flags":""}],"stopwords":[]},{"condition":"OR","regexTarget":"match","regexes":[{"regex":"(?:[aA][cC][cC][eE][sS][sS](?:[iI][bB][iI][lL][iI][tT][yY]|[oO][rR])|[aA][cC][cC][eE][sS][sS][_.\\-]?[iI][dD]|[rR][aA][nN][dD][oO][mM][_.\\-]?[aA][cC][cC][eE][sS][sS]|[aA][pP][iI][_.\\-]?(?:[iI][dD]|[nN][aA][mM][eE]|[vV][eE][rR][sS][iI][oO][nN])|[rR][aA][pP][iI][dD]|[cC][aA][pP][iI][tT][aA][lL]|[a-z0-9\\-A-Z]*?[aA][pP][iI][a-z0-9\\-A-Z]*?:[jJ][aA][rR]:|[aA][uU][tT][hH][oO][rR]|[Xx]-[Mm][Ss]-[Ee][xX][cC][hH][aA][nN][gG][eE]-[Oo][rR][gG][aA][nN][iI][zZ][aA][tT][iI][oO][nN]-[Aa][uU][tT][hH]|[Aa][uU][tT][hH][eE][nN][tT][iI][cC][aA][tT][iI][oO][nN]-[Rr][eE][sS][uU][lL][tT][sS]|(?:[cC][rR][eE][dD][eE][nN][tT][iI][aA][lL][sS]?[_.\\-]?[iI][dD]|[wW][iI][tT][hH][Cc][rR][eE][dD][eE][nN][tT][iI][aA][lL][sS])|(?:[bB][uU][cC][kK][eE][tT]|[fF][oO][rR][eE][iI][gG][nN]|[hH][oO][tT]|[iI][dD][xX]|[nN][aA][tT][uU][rR][aA][lL]|[pP][rR][iI][mM][aA][rR][yY]|[pP][uU][bB](?:[lL][iI][cC])?|[sS][cC][hH][eE][mM][aA]|[sS][eE][qQ][uU][eE][nN][cC][eE])[_.\\-]?[kK][eE][yY]|(?:[tT][uU][rR][kK][eE][yY])|[kK][eE][yY][_.\\-]?(?:[aA][lL][iI][aA][sS]|[bB][oO][aA][rR][dD]|[cC][oO][dD][eE]|[fF][rR][aA][mM][eE]|[iI][dD]|[lL][eE][nN][gG][tT][hH]|[mM][eE][sS][hH]|[nN][aA][mM][eE]|[pP][aA][iI][rR]|[pP][rR][eE][sS][sS](?:[eE][dD])?|[rR][iI][nN][gG]|[sS][eE][lL][eE][cC][tT][oO][rR]|[sS][iI][gG][nN][aA][tT][uU][rR][eE]|[sS][iI][zZ][eE]|[sS][tT][oO][nN][eE]|[sS][tT][oO][rR][eE][tT][yY][pP][eE]|[wW][oO][rR][dD]|[uU][pP]|[dD][oO][wW][nN]|[lL][eE][fF][tT]|[rR][iI][gG][hH][tT])|[kK][eE][yY][_.\\-]?[vV][aA][uU][lL][tT][_.\\-]?(?:[iI][dD]|[nN][aA][mM][eE])|[kK][eE][yY][Vv][aA][uU][lL][tT][Tt][oO][Ss][tT][oO][rR][eE][Ss][eE][cC][rR][eE][tT][sS]|[kK][eE][yY](?:[sS][tT][oO][rR][eE]|[tT][aA][bB])[_.\\-]?(?:[fF][iI][lL][eE]|[pP][aA][tT][hH])|[iI][sS][sS][uU][eE][rR][kK][eE][yY][hH][aA][sS][hH]|(?:[DdMm]onkey|[DM]ONKEY)|[kK][eE][yY][iI][nN][gG]|(?:[sS][eE][cC][rR][eE][tT])[_.\\-]?(?:[lL][eE][nN][gG][tT][hH]|[nN][aA][mM][eE]|[sS][iI][zZ][eE])|[Uu][sS][eE][rR][Ss][eE][cC][rR][eE][tT][sS][Ii][dD]|(?:[cC][sS][rR][fF])[_.\\-]?[tT][oO][kK][eE][nN]|(?:[iI][oO]\\.[jJ][sS][oO][nN][wW][eE][bB][tT][oO][kK][eE][nN][ \\t]?:[ \\t]?[\\w\\-]+)|(?:[aA][pP][iI]|[cC][rR][eE][dD][eE][nN][tT][iI][aA][lL][sS]|[tT][oO][kK][eE][nN])[_.\\-]?(?:[eE][nN][dD][pP][oO][iI][nN][tT]|[uU][rR][ilIL])|[pP][uU][bB][lL][iI][cC][_.\\-]?[tT][oO][kK][eE][nN]|(?:[kK][eE][yY]|[tT][oO][kK][eE][nN])[_.\\-]?[fF][iI][lL][eE]|(?:(?:[A-Z_]+=\\n[A-Z_]+=|[a-z_]+=\\n[a-z_]+=)(?:\\n|$))|(?:(?:[A-Z.]+=\\n[A-Z.]+=|[a-z.]+=\\n[a-z.]+=)(?:\\n|$)))","flags":""}],"stopwords":["000000","6fe4476ee5a1832882e326b506d14126","_ec2_","aaaaaa","about","abstract","academy","acces","account","act-","act.","act_","action","active","actively","activity","adapter","add-","add-on","add.","add_","addon","addres","admin","adobe","advanced","adventure","agent","agile","air-","air.","air_","ajax","akka","alert","alfred","algorithm","all-","all.","all_","alloy","alpha","amazon","amqp","analysi","analytic","analyzer","android","angular","angularj","animate","animation","another","ansible","answer","ant-","ant.","ant_","any-","any.","any_","apache","app-","app.","app_","apple","arch","archive","archived","arduino","array","art-","art.","art_","article","asp-","asp.","asp_","asset","async","atom","attention","audio","audit","aura","auth","author","authorize","auto","automated","automatic","awesome","aws_","azure","back","backbone","backend","backup","bar-","bar.","bar_","base","based","bash","basic","batch","been","beer","behavior","being","benchmark","best","beta","better","big-","big.","big_","binary","binding","bit-","bit.","bit_","bitcoin","block","blog","board","book","bookmark","boost","boot","bootstrap","bosh","bot-","bot.","bot_","bower","box-","box.","box_","boxen","bracket","branch","bridge","browser","brunch","buffer","bug-","bug.","bug_","build","builder","building","buildout","buildpack","built","bundle","busines","but-","but.","but_","button","cache","caching","cakephp","calendar","call","camera","campfire","can-","can.","can_","canva","captcha","capture","card","carousel","case","cassandra","cat-","cat.","cat_","category","center","cento","challenge","change","changelog","channel","chart","chat","cheat","check","checker","chef","ches","chinese","chosen","chrome","ckeditor","clas","classe","classic","clean","cli-","cli.","cli_","client","clojure","clone","closure","cloud","club","cluster","cms-","cms_","coco","code","coding","coffee","color","combination","combo","command","commander","comment","commit","common","community","compas","compiler","complete","component","composer","computer","computing","con-","con.","con_","concept","conf","config","connect","connector","console","contact","container","contao","content","contest","context","control","convert","converter","conway'","cookbook","cookie","cool","copy","cordova","core","couchbase","couchdb","countdown","counter","course","craft","crawler","create","creating","creator","credential","crm-","crm.","crm_","cros","crud","csv-","csv.","csv_","cube","cucumber","cuda","current","currently","custom","daemon","dark","dart","dash","dashboard","data","database","date","day-","day.","day_","dead","debian","debug","debugger","deck","define","del-","del.","del_","delete","demo","deploy","design","designer","desktop","detection","detector","dev-","dev.","dev_","develop","developer","device","devise","diff","digital","directive","directory","discovery","display","django","dns-","dns_","doc-","doc.","doc_","docker","docpad","doctrine","document","doe-","doe.","doe_","dojo","dom-","dom.","dom_","domain","don't","done","dot-","dot.","dot_","dotfile","download","draft","drag","drill","drive","driven","driver","drop","dropbox","drupal","dsl-","dsl.","dsl_","dynamic","easy","ecdsa","eclipse","edit","editing","edition","editor","element","emac","email","embed","embedded","ember","emitter","emulator","encoding","endpoint","engine","english","enhanced","entity","entry","env_","episode","erlang","error","espresso","event","evented","example","exchange","exercise","experiment","expire","exploit","explorer","export","exporter","expres","ext-","ext.","ext_","extended","extension","external","extra","extractor","fabric","facebook","factory","fake","fast","feature","feed","fewfwef","ffmpeg","field","file","filter","find","finder","firefox","firmware","first","fish","fix-","fix_","flash","flask","flat","flex","flexible","flickr","flow","fluent","fluentd","fluid","folder","font","force","foreman","fork","form","format","formatter","forum","foundry","framework","free","friend","friendly","front-end","frontend","ftp-","ftp.","ftp_","fuel","full","fun-","fun.","fun_","func","future","gaia","gallery","game","gateway","gem-","gem.","gem_","gen-","gen.","gen_","general","generator","generic","genetic","get-","get.","get_","getenv","getting","ghost","gist","git-","git.","git_","github","gitignore","gitlab","glas","gmail","gnome","gnu-","gnu.","gnu_","goal","golang","gollum","good","google","gpu-","gpu.","gpu_","gradle","grail","graph","graphic","great","grid","groovy","group","grunt","guard","gui-","gui.","gui_","guide","guideline","gulp","gwt-","gwt.","gwt_","hack","hackathon","hacker","hacking","hadoop","haml","handler","hardware","has-","has_","hash","haskell","have","haxe","hello","help","helper","here","hero","heroku","high","hipchat","history","home","homebrew","homepage","hook","host","hosting","hot-","hot.","hot_","house","how-","how.","how_","html","http","hub-","hub.","hub_","hubot","human","icon","ide-","ide.","ide_","idea","identity","idiomatic","image","impact","import","important","importer","impres","index","infinite","info","injection","inline","input","inside","inspector","instagram","install","installer","instant","intellij","interface","internet","interview","into","intro","ionic","iphone","ipython","irc-","irc_","iso-","iso.","iso_","issue","jade","jasmine","java","jbos","jekyll","jenkin","jetbrains","job-","job.","job_","joomla","jpa-","jpa.","jpa_","jquery","json","just","kafka","karma","kata","kernel","keyboard","kindle","kit-","kit.","kit_","kitchen","knife","koan","kohana","lab-","lab.","lab_","lambda","lamp","language","laravel","last","latest","latex","launcher","layer","layout","lazy","ldap","leaflet","league","learn","learning","led-","led.","led_","leetcode","les-","les.","les_","level","leveldb","lib-","lib.","lib_","librarie","library","license","life","liferay","light","lightbox","like","line","link","linked","linkedin","linux","lisp","list","lite","little","load","loader","local","location","lock","log-","log.","log_","logger","logging","logic","login","logstash","longer","look","love","lua-","lua.","lua_","mac-","mac.","mac_","machine","made","magento","magic","mail","make","maker","making","man-","man.","man_","manage","manager","manifest","manual","map-","map.","map_","mapper","mapping","markdown","markup","master","math","matrix","maven","md5","mean","media","mediawiki","meetup","memcached","memory","menu","merchant","message","messaging","meta","metadata","meteor","method","metric","micro","middleman","migration","minecraft","miner","mini","minimal","mirror","mit-","mit.","mit_","mobile","mocha","mock","mod-","mod.","mod_","mode","model","modern","modular","module","modx","money","mongo","mongodb","mongoid","mongoose","monitor","monkey","more","motion","moved","movie","mozilla","mqtt","mule","multi","multiple","music","mustache","mvc-","mvc.","mvc_","mysql","nagio","name","native","need","neo-","neo.","neo_","nest","nested","net-","net.","net_","nette","network","new-","new.","new_","next","nginx","ninja","nlp-","nlp.","nlp_","node","nodej","nosql","not-","not.","not_","note","notebook","notepad","notice","notifier","now-","now.","now_","number","oauth","object","objective","obsolete","ocaml","octopres","official","old-","old.","old_","onboard","online","only","open","opencv","opengl","openshift","openwrt","option","oracle","org-","org.","org_","origin","original","orm-","orm.","orm_","osx-","osx_","our-","our.","our_","out-","out.","out_","output","over","overview","own-","own.","own_","pack","package","packet","page","panel","paper","paperclip","para","parallax","parallel","parse","parser","parsing","particle","party","password","patch","path","pattern","payment","paypal","pdf-","pdf.","pdf_","pebble","people","perl","personal","phalcon","phoenix","phone","phonegap","photo","php-","php.","php_","physic","picker","pipeline","platform","play","player","please","plu-","plu.","plu_","plug-in","plugin","plupload","png-","png.","png_","poker","polyfill","polymer","pool","pop-","pop.","pop_","popcorn","popup","port","portable","portal","portfolio","post","power","powered","powerful","prelude","pretty","preview","principle","print","pro-","pro.","pro_","problem","proc","product","profile","profiler","program","progres","project","protocol","prototype","provider","proxy","public","pull","puppet","pure","purpose","push","pusher","pyramid","python","quality","query","queue","quick","rabbitmq","rack","radio","rail","railscast","random","range","raspberry","rdf-","rdf.","rdf_","react","reactive","read","reader","readme","ready","real","real-time","reality","realtime","recipe","recorder","red-","red.","red_","reddit","redi","redmine","reference","refinery","refresh","registry","related","release","remote","rendering","repo","report","request","require","required","requirej","research","resource","response","resque","rest","restful","resume","reveal","reverse","review","riak","rich","right","ring","robot","role","room","router","routing","rpc-","rpc.","rpc_","rpg-","rpg.","rpg_","rspec","ruby-","ruby.","ruby_","rule","run-","run.","run_","runner","running","runtime","rust","rvm-","rvm.","rvm_","salt","sample","sandbox","sas-","sas.","sas_","sbt-","sbt.","sbt_","scala","scalable","scanner","schema","scheme","school","science","scraper","scratch","screen","script","scroll","scs-","scs.","scs_","sdk-","sdk.","sdk_","sdl-","sdl.","sdl_","search","secure","security","see-","see.","see_","seed","select","selector","selenium","semantic","sencha","send","sentiment","serie","server","service","session","set-","set.","set_","setting","setup","sha1","sha2","sha256","share","shared","sharing","sheet","shell","shield","shipping","shop","shopify","shortener","should","show","showcase","side","silex","simple","simulator","single","site","skeleton","sketch","skin","slack","slide","slider","slim","small","smart","smtp","snake","snapshot","snippet","soap","social","socket","software","solarized","solr","solution","solver","some","soon","source","space","spark","spatial","spec","sphinx","spine","spotify","spree","spring","sprite","sql-","sql.","sql_","sqlite","ssh-","ssh.","ssh_","stack","staging","standard","stanford","start","started","starter","startup","stat","statamic","state","static","statistic","statsd","statu","steam","step","still","stm-","stm.","stm_","storage","store","storm","story","strategy","stream","streaming","string","stripe","structure","studio","study","stuff","style","sublime","sugar","suite","summary","super","support","supported","svg-","svg.","svg_","svn-","svn.","svn_","swagger","swift","switch","switcher","symfony","symphony","sync","synopsi","syntax","system","tab-","tab.","tab_","table","tag-","tag.","tag_","talk","target","task","tcp-","tcp.","tcp_","tdd-","tdd.","tdd_","team","tech","template","term","terminal","testing","tetri","text","textmate","theme","theory","three","thrift","time","timeline","timer","tiny","tinymce","tip-","tip.","tip_","title","todo","todomvc","token","tool","toolbox","toolkit","top-","top.","top_","tornado","touch","tower","tracker","tracking","traffic","training","transfer","translate","transport","tree","trello","try-","try.","try_","tumblr","tut-","tut.","tut_","tutorial","tweet","twig","twitter","type","typo","ubuntu","uiview","ultimate","under","unit","unity","universal","unix","update","updated","upgrade","upload","uploader","uri-","uri.","uri_","url-","url.","url_","usage","usb-","usb.","usb_","use-","use.","use_","used","useful","user","using","util","utilitie","utility","vagrant","validator","value","variou","varnish","version","via-","via.","via_","video","view","viewer","vim-","vim.","vim_","vimrc","virtual","vision","visual","vpn","want","warning","watch","watcher","wave","way-","way.","way_","weather","web-","web_","webapp","webgl","webhook","webkit","webrtc","website","websocket","welcome","what","what'","when","where","which","why-","why.","why_","widget","wifi","wiki","win-","win.","win_","window","wip-","wip.","wip_","within","without","wizard","word","wordpres","work","worker","workflow","working","workshop","world","wrapper","write","writer","writing","written","www-","www.","www_","xamarin","xcode","xml-","xml.","xml_","xmpp","xxxxxx","yahoo","yaml","yandex","yeoman","yet-","yet.","yet_","yii-","yii.","yii_","youtube","yui-","yui.","yui_","zend","zero","zip-","zip.","zip_","zsh-","zsh.","zsh_"]},{"condition":"OR","regexTarget":"line","regexes":[{"regex":"--mount=type=secret,","flags":""},{"regex":"import[ \\t]+{[ \\t\\w,]+}[ \\t]+from[ \\t]+['\"][^'\"]+['\"]","flags":""}],"stopwords":[]}],"tier":"strict"},
- {"id":"github-app-token","regex":"(?:ghu|ghs)_[0-9a-zA-Z]{36}","flags":"","keywords":["ghu_","ghs_"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"github-fine-grained-pat","regex":"github_pat_\\w{82}","flags":"","keywords":["github_pat_"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"github-oauth","regex":"gho_[0-9a-zA-Z]{36}","flags":"","keywords":["gho_"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"github-pat","regex":"ghp_[0-9a-zA-Z]{36}","flags":"","keywords":["ghp_"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"github-refresh-token","regex":"ghr_[0-9a-zA-Z]{36}","flags":"","keywords":["ghr_"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"gitlab-cicd-job-token","regex":"glcbt-[0-9a-zA-Z]{1,5}_[0-9a-zA-Z_\\-]{20}","flags":"","keywords":["glcbt-"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"gitlab-deploy-token","regex":"gldt-[0-9a-zA-Z_\\-]{20}","flags":"","keywords":["gldt-"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"gitlab-feature-flag-client-token","regex":"glffct-[0-9a-zA-Z_\\-]{20}","flags":"","keywords":["glffct-"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"gitlab-feed-token","regex":"glft-[0-9a-zA-Z_\\-]{20}","flags":"","keywords":["glft-"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"gitlab-incoming-mail-token","regex":"glimt-[0-9a-zA-Z_\\-]{25}","flags":"","keywords":["glimt-"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"gitlab-kubernetes-agent-token","regex":"glagent-[0-9a-zA-Z_\\-]{50}","flags":"","keywords":["glagent-"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"gitlab-oauth-app-secret","regex":"gloas-[0-9a-zA-Z_\\-]{64}","flags":"","keywords":["gloas-"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"gitlab-pat","regex":"glpat-[\\w\\-]{20}","flags":"","keywords":["glpat-"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"gitlab-pat-routable","regex":"\\bglpat-[0-9a-zA-Z_\\-]{27,300}\\.[0-9a-z]{2}[0-9a-z]{7}\\b","flags":"","keywords":["glpat-"],"entropy":4,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"gitlab-ptt","regex":"glptt-[0-9a-f]{40}","flags":"","keywords":["glptt-"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"gitlab-rrt","regex":"GR1348941[\\w\\-]{20}","flags":"","keywords":["gr1348941"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"gitlab-runner-authentication-token","regex":"glrt-[0-9a-zA-Z_\\-]{20}","flags":"","keywords":["glrt-"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"gitlab-runner-authentication-token-routable","regex":"\\bglrt-t\\d_[0-9a-zA-Z_\\-]{27,300}\\.[0-9a-z]{2}[0-9a-z]{7}\\b","flags":"","keywords":["glrt-"],"entropy":4,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"gitlab-scim-token","regex":"glsoat-[0-9a-zA-Z_\\-]{20}","flags":"","keywords":["glsoat-"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"gitlab-session-cookie","regex":"_gitlab_session=[0-9a-z]{32}","flags":"","keywords":["_gitlab_session="],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"gitter-access-token","regex":"[\\w.\\-]{0,50}?(?:gitter)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9_\\-]{40})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["gitter"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"gocardless-api-token","regex":"[\\w.\\-]{0,50}?(?:gocardless)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}(live_[a-z0-9\\-_=A-Z]{40})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["live_","gocardless"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"grafana-api-key","regex":"\\b(eyJrIjoi[A-Za-z0-9]{70,400}={0,3})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["eyjrijoi"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"grafana-cloud-api-token","regex":"\\b(glc_[A-Za-z0-9+/]{32,400}={0,3})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["glc_"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"grafana-service-account-token","regex":"\\b(glsa_[A-Za-z0-9]{32}_[A-Fa-f0-9]{8})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["glsa_"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"harness-api-key","regex":"(?:pat|sat)\\.[a-zA-Z0-9_\\-]{22}\\.[a-zA-Z0-9]{24}\\.[a-zA-Z0-9]{20}","flags":"","keywords":["pat.","sat."],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"hashicorp-tf-api-token","regex":"[a-z0-9A-Z]{14}\\.(?:atlasv1)\\.[a-z0-9\\-_=A-Z]{60,70}","flags":"","keywords":["atlasv1"],"entropy":3.5,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"heroku-api-key","regex":"[\\w.\\-]{0,50}?(?:heroku)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["heroku"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"heroku-api-key-v2","regex":"\\b((HRKU-AA[0-9a-zA-Z_\\-]{58}))(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["hrku-aa"],"entropy":4,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"hubspot-api-key","regex":"[\\w.\\-]{0,50}?(?:hubspot)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["hubspot"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"huggingface-access-token","regex":"\\b(hf_(?:[a-zA-Z]{34}))(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["hf_"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"huggingface-organization-api-token","regex":"\\b(api_org_(?:[a-zA-Z]{34}))(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["api_org_"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"infracost-api-token","regex":"\\b(ico-[a-zA-Z0-9]{32})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["ico-"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"intercom-api-key","regex":"[\\w.\\-]{0,50}?(?:intercom)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9=_\\-]{60})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["intercom"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"intra42-client-secret","regex":"\\b(s-s4t2(?:ud|af)-[abcdef0123456789ABCDEF]{64})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["intra","s-s4t2ud-","s-s4t2af-"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"jfrog-api-key","regex":"[\\w.\\-]{0,50}?(?:jfrog|artifactory|bintray|xray)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{73})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["jfrog","artifactory","bintray","xray"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"jfrog-identity-token","regex":"[\\w.\\-]{0,50}?(?:jfrog|artifactory|bintray|xray)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{64})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["jfrog","artifactory","bintray","xray"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"jwt","regex":"\\b(ey[a-zA-Z0-9]{17,}\\.ey[a-zA-Z0-9\\/\\\\_\\-]{17,}\\.(?:[a-zA-Z0-9\\/\\\\_\\-]{10,}={0,2})?)(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["ey"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"jwt-base64","regex":"\\bZXlK(?:(?<alg>aGJHY2lPaU)|(?<apu>aGNIVWlPaU)|(?<apv>aGNIWWlPaU)|(?<aud>aGRXUWlPaU)|(?<b64>aU5qUWlP)|(?<crit>amNtbDBJanBi)|(?<cty>amRIa2lPaU)|(?<epk>bGNHc2lPbn)|(?<enc>bGJtTWlPaU)|(?<jku>cWEzVWlPaU)|(?<jwk>cWQyc2lPb)|(?<iss>cGMzTWlPaU)|(?<iv>cGRpSTZJ)|(?<kid>cmFXUWlP)|(?<key_ops>clpYbGZiM0J6SWpwY)|(?<kty>cmRIa2lPaUp)|(?<nonce>dWIyNWpaU0k2)|(?<p2c>d01tTWlP)|(?<p2s>d01uTWlPaU)|(?<ppt>d2NIUWlPaU)|(?<sub>emRXSWlPaU)|(?<svt>emRuUWlP)|(?<tag>MFlXY2lPaU)|(?<typ>MGVYQWlPaUp)|(?<url>MWNtd2l)|(?<use>MWMyVWlPaUp)|(?<ver>MlpYSWlPaU)|(?<version>MlpYSnphVzl1SWpv)|(?<x>NElqb2)|(?<x5c>NE5XTWlP)|(?<x5t>NE5YUWlPaU)|(?<x5ts256>NE5YUWpVekkxTmlJNkl)|(?<x5u>NE5YVWlPaU)|(?<zip>NmFYQWlPaU))[a-zA-Z0-9\\/\\\\_+\\-\\r\\n]{40,}={0,2}","flags":"","keywords":["zxlk"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"kraken-access-token","regex":"[\\w.\\-]{0,50}?(?:kraken)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9\\/=_\\+\\-]{80,90})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["kraken"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"kucoin-access-token","regex":"[\\w.\\-]{0,50}?(?:kucoin)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-f0-9]{24})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["kucoin"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"kucoin-secret-key","regex":"[\\w.\\-]{0,50}?(?:kucoin)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["kucoin"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"launchdarkly-access-token","regex":"[\\w.\\-]{0,50}?(?:launchdarkly)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9=_\\-]{40})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["launchdarkly"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"linear-api-key","regex":"lin_api_[a-z0-9A-Z]{40}","flags":"","keywords":["lin_api_"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"linear-client-secret","regex":"[\\w.\\-]{0,50}?(?:linear)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-f0-9]{32})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["linear"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"linkedin-client-id","regex":"[\\w.\\-]{0,50}?(?:linked[_\\-]?in)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{14})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["linkedin","linked_in","linked-in"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"linkedin-client-secret","regex":"[\\w.\\-]{0,50}?(?:linked[_\\-]?in)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{16})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["linkedin","linked_in","linked-in"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"lob-api-key","regex":"[\\w.\\-]{0,50}?(?:lob)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}((live|test)_[a-f0-9]{35})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["test_","live_"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"lob-pub-api-key","regex":"[\\w.\\-]{0,50}?(?:lob)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}((test|live)_pub_[a-f0-9]{31})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["test_pub","live_pub","_pub"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"looker-client-id","regex":"[\\w.\\-]{0,50}?(?:looker)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{20})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["looker"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"looker-client-secret","regex":"[\\w.\\-]{0,50}?(?:looker)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{24})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["looker"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"mailchimp-api-key","regex":"[\\w.\\-]{0,50}?(?:MailchimpSDK[^\\n]initialize|mailchimp)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-f0-9]{32}-us\\d\\d)(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["mailchimp"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"mailgun-private-api-token","regex":"[\\w.\\-]{0,50}?(?:mailgun)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}(key-[a-f0-9]{32})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["mailgun"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"mailgun-pub-key","regex":"[\\w.\\-]{0,50}?(?:mailgun)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}(pubkey-[a-f0-9]{32})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["mailgun"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"mailgun-signing-key","regex":"[\\w.\\-]{0,50}?(?:mailgun)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-h0-9]{32}-[a-h0-9]{8}-[a-h0-9]{8})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["mailgun"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"mapbox-api-token","regex":"[\\w.\\-]{0,50}?(?:mapbox)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}(pk\\.[a-z0-9]{60}\\.[a-z0-9]{22})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["mapbox"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"mattermost-access-token","regex":"[\\w.\\-]{0,50}?(?:mattermost)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{26})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["mattermost"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"maxmind-license-key","regex":"\\b([A-Za-z0-9]{6}_[A-Za-z0-9]{29}_mmk)(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["_mmk"],"entropy":4,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"messagebird-api-token","regex":"[\\w.\\-]{0,50}?(?:message[_\\-]?bird)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{25})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["messagebird","message-bird","message_bird"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"messagebird-client-id","regex":"[\\w.\\-]{0,50}?(?:message[_\\-]?bird)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["messagebird","message-bird","message_bird"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"microsoft-teams-webhook","regex":"https://[a-z0-9]+\\.webhook\\.office\\.com/webhookb2/[a-z0-9]{8}-([a-z0-9]{4}-){3}[a-z0-9]{12}@[a-z0-9]{8}-([a-z0-9]{4}-){3}[a-z0-9]{12}/IncomingWebhook/[a-z0-9]{32}/[a-z0-9]{8}-([a-z0-9]{4}-){3}[a-z0-9]{12}","flags":"","keywords":["webhook.office.com","webhookb2","incomingwebhook"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"netlify-access-token","regex":"[\\w.\\-]{0,50}?(?:netlify)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9=_\\-]{40,46})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["netlify"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"new-relic-browser-api-token","regex":"[\\w.\\-]{0,50}?(?:new-relic|newrelic|new_relic)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}(NRJS-[a-f0-9]{19})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["nrjs-"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"new-relic-insert-key","regex":"[\\w.\\-]{0,50}?(?:new-relic|newrelic|new_relic)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}(NRII-[a-z0-9\\-]{32})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["nrii-"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"new-relic-user-api-id","regex":"[\\w.\\-]{0,50}?(?:new-relic|newrelic|new_relic)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{64})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["new-relic","newrelic","new_relic"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"new-relic-user-api-key","regex":"[\\w.\\-]{0,50}?(?:new-relic|newrelic|new_relic)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}(NRAK-[a-z0-9]{27})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["nrak"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"notion-api-token","regex":"\\b(ntn_[0-9]{11}[A-Za-z0-9]{32}[A-Za-z0-9]{3})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["ntn_"],"entropy":4,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"npm-access-token","regex":"\\b(npm_[a-z0-9]{36})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["npm_"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"nytimes-access-token","regex":"[\\w.\\-]{0,50}?(?:nytimes|new-york-times,|newyorktimes)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9=_\\-]{32})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["nytimes","new-york-times","newyorktimes"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"octopus-deploy-api-key","regex":"\\b(API-[A-Z0-9]{26})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["api-"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"openai-api-key","regex":"\\b(sk-(?:proj|svcacct|admin)-(?:[A-Za-z0-9_\\-]{74}|[A-Za-z0-9_\\-]{58})T3BlbkFJ(?:[A-Za-z0-9_\\-]{74}|[A-Za-z0-9_\\-]{58})\\b|sk-[a-zA-Z0-9]{20}T3BlbkFJ[a-zA-Z0-9]{20})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["t3blbkfj"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"openshift-user-token","regex":"\\b(sha256~[\\w\\-]{43})(?:[^\\w\\-]|$)","flags":"","keywords":["sha256~"],"entropy":3.5,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"perplexity-api-key","regex":"\\b(pplx-[a-zA-Z0-9]{48})(?:[\\x60'\"\\s;]|\\\\[nr]|$|\\b)","flags":"","keywords":["pplx-"],"entropy":4,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"plaid-api-token","regex":"[\\w.\\-]{0,50}?(?:plaid)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}(access-(?:sandbox|development|production)-[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["plaid"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"plaid-client-id","regex":"[\\w.\\-]{0,50}?(?:plaid)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{24})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["plaid"],"entropy":3.5,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"plaid-secret-key","regex":"[\\w.\\-]{0,50}?(?:plaid)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{30})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["plaid"],"entropy":3.5,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"planetscale-api-token","regex":"\\b(pscale_tkn_[\\w=\\.\\-]{32,64})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["pscale_tkn_"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"planetscale-oauth-token","regex":"\\b(pscale_oauth_[\\w=\\.\\-]{32,64})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["pscale_oauth_"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"planetscale-password","regex":"\\b(pscale_pw_[\\w=\\.\\-]{32,64})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["pscale_pw_"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"postman-api-token","regex":"\\b(PMAK-[a-f0-9A-F]{24}\\-[a-f0-9A-F]{34})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["pmak-"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"prefect-api-token","regex":"\\b(pnu_[a-zA-Z0-9]{36})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["pnu_"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"private-key","regex":"-----BEGIN[ A-Z0-9_\\-]{0,100}PRIVATE KEY(?: BLOCK)?-----[\\s\\S\\-]{64,}?KEY(?: BLOCK)?-----","flags":"i","keywords":["-----begin"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"pulumi-api-token","regex":"\\b(pul-[a-f0-9]{40})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["pul-"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"pypi-upload-token","regex":"pypi-AgEIcHlwaS5vcmc[\\w\\-]{50,1000}","flags":"","keywords":["pypi-ageichlwas5vcmc"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"rapidapi-access-token","regex":"[\\w.\\-]{0,50}?(?:rapidapi)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9_\\-]{50})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["rapidapi"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"readme-api-token","regex":"\\b(rdme_[a-z0-9]{70})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["rdme_"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"rubygems-api-token","regex":"\\b(rubygems_[a-f0-9]{48})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["rubygems_"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"scalingo-api-token","regex":"\\b(tk-us-[\\w\\-]{48})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["tk-us-"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"sendbird-access-id","regex":"[\\w.\\-]{0,50}?(?:sendbird)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["sendbird"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"sendbird-access-token","regex":"[\\w.\\-]{0,50}?(?:sendbird)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-f0-9]{40})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["sendbird"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"sendgrid-api-token","regex":"\\b(SG\\.[a-z0-9=_\\-\\.A-Z]{66})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["sg."],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"sendinblue-api-token","regex":"\\b(xkeysib-[a-f0-9]{64}\\-[a-z0-9A-Z]{16})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["xkeysib-"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"sentry-access-token","regex":"[\\w.\\-]{0,50}?(?:sentry)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-f0-9]{64})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["sentry"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"sentry-org-token","regex":"\\bsntrys_eyJpYXQiO[a-zA-Z0-9+/]{10,200}(?:LCJyZWdpb25fdXJs|InJlZ2lvbl91cmwi|cmVnaW9uX3VybCI6)[a-zA-Z0-9+/]{10,200}={0,2}_[a-zA-Z0-9+/]{43}(?:[^a-zA-Z0-9+/]|$)","flags":"","keywords":["sntrys_eyjpyxqio"],"entropy":4.5,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"sentry-user-token","regex":"\\b(sntryu_[a-f0-9]{64})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["sntryu_"],"entropy":3.5,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"settlemint-application-access-token","regex":"\\b(sm_aat_[a-zA-Z0-9]{16})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["sm_aat"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"settlemint-personal-access-token","regex":"\\b(sm_pat_[a-zA-Z0-9]{16})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["sm_pat"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"settlemint-service-access-token","regex":"\\b(sm_sat_[a-zA-Z0-9]{16})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["sm_sat"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"shippo-api-token","regex":"\\b(shippo_(?:live|test)_[a-fA-F0-9]{40})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["shippo_"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"shopify-access-token","regex":"shpat_[a-fA-F0-9]{32}","flags":"","keywords":["shpat_"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"shopify-custom-access-token","regex":"shpca_[a-fA-F0-9]{32}","flags":"","keywords":["shpca_"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"shopify-private-app-access-token","regex":"shppa_[a-fA-F0-9]{32}","flags":"","keywords":["shppa_"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"shopify-shared-secret","regex":"shpss_[a-fA-F0-9]{32}","flags":"","keywords":["shpss_"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"sidekiq-secret","regex":"[\\w.\\-]{0,50}?(?:BUNDLE_ENTERPRISE__CONTRIBSYS__COM|BUNDLE_GEMS__CONTRIBSYS__COM)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-f0-9]{8}:[a-f0-9]{8})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["bundle_enterprise__contribsys__com","bundle_gems__contribsys__com"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"sidekiq-sensitive-url","regex":"\\bhttps?://([a-f0-9]{8}:[a-f0-9]{8})@(?:gems[^\\n]contribsys[^\\n]com|enterprise[^\\n]contribsys[^\\n]com)(?:[\\/|\\#|\\?|:]|$)","flags":"i","keywords":["gems.contribsys.com","enterprise.contribsys.com"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"slack-app-token","regex":"xapp-\\d-[A-Z0-9]+-\\d+-[a-z0-9]+","flags":"i","keywords":["xapp"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"slack-bot-token","regex":"xoxb-[0-9]{10,13}-[0-9]{10,13}[a-zA-Z0-9\\-]*","flags":"","keywords":["xoxb"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"slack-config-access-token","regex":"xoxe[^\\n]xox[bp]-\\d-[A-Z0-9]{163,166}","flags":"i","keywords":["xoxe.xoxb-","xoxe.xoxp-"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"slack-config-refresh-token","regex":"xoxe-\\d-[A-Z0-9]{146}","flags":"i","keywords":["xoxe-"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"slack-legacy-bot-token","regex":"xoxb-[0-9]{8,14}-[a-zA-Z0-9]{18,26}","flags":"","keywords":["xoxb"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"slack-legacy-token","regex":"xox[os]-\\d+-\\d+-\\d+-[a-fA-F\\d]+","flags":"","keywords":["xoxo","xoxs"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"slack-legacy-workspace-token","regex":"xox[ar]-(?:\\d-)?[0-9a-zA-Z]{8,48}","flags":"","keywords":["xoxa","xoxr"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"slack-user-token","regex":"xox[pe](?:-[0-9]{10,13}){3}-[a-zA-Z0-9\\-]{28,34}","flags":"","keywords":["xoxp-","xoxe-"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"slack-webhook-url","regex":"(?:https?://)?hooks[^\\n]slack[^\\n]com/(?:services|workflows|triggers)/[A-Za-z0-9+/]{43,56}","flags":"","keywords":["hooks.slack.com"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"snyk-api-token","regex":"[\\w.\\-]{0,50}?(?:snyk[_.\\-]?(?:(?:api|oauth)[_.\\-]?)?(?:key|token))(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["snyk"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"sonar-api-token","regex":"[\\w.\\-]{0,50}?(?:sonar[_.\\-]?(login|token))(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}((?:squ_|sqp_|sqa_)?[a-z0-9=_\\-]{40})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["sonar"],"entropy":0,"secretGroup":2,"allowlists":[],"tier":"standard"},
- {"id":"sourcegraph-access-token","regex":"\\b(\\b(sgp_(?:[a-fA-F0-9]{16}|local)_[a-fA-F0-9]{40}|sgp_[a-fA-F0-9]{40}|[a-fA-F0-9]{40})\\b)(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["sgp_","sourcegraph"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"square-access-token","regex":"\\b((?:EAAA|sq0atp-)[\\w\\-]{22,60})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["sq0atp-","eaaa"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"squarespace-access-token","regex":"[\\w.\\-]{0,50}?(?:squarespace)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["squarespace"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"stripe-access-token","regex":"\\b((?:sk|rk)_(?:test|live|prod)_[a-zA-Z0-9]{10,99})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["sk_test","sk_live","sk_prod","rk_test","rk_live","rk_prod"],"entropy":2,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"sumologic-access-token","regex":"[\\w.\\-]{0,50}?(?:(?:[Ss]umo|SUMO))(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9A-Z]{64})(?:[\\x60'\"\\s;]|\\\\[nrNR]|$)","flags":"","keywords":["sumo"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"telegram-bot-api-token","regex":"[\\w.\\-]{0,50}?(?:[tT][eE][lL][eE][gG][rR])(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([0-9]{5,16}:(?:A)[a-z0-9_\\-A-Z]{34})(?:[\\x60'\"\\s;]|\\\\[nrNR]|$)","flags":"","keywords":["telegr"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"travisci-access-token","regex":"[\\w.\\-]{0,50}?(?:travis)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{22})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["travis"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"twilio-api-key","regex":"SK[0-9a-fA-F]{32}","flags":"","keywords":["sk"],"entropy":3,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"twitch-api-token","regex":"[\\w.\\-]{0,50}?(?:twitch)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{30})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["twitch"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"twitter-access-secret","regex":"[\\w.\\-]{0,50}?(?:twitter)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{45})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["twitter"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"twitter-access-token","regex":"[\\w.\\-]{0,50}?(?:twitter)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([0-9]{15,25}-[a-zA-Z0-9]{20,40})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["twitter"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"twitter-api-key","regex":"[\\w.\\-]{0,50}?(?:twitter)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{25})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["twitter"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"twitter-api-secret","regex":"[\\w.\\-]{0,50}?(?:twitter)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{50})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["twitter"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"twitter-bearer-token","regex":"[\\w.\\-]{0,50}?(?:twitter)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}(A{22}[a-zA-Z0-9%]{80,100})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["twitter"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"typeform-api-token","regex":"[\\w.\\-]{0,50}?(?:typeform)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}(tfp_[a-z0-9\\-_\\.=]{59})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["tfp_"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"vault-batch-token","regex":"\\b(hvb\\.[\\w\\-]{138,300})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["hvb."],"entropy":4,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"vault-service-token","regex":"\\b((?:hvs\\.[\\w\\-]{90,120}|s\\.(?:[a-z0-9A-Z]{24})))(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"","keywords":["hvs.","s."],"entropy":3.5,"secretGroup":0,"allowlists":[{"condition":"OR","regexTarget":"secret","regexes":[{"regex":"s\\.[A-Za-z]{24}","flags":""}],"stopwords":[]}],"tier":"standard"},
- {"id":"yandex-access-token","regex":"[\\w.\\-]{0,50}?(?:yandex)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}(t1\\.[A-Z0-9a-z_\\-]+[=]{0,2}\\.[A-Z0-9a-z_\\-]{86}[=]{0,2})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["yandex"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"yandex-api-key","regex":"[\\w.\\-]{0,50}?(?:yandex)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}(AQVN[A-Za-z0-9_\\-]{35,38})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["yandex"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"yandex-aws-access-token","regex":"[\\w.\\-]{0,50}?(?:yandex)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}(YC[a-zA-Z0-9_\\-]{38})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["yandex"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"zendesk-secret-key","regex":"[\\w.\\-]{0,50}?(?:zendesk)(?:[ \\t\\w.\\-]{0,20})[\\s'\"]{0,3}(?:=|>|:{1,3}=|\\|\\||:|=>|\\?=|,)[\\x60'\"\\s=]{0,5}([a-z0-9]{40})(?:[\\x60'\"\\s;]|\\\\[nr]|$)","flags":"i","keywords":["zendesk"],"entropy":0,"secretGroup":0,"allowlists":[],"tier":"standard"},
- {"id":"openviking-gateway-key","regex":"(?<![A-Za-z0-9_-])(ovgw_[A-Za-z0-9_-]{43})(?![A-Za-z0-9_-])","flags":"","keywords":["ovgw_"],"entropy":3,"secretGroup":1,"allowlists":[],"tier":"standard"},
- {"id":"openviking-gateway-management-key","regex":"(?<![A-Za-z0-9_-])(ovgm_[A-Za-z0-9_-]{43})(?![A-Za-z0-9_-])","flags":"","keywords":["ovgm_"],"entropy":3,"secretGroup":1,"allowlists":[],"tier":"standard"},
- {"id":"openviking-oauth-access-token","regex":"(?<![A-Za-z0-9_-])(ovat_[A-Za-z0-9_-]{54})(?![A-Za-z0-9_-])","flags":"","keywords":["ovat_"],"entropy":3,"secretGroup":1,"allowlists":[],"tier":"standard"},
- {"id":"openviking-oauth-refresh-token","regex":"(?<![A-Za-z0-9_-])(ovrt_[A-Za-z0-9_-]{54})(?![A-Za-z0-9_-])","flags":"","keywords":["ovrt_"],"entropy":3,"secretGroup":1,"allowlists":[],"tier":"standard"},
- {"id":"openviking-oauth-auth-code","regex":"(?<![A-Za-z0-9_-])(ovac_[A-Za-z0-9_-]{54})(?![A-Za-z0-9_-])","flags":"","keywords":["ovac_"],"entropy":3,"secretGroup":1,"allowlists":[],"tier":"standard"},
-];
diff --git a/examples/openclaw-plugin/shared/workspace-identity.mjs b/examples/openclaw-plugin/shared/workspace-identity.mjs
deleted file mode 100644
index 76922cb03..000000000
--- a/examples/openclaw-plugin/shared/workspace-identity.mjs
+++ /dev/null
@@ -1,334 +0,0 @@
-// GENERATED FROM examples/memory-plugin-shared/lib. DO NOT EDIT.
-/**
- * Workspace identity: where the workspace root is, and what git calls it.
- *
- * Every hook is a fresh Node process and this runs on prompt-level paths, so
- * the derivation is pure filesystem work — no `git` subprocess. That keeps it
- * inside the tightest hook budget (Codex allows SessionEnd 3s against
- * SessionStart's 70s), and it keeps working where git is absent from PATH or
- * would refuse the repo over dubious ownership.
- *
- * The result is cached per cwd under the state dir so the several hooks of one
- * turn pay for the walk once.
- */
-
-import { createHash } from "node:crypto";
-import { mkdirSync, readFileSync, realpathSync, renameSync, statSync, writeFileSync } from "node:fs";
-import { homedir } from "node:os";
-import { dirname, isAbsolute, join, parse, resolve, sep } from "node:path";
-
-// The workspace config file names live here, and `workspace-config.mjs`
-// re-exports them: the walk below needs the filenames to recognise a directory
-// someone marked as a workspace, and it must not pull in the config layer to
-// learn them.
-export const CONFIG_DIR_NAME = ".openviking";
-export const TEAM_FILE = "config.json";
-export const LOCAL_FILE = "config.local.json";
-
-const IDENTITY_CACHE_TTL_MS = 60_000;
-// 255 is the AGFS path-segment limit; stopping well short leaves room for the
-// hash suffix and for anything that later prefixes a peer id.
-const MAX_PEER_ID_LENGTH = 100;
-
-export function stateDir(env = process.env) {
- const explicit = String(env.OPENVIKING_STATE_DIR || "").trim();
- if (explicit) return explicit;
- const home = String(env.OPENVIKING_HOME || "").trim();
- const base = home ? home.replace(/^~(?=$|\/)/, homedir()) : join(homedir(), ".openviking");
- return join(base, "state");
-}
-
-function shortHash(value) {
- return createHash("sha256").update(String(value)).digest("hex").slice(0, 12);
-}
-
-/**
- * Legacy peer sanitation: one byte in, one byte out, no collapsing and no
- * trimming, so a leading `/` still becomes a leading `-`. Kept byte-exact
- * because `peer.source: "cwd"` and the legacy id that dual-read recomputes both
- * depend on it — do not "improve" it.
- */
-export function legacySanitize(value) {
- return String(value || "").replace(/[^A-Za-z0-9]/g, "-");
-}
-
-/**
- * Readable sanitation for values that were never path-shaped — a normalized
- * remote, a directory name. Mirrors the server's own `_sanitize_component`
- * (`openviking/ingest/peer.py:32`) so both languages agree on the id, then
- * enforces what `validate_identifier_part` additionally requires.
- */
-export function sanitizePeerId(value) {
- const raw = String(value || "").trim();
- let cleaned = raw.replace(/[^a-zA-Z0-9_.@-]+/g, "-").replace(/-{2,}/g, "-").replace(/^[-.]+|[-.]+$/g, "");
- if (!cleaned) return "";
- // The server accepts at most one `@` in an identifier part.
- const at = cleaned.indexOf("@");
- if (at !== -1) cleaned = cleaned.slice(0, at + 1) + cleaned.slice(at + 1).replace(/@/g, "-");
- // `ext-` is the server's namespace for base64-encoded external identities,
- // and `__self` its operation-target sentinel. Neither is ours to occupy.
- if (cleaned.startsWith("ext-")) cleaned = `x-${cleaned}`;
- if (cleaned === "__self") cleaned = "self";
- if (cleaned === "." || cleaned === "..") return "";
- if (cleaned.length > MAX_PEER_ID_LENGTH) {
- cleaned = `${cleaned.slice(0, MAX_PEER_ID_LENGTH - 13).replace(/[-.]+$/, "")}-${shortHash(raw)}`;
- }
- return cleaned;
-}
-
-/**
- * Normalize a remote URL to `host/path`, lowercased.
- *
- * Both spellings of the same repo converge, and userinfo is dropped — so a
- * remote with an embedded token cannot leak it into a peer id. The cost of
- * case folding is that two repos differing only in case share one namespace on
- * the rare case-sensitive forge.
- */
-export function normalizeGitRemote(url) {
- const raw = String(url || "").trim();
- if (!raw) return "";
-
- // `C:\src\repo` and `C:/src/repo` are one machine's directory, not a shared
- // identity — and the scp pattern would happily read the drive as a host.
- if (/^[A-Za-z]:[\\/]/.test(raw)) return "";
-
- let host = "";
- let path = "";
- const scp = /^(?:[^@/\\]+@)?([^:/\\]+):(?!\/)(.+)$/.exec(raw);
- if (scp && !/^[a-zA-Z][a-zA-Z0-9+.-]*:\/\//.test(raw)) {
- host = scp[1];
- path = scp[2];
- } else {
- let parsed;
- try {
- parsed = new URL(raw);
- } catch {
- return "";
- }
- // A local clone has no stable shared identity — fall through to the path
- // rules instead of minting one from `file://` or a bare directory.
- if (parsed.protocol === "file:" || !parsed.hostname) return "";
- host = parsed.hostname;
- path = parsed.pathname;
- }
-
- host = host.toLowerCase().replace(/^\[|\]$/g, "");
- path = path.replace(/^\/+/, "").replace(/\/+$/, "").replace(/\.git$/i, "").toLowerCase();
- if (!host || !path) return "";
- return `${host}/${path}`;
-}
-
-function readFileOrEmpty(path) {
- try {
- return readFileSync(path, "utf-8");
- } catch {
- return "";
- }
-}
-
-/**
- * Read `[remote "origin"] url` out of a git config with a minimal INI parse.
- *
- * `include` / `includeIf` are deliberately not followed: resolving them means
- * more filesystem walking for a value the fallback chain already covers, so an
- * unreadable remote just falls through to the next template.
- */
-export function readGitRemoteUrl(commonDir, remote = "origin") {
- const text = readFileOrEmpty(join(commonDir, "config"));
- if (!text) return "";
-
- let inSection = false;
- for (const line of text.split("\n")) {
- const trimmed = line.trim();
- if (!trimmed || trimmed.startsWith("#") || trimmed.startsWith(";")) continue;
- const section = /^\[([^\]]+)\]/.exec(trimmed);
- if (section) {
- const header = section[1].trim();
- // git folds section and key names to lower case but keeps a quoted
- // subsection exact, so `[Remote "origin"]` is the same section and
- // `[remote "Origin"]` is not.
- const quoted = /^remote\s+"(.*)"$/i.exec(header);
- inSection = Boolean(quoted && quoted[1] === remote);
- continue;
- }
- if (!inSection) continue;
- const pair = /^url\s*=\s*(.*)$/i.exec(trimmed);
- // git treats an unquoted `#` or `;` as starting a comment anywhere on the
- // line, so a trailing note is not part of the URL.
- if (pair) return pair[1].split(/[#;]/)[0].trim().replace(/^["']|["']$/g, "");
- }
- return "";
-}
-
-function resolveGitDir(root) {
- const dotGit = join(root, ".git");
- let stat;
- try {
- stat = statSync(dotGit);
- } catch {
- return null;
- }
- if (stat.isDirectory()) return { gitDir: dotGit, commonDir: dotGit, kind: "repo" };
- if (!stat.isFile()) return null;
-
- const pointer = /^gitdir:\s*(.+)$/m.exec(readFileOrEmpty(dotGit));
- if (!pointer) return null;
- const gitDir = resolve(root, pointer[1].trim());
-
- // `commondir` is the worktree signal, so it is read first — a repository
- // that merely lives under a directory called `modules` is not a submodule.
- const commonRef = readFileOrEmpty(join(gitDir, "commondir")).trim();
- const commonDir = commonRef
- ? (isAbsolute(commonRef) ? commonRef : resolve(gitDir, commonRef))
- : gitDir;
-
- // A submodule keeps its own remote under the superproject's
- // `.git/modules/<name>`; converging it onto the superproject would merge two
- // repositories that release, and are reviewed, separately. Only the segment
- // right after a `.git` directory means that, which is also why a worktree of
- // a submodule resolves here through its own commondir.
- const kind = /[/\\]\.git[/\\]modules[/\\]/.test(`${commonDir}${sep}`)
- ? "submodule"
- : (commonRef ? "worktree" : "repo");
- return { gitDir, commonDir, kind };
-}
-
-/** A directory the user made a workspace on purpose, by giving it a config file. */
-function hasWorkspaceMarker(dir) {
- for (const name of [TEAM_FILE, LOCAL_FILE]) {
- try {
- if (statSync(join(dir, CONFIG_DIR_NAME, name)).isFile()) return true;
- } catch { /* not marked here */ }
- }
- return false;
-}
-
-const NO_ROOT = Object.freeze({ root: "", rootKind: "", git: null, gitRoot: "" });
-
-/**
- * Walk up from `cwd` to the nearest workspace root.
- *
- * A workspace is a git repository, or a directory someone marked as one by
- * creating `.openviking/config.json` (or `config.local.json`) in it. Nearest
- * wins. Above a marked directory the walk continues to the enclosing
- * repository, if any, so the git-shaped variables still resolve there.
- * Anything else — a scratch folder, a download, an app's per-task directory —
- * is not a workspace and gets no peer of its own.
- *
- * `$HOME` and the filesystem root are never workspace roots: a stray `.git`
- * in either would silently make every unrelated directory one workspace.
- */
-export function findWorkspaceRoot(cwd, env = process.env) {
- const start = String(cwd || "").trim();
- if (!start) return NO_ROOT;
-
- let absolute;
- try {
- // A relative `start` makes `resolve` read process.cwd(), which throws when
- // the directory is gone — the very case the catch below is meant to cover.
- absolute = resolve(start);
- } catch {
- return NO_ROOT;
- }
-
- // `current` and `stopAt` are compared as strings, so they must be
- // canonicalized together. A `$HOME` reached through a symlink plus an
- // unresolvable cwd would otherwise walk straight past the guard.
- const home = String(env.HOME || "").trim() || homedir();
- let current;
- let stopAt;
- try {
- current = realpathSync(absolute);
- stopAt = realpathSync(home);
- } catch {
- current = absolute;
- stopAt = home;
- }
- const filesystemRoot = parse(current).root;
- if (current === stopAt || current === filesystemRoot) return NO_ROOT;
-
- let root = "";
- let rootKind = "";
- while (current && current !== filesystemRoot && current !== stopAt) {
- const git = resolveGitDir(current);
- if (git) return { root: root || current, rootKind: rootKind || "git", git, gitRoot: current };
- if (!root && hasWorkspaceMarker(current)) {
- root = current;
- rootKind = "config";
- }
- const parent = dirname(current);
- if (parent === current) break;
- current = parent;
- }
- return root ? { root, rootKind, git: null, gitRoot: "" } : NO_ROOT;
-}
-
-function cachePath(cwd, env) {
- return join(stateDir(env), `ws-identity-${shortHash(cwd)}.json`);
-}
-
-function readCache(path, now) {
- try {
- const cached = JSON.parse(readFileSync(path, "utf-8"));
- // Bounded on both sides: an entry stamped in the future — a clock that ran
- // fast, or `Infinity` — would otherwise pin a stale identity indefinitely.
- if (typeof cached?.ts !== "number" || cached.ts > now || now - cached.ts > IDENTITY_CACHE_TTL_MS) return null;
- const identity = cached.identity;
- if (identity && typeof identity === "object" && identity.vars && typeof identity.vars === "object") {
- return identity;
- }
- } catch { /* a cold or corrupt cache just costs one walk */ }
- return null;
-}
-
-function writeCache(path, identity, now) {
- try {
- mkdirSync(dirname(path), { recursive: true });
- const tmp = `${path}.${process.pid}.tmp`;
- writeFileSync(tmp, JSON.stringify({ ts: now, identity }), { mode: 0o600 });
- renameSync(tmp, path);
- } catch { /* best effort */ }
-}
-
-/**
- * Everything the peer templates can substitute, for one cwd.
- *
- * `git_remote` and `dir` are already sanitized; `git_root` and `cwd` carry the
- * legacy byte-for-byte rule, because they are the two that must reproduce a
- * peer minted before any of this existed.
- */
-export function resolveWorkspaceIdentity({ cwd = "", env = process.env, cache = true, now = Date.now() } = {}) {
- const key = String(cwd || "");
- const path = cachePath(key, env);
- if (cache) {
- const hit = readCache(path, now);
- if (hit) return hit;
- }
-
- const { root, rootKind, git, gitRoot } = findWorkspaceRoot(key, env);
- // Only the normalized form is kept. The raw URL may carry a token, and this
- // file outlives the process — writing it here would undo the care
- // `normalizeGitRemote` takes to drop userinfo.
- const remote = git ? normalizeGitRemote(readGitRemoteUrl(git.commonDir)) : "";
- const identity = {
- cwd: key,
- root,
- rootKind,
- isGit: Boolean(git),
- gitKind: git?.kind || "",
- gitCommonDir: git?.commonDir || "",
- gitRoot,
- remote,
- vars: {
- git_remote: sanitizePeerId(remote),
- // The enclosing repository's root, which is not the workspace root when a
- // marker file below it won. Empty outside a repository, so the `git`
- // preset resolves to nothing there rather than to a bare path.
- git_root: git ? legacySanitize(gitRoot) : "",
- cwd: legacySanitize(key),
- dir: root ? sanitizePeerId(root.split(/[/\\]/).filter(Boolean).pop() || "") : "",
- },
- };
- if (cache) writeCache(path, identity, now);
- return identity;
-}
diff --git a/examples/openclaw-plugin/tests/ut/capture-redact.test.ts b/examples/openclaw-plugin/tests/ut/capture-redact.test.ts
deleted file mode 100644
index 651974ea7..000000000
--- a/examples/openclaw-plugin/tests/ut/capture-redact.test.ts
+++ /dev/null
@@ -1,126 +0,0 @@
-import { mkdtempSync, readFileSync, rmSync } from "node:fs";
-import { tmpdir } from "node:os";
-import { dirname, join, resolve } from "node:path";
-import { fileURLToPath } from "node:url";
-import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
-
-import { OpenVikingClient } from "../../client.js";
-import type { HttpTransport } from "../../adapters/http-transport.js";
-import { memoryOpenVikingConfigSchema } from "../../config.js";
-import { createOpenVikingClientRuntime } from "../../plugin/openviking-client-runtime.js";
-
-// Assembled at runtime so this file holds no contiguous token for a scanner.
-const GITHUB_PAT = ["ghp", "_", "a1B2c3D4e5F6g7H8i9J0", "k1L2m3N4o5P6q7R8"].join("");
-const GENERIC = ["Zq8", "xW2", "pL5", "mN7", "rT4", "vB9", "kH3", "jF6"].join("");
-
-function okResponse(): Response {
- return new Response(JSON.stringify({ status: "ok", result: { session_id: "s-1" } }), {
- status: 200,
- headers: { "Content-Type": "application/json" },
- });
-}
-
-function makeClient(captureRedact?: string) {
- const transport = vi.fn<HttpTransport>().mockImplementation(async () => okResponse());
- const client = new OpenVikingClient("http://127.0.0.1:1933", "", "agent", 5_000, "", "", undefined, {
- transport,
- captureRedact,
- });
- const bodies = () => transport.mock.calls.map(([, init]) => String(init.body ?? ""));
- return { client, bodies };
-}
-
-describe("captureRedact", () => {
- const originalEnv = { ...process.env };
- let stateDir = "";
-
- beforeEach(() => {
- stateDir = mkdtempSync(join(tmpdir(), "openclaw-redact-"));
- // The install key is kept under the state dir; keep it out of the real home.
- process.env.OPENVIKING_STATE_DIR = stateDir;
- delete process.env.OPENVIKING_CAPTURE_REDACT;
- });
-
- afterEach(() => {
- process.env = { ...originalEnv };
- rmSync(stateDir, { recursive: true, force: true });
- });
-
- it("parses to standard by default, false to off, and unknown tiers to standard", () => {
- expect(memoryOpenVikingConfigSchema.parse({}).captureRedact).toBe("standard");
- expect(memoryOpenVikingConfigSchema.parse({ captureRedact: "strict" }).captureRedact).toBe("strict");
- expect(memoryOpenVikingConfigSchema.parse({ captureRedact: false }).captureRedact).toBe("off");
- expect(memoryOpenVikingConfigSchema.parse({ captureRedact: "off" }).captureRedact).toBe("off");
- expect(memoryOpenVikingConfigSchema.parse({ captureRedact: "paranoid" }).captureRedact).toBe("standard");
- });
-
- it("leaves tier names to the plugin: the manifest schema accepts any string or boolean", () => {
- const manifest = JSON.parse(readFileSync(resolve(dirname(fileURLToPath(import.meta.url)), "../../openclaw.plugin.json"), "utf8"));
- const schema = manifest.configSchema.properties.captureRedact;
- expect(schema.oneOf).toEqual([{ type: "string" }, { type: "boolean" }]);
- expect(schema.default).toBe("standard");
- });
-
- it("lets OPENVIKING_CAPTURE_REDACT outrank the plugin config", () => {
- process.env.OPENVIKING_CAPTURE_REDACT = "0";
- expect(memoryOpenVikingConfigSchema.parse({ captureRedact: "strict" }).captureRedact).toBe("off");
- process.env.OPENVIKING_CAPTURE_REDACT = "strict";
- expect(memoryOpenVikingConfigSchema.parse({}).captureRedact).toBe("strict");
- process.env.OPENVIKING_CAPTURE_REDACT = "";
- expect(memoryOpenVikingConfigSchema.parse({ captureRedact: "off" }).captureRedact).toBe("off");
- });
-
- it("redacts a session message before it is posted, without touching the caller's parts", async () => {
- const { client, bodies } = makeClient();
- const parts = [
- { type: "text" as const, text: `export GITHUB_TOKEN=${GITHUB_PAT}` },
- {
- type: "tool" as const,
- tool_id: "call_1",
- tool_name: "bash",
- tool_input: { command: "cat .env" },
- tool_output: `GITHUB_TOKEN=${GITHUB_PAT}\n`,
- tool_status: "completed",
- },
- ];
- await client.addSessionMessage("s-1", "assistant", parts, undefined, undefined, "peer-1");
-
- expect(parts[0]!.text).toContain(GITHUB_PAT);
- const sent = JSON.parse(bodies()[0]!);
- expect(bodies()[0]).not.toContain(GITHUB_PAT);
- expect(sent.parts[0].text).toMatch(/^export GITHUB_TOKEN=\{\{ov_redacted:github-pat:[0-9a-f]{8}\}\}$/);
- expect(sent.parts[1].tool_output).toMatch(/\{\{ov_redacted:github-pat:[0-9a-f]{8}\}\}/);
- expect(sent.parts[1].tool_id).toBe("call_1");
- expect(sent.peer_id).toBe("peer-1");
- expect(sent.role).toBe("assistant");
- });
-
- it("follows the configured tier", async () => {
- const line = [{ type: "text" as const, text: `API_TOKEN=${GENERIC}` }];
- const standard = makeClient("standard");
- await standard.client.addSessionMessage("s-1", "user", line);
- expect(standard.bodies()[0]).toContain(GENERIC);
-
- const strict = makeClient("strict");
- await strict.client.addSessionMessage("s-1", "user", line);
- expect(strict.bodies()[0]).not.toContain(GENERIC);
-
- const off = makeClient("off");
- await off.client.addSessionMessage("s-1", "user", [{ type: "text", text: GITHUB_PAT }]);
- expect(off.bodies()[0]).toContain(GITHUB_PAT);
- });
-
- it("is plumbed from the parsed config into the runtime's client", async () => {
- const transport = vi.fn<HttpTransport>().mockImplementation(async () => okResponse());
- const cfg = memoryOpenVikingConfigSchema.parse({ captureRedact: "off" });
- const runtime = createOpenVikingClientRuntime({
- cfg,
- rawPeerPrefix: undefined,
- logger: { info() {}, warn() {}, error() {}, debug() {} } as never,
- transport,
- });
- const client = await runtime.getClient();
- await client.addSessionMessage("s-1", "user", [{ type: "text", text: GITHUB_PAT }]);
- expect(String(transport.mock.calls[0]![1].body)).toContain(GITHUB_PAT);
- });
-});
diff --git a/examples/opencode-plugin/lib/memory-session.mjs b/examples/opencode-plugin/lib/memory-session.mjs
index a2fbb7efd..05b318225 100644
--- a/examples/opencode-plugin/lib/memory-session.mjs
+++ b/examples/opencode-plugin/lib/memory-session.mjs
@@ -57,7 +57,6 @@ export function createMemorySessionManager({ config, pluginRoot }) {
await replayPending(
(endpoint, init = {}, options = {}) => fetchJSON(config, endpoint, init, options),
(stage, data) => log("DEBUG", "pending", stage, data),
- { redactTier: config.captureRedact },
)
}).catch((error) => {
log("WARN", "pending", "Pending replay failed during initialization", { error: error?.message })
@@ -204,7 +203,6 @@ export function createMemorySessionManager({ config, pluginRoot }) {
await replayPending(
(endpoint, init = {}, options = {}) => fetchJSON(config, endpoint, init, options),
(stage, data) => log("DEBUG", "pending", stage, data),
- { redactTier: config.captureRedact },
)
}
log("INFO", "event", "OpenViking session derived", {
@@ -446,9 +444,7 @@ export function createMemorySessionManager({ config, pluginRoot }) {
const health = await fetchJSON(config, "/health", {}, { timeoutMs: 5000 })
if (!health.ok) {
for (const item of toSend) {
- const queued = await enqueue("addMessage", state.ovSessionId, item.body, {
- redactTier: config.captureRedact,
- })
+ const queued = await enqueue("addMessage", state.ovSessionId, item.body)
if (!queued.ok) break
item.message.captured = true
added += 1
@@ -458,7 +454,7 @@ export function createMemorySessionManager({ config, pluginRoot }) {
(endpoint, init = {}, options = {}) => fetchJSON(config, endpoint, init, { timeoutMs: 10000, ...options }),
state.ovSessionId,
toSend.map((item) => item.body),
- { enqueueOnRetryable: true, redactTier: config.captureRedact },
+ { enqueueOnRetryable: true },
)
added = res.sent + res.queued
for (const item of toSend.slice(0, added)) {
diff --git a/examples/opencode-plugin/package.json b/examples/opencode-plugin/package.json
index de5b30800..c5ef35299 100644
--- a/examples/opencode-plugin/package.json
+++ b/examples/opencode-plugin/package.json
@@ -1,6 +1,6 @@
{
"name": "@openviking/opencode-plugin",
- "version": "0.5.20",
+ "version": "0.5.19",
"author": "@openviking",
"description": "Unified OpenCode plugin for OpenViking repository retrieval and long-term memory",
"type": "module",
diff --git a/examples/pi-coding-agent-extension/README.md b/examples/pi-coding-agent-extension/README.md
index f0f6f7f6d..71b6960e0 100644
--- a/examples/pi-coding-agent-extension/README.md
+++ b/examples/pi-coding-agent-extension/README.md
@@ -186,7 +186,6 @@ integrations should configure category `quotas` when they need exact ceilings.
| `captureAssistantTurns` | `true` | Include assistant turns (text + tool USE inputs) |
| `captureToolResults` | `false` | Declared in the shared schema, but this extension never reads it: `lib/capture-adapter.mjs` keeps every structured tool part, so tool results are captured either way, bounded by `captureToolMaxChars` |
| `captureToolMaxChars` | `1000000` | Guard cap on one tool part's `tool_output`; the server externalizes oversized output |
-| `captureRedact` | `standard` | Secret redaction before a payload is sent or queued: `standard` (gitleaks provider rules), `strict` (adds the generic `key=value` rule) or `off`. Secrets become `{{ov_redacted:<rule>:<tag>}}`. Env `OPENVIKING_CAPTURE_REDACT`; user-level only |
| `commitTokenThreshold` | `20000` | Pending-token threshold for client-driven commit |
| `commitKeepRecentCount` | `10` | Not read: commits outside takeover archive every captured message (`keep_recent_count` 0); takeover sends the exact message count of the turns it keeps |
diff --git a/examples/pi-coding-agent-extension/config.ts b/examples/pi-coding-agent-extension/config.ts
index 0b669b702..94cf2b327 100644
--- a/examples/pi-coding-agent-extension/config.ts
+++ b/examples/pi-coding-agent-extension/config.ts
@@ -52,8 +52,6 @@ export interface OVConfig {
captureMaxLength: number;
captureToolMaxChars: number;
captureAssistantTurns: boolean;
- /** Secret-redaction tier for every captured payload (shared `captureRedact` knob). */
- captureRedact?: "off" | "standard" | "strict";
/** Kept as this extension's original spelling; projected onto the shared one. */
bypassPatterns: string[];
bypassSession: boolean;
diff --git a/examples/pi-coding-agent-extension/package-lock.json b/examples/pi-coding-agent-extension/package-lock.json
index 51b0ccdf5..c9cafa7db 100644
--- a/examples/pi-coding-agent-extension/package-lock.json
+++ b/examples/pi-coding-agent-extension/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "openviking-pi-extension",
- "version": "0.4.23",
+ "version": "0.4.22",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "openviking-pi-extension",
- "version": "0.4.23",
+ "version": "0.4.22",
"dependencies": {
"@modelcontextprotocol/client": "2.0.0"
},
diff --git a/examples/pi-coding-agent-extension/package.json b/examples/pi-coding-agent-extension/package.json
index 6662b2741..2f77d4c6e 100644
--- a/examples/pi-coding-agent-extension/package.json
+++ b/examples/pi-coding-agent-extension/package.json
@@ -1,6 +1,6 @@
{
"name": "openviking-pi-extension",
- "version": "0.4.23",
+ "version": "0.4.22",
"description": "OpenViking memory and context extension for the pi coding agent",
"private": true,
"type": "module",
diff --git a/examples/pi-coding-agent-extension/sync.ts b/examples/pi-coding-agent-extension/sync.ts
index d14faec0f..b836ab22e 100644
--- a/examples/pi-coding-agent-extension/sync.ts
+++ b/examples/pi-coding-agent-extension/sync.ts
@@ -102,7 +102,6 @@ export class SyncManager {
await replayPending(
(path: string, init?: any) => this.client.fetchJSON(path, init),
(stage: string, data: unknown) => this.logger.log(stage, data),
- { redactTier: this.config.captureRedact },
);
}
@@ -177,7 +176,6 @@ export class SyncManager {
sid,
claimed.map(({ entry }) => entry.payload),
{
- redactTier: this.config.captureRedact,
onSent: async (count: number) => {
for (let i = 0; i < count; i++) await dequeue(claimed[delivered++].filename);
},
@@ -266,7 +264,6 @@ export class SyncManager {
}
const res = await sendSessionMessages(this.fetchJSON, this.ovSessionId, payloads, {
enqueueOnRetryable: true,
- redactTier: this.config.captureRedact,
});
if (res.failed > 0 || res.enqueueFailed > 0) {
this.logger.log("send", {
diff --git a/examples/pi-experimental-context-management/README.md b/examples/pi-experimental-context-management/README.md
index c08ffaf37..b8d26d7c4 100644
--- a/examples/pi-experimental-context-management/README.md
+++ b/examples/pi-experimental-context-management/README.md
@@ -161,13 +161,6 @@ this out of experimental status has to add them:
in `examples/memory-plugin-shared/sync.mjs`. Until then the copies here are
frozen at the commit that added them and will drift as the shared modules
change.
-- **Captured text is not redacted.** The shared plugins replace secrets with
- `{{ov_redacted:<rule>:<tag>}}` before sending (`captureRedact`, in
- `lib/redact.mjs` of the shared runtime); this extension's frozen copy
- predates that, so `remember`, the handoff note and transcript sync send text
- as it is, and `captureRedact` has no effect here. Promoting it means
- vendoring `redact.mjs` and `secret-rules.mjs` with the sync above and passing
- the tier to `sendSessionMessages` and the `client.ts` POST helpers.
The root `.gitignore` ignores every `lib/` directory, so this extension carries
its own `.gitignore` with `!lib/` instead of adding another exception there.