@skillsmith/core 0.12.2 → 0.12.4
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 +173 -0
- package/README.md +2 -2
- package/dist/.tsbuildinfo +1 -1
- package/dist/src/config/owned-lock.acquire.d.ts +8 -0
- package/dist/src/config/owned-lock.acquire.d.ts.map +1 -1
- package/dist/src/config/owned-lock.acquire.js +19 -4
- package/dist/src/config/owned-lock.acquire.js.map +1 -1
- package/dist/src/config/owned-lock.claim.d.ts +4 -2
- package/dist/src/config/owned-lock.claim.d.ts.map +1 -1
- package/dist/src/config/owned-lock.claim.js +42 -8
- package/dist/src/config/owned-lock.claim.js.map +1 -1
- package/dist/src/config/owned-lock.d.ts.map +1 -1
- package/dist/src/config/owned-lock.js +1 -0
- package/dist/src/config/owned-lock.js.map +1 -1
- package/dist/src/config/owned-lock.test.js +126 -2
- package/dist/src/config/owned-lock.test.js.map +1 -1
- package/dist/src/config/owned-lock.types.d.ts +9 -0
- package/dist/src/config/owned-lock.types.d.ts.map +1 -1
- package/dist/src/db/createDatabase.d.ts.map +1 -1
- package/dist/src/db/createDatabase.js +0 -2
- package/dist/src/db/createDatabase.js.map +1 -1
- package/dist/src/exports/services.install.d.ts +1 -0
- package/dist/src/exports/services.install.d.ts.map +1 -1
- package/dist/src/exports/services.install.js +5 -0
- package/dist/src/exports/services.install.js.map +1 -1
- package/dist/src/index.d.ts +2 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +3 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/install/fan-out.cleanup.d.ts +37 -0
- package/dist/src/install/fan-out.cleanup.d.ts.map +1 -0
- package/dist/src/install/fan-out.cleanup.js +75 -0
- package/dist/src/install/fan-out.cleanup.js.map +1 -0
- package/dist/src/install/fan-out.d.ts +41 -31
- package/dist/src/install/fan-out.d.ts.map +1 -1
- package/dist/src/install/fan-out.js +213 -112
- package/dist/src/install/fan-out.js.map +1 -1
- package/dist/src/install/fan-out.leftovers.d.ts +60 -0
- package/dist/src/install/fan-out.leftovers.d.ts.map +1 -0
- package/dist/src/install/fan-out.leftovers.js +251 -0
- package/dist/src/install/fan-out.leftovers.js.map +1 -0
- package/dist/src/install/fan-out.locks.d.ts +12 -0
- package/dist/src/install/fan-out.locks.d.ts.map +1 -0
- package/dist/src/install/fan-out.locks.js +114 -0
- package/dist/src/install/fan-out.locks.js.map +1 -0
- package/dist/src/install/fan-out.manifest.d.ts +64 -0
- package/dist/src/install/fan-out.manifest.d.ts.map +1 -0
- package/dist/src/install/fan-out.manifest.js +130 -0
- package/dist/src/install/fan-out.manifest.js.map +1 -0
- package/dist/src/install/fan-out.overwrite.d.ts +51 -0
- package/dist/src/install/fan-out.overwrite.d.ts.map +1 -0
- package/dist/src/install/fan-out.overwrite.js +343 -0
- package/dist/src/install/fan-out.overwrite.js.map +1 -0
- package/dist/src/install/remove-if-same.d.ts +58 -0
- package/dist/src/install/remove-if-same.d.ts.map +1 -0
- package/dist/src/install/remove-if-same.js +222 -0
- package/dist/src/install/remove-if-same.js.map +1 -0
- package/dist/src/provenance/backfill.d.ts.map +1 -1
- package/dist/src/provenance/backfill.js +15 -2
- package/dist/src/provenance/backfill.js.map +1 -1
- package/dist/src/scripts/__tests__/scan-imported-skills.test.js +9 -1
- package/dist/src/scripts/__tests__/scan-imported-skills.test.js.map +1 -1
- package/dist/src/scripts/scan-imported-skills.d.ts +7 -1
- package/dist/src/scripts/scan-imported-skills.d.ts.map +1 -1
- package/dist/src/scripts/scan-imported-skills.js +15 -2
- package/dist/src/scripts/scan-imported-skills.js.map +1 -1
- package/dist/src/scripts/skill-scanner/allowlist.d.ts +10 -0
- package/dist/src/scripts/skill-scanner/allowlist.d.ts.map +1 -1
- package/dist/src/scripts/skill-scanner/allowlist.js +10 -0
- package/dist/src/scripts/skill-scanner/allowlist.js.map +1 -1
- package/dist/src/scripts/skill-scanner/index.d.ts +8 -0
- package/dist/src/scripts/skill-scanner/index.d.ts.map +1 -1
- package/dist/src/scripts/skill-scanner/index.js +13 -5
- package/dist/src/scripts/skill-scanner/index.js.map +1 -1
- package/dist/src/scripts/skill-scanner/trust-scorer.d.ts.map +1 -1
- package/dist/src/scripts/skill-scanner/trust-scorer.js +6 -0
- package/dist/src/scripts/skill-scanner/trust-scorer.js.map +1 -1
- package/dist/src/security/scanner/SecurityScanner.action-context.d.ts +15 -0
- package/dist/src/security/scanner/SecurityScanner.action-context.d.ts.map +1 -0
- package/dist/src/security/scanner/SecurityScanner.action-context.js +209 -0
- package/dist/src/security/scanner/SecurityScanner.action-context.js.map +1 -0
- package/dist/src/security/scanner/SecurityScanner.d.ts +25 -0
- package/dist/src/security/scanner/SecurityScanner.d.ts.map +1 -1
- package/dist/src/security/scanner/SecurityScanner.helpers.d.ts +40 -1
- package/dist/src/security/scanner/SecurityScanner.helpers.d.ts.map +1 -1
- package/dist/src/security/scanner/SecurityScanner.helpers.js +88 -51
- package/dist/src/security/scanner/SecurityScanner.helpers.js.map +1 -1
- package/dist/src/security/scanner/SecurityScanner.js +39 -6
- package/dist/src/security/scanner/SecurityScanner.js.map +1 -1
- package/dist/src/security/scanner/SecurityScanner.pii.d.ts +30 -0
- package/dist/src/security/scanner/SecurityScanner.pii.d.ts.map +1 -1
- package/dist/src/security/scanner/SecurityScanner.pii.js +8 -1
- package/dist/src/security/scanner/SecurityScanner.pii.js.map +1 -1
- package/dist/src/security/scanner/SecurityScanner.prose-lexicon.d.ts +60 -0
- package/dist/src/security/scanner/SecurityScanner.prose-lexicon.d.ts.map +1 -0
- package/dist/src/security/scanner/SecurityScanner.prose-lexicon.js +228 -0
- package/dist/src/security/scanner/SecurityScanner.prose-lexicon.js.map +1 -0
- package/dist/src/security/scanner/SecurityScanner.scanners.d.ts.map +1 -1
- package/dist/src/security/scanner/SecurityScanner.scanners.js +42 -5
- package/dist/src/security/scanner/SecurityScanner.scanners.js.map +1 -1
- package/dist/src/security/scanner/SecurityScanner.value-gate.d.ts +69 -0
- package/dist/src/security/scanner/SecurityScanner.value-gate.d.ts.map +1 -0
- package/dist/src/security/scanner/SecurityScanner.value-gate.js +271 -0
- package/dist/src/security/scanner/SecurityScanner.value-gate.js.map +1 -0
- package/dist/src/security/scanner/SecurityScanner.weak-passwords.d.ts +55 -0
- package/dist/src/security/scanner/SecurityScanner.weak-passwords.d.ts.map +1 -0
- package/dist/src/security/scanner/SecurityScanner.weak-passwords.js +308 -0
- package/dist/src/security/scanner/SecurityScanner.weak-passwords.js.map +1 -0
- package/dist/src/security/scanner/patterns.d.ts +61 -6
- package/dist/src/security/scanner/patterns.d.ts.map +1 -1
- package/dist/src/security/scanner/patterns.js +70 -61
- package/dist/src/security/scanner/patterns.js.map +1 -1
- package/dist/src/security/scanner/patterns.sensitive-path.d.ts +73 -0
- package/dist/src/security/scanner/patterns.sensitive-path.d.ts.map +1 -0
- package/dist/src/security/scanner/patterns.sensitive-path.js +192 -0
- package/dist/src/security/scanner/patterns.sensitive-path.js.map +1 -0
- package/dist/src/security/scanner/regex-utils.d.ts +31 -17
- package/dist/src/security/scanner/regex-utils.d.ts.map +1 -1
- package/dist/src/security/scanner/regex-utils.js +31 -17
- package/dist/src/security/scanner/regex-utils.js.map +1 -1
- package/dist/src/security/scanner/types.d.ts +9 -0
- package/dist/src/security/scanner/types.d.ts.map +1 -1
- package/dist/src/services/agent-pack/prompt-source.d.ts.map +1 -1
- package/dist/src/services/agent-pack/prompt-source.js +3 -2
- package/dist/src/services/agent-pack/prompt-source.js.map +1 -1
- package/dist/src/services/skill-installation.content.d.ts +7 -2
- package/dist/src/services/skill-installation.content.d.ts.map +1 -1
- package/dist/src/services/skill-installation.content.js +75 -28
- package/dist/src/services/skill-installation.content.js.map +1 -1
- package/dist/src/services/skill-installation.helpers.d.ts.map +1 -1
- package/dist/src/services/skill-installation.helpers.js +8 -0
- package/dist/src/services/skill-installation.helpers.js.map +1 -1
- package/dist/src/services/skill-installation.io.d.ts +1 -29
- package/dist/src/services/skill-installation.io.d.ts.map +1 -1
- package/dist/src/services/skill-installation.io.dirs.d.ts +15 -0
- package/dist/src/services/skill-installation.io.dirs.d.ts.map +1 -0
- package/dist/src/services/skill-installation.io.dirs.js +84 -0
- package/dist/src/services/skill-installation.io.dirs.js.map +1 -0
- package/dist/src/services/skill-installation.io.js +6 -176
- package/dist/src/services/skill-installation.io.js.map +1 -1
- package/dist/src/services/skill-installation.io.rollback.d.ts +138 -0
- package/dist/src/services/skill-installation.io.rollback.d.ts.map +1 -0
- package/dist/src/services/skill-installation.io.rollback.js +218 -0
- package/dist/src/services/skill-installation.io.rollback.js.map +1 -0
- package/dist/src/services/skill-installation.io.write.d.ts +69 -0
- package/dist/src/services/skill-installation.io.write.d.ts.map +1 -0
- package/dist/src/services/skill-installation.io.write.js +417 -0
- package/dist/src/services/skill-installation.io.write.js.map +1 -0
- package/dist/src/services/skill-installation.service.d.ts.map +1 -1
- package/dist/src/services/skill-installation.service.finalize.d.ts +62 -0
- package/dist/src/services/skill-installation.service.finalize.d.ts.map +1 -0
- package/dist/src/services/skill-installation.service.finalize.js +136 -0
- package/dist/src/services/skill-installation.service.finalize.js.map +1 -0
- package/dist/src/services/skill-installation.service.js +66 -80
- package/dist/src/services/skill-installation.service.js.map +1 -1
- package/dist/src/services/skill-installation.target-guard.d.ts +82 -0
- package/dist/src/services/skill-installation.target-guard.d.ts.map +1 -0
- package/dist/src/services/skill-installation.target-guard.js +410 -0
- package/dist/src/services/skill-installation.target-guard.js.map +1 -0
- package/dist/src/services/skill-installation.types.d.ts +13 -1
- package/dist/src/services/skill-installation.types.d.ts.map +1 -1
- package/dist/src/services/skill-installation.types.js.map +1 -1
- package/dist/src/services/skill-installation.uninstall.d.ts +3 -1
- package/dist/src/services/skill-installation.uninstall.d.ts.map +1 -1
- package/dist/src/services/skill-installation.uninstall.helpers.d.ts +59 -0
- package/dist/src/services/skill-installation.uninstall.helpers.d.ts.map +1 -0
- package/dist/src/services/skill-installation.uninstall.helpers.js +124 -0
- package/dist/src/services/skill-installation.uninstall.helpers.js.map +1 -0
- package/dist/src/services/skill-installation.uninstall.js +148 -25
- package/dist/src/services/skill-installation.uninstall.js.map +1 -1
- package/dist/src/utils/index.d.ts +1 -0
- package/dist/src/utils/index.d.ts.map +1 -1
- package/dist/src/utils/index.js +2 -0
- package/dist/src/utils/index.js.map +1 -1
- package/dist/src/utils/safe-fs.d.ts +69 -0
- package/dist/src/utils/safe-fs.d.ts.map +1 -1
- package/dist/src/utils/safe-fs.js +113 -2
- package/dist/src/utils/safe-fs.js.map +1 -1
- package/dist/src/utils/skill-name.d.ts +19 -0
- package/dist/src/utils/skill-name.d.ts.map +1 -0
- package/dist/src/utils/skill-name.js +26 -0
- package/dist/src/utils/skill-name.js.map +1 -0
- package/dist/src/utils/skill-name.test.d.ts +2 -0
- package/dist/src/utils/skill-name.test.d.ts.map +1 -0
- package/dist/src/utils/skill-name.test.js +34 -0
- package/dist/src/utils/skill-name.test.js.map +1 -0
- package/dist/tests/install/fan-out.test.js +1951 -13
- package/dist/tests/install/fan-out.test.js.map +1 -1
- package/dist/tests/install/remove-if-same.test.d.ts +2 -0
- package/dist/tests/install/remove-if-same.test.d.ts.map +1 -0
- package/dist/tests/install/remove-if-same.test.js +298 -0
- package/dist/tests/install/remove-if-same.test.js.map +1 -0
- package/dist/tests/integration/fan-out-lock-contention.test.d.ts +11 -0
- package/dist/tests/integration/fan-out-lock-contention.test.d.ts.map +1 -0
- package/dist/tests/integration/fan-out-lock-contention.test.js +53 -0
- package/dist/tests/integration/fan-out-lock-contention.test.js.map +1 -0
- package/dist/tests/provenance/backfill.test.js +43 -0
- package/dist/tests/provenance/backfill.test.js.map +1 -1
- package/dist/tests/security/ContinuousSecurity.performance.test.js +12 -7
- package/dist/tests/security/ContinuousSecurity.performance.test.js.map +1 -1
- package/dist/tests/security/ContinuousSecurity.test.js +14 -2
- package/dist/tests/security/ContinuousSecurity.test.js.map +1 -1
- package/dist/tests/security/ai-defence-multiline-promotion.test.d.ts +10 -12
- package/dist/tests/security/ai-defence-multiline-promotion.test.d.ts.map +1 -1
- package/dist/tests/security/ai-defence-multiline-promotion.test.js +26 -33
- package/dist/tests/security/ai-defence-multiline-promotion.test.js.map +1 -1
- package/dist/tests/security/nested-instruction-long-attribute.test.js +20 -10
- package/dist/tests/security/nested-instruction-long-attribute.test.js.map +1 -1
- package/dist/tests/security/scanner-evidence-tiers.test.js +15 -0
- package/dist/tests/security/scanner-evidence-tiers.test.js.map +1 -1
- package/dist/tests/security/scanner-multiline-cap.test.d.ts +21 -0
- package/dist/tests/security/scanner-multiline-cap.test.d.ts.map +1 -0
- package/dist/tests/security/scanner-multiline-cap.test.js +152 -0
- package/dist/tests/security/scanner-multiline-cap.test.js.map +1 -0
- package/dist/tests/security/scanner-regression-guard.test.js +66 -1
- package/dist/tests/security/scanner-regression-guard.test.js.map +1 -1
- package/dist/tests/security/scanner-witness-sw1.test.d.ts +32 -0
- package/dist/tests/security/scanner-witness-sw1.test.d.ts.map +1 -0
- package/dist/tests/security/scanner-witness-sw1.test.js +255 -0
- package/dist/tests/security/scanner-witness-sw1.test.js.map +1 -0
- package/dist/tests/security/sensitive-path-adversarial-review.test.d.ts +2 -0
- package/dist/tests/security/sensitive-path-adversarial-review.test.d.ts.map +1 -0
- package/dist/tests/security/sensitive-path-adversarial-review.test.js +313 -0
- package/dist/tests/security/sensitive-path-adversarial-review.test.js.map +1 -0
- package/dist/tests/security/sensitive-path-boolean-flag.test.d.ts +2 -0
- package/dist/tests/security/sensitive-path-boolean-flag.test.d.ts.map +1 -0
- package/dist/tests/security/sensitive-path-boolean-flag.test.js +151 -0
- package/dist/tests/security/sensitive-path-boolean-flag.test.js.map +1 -0
- package/dist/tests/security/sensitive-path-fp.test.js +314 -0
- package/dist/tests/security/sensitive-path-fp.test.js.map +1 -1
- package/dist/tests/security/sensitive-path-prefixed-secrets.test.d.ts +2 -0
- package/dist/tests/security/sensitive-path-prefixed-secrets.test.d.ts.map +1 -0
- package/dist/tests/security/sensitive-path-prefixed-secrets.test.js +176 -0
- package/dist/tests/security/sensitive-path-prefixed-secrets.test.js.map +1 -0
- package/dist/tests/security/smi5879-corroboration.core.test.js +44 -0
- package/dist/tests/security/smi5879-corroboration.core.test.js.map +1 -1
- package/dist/tests/security/weak-password-lexicon.test.d.ts +18 -0
- package/dist/tests/security/weak-password-lexicon.test.d.ts.map +1 -0
- package/dist/tests/security/weak-password-lexicon.test.js +132 -0
- package/dist/tests/security/weak-password-lexicon.test.js.map +1 -0
- package/dist/tests/skill-scanner/allowlist.test.js +58 -4
- package/dist/tests/skill-scanner/allowlist.test.js.map +1 -1
- package/dist/tests/skill-scanner/categorizer.test.d.ts +2 -0
- package/dist/tests/skill-scanner/categorizer.test.d.ts.map +1 -0
- package/dist/tests/skill-scanner/categorizer.test.js +71 -0
- package/dist/tests/skill-scanner/categorizer.test.js.map +1 -0
- package/dist/tests/skill-scanner/cli-guard.test.d.ts +23 -0
- package/dist/tests/skill-scanner/cli-guard.test.d.ts.map +1 -0
- package/dist/tests/skill-scanner/cli-guard.test.js +71 -0
- package/dist/tests/skill-scanner/cli-guard.test.js.map +1 -0
- package/dist/tests/unit/services/skill-installation.content.test.js +59 -0
- package/dist/tests/unit/services/skill-installation.content.test.js.map +1 -1
- package/dist/tests/unit/services/skill-installation.io.client-agent-path.test.js +35 -14
- package/dist/tests/unit/services/skill-installation.io.client-agent-path.test.js.map +1 -1
- package/dist/tests/unit/services/skill-installation.io.rollback.test.d.ts +2 -0
- package/dist/tests/unit/services/skill-installation.io.rollback.test.d.ts.map +1 -0
- package/dist/tests/unit/services/skill-installation.io.rollback.test.js +984 -0
- package/dist/tests/unit/services/skill-installation.io.rollback.test.js.map +1 -0
- package/dist/tests/unit/services/skill-installation.io.rollback.unit.test.d.ts +2 -0
- package/dist/tests/unit/services/skill-installation.io.rollback.unit.test.d.ts.map +1 -0
- package/dist/tests/unit/services/skill-installation.io.rollback.unit.test.js +148 -0
- package/dist/tests/unit/services/skill-installation.io.rollback.unit.test.js.map +1 -0
- package/dist/tests/unit/services/skill-installation.service.error-codes.test.js +19 -0
- package/dist/tests/unit/services/skill-installation.service.error-codes.test.js.map +1 -1
- package/dist/tests/unit/services/skill-installation.service.finalize.test.d.ts +2 -0
- package/dist/tests/unit/services/skill-installation.service.finalize.test.d.ts.map +1 -0
- package/dist/tests/unit/services/skill-installation.service.finalize.test.js +147 -0
- package/dist/tests/unit/services/skill-installation.service.finalize.test.js.map +1 -0
- package/dist/tests/unit/services/skill-installation.service.sensitive-path-fp.test.d.ts +29 -0
- package/dist/tests/unit/services/skill-installation.service.sensitive-path-fp.test.d.ts.map +1 -0
- package/dist/tests/unit/services/skill-installation.service.sensitive-path-fp.test.js +200 -0
- package/dist/tests/unit/services/skill-installation.service.sensitive-path-fp.test.js.map +1 -0
- package/dist/tests/unit/services/skill-installation.service.test.js +43 -0
- package/dist/tests/unit/services/skill-installation.service.test.js.map +1 -1
- package/dist/tests/unit/services/skill-installation.target-guard.test.d.ts +2 -0
- package/dist/tests/unit/services/skill-installation.target-guard.test.d.ts.map +1 -0
- package/dist/tests/unit/services/skill-installation.target-guard.test.js +590 -0
- package/dist/tests/unit/services/skill-installation.target-guard.test.js.map +1 -0
- package/dist/tests/unit/services/skill-installation.uninstall.guard.test.d.ts +2 -0
- package/dist/tests/unit/services/skill-installation.uninstall.guard.test.d.ts.map +1 -0
- package/dist/tests/unit/services/skill-installation.uninstall.guard.test.js +473 -0
- package/dist/tests/unit/services/skill-installation.uninstall.guard.test.js.map +1 -0
- package/dist/tests/utils/safe-fs.test.js +129 -2
- package/dist/tests/utils/safe-fs.test.js.map +1 -1
- package/package.json +6 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SecurityScanner.scanners.js","sourceRoot":"","sources":["../../../../src/security/scanner/SecurityScanner.scanners.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,EACL,uBAAuB,EACvB,gBAAgB,EAChB,4BAA4B,EAC5B,2BAA2B,EAC3B,uBAAuB,EACvB,0BAA0B,EAC1B,6BAA6B,EAC7B,gCAAgC,GACjC,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAEhE,OAAO,EACL,sBAAsB,EACtB,sBAAsB,EACtB,kBAAkB,GACnB,MAAM,8BAA8B,CAAA;AACrC,OAAO,EACL,0BAA0B,EAC1B,cAAc,EACd,eAAe,GAChB,MAAM,0BAA0B,CAAA;
|
|
1
|
+
{"version":3,"file":"SecurityScanner.scanners.js","sourceRoot":"","sources":["../../../../src/security/scanner/SecurityScanner.scanners.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,EACL,uBAAuB,EACvB,gBAAgB,EAChB,4BAA4B,EAC5B,kBAAkB,EAClB,+BAA+B,EAC/B,4BAA4B,EAC5B,2BAA2B,EAC3B,uBAAuB,EACvB,0BAA0B,EAC1B,6BAA6B,EAC7B,gCAAgC,GACjC,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAEhE,OAAO,EACL,sBAAsB,EACtB,sBAAsB,EACtB,kBAAkB,GACnB,MAAM,8BAA8B,CAAA;AACrC,OAAO,EACL,0BAA0B,EAC1B,cAAc,EACd,eAAe,GAChB,MAAM,0BAA0B,CAAA;AACjC,2EAA2E;AAC3E,6EAA6E;AAC7E,gEAAgE;AAChE,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAA;AAC1E,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAA;AAExE;;;;;;GAMG;AACH,MAAM,iBAAiB,GACrB,8HAA8H,CAAA;AAEhI;;;;;;;;GAQG;AACH,MAAM,qBAAqB,GAAG,+DAA+D,CAAA;AAE7F,MAAM,UAAU,kBAAkB,CAChC,OAAe,EACf,YAA4B;IAE5B,MAAM,QAAQ,GAAsB,EAAE,CAAA;IACtC,MAAM,KA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E,OAAO,EAAE,cAAc,EAAE,0BAA0B,EAAE,eAAe,EAAE,CAAA"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Security Scanner — MF-4 assignment-value gate (SMI-5207)
|
|
3
|
+
* @module @skillsmith/core/security/scanner/SecurityScanner.value-gate
|
|
4
|
+
*
|
|
5
|
+
* The `sensitive_path` MF-4 gate: given a line that matched one of the three
|
|
6
|
+
* VALUE_GATED_ASSIGNMENT_PATTERNS, decide whether it assigns a REAL credential
|
|
7
|
+
* (→ HIGH) or only prose (→ MEDIUM). HIGH is the default; a downgrade requires
|
|
8
|
+
* positive prose evidence, and since HIGH is the pre-SMI-5207 unconditional
|
|
9
|
+
* behaviour that default could not regress detection.
|
|
10
|
+
*
|
|
11
|
+
* SMI-6505 QUALIFIES THAT LAST CLAUSE — it is no longer unconditionally true of
|
|
12
|
+
* this module. It held while every rule here only recognized prose. The
|
|
13
|
+
* embedded-key boolean-flag rule below deliberately turns a previously-HIGH
|
|
14
|
+
* input MEDIUM (`allow_credentials=True`, a FastAPI CORS flag that was blocking
|
|
15
|
+
* installation of any skill documenting CORS setup). The MF-4b veto's own
|
|
16
|
+
* invariant is unaffected: that one is a claim about the `weakPasswordVeto`
|
|
17
|
+
* option, and it still holds — see its block below.
|
|
18
|
+
*
|
|
19
|
+
* Split out of SecurityScanner.scanners.ts for the 500-line pre-commit gate
|
|
20
|
+
* once round 8's segmentation logic landed (that file is at 4xx with the MF-3
|
|
21
|
+
* gate and six per-category scanners already in it). Cohesive unit — every
|
|
22
|
+
* symbol here serves the single question "is this assignment's value real?".
|
|
23
|
+
*/
|
|
24
|
+
/**
|
|
25
|
+
* MF-4 value classification, SEGMENTED PER ASSIGNMENT (SMI-5207 adversarial
|
|
26
|
+
* review, round 8). Each assignment key on the line owns exactly the text
|
|
27
|
+
* between its own `:`/`=` and the NEXT key (or EOL); the finding stays HIGH if
|
|
28
|
+
* ANY of those values is a real credential, and downgrades only when EVERY one
|
|
29
|
+
* of them positively reads as prose.
|
|
30
|
+
*
|
|
31
|
+
* The plan's single-whole-line-span shape (`SPAN.exec(line)[1]`) leaks across
|
|
32
|
+
* assignments in THREE directions on a line carrying two keys. All three are
|
|
33
|
+
* false-negative REGRESSIONS (unconditionally HIGH pre-SMI-5207) and none is
|
|
34
|
+
* residual R-3, which is a stopword inside the assignment's OWN value — here
|
|
35
|
+
* the prose bleeds in from a DIFFERENT assignment entirely:
|
|
36
|
+
*
|
|
37
|
+
* 1. LEFT — `SPAN` is unanchored, so it captures from the LEFTMOST key, not
|
|
38
|
+
* necessarily the one that produced the finding (scanSensitivePaths emits
|
|
39
|
+
* for the first entry matching in ARRAY order, and CREDENTIALS(2)/
|
|
40
|
+
* SECRETS(3) precede PASSWORD(8)). `password: this credentials:
|
|
41
|
+
* Tr0ub4dor&3` → captured `this credentials: Tr0ub4dor&3` → `this` →
|
|
42
|
+
* MEDIUM. This is the reviewer's reported counter-example.
|
|
43
|
+
* 2. RIGHT — `(\S.*)$` runs to EOL and swallows the next assignment's prose:
|
|
44
|
+
* `credentials: Tr0ub4dor&3 password: this` → trailing `this` → MEDIUM.
|
|
45
|
+
* 3. Anchoring at the finding's own match (the narrow fix) closes 1, not 2,
|
|
46
|
+
* and opens a mirror of 1: only ONE finding is emitted per line (the
|
|
47
|
+
* scanner loop `break`s), so on `password: Tr0ub4dor&3 credentials: this`
|
|
48
|
+
* the emitted finding sits RIGHT of the real credential, which a
|
|
49
|
+
* match-anchored scan never sees → MEDIUM.
|
|
50
|
+
*
|
|
51
|
+
* Segmenting closes all three. It is also the correct granularity: severity
|
|
52
|
+
* attaches to the LINE (the finding's `location` is the whole trimmed line), so
|
|
53
|
+
* a line holding any real credential is HIGH. Monotonicity holds — this returns
|
|
54
|
+
* true at least as often as the per-span reading, and true is the status quo.
|
|
55
|
+
*
|
|
56
|
+
* SMI-6441 note: "true is the status quo" is still literally correct, but no
|
|
57
|
+
* longer conveys the blast radius of a single keeplist miss. Under the MF-4b
|
|
58
|
+
* veto ONE lexicon hit in ANY segment escalates the WHOLE line — so a line
|
|
59
|
+
* whose first segment is the acceptance criterion's own must-stay-MEDIUM case
|
|
60
|
+
* goes HIGH anyway if a later segment trips the veto. The next-line path does
|
|
61
|
+
* the same across a line boundary, letting an indented continuation drive the
|
|
62
|
+
* severity of an unindented key line. Both follow from the design and neither
|
|
63
|
+
* loses detection; recorded so a future reader sizes one missing keeplist
|
|
64
|
+
* entry correctly.
|
|
65
|
+
*/
|
|
66
|
+
export declare function assignmentHasRealValue(lines: string[], index: number, options?: {
|
|
67
|
+
readonly weakPasswordVeto?: boolean;
|
|
68
|
+
}): boolean;
|
|
69
|
+
//# sourceMappingURL=SecurityScanner.value-gate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SecurityScanner.value-gate.d.ts","sourceRoot":"","sources":["../../../../src/security/scanner/SecurityScanner.value-gate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AA4KH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,MAAM,EAAE,EACf,KAAK,EAAE,MAAM,EACb,OAAO,CAAC,EAAE;IAAE,QAAQ,CAAC,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAAE,GAChD,OAAO,CAgCT"}
|
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Security Scanner — MF-4 assignment-value gate (SMI-5207)
|
|
3
|
+
* @module @skillsmith/core/security/scanner/SecurityScanner.value-gate
|
|
4
|
+
*
|
|
5
|
+
* The `sensitive_path` MF-4 gate: given a line that matched one of the three
|
|
6
|
+
* VALUE_GATED_ASSIGNMENT_PATTERNS, decide whether it assigns a REAL credential
|
|
7
|
+
* (→ HIGH) or only prose (→ MEDIUM). HIGH is the default; a downgrade requires
|
|
8
|
+
* positive prose evidence, and since HIGH is the pre-SMI-5207 unconditional
|
|
9
|
+
* behaviour that default could not regress detection.
|
|
10
|
+
*
|
|
11
|
+
* SMI-6505 QUALIFIES THAT LAST CLAUSE — it is no longer unconditionally true of
|
|
12
|
+
* this module. It held while every rule here only recognized prose. The
|
|
13
|
+
* embedded-key boolean-flag rule below deliberately turns a previously-HIGH
|
|
14
|
+
* input MEDIUM (`allow_credentials=True`, a FastAPI CORS flag that was blocking
|
|
15
|
+
* installation of any skill documenting CORS setup). The MF-4b veto's own
|
|
16
|
+
* invariant is unaffected: that one is a claim about the `weakPasswordVeto`
|
|
17
|
+
* option, and it still holds — see its block below.
|
|
18
|
+
*
|
|
19
|
+
* Split out of SecurityScanner.scanners.ts for the 500-line pre-commit gate
|
|
20
|
+
* once round 8's segmentation logic landed (that file is at 4xx with the MF-3
|
|
21
|
+
* gate and six per-category scanners already in it). Cohesive unit — every
|
|
22
|
+
* symbol here serves the single question "is this assignment's value real?".
|
|
23
|
+
*/
|
|
24
|
+
import { PLACEHOLDER_SECRET_RE } from './SecurityScanner.pii.js';
|
|
25
|
+
import { PROSE_STOPWORDS } from './SecurityScanner.prose-lexicon.js';
|
|
26
|
+
import { COMMON_WEAK_PASSWORDS } from './SecurityScanner.weak-passwords.js';
|
|
27
|
+
import { MAX_LINE_LENGTH_FOR_REGEX } from './regex-utils.js';
|
|
28
|
+
/** A value that REFERENCES a secret rather than containing one. */
|
|
29
|
+
const TEMPLATE_REFERENCE = /^\$|^\{\{|\$\{|^%[A-Za-z_]|^<%/;
|
|
30
|
+
/**
|
|
31
|
+
* Max token count for an all-lowercase span to read as a doc LABEL rather
|
|
32
|
+
* than a passphrase. 2 dictionary words carry ~26 bits (2 x ~12.9 diceware),
|
|
33
|
+
* below any credible credential strength; 3 words (~39 bits) is defensibly a
|
|
34
|
+
* real passphrase. This is the narrowest value that closes `credentials:
|
|
35
|
+
* rotation policy` (2 words) without also swallowing a genuine 3-word
|
|
36
|
+
* passphrase — verified at both 2 and 3 against the full fixture set; 2 wins
|
|
37
|
+
* because it errs toward RETAINING detection on the ambiguous 3-token case.
|
|
38
|
+
*/
|
|
39
|
+
const MAX_LABEL_TOKENS = 2;
|
|
40
|
+
/**
|
|
41
|
+
* The assignment KEY — the exact union of the three
|
|
42
|
+
* VALUE_GATED_ASSIGNMENT_PATTERNS it gates, `\b` included (only the secrets
|
|
43
|
+
* entry carries one), so every line reaching assignmentHasRealValue() through
|
|
44
|
+
* those patterns is covered. `g` is required by matchAll, which clones the
|
|
45
|
+
* regex, so there is no shared `lastIndex` state.
|
|
46
|
+
*
|
|
47
|
+
* DERIVATION NOTE — the plan's item-3 block sketches CREDENTIAL_ASSIGN_SPAN /
|
|
48
|
+
* BARE_ASSIGNMENT_EOL, a single-whole-line-span shape. Round 8 confirmed
|
|
49
|
+
* (two adversarial review rounds, six hand-traced counter-examples) that
|
|
50
|
+
* shape leaks across assignments in THREE directions on a line carrying two
|
|
51
|
+
* keys — see assignmentHasRealValue below — so this reconstruction segments
|
|
52
|
+
* the line by key instead of using one span regex.
|
|
53
|
+
*/
|
|
54
|
+
const ASSIGNMENT_HEAD = /(?:credentials|\bsecrets?|password)\s*[:=]\s*/gi;
|
|
55
|
+
/**
|
|
56
|
+
* A whole-span boolean literal, plus trailing delimiters (SMI-6505).
|
|
57
|
+
*
|
|
58
|
+
* Anchored at BOTH ends, deliberately. DO NOT relax this. Two obvious
|
|
59
|
+
* relaxations were each implemented, measured, and rejected: the value span runs
|
|
60
|
+
* to the next assignment key or EOL, so whatever this regex accepts unexamined
|
|
61
|
+
* is exactly where a real credential can hide.
|
|
62
|
+
*
|
|
63
|
+
* token-terminated — `^(?:true|false)\s*(?:[,;)\]}]|#|\/\/)`
|
|
64
|
+
* would fix a single-line multi-argument call
|
|
65
|
+
* would open `<prefix>_credentials=true, Tr0ub4dor&3` -> MEDIUM
|
|
66
|
+
*
|
|
67
|
+
* trailing-comment branch — `...[\s,;)\]}]*(?:(?:#|\/\/).*)?$`
|
|
68
|
+
* would fix `allow_credentials=True, # allow cookies`
|
|
69
|
+
* would open `<prefix>_credentials=true # Tr0ub4dor&3` -> MEDIUM
|
|
70
|
+
*
|
|
71
|
+
* Both bypass shapes are pinned as must-stay-HIGH tests. An embedded key is
|
|
72
|
+
* trivial to write, so either relaxation is a cheap deliberate bypass rather
|
|
73
|
+
* than an accidental edge case — which is why the two formatting variants they
|
|
74
|
+
* would have fixed are accepted residuals instead.
|
|
75
|
+
*/
|
|
76
|
+
const BOOLEAN_FLAG_VALUE = /^(?:true|false)[\s,;)\]}]*$/i;
|
|
77
|
+
/**
|
|
78
|
+
* Is the matched assignment keyword a SUFFIX of a longer identifier?
|
|
79
|
+
*
|
|
80
|
+
* The SMI-6505 discriminator. `allow_credentials=True` reaches this gate at all
|
|
81
|
+
* only because CREDENTIALS_ASSIGN_PATTERN carries no left boundary; the keyword
|
|
82
|
+
* being embedded is what marks it as an ordinary identifier rather than a
|
|
83
|
+
* credential key. Never true of the secrets entry, which has its own `\b`.
|
|
84
|
+
*
|
|
85
|
+
* Deliberately NOT fixed by adding `\b` to the pattern instead — that would also
|
|
86
|
+
* stop matching `AWS_CREDENTIALS=hunter2`, a real credential, trading this false
|
|
87
|
+
* positive for a false negative. See SMI-6508.
|
|
88
|
+
*/
|
|
89
|
+
function isEmbeddedKey(line, matchStart) {
|
|
90
|
+
return matchStart > 0 && /[A-Za-z0-9_]/.test(line[matchStart - 1]);
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Positive prose evidence. Absence of evidence leaves the finding at HIGH.
|
|
94
|
+
* PROSE_STOPWORDS lives in SecurityScanner.prose-lexicon.ts — English function
|
|
95
|
+
* words: a passphrase is nouns, an explanatory sentence is not.
|
|
96
|
+
*/
|
|
97
|
+
function isProseValue(span, weakPasswordVeto) {
|
|
98
|
+
const v = span.replace(/^['"]|['"]$/g, '').trim();
|
|
99
|
+
if (v.length === 0)
|
|
100
|
+
return true;
|
|
101
|
+
if (TEMPLATE_REFERENCE.test(v))
|
|
102
|
+
return true; // $VAR, ${{ secrets.X }}
|
|
103
|
+
if (PLACEHOLDER_SECRET_RE.test(v))
|
|
104
|
+
return true; // <YOUR_PASSWORD>, changeme
|
|
105
|
+
if (/^(.)\1+$/.test(v))
|
|
106
|
+
return true; // xxxxxxxx
|
|
107
|
+
const tokens = v.split(/\s+/);
|
|
108
|
+
if (tokens.some((t) => PROSE_STOPWORDS.has(t.toLowerCase().replace(/[^a-z']/g, ''))))
|
|
109
|
+
return true; // sentence
|
|
110
|
+
if (tokens.length > 12)
|
|
111
|
+
return true; // long sentence
|
|
112
|
+
/**
|
|
113
|
+
* SMI-6441 (MF-4b): a 2-token all-lowercase value normally reads as a
|
|
114
|
+
* documentation label ("rotation policy"). It does NOT when EVERY one of its
|
|
115
|
+
* tokens is a known common password ("monkey dragon", "qwerty ninja") — that
|
|
116
|
+
* is a weak credential wearing a label's shape, SMI-5207's residual R-2.
|
|
117
|
+
*
|
|
118
|
+
* WHY `every` AND NOT `some` — the load-bearing choice, decided on measured
|
|
119
|
+
* evidence after three adversarial review rounds. A `some` predicate reopens
|
|
120
|
+
* the very false-positive class SMI-5207 closed, and does so unboundedly:
|
|
121
|
+
* 55% of the emitted lexicon (2,229 of 4,012 entries) are ordinary English
|
|
122
|
+
* dictionary words, so almost any two-word documentation label pairs a
|
|
123
|
+
* benign noun with a lexicon member. Three independent review passes each
|
|
124
|
+
* found more leaks (`security policy`, `command reference`, `cloud
|
|
125
|
+
* provider`, `active profile`, `help center`, `java client`, `mobile app`,
|
|
126
|
+
* …), and the keeplist that was supposed to prevent this is a hand-curated
|
|
127
|
+
* denylist-of-a-denylist against a 2,229-word residual — it does not
|
|
128
|
+
* converge. `every` closes the class STRUCTURALLY instead: a documentation
|
|
129
|
+
* label essentially never has BOTH of its words in a common-password list.
|
|
130
|
+
*
|
|
131
|
+
* WHAT THIS COSTS, STATED PLAINLY: R-2 is now closed only for the
|
|
132
|
+
* two-common-password case. A value pairing ONE common password with an
|
|
133
|
+
* ordinary word — the plan's original headline example — stays MEDIUM,
|
|
134
|
+
* because it is not distinguishable from a documentation label without a
|
|
135
|
+
* false-positive rate this gate cannot afford. The install gate fails on
|
|
136
|
+
* `hasHigh` alone with no allowlist anywhere in `skill-installation.*`, so
|
|
137
|
+
* an FP here blocks a legitimate install and costs a package publish to
|
|
138
|
+
* undo; a FN leaves a weak credential at MEDIUM, which is exactly where it
|
|
139
|
+
* sat before this wave. The asymmetry is what decides it.
|
|
140
|
+
*
|
|
141
|
+
* SCOPE, DELIBERATELY NARROW: this veto applies ONLY to the exactly-2-token
|
|
142
|
+
* all-lowercase carve-out below, never to the stopword ("sentence") rule
|
|
143
|
+
* above it. A top-10k common-password list is saturated with ordinary nouns
|
|
144
|
+
* (love, money, summer, hello, welcome, computer, football, sunshine) and a
|
|
145
|
+
* ten-word documentation sentence has a high chance of containing one, so
|
|
146
|
+
* extending the veto to sentences would reopen exactly the false-positive
|
|
147
|
+
* class SMI-5207 closed. R-3 (a passphrase containing a function word) is
|
|
148
|
+
* therefore NOT closed by this wave, by design.
|
|
149
|
+
*
|
|
150
|
+
* SAFETY INVARIANT — stated precisely, because the obvious stronger claim is
|
|
151
|
+
* FALSE. This veto only ever REMOVES a downgrade path; it never adds one. So
|
|
152
|
+
* for every input, post-6441 severity >= pre-6441 severity, and the set of
|
|
153
|
+
* inputs reading MEDIUM after this change is a strict SUBSET of the set that
|
|
154
|
+
* read MEDIUM before it. That is the whole safety argument, and it is enough:
|
|
155
|
+
* no input that was HIGH becomes MEDIUM, so no detection is lost.
|
|
156
|
+
*
|
|
157
|
+
* It is NOT true that "no added token can lower severity". The stopword check
|
|
158
|
+
* above runs BEFORE this label check and returns early, so:
|
|
159
|
+
* password: monkey dragon -> vetoed -> HIGH
|
|
160
|
+
* password: a monkey dragon -> stopword -> MEDIUM
|
|
161
|
+
* A third token that is a PROSE_STOPWORD ('a', 'the', 'an', 'no', 'so',
|
|
162
|
+
* 'now', 'just', 'only', 'is', ...) short-circuits ahead of this line and
|
|
163
|
+
* downgrades. This stopword-prepend path is the KNOWN, ACCEPTED BYPASS of
|
|
164
|
+
* this veto. It is not a new hole opened by SMI-6441 — it is exactly
|
|
165
|
+
* SMI-5207's residual R-3 (a value containing an English function word
|
|
166
|
+
* degrades to MEDIUM), which this wave deliberately leaves open (see
|
|
167
|
+
* Rejected alternative 1: extending the veto to the stopword rule would flip
|
|
168
|
+
* ordinary documentation sentences to HIGH, reopening the FP class with 10
|
|
169
|
+
* documented recurrences). Anyone closing R-3 later closes this bypass with
|
|
170
|
+
* it; until then, do not describe this veto as unpoisonable.
|
|
171
|
+
*
|
|
172
|
+
* ONE THING THE R-3 IDENTIFICATION DOES NOT CARRY OVER (SMI-6441
|
|
173
|
+
* adversarial review round 2). Calling this bypass "exactly R-3" is true
|
|
174
|
+
* of the MECHANISM, but must not be read as inheriting SMI-5207's whole
|
|
175
|
+
* acceptance rationale. That plan accepted R-3 partly because its quoted
|
|
176
|
+
* form is independently covered by PII_PATTERNS. Measured, that backstop
|
|
177
|
+
* covers only the quoted form: a quoted stopword-prefixed value still
|
|
178
|
+
* fires a HIGH pii finding, while the UNQUOTED form fires nothing at any
|
|
179
|
+
* severity — and the unquoted form is the one an author would type. The
|
|
180
|
+
* mechanism is inherited; its REACHABILITY AS AN EVASION is not. Before
|
|
181
|
+
* this wave there was nothing to evade here, because a 2-token label was
|
|
182
|
+
* already MEDIUM. Treat it as an accepted residual with NO backstop.
|
|
183
|
+
*/
|
|
184
|
+
if (tokens.length > 1 &&
|
|
185
|
+
tokens.length <= MAX_LABEL_TOKENS &&
|
|
186
|
+
tokens.every((t) => /^[a-z]{1,19}$/.test(t)) &&
|
|
187
|
+
(!weakPasswordVeto || !tokens.every((t) => COMMON_WEAK_PASSWORDS.has(t))))
|
|
188
|
+
return true; // 2-word doc label
|
|
189
|
+
return false; // DEFAULT: stays HIGH
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* MF-4 value classification, SEGMENTED PER ASSIGNMENT (SMI-5207 adversarial
|
|
193
|
+
* review, round 8). Each assignment key on the line owns exactly the text
|
|
194
|
+
* between its own `:`/`=` and the NEXT key (or EOL); the finding stays HIGH if
|
|
195
|
+
* ANY of those values is a real credential, and downgrades only when EVERY one
|
|
196
|
+
* of them positively reads as prose.
|
|
197
|
+
*
|
|
198
|
+
* The plan's single-whole-line-span shape (`SPAN.exec(line)[1]`) leaks across
|
|
199
|
+
* assignments in THREE directions on a line carrying two keys. All three are
|
|
200
|
+
* false-negative REGRESSIONS (unconditionally HIGH pre-SMI-5207) and none is
|
|
201
|
+
* residual R-3, which is a stopword inside the assignment's OWN value — here
|
|
202
|
+
* the prose bleeds in from a DIFFERENT assignment entirely:
|
|
203
|
+
*
|
|
204
|
+
* 1. LEFT — `SPAN` is unanchored, so it captures from the LEFTMOST key, not
|
|
205
|
+
* necessarily the one that produced the finding (scanSensitivePaths emits
|
|
206
|
+
* for the first entry matching in ARRAY order, and CREDENTIALS(2)/
|
|
207
|
+
* SECRETS(3) precede PASSWORD(8)). `password: this credentials:
|
|
208
|
+
* Tr0ub4dor&3` → captured `this credentials: Tr0ub4dor&3` → `this` →
|
|
209
|
+
* MEDIUM. This is the reviewer's reported counter-example.
|
|
210
|
+
* 2. RIGHT — `(\S.*)$` runs to EOL and swallows the next assignment's prose:
|
|
211
|
+
* `credentials: Tr0ub4dor&3 password: this` → trailing `this` → MEDIUM.
|
|
212
|
+
* 3. Anchoring at the finding's own match (the narrow fix) closes 1, not 2,
|
|
213
|
+
* and opens a mirror of 1: only ONE finding is emitted per line (the
|
|
214
|
+
* scanner loop `break`s), so on `password: Tr0ub4dor&3 credentials: this`
|
|
215
|
+
* the emitted finding sits RIGHT of the real credential, which a
|
|
216
|
+
* match-anchored scan never sees → MEDIUM.
|
|
217
|
+
*
|
|
218
|
+
* Segmenting closes all three. It is also the correct granularity: severity
|
|
219
|
+
* attaches to the LINE (the finding's `location` is the whole trimmed line), so
|
|
220
|
+
* a line holding any real credential is HIGH. Monotonicity holds — this returns
|
|
221
|
+
* true at least as often as the per-span reading, and true is the status quo.
|
|
222
|
+
*
|
|
223
|
+
* SMI-6441 note: "true is the status quo" is still literally correct, but no
|
|
224
|
+
* longer conveys the blast radius of a single keeplist miss. Under the MF-4b
|
|
225
|
+
* veto ONE lexicon hit in ANY segment escalates the WHOLE line — so a line
|
|
226
|
+
* whose first segment is the acceptance criterion's own must-stay-MEDIUM case
|
|
227
|
+
* goes HIGH anyway if a later segment trips the veto. The next-line path does
|
|
228
|
+
* the same across a line boundary, letting an indented continuation drive the
|
|
229
|
+
* severity of an unindented key line. Both follow from the design and neither
|
|
230
|
+
* loses detection; recorded so a future reader sizes one missing keeplist
|
|
231
|
+
* entry correctly.
|
|
232
|
+
*/
|
|
233
|
+
export function assignmentHasRealValue(lines, index, options // default true
|
|
234
|
+
) {
|
|
235
|
+
const weakPasswordVeto = options?.weakPasswordVeto !== false;
|
|
236
|
+
// Same ReDoS input cap the safeRegex* helpers apply; matchAll has no
|
|
237
|
+
// equivalent wrapper, so the truncation is explicit here.
|
|
238
|
+
const line = lines[index].slice(0, MAX_LINE_LENGTH_FOR_REGEX);
|
|
239
|
+
const heads = [...line.matchAll(ASSIGNMENT_HEAD)];
|
|
240
|
+
if (heads.length === 0)
|
|
241
|
+
return false;
|
|
242
|
+
let trailingKeyIsBare = false;
|
|
243
|
+
for (let i = 0; i < heads.length; i++) {
|
|
244
|
+
const from = (heads[i].index ?? 0) + heads[i][0].length;
|
|
245
|
+
const to = i + 1 < heads.length ? (heads[i + 1].index ?? line.length) : line.length;
|
|
246
|
+
const value = line.slice(from, to);
|
|
247
|
+
if (value.trim().length === 0) {
|
|
248
|
+
// A key with nothing after it. Only the LAST one can take its value from
|
|
249
|
+
// the next line (YAML block form).
|
|
250
|
+
trailingKeyIsBare = i === heads.length - 1;
|
|
251
|
+
continue;
|
|
252
|
+
}
|
|
253
|
+
trailingKeyIsBare = false;
|
|
254
|
+
// SMI-6505: an EMBEDDED key assigned a bare boolean is a configuration flag,
|
|
255
|
+
// not a credential. `continue` classifies the segment as prose without
|
|
256
|
+
// consulting isProseValue(), which sees only the value span and therefore
|
|
257
|
+
// could not tell this apart from a bare `credentials: True`.
|
|
258
|
+
if (isEmbeddedKey(line, heads[i].index ?? 0) && BOOLEAN_FLAG_VALUE.test(value.trim()))
|
|
259
|
+
continue;
|
|
260
|
+
if (!isProseValue(value, weakPasswordVeto))
|
|
261
|
+
return true;
|
|
262
|
+
}
|
|
263
|
+
if (!trailingKeyIsBare)
|
|
264
|
+
return false;
|
|
265
|
+
// `| undefined` annotated (not in the plan's block) so the plan's own
|
|
266
|
+
// `next !== undefined` guard type-checks — `lines[index + 1]` is `string`
|
|
267
|
+
// here (no noUncheckedIndexedAccess), making the compare a TS2367 error.
|
|
268
|
+
const next = lines[index + 1];
|
|
269
|
+
return next !== undefined && !isProseValue(next.trim(), weakPasswordVeto);
|
|
270
|
+
}
|
|
271
|
+
//# sourceMappingURL=SecurityScanner.value-gate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SecurityScanner.value-gate.js","sourceRoot":"","sources":["../../../../src/security/scanner/SecurityScanner.value-gate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAA;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAA;AACpE,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAA;AAC3E,OAAO,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAA;AAE5D,mEAAmE;AACnE,MAAM,kBAAkB,GAAG,gCAAgC,CAAA;AAE3D;;;;;;;;GAQG;AACH,MAAM,gBAAgB,GAAG,CAAC,CAAA;AAE1B;;;;;;;;;;;;;GAaG;AACH,MAAM,eAAe,GAAG,iDAAiD,CAAA;AAEzE;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,kBAAkB,GAAG,8BAA8B,CAAA;AAEzD;;;;;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M,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAA;QACnF,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,EAAE,CAAC,CAAA;QAClC,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC9B,yEAAyE;YACzE,mCAAmC;YACnC,iBAAiB,GAAG,CAAC,KAAK,KAAK,CAAC,MAAM,GAAG,CAAC,CAAA;YAC1C,SAAQ;QACV,CAAC;QACD,iBAAiB,GAAG,KAAK,CAAA;QACzB,6EAA6E;QAC7E,uEAAuE;QACvE,0EAA0E;QAC1E,6DAA6D;QAC7D,IAAI,aAAa,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,IAAI,kBAAkB,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;YAAE,SAAQ;QAC/F,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,gBAAgB,CAAC;YAAE,OAAO,IAAI,CAAA;IACzD,CAAC;IACD,IAAI,CAAC,iBAAiB;QAAE,OAAO,KAAK,CAAA;IACpC,sEAAsE;IACtE,0EAA0E;IAC1E,yEAAyE;IACzE,MAAM,IAAI,GAAuB,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,CAAA;IACjD,OAAO,IAAI,KAAK,SAAS,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,gBAAgB,CAAC,CAAA;AAC3E,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SMI-6441: generated common-password lexicon for the `sensitive_path`
|
|
3
|
+
* MF-4b veto (Wave 2). Vetoes MF-4's 2-token documentation-label
|
|
4
|
+
* carve-out when one of the tokens is a known common password.
|
|
5
|
+
* @module @skillsmith/core/security/scanner/SecurityScanner.weak-passwords
|
|
6
|
+
* @generated DO NOT EDIT — produced by scripts/gen-weak-password-lexicon.mjs
|
|
7
|
+
* from data/wordlists/{seclists-xato-top-10000.txt,doc-vocab-keeplist.txt}.
|
|
8
|
+
* Regenerate with `npm run lexicon:weak-passwords`; verify freshness with
|
|
9
|
+
* `npm run lexicon:weak-passwords:check`. A hand edit here is overwritten
|
|
10
|
+
* on the next --write and is caught by the L3 --check gate before merge.
|
|
11
|
+
*
|
|
12
|
+
* SECURITY-RELEVANT DUPLICATION (ADR-137 Decision point 4): this file is
|
|
13
|
+
* one of three byte-identical-modulo-@module copies of the same
|
|
14
|
+
* generated payload —
|
|
15
|
+
* packages/core/src/security/scanner/SecurityScanner.weak-passwords.ts
|
|
16
|
+
* scripts/indexer/_shared/security-scanner-edge.weak-passwords.ts
|
|
17
|
+
* supabase/functions/_shared/security-scanner-edge.weak-passwords.ts
|
|
18
|
+
* A silent divergence between these three is a SECURITY GAP, not a
|
|
19
|
+
* cosmetic inconsistency: this data decides whether a `sensitive_path`
|
|
20
|
+
* finding is HIGH or MEDIUM (quarantine vs. pass on the weekly scan
|
|
21
|
+
* surface; blocked vs. permitted install). Enforced by three parity
|
|
22
|
+
* layers: L1 Deno<->Node byte identity
|
|
23
|
+
* (scripts/tests/indexer/security-scanner-edge.test.ts's
|
|
24
|
+
* PATHS_FAMILY_TWINS), L2 three-way literal payload identity
|
|
25
|
+
* (scripts/tests/indexer/parity-utils.ts's extractGeneratedPayload),
|
|
26
|
+
* and L3 freshness/anti-hand-edit (`npm run lexicon:weak-passwords:check`,
|
|
27
|
+
* wired into scripts/audit-standards.mjs).
|
|
28
|
+
*
|
|
29
|
+
* Source: SecLists (MIT license) — see data/wordlists/LICENSE-SecLists
|
|
30
|
+
* and WEAK_PASSWORD_LEXICON_SOURCE below for exact provenance.
|
|
31
|
+
*
|
|
32
|
+
* Full design: docs/internal/implementation/smi-6441-weak-password-veto.md
|
|
33
|
+
* See also: docs/internal/adr/149-generated-scanner-data-veto-severity-model.md
|
|
34
|
+
* and docs/internal/adr/137-cross-runtime-duplication-of-security-logic.md
|
|
35
|
+
*/
|
|
36
|
+
/** Provenance of the vendored upstream snapshot this file was generated from. */
|
|
37
|
+
export declare const WEAK_PASSWORD_LEXICON_SOURCE: {
|
|
38
|
+
readonly upstream: "https://github.com/danielmiessler/SecLists";
|
|
39
|
+
readonly path: "Passwords/Common-Credentials/xato-net-10-million-passwords-10000.txt";
|
|
40
|
+
readonly license: "MIT";
|
|
41
|
+
readonly commit: "c205c36a445bff37f8e58a9ec829105cd4975c58";
|
|
42
|
+
readonly sha256: "c63d5e4ccc31344d662583cc39ca4bd5bd20517ff1d24501f0c4e0c22d9b722a";
|
|
43
|
+
readonly sourceRankLimit: 5000;
|
|
44
|
+
readonly entries: 4009;
|
|
45
|
+
};
|
|
46
|
+
/** Bumped whenever the emitted entry set changes. Deterministic, no timestamp. */
|
|
47
|
+
export declare const WEAK_PASSWORD_LEXICON_VERSION: "2026-09-09.2";
|
|
48
|
+
/**
|
|
49
|
+
* Lowercase-alphabetic common-password tokens, 3-19 chars, sorted, with the
|
|
50
|
+
* documentation vocabulary subtracted at generation time. Exact membership
|
|
51
|
+
* by design (see the ADR): the veto's failure direction is a false positive
|
|
52
|
+
* on ordinary documentation, so an approximate structure is not acceptable here.
|
|
53
|
+
*/
|
|
54
|
+
export declare const COMMON_WEAK_PASSWORDS: ReadonlySet<string>;
|
|
55
|
+
//# sourceMappingURL=SecurityScanner.weak-passwords.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SecurityScanner.weak-passwords.d.ts","sourceRoot":"","sources":["../../../../src/security/scanner/SecurityScanner.weak-passwords.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH,iFAAiF;AACjF,eAAO,MAAM,4BAA4B;;;;;;;;CAQ/B,CAAA;AAEV,kFAAkF;AAClF,eAAO,MAAM,6BAA6B,EAAG,cAAuB,CAAA;AAEpE;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,EAAE,WAAW,CAAC,MAAM,CA+PrD,CAAA"}
|