@swarmdo/cli 1.8.0 → 1.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/dist/src/commands/index.d.ts.map +1 -1
- package/dist/src/commands/index.js +6 -3
- package/dist/src/commands/index.js.map +1 -1
- package/dist/src/commands/redact.d.ts +18 -0
- package/dist/src/commands/redact.d.ts.map +1 -0
- package/dist/src/commands/redact.js +128 -0
- package/dist/src/commands/redact.js.map +1 -0
- package/dist/src/mcp-client.d.ts.map +1 -1
- package/dist/src/mcp-client.js +2 -0
- package/dist/src/mcp-client.js.map +1 -1
- package/dist/src/mcp-tools/index.d.ts +1 -0
- package/dist/src/mcp-tools/index.d.ts.map +1 -1
- package/dist/src/mcp-tools/index.js +1 -0
- package/dist/src/mcp-tools/index.js.map +1 -1
- package/dist/src/mcp-tools/profiles.d.ts.map +1 -1
- package/dist/src/mcp-tools/profiles.js +1 -0
- package/dist/src/mcp-tools/profiles.js.map +1 -1
- package/dist/src/mcp-tools/redact-tools.d.ts +11 -0
- package/dist/src/mcp-tools/redact-tools.d.ts.map +1 -0
- package/dist/src/mcp-tools/redact-tools.js +69 -0
- package/dist/src/mcp-tools/redact-tools.js.map +1 -0
- package/dist/src/redact/redact.d.ts +68 -0
- package/dist/src/redact/redact.d.ts.map +1 -0
- package/dist/src/redact/redact.js +153 -0
- package/dist/src/redact/redact.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* redact.ts — deterministic secret detection + redaction for the agent data
|
|
3
|
+
* path. swarmdo pipes tool output, memory, and context into LLMs constantly;
|
|
4
|
+
* `compact` de-noises that stream but never redacts, and `security scan` is
|
|
5
|
+
* CVE-oriented, not a content filter. This engine is the missing guard: it
|
|
6
|
+
* catches API keys / tokens / private keys via a high-confidence rule catalog
|
|
7
|
+
* plus a Shannon-entropy fallback for keyword-prefixed assignments, and masks
|
|
8
|
+
* them before content reaches a model, a log, or memory.
|
|
9
|
+
*
|
|
10
|
+
* Pure + LLM-free by design — known-secret fixtures in, deterministic masked
|
|
11
|
+
* bytes out. The CLI wrapper (../commands/redact.ts) and an MCP tool share it.
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* High-confidence catalog. Ordered — more specific rules (e.g. Anthropic
|
|
15
|
+
* `sk-ant-`) come before broader ones (`sk-` OpenAI) so the specific rule wins
|
|
16
|
+
* and we don't double-count. Patterns are conservative to keep false positives
|
|
17
|
+
* low; the entropy fallback covers the long tail of custom secrets.
|
|
18
|
+
*/
|
|
19
|
+
export const RULES = [
|
|
20
|
+
{ id: 'private-key', description: 'Private key block header', regex: /-----BEGIN (?:RSA |EC |DSA |OPENSSH |PGP )?PRIVATE KEY-----/g },
|
|
21
|
+
{ id: 'aws-access-key', description: 'AWS access key ID', regex: /\b(?:AKIA|ASIA|AGPA|AIDA|AROA|AIPA|ANPA|ANVA|ASCA)[0-9A-Z]{16}\b/g },
|
|
22
|
+
{ id: 'github-pat', description: 'GitHub personal access token', regex: /\bghp_[0-9A-Za-z]{36}\b/g },
|
|
23
|
+
{ id: 'github-oauth', description: 'GitHub OAuth/app token', regex: /\b(?:gho|ghu|ghs|ghr)_[0-9A-Za-z]{36}\b/g },
|
|
24
|
+
{ id: 'github-fine-pat', description: 'GitHub fine-grained PAT', regex: /\bgithub_pat_[0-9A-Za-z_]{82}\b/g },
|
|
25
|
+
{ id: 'gitlab-pat', description: 'GitLab personal access token', regex: /\bglpat-[0-9A-Za-z_-]{20}\b/g },
|
|
26
|
+
{ id: 'anthropic-key', description: 'Anthropic API key', regex: /\bsk-ant-[0-9A-Za-z-]{16,}\b/g },
|
|
27
|
+
{ id: 'openai-key', description: 'OpenAI API key', regex: /\bsk-(?:proj-)?[0-9A-Za-z]{20,}\b/g },
|
|
28
|
+
{ id: 'google-api-key', description: 'Google API key', regex: /\bAIza[0-9A-Za-z_-]{35}\b/g },
|
|
29
|
+
{ id: 'slack-token', description: 'Slack token', regex: /\bxox[baprs]-[0-9A-Za-z-]{10,}\b/g },
|
|
30
|
+
{ id: 'slack-webhook', description: 'Slack incoming webhook', regex: /https:\/\/hooks\.slack\.com\/services\/T[0-9A-Za-z_]+\/B[0-9A-Za-z_]+\/[0-9A-Za-z_]+/g },
|
|
31
|
+
{ id: 'stripe-key', description: 'Stripe secret/restricted key', regex: /\b(?:sk|rk)_live_[0-9A-Za-z]{24,}\b/g },
|
|
32
|
+
{ id: 'sendgrid-key', description: 'SendGrid API key', regex: /\bSG\.[0-9A-Za-z_-]{22}\.[0-9A-Za-z_-]{43}\b/g },
|
|
33
|
+
{ id: 'twilio-key', description: 'Twilio API key SID', regex: /\bSK[0-9a-fA-F]{32}\b/g },
|
|
34
|
+
{ id: 'npm-token', description: 'npm access token', regex: /\bnpm_[0-9A-Za-z]{36}\b/g },
|
|
35
|
+
{ id: 'jwt', description: 'JSON Web Token', regex: /\beyJ[0-9A-Za-z_-]{10,}\.eyJ[0-9A-Za-z_-]{10,}\.[0-9A-Za-z_-]{10,}\b/g },
|
|
36
|
+
];
|
|
37
|
+
/** Keyword-prefixed assignment, e.g. `api_key = "..."` — the value is group 1. */
|
|
38
|
+
const ASSIGNMENT_RE = /(?:pass(?:word|wd)?|pwd|secret|token|api[_-]?key|apikey|access[_-]?key|auth[_-]?token|client[_-]?secret)["']?\s*[:=]\s*["']?([^\s"'`,;]{8,})/gi;
|
|
39
|
+
/** Shannon entropy in bits/char. Pure; used by the assignment fallback. */
|
|
40
|
+
export function shannonEntropy(s) {
|
|
41
|
+
if (!s)
|
|
42
|
+
return 0;
|
|
43
|
+
const freq = new Map();
|
|
44
|
+
for (const ch of s)
|
|
45
|
+
freq.set(ch, (freq.get(ch) ?? 0) + 1);
|
|
46
|
+
let bits = 0;
|
|
47
|
+
for (const n of freq.values()) {
|
|
48
|
+
const p = n / s.length;
|
|
49
|
+
bits -= p * Math.log2(p);
|
|
50
|
+
}
|
|
51
|
+
return bits;
|
|
52
|
+
}
|
|
53
|
+
/** Mask a secret: keep `keepPrefix` leading chars, then the token. */
|
|
54
|
+
export function maskSecret(secret, opts = {}) {
|
|
55
|
+
const keep = Math.max(0, Math.min(opts.keepPrefix ?? 3, secret.length));
|
|
56
|
+
const token = opts.token ?? '[REDACTED]';
|
|
57
|
+
return secret.slice(0, keep) + token;
|
|
58
|
+
}
|
|
59
|
+
function isAllowlisted(match, allowlist) {
|
|
60
|
+
if (!allowlist || allowlist.length === 0)
|
|
61
|
+
return false;
|
|
62
|
+
return allowlist.some((a) => (typeof a === 'string' ? match.includes(a) : a.test(match)));
|
|
63
|
+
}
|
|
64
|
+
/** Collect all rule + entropy hits across the text, deduped by offset. */
|
|
65
|
+
function collectHits(text, opts) {
|
|
66
|
+
const hits = [];
|
|
67
|
+
const claimed = []; // [start,end) ranges already taken
|
|
68
|
+
const overlaps = (start, end) => claimed.some(([s, e]) => start < e && end > s);
|
|
69
|
+
for (const rule of RULES) {
|
|
70
|
+
rule.regex.lastIndex = 0;
|
|
71
|
+
let m;
|
|
72
|
+
while ((m = rule.regex.exec(text)) !== null) {
|
|
73
|
+
const secret = rule.group != null ? m[rule.group] : m[0];
|
|
74
|
+
if (secret == null)
|
|
75
|
+
continue;
|
|
76
|
+
const start = rule.group != null ? m.index + m[0].indexOf(secret) : m.index;
|
|
77
|
+
const end = start + secret.length;
|
|
78
|
+
if (overlaps(start, end))
|
|
79
|
+
continue;
|
|
80
|
+
if (isAllowlisted(secret, opts.allowlist))
|
|
81
|
+
continue;
|
|
82
|
+
claimed.push([start, end]);
|
|
83
|
+
hits.push({ ruleId: rule.id, description: rule.description, index: start, match: secret });
|
|
84
|
+
if (m.index === rule.regex.lastIndex)
|
|
85
|
+
rule.regex.lastIndex++; // guard zero-width
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
if (opts.entropy !== false) {
|
|
89
|
+
const threshold = opts.entropyThreshold ?? 3.5;
|
|
90
|
+
ASSIGNMENT_RE.lastIndex = 0;
|
|
91
|
+
let m;
|
|
92
|
+
while ((m = ASSIGNMENT_RE.exec(text)) !== null) {
|
|
93
|
+
const value = m[1];
|
|
94
|
+
const start = m.index + m[0].indexOf(value);
|
|
95
|
+
const end = start + value.length;
|
|
96
|
+
if (overlaps(start, end))
|
|
97
|
+
continue;
|
|
98
|
+
if (isAllowlisted(value, opts.allowlist))
|
|
99
|
+
continue;
|
|
100
|
+
if (shannonEntropy(value) < threshold)
|
|
101
|
+
continue;
|
|
102
|
+
claimed.push([start, end]);
|
|
103
|
+
hits.push({ ruleId: 'high-entropy-assignment', description: 'High-entropy secret assignment', index: start, match: value });
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
return hits.sort((a, b) => a.index - b.index);
|
|
107
|
+
}
|
|
108
|
+
/** Map an absolute offset to 1-based {line, column}. */
|
|
109
|
+
function lineColOf(text, index) {
|
|
110
|
+
let line = 1;
|
|
111
|
+
let last = -1;
|
|
112
|
+
for (let i = 0; i < index; i++) {
|
|
113
|
+
if (text[i] === '\n') {
|
|
114
|
+
line++;
|
|
115
|
+
last = i;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
return { line, column: index - last };
|
|
119
|
+
}
|
|
120
|
+
/** Scan without rewriting — returns findings only (for --scan / CI gating). */
|
|
121
|
+
export function scanText(text, opts = {}) {
|
|
122
|
+
return collectHits(text, opts).map((h) => {
|
|
123
|
+
const { line, column } = lineColOf(text, h.index);
|
|
124
|
+
return { ruleId: h.ruleId, description: h.description, line, column, match: h.match, redacted: maskSecret(h.match, opts) };
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
/** Redact secrets in `text`, returning the rewritten output + findings. */
|
|
128
|
+
export function redactText(text, opts = {}) {
|
|
129
|
+
const hits = collectHits(text, opts);
|
|
130
|
+
const findings = [];
|
|
131
|
+
let out = '';
|
|
132
|
+
let cursor = 0;
|
|
133
|
+
for (const h of hits) {
|
|
134
|
+
const { line, column } = lineColOf(text, h.index);
|
|
135
|
+
const redacted = maskSecret(h.match, opts);
|
|
136
|
+
out += text.slice(cursor, h.index) + redacted;
|
|
137
|
+
cursor = h.index + h.match.length;
|
|
138
|
+
findings.push({ ruleId: h.ruleId, description: h.description, line, column, match: h.match, redacted });
|
|
139
|
+
}
|
|
140
|
+
out += text.slice(cursor);
|
|
141
|
+
return { output: out, findings };
|
|
142
|
+
}
|
|
143
|
+
/** One-line human summary for stderr. */
|
|
144
|
+
export function formatFindingsSummary(findings) {
|
|
145
|
+
if (findings.length === 0)
|
|
146
|
+
return 'redact: no secrets found';
|
|
147
|
+
const byRule = new Map();
|
|
148
|
+
for (const f of findings)
|
|
149
|
+
byRule.set(f.ruleId, (byRule.get(f.ruleId) ?? 0) + 1);
|
|
150
|
+
const parts = [...byRule.entries()].sort((a, b) => b[1] - a[1]).map(([r, n]) => `${r}:${n}`);
|
|
151
|
+
return `redact: ${findings.length} secret${findings.length === 1 ? '' : 's'} redacted (${parts.join(', ')})`;
|
|
152
|
+
}
|
|
153
|
+
//# sourceMappingURL=redact.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"redact.js","sourceRoot":"","sources":["../../../src/redact/redact.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AA4CH;;;;;GAKG;AACH,MAAM,CAAC,MAAM,KAAK,GAAiB;IACjC,EAAE,EAAE,EAAE,aAAa,EAAE,WAAW,EAAE,0BAA0B,EAAE,KAAK,EAAE,8DAA8D,EAAE;IACrI,EAAE,EAAE,EAAE,gBAAgB,EAAE,WAAW,EAAE,mBAAmB,EAAE,KAAK,EAAE,mEAAmE,EAAE;IACtI,EAAE,EAAE,EAAE,YAAY,EAAE,WAAW,EAAE,8BAA8B,EAAE,KAAK,EAAE,0BAA0B,EAAE;IACpG,EAAE,EAAE,EAAE,cAAc,EAAE,WAAW,EAAE,wBAAwB,EAAE,KAAK,EAAE,0CAA0C,EAAE;IAChH,EAAE,EAAE,EAA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