dsh-standards 1.6.11 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/31-DS-C/346/235/241/346/254/276.md +26 -5
- package/31-DSH-ENTRY/345/205/245/351/227/250/350/247/204/350/214/203.md +0 -0
- package/34-/344/270/211/345/261/202/345/210/206/347/272/247/346/250/241/345/236/213-GB-GBT-GBZ/347/261/273/346/257/224.md +0 -0
- package/40-checker/README.md +0 -0
- package/40-checker/bin/dsh-flow-collect.mjs +0 -0
- package/40-checker/bin/dsh-plugin-verify.mjs +0 -0
- package/40-checker/fixtures/bad/index.mjs +0 -0
- package/40-checker/fixtures/bad/package.json +0 -0
- package/40-checker/fixtures/bad-manifest/index.js +0 -0
- package/40-checker/fixtures/bad-manifest/package.json +0 -0
- package/40-checker/fixtures/bundle/cordis.patch.yml +0 -0
- package/40-checker/fixtures/bundle/package.json +0 -0
- package/40-checker/fixtures/bundle/server.mjs +0 -0
- package/40-checker/fixtures/bundle-patch-only/cordis.patch.yml +0 -0
- package/40-checker/fixtures/bundle-patch-only/package.json +0 -0
- package/40-checker/fixtures/bundle-v0/cordis.patch.yml +0 -0
- package/40-checker/fixtures/bundle-v0/package.json +0 -0
- package/40-checker/fixtures/bundle-v0/server.mjs +0 -0
- package/40-checker/fixtures/c12-command-arg/index.mjs +0 -0
- package/40-checker/fixtures/c12-command-arg/package.json +0 -0
- package/40-checker/fixtures/c12-comment/index.mjs +0 -0
- package/40-checker/fixtures/c12-comment/package.json +0 -0
- package/40-checker/fixtures/c12-compare/index.mjs +0 -0
- package/40-checker/fixtures/c12-compare/package.json +0 -0
- package/40-checker/fixtures/c12-doc-string/index.mjs +0 -0
- package/40-checker/fixtures/c12-doc-string/package.json +0 -0
- package/40-checker/fixtures/c12-grant/index.mjs +0 -0
- package/40-checker/fixtures/c12-grant/package.json +0 -0
- package/40-checker/fixtures/c12-string/index.mjs +0 -0
- package/40-checker/fixtures/c12-string/package.json +0 -0
- package/40-checker/fixtures/client-missing/client.js +0 -0
- package/40-checker/fixtures/client-missing/index.js +0 -0
- package/40-checker/fixtures/client-missing/package.json +0 -0
- package/40-checker/fixtures/declaration-file/index.d.ts +0 -0
- package/40-checker/fixtures/declaration-file/index.mjs +0 -0
- package/40-checker/fixtures/declaration-file/package.json +0 -0
- package/40-checker/fixtures/flow-config/index.js +0 -0
- package/40-checker/fixtures/flow-config/package.json +0 -0
- package/40-checker/fixtures/fs-write/index.mjs +0 -0
- package/40-checker/fixtures/fs-write/package.json +0 -0
- package/40-checker/fixtures/good/index.mjs +0 -0
- package/40-checker/fixtures/good/package.json +0 -0
- package/40-checker/fixtures/hang/index.mjs +0 -0
- package/40-checker/fixtures/hang/package.json +0 -0
- package/40-checker/fixtures/import-local-side-effect/index.mjs +0 -0
- package/40-checker/fixtures/import-local-side-effect/package.json +0 -0
- package/40-checker/fixtures/import-local-side-effect/side-effectful.mjs +0 -0
- package/40-checker/fixtures/import-open-readonly/index.mjs +0 -0
- package/40-checker/fixtures/import-open-readonly/package.json +0 -0
- package/40-checker/fixtures/import-package-only/index.mjs +0 -0
- package/40-checker/fixtures/import-package-only/package.json +0 -0
- package/40-checker/fixtures/import-parse-error/index.mjs +0 -0
- package/40-checker/fixtures/import-parse-error/package.json +0 -0
- package/40-checker/fixtures/import-side-effect/index.mjs +0 -0
- package/40-checker/fixtures/import-side-effect/package.json +0 -0
- package/40-checker/fixtures/import-side-effect-nonentry/index.mjs +0 -0
- package/40-checker/fixtures/import-side-effect-nonentry/package.json +0 -0
- package/40-checker/fixtures/import-side-effect-nonentry/selfcheck.mjs +0 -0
- package/40-checker/fixtures/import-void-main/index.mjs +0 -0
- package/40-checker/fixtures/import-void-main/package.json +0 -0
- package/40-checker/fixtures/known-answer/expected.json +0 -0
- package/40-checker/fixtures/market-index-real.json +0 -0
- package/40-checker/fixtures/market-index.json +0 -0
- package/40-checker/fixtures/negative/bad-entry/package.json +0 -0
- package/40-checker/fixtures/negative/no-entry/package.json +0 -0
- package/40-checker/fixtures/negative/no-patch/package.json +0 -0
- package/40-checker/fixtures/negative/root-missing/cordis.patch.yml +0 -0
- package/40-checker/fixtures/negative/root-missing/package.json +0 -0
- package/40-checker/fixtures/negative/workspace/package.json +0 -0
- package/40-checker/fixtures/no-source/package.json +0 -0
- package/40-checker/fixtures/parse-error-nonentry/index.mjs +0 -0
- package/40-checker/fixtures/parse-error-nonentry/package.json +0 -0
- package/40-checker/fixtures/parse-error-nonentry/references/broken.js +0 -0
- package/40-checker/fixtures/security/sec11-cred-declared/index.mjs +0 -0
- package/40-checker/fixtures/security/sec11-cred-declared/package.json +0 -0
- package/40-checker/fixtures/security/sec11-cred-list/index.mjs +0 -0
- package/40-checker/fixtures/security/sec11-cred-list/package.json +0 -0
- package/40-checker/fixtures/security/sec11-cred-undeclared/index.mjs +0 -0
- package/40-checker/fixtures/security/sec11-cred-undeclared/package.json +0 -0
- package/40-checker/fixtures/security/sec15-clean/index.mjs +0 -0
- package/40-checker/fixtures/security/sec15-clean/package.json +0 -0
- package/40-checker/fixtures/security/sec15-install-cred/index.mjs +0 -0
- package/40-checker/fixtures/security/sec15-install-cred/install.js +0 -0
- package/40-checker/fixtures/security/sec15-install-cred/package.json +0 -0
- package/40-checker/fixtures/security/sec15-install-curl/index.mjs +0 -0
- package/40-checker/fixtures/security/sec15-install-curl/package.json +0 -0
- package/40-checker/fixtures/security/sec15-install-curl/scripts/install.sh +0 -0
- package/40-checker/fixtures/security/sec15-install-danger/index.mjs +0 -0
- package/40-checker/fixtures/security/sec15-install-danger/install.js +0 -0
- package/40-checker/fixtures/security/sec15-install-danger/package.json +0 -0
- package/40-checker/fixtures/security/sec15-install-download-safe/index.js +0 -0
- package/40-checker/fixtures/security/sec15-install-download-safe/package.json +0 -0
- package/40-checker/fixtures/security/sec15-install-download-safe/scripts/install.js +0 -0
- package/40-checker/fixtures/security/sec15-install-download-safe/scripts/local-util.cjs +0 -0
- package/40-checker/fixtures/security/sec15-install-dynamic/index.js +0 -0
- package/40-checker/fixtures/security/sec15-install-dynamic/package.json +0 -0
- package/40-checker/fixtures/security/sec15-install-dynamic/scripts/install.js +0 -0
- package/40-checker/fixtures/security/sec15-install-remote-literal/index.js +0 -0
- package/40-checker/fixtures/security/sec15-install-remote-literal/package.json +0 -0
- package/40-checker/fixtures/security/sec15-install-remote-literal/scripts/install.js +0 -0
- package/40-checker/fixtures/security/sec15-install-safe/index.mjs +0 -0
- package/40-checker/fixtures/security/sec15-install-safe/install.js +0 -0
- package/40-checker/fixtures/security/sec15-install-safe/package.json +0 -0
- package/40-checker/fixtures/security/sec15-missing-ref/index.mjs +0 -0
- package/40-checker/fixtures/security/sec15-missing-ref/package.json +0 -0
- package/40-checker/fixtures/security/sec15-node/index.mjs +0 -0
- package/40-checker/fixtures/security/sec15-node/package.json +0 -0
- package/40-checker/fixtures/security/sec15-node/scripts/build.mjs +0 -0
- package/40-checker/fixtures/security/sec15-pipe/index.mjs +0 -0
- package/40-checker/fixtures/security/sec15-pipe/package.json +0 -0
- package/40-checker/fixtures/security/sec16-base64-clean/index.mjs +0 -0
- package/40-checker/fixtures/security/sec16-base64-clean/package.json +0 -0
- package/40-checker/fixtures/security/sec16-base64-eval/index.mjs +0 -0
- package/40-checker/fixtures/security/sec16-base64-eval/package.json +0 -0
- package/40-checker/fixtures/security/sec16-client/index.mjs +0 -0
- package/40-checker/fixtures/security/sec16-client/lib/client.js +0 -0
- package/40-checker/fixtures/security/sec16-client/package.json +0 -0
- package/40-checker/fixtures/security/sec16-declared/index.mjs +0 -0
- package/40-checker/fixtures/security/sec16-declared/package.json +0 -0
- package/40-checker/fixtures/security/sec16-eval/index.mjs +0 -0
- package/40-checker/fixtures/security/sec16-eval/package.json +0 -0
- package/40-checker/fixtures/security/sec16-exec-curl/index.mjs +0 -0
- package/40-checker/fixtures/security/sec16-exec-curl/package.json +0 -0
- package/40-checker/fixtures/security/sec16-import-only/index.mjs +0 -0
- package/40-checker/fixtures/security/sec16-import-only/package.json +0 -0
- package/40-checker/fixtures/security/sec16-require/index.mjs +0 -0
- package/40-checker/fixtures/security/sec16-require/package.json +0 -0
- package/40-checker/fixtures/security/sec16-spawn-shell/index.mjs +0 -0
- package/40-checker/fixtures/security/sec16-spawn-shell/package.json +0 -0
- package/40-checker/fixtures/security/sec16-subprocess-safe/index.mjs +0 -0
- package/40-checker/fixtures/security/sec16-subprocess-safe/package.json +0 -0
- package/40-checker/fixtures/security/sec16-vendor-bundle/lib/index.js +0 -0
- package/40-checker/fixtures/security/sec16-vendor-bundle/package.json +0 -0
- package/40-checker/fixtures/security/sec16-vendor-decoy/lib/index.js +0 -0
- package/40-checker/fixtures/security/sec16-vendor-decoy/package.json +0 -0
- package/40-checker/fixtures/security/sec16-vendor-path/index.mjs +0 -0
- package/40-checker/fixtures/security/sec16-vendor-path/package.json +0 -0
- package/40-checker/fixtures/security/sec16-vendor-path/vendor/schemastery.mjs +0 -0
- package/40-checker/fixtures/security/sec17-alias-clean/data.txt +0 -0
- package/40-checker/fixtures/security/sec17-alias-clean/index.mjs +0 -0
- package/40-checker/fixtures/security/sec17-alias-clean/package.json +0 -0
- package/40-checker/fixtures/security/sec17-alias-read/index.mjs +0 -0
- package/40-checker/fixtures/security/sec17-alias-read/package.json +0 -0
- package/40-checker/fixtures/security/sec17-base64-path/index.mjs +0 -0
- package/40-checker/fixtures/security/sec17-base64-path/package.json +0 -0
- package/40-checker/fixtures/security/sec17-base64-path-clean/data/config.json +0 -0
- package/40-checker/fixtures/security/sec17-base64-path-clean/index.mjs +0 -0
- package/40-checker/fixtures/security/sec17-base64-path-clean/package.json +0 -0
- package/40-checker/fixtures/security/sec17-cred-exfil/index.mjs +0 -0
- package/40-checker/fixtures/security/sec17-cred-exfil/package.json +0 -0
- package/40-checker/fixtures/security/sec17-env/index.mjs +0 -0
- package/40-checker/fixtures/security/sec17-env/package.json +0 -0
- package/40-checker/fixtures/security/sec17-home-env/index.js +0 -0
- package/40-checker/fixtures/security/sec17-home-env/package.json +0 -0
- package/40-checker/fixtures/security/sec17-home-env-clean/index.mjs +0 -0
- package/40-checker/fixtures/security/sec17-home-env-clean/package.json +0 -0
- package/40-checker/fixtures/security/sec17-seam/index.mjs +0 -0
- package/40-checker/fixtures/security/sec17-seam/package.json +0 -0
- package/40-checker/fixtures/security/sec17-ssh/index.mjs +0 -0
- package/40-checker/fixtures/security/sec17-ssh/package.json +0 -0
- package/40-checker/fixtures/security/sec18-bad/index.mjs +0 -0
- package/40-checker/fixtures/security/sec18-bad/package.json +0 -0
- package/40-checker/fixtures/security/sec18-good/index.mjs +0 -0
- package/40-checker/fixtures/security/sec18-good/package.json +0 -0
- package/40-checker/fixtures/security/sec18-split-fetch/index.mjs +0 -0
- package/40-checker/fixtures/security/sec18-split-fetch/package.json +0 -0
- package/40-checker/fixtures/security/sec18-split-fetch-clean/index.mjs +0 -0
- package/40-checker/fixtures/security/sec18-split-fetch-clean/package.json +0 -0
- package/40-checker/fixtures/security/sec18-undeclared/index.mjs +0 -0
- package/40-checker/fixtures/security/sec18-undeclared/package.json +0 -0
- package/40-checker/fixtures/security/sec19-blob/index.mjs +0 -0
- package/40-checker/fixtures/security/sec19-blob/package.json +0 -0
- package/40-checker/fixtures/security/sec19-clean/index.mjs +0 -0
- package/40-checker/fixtures/security/sec19-clean/package.json +0 -0
- package/40-checker/fixtures/security/sec19-wasm/blob.wasm +0 -0
- package/40-checker/fixtures/security/sec19-wasm/index.mjs +0 -0
- package/40-checker/fixtures/security/sec19-wasm/package.json +0 -0
- package/40-checker/fixtures/security/sec20-unwrapped/index.mjs +0 -0
- package/40-checker/fixtures/security/sec20-unwrapped/package.json +0 -0
- package/40-checker/fixtures/security/sec20-wrapped/index.mjs +0 -0
- package/40-checker/fixtures/security/sec20-wrapped/package.json +0 -0
- package/40-checker/fixtures/security/sec21-known/index.mjs +0 -0
- package/40-checker/fixtures/security/sec21-known/package.json +0 -0
- package/40-checker/fixtures/security/sec21-typosquat/index.mjs +0 -0
- package/40-checker/fixtures/security/sec21-typosquat/package.json +0 -0
- package/40-checker/fixtures/security/sec22-attested/index.mjs +0 -0
- package/40-checker/fixtures/security/sec22-attested/package.json +0 -0
- package/40-checker/fixtures/security/sec22-none/index.mjs +0 -0
- package/40-checker/fixtures/security/sec22-none/package.json +0 -0
- package/40-checker/package.json +0 -0
- package/40-checker/samples/README.md +0 -0
- package/40-checker/samples/entry18.json +0 -0
- package/40-checker/samples/frame.json +0 -0
- package/40-checker/scripts/apply-overlay.mjs +0 -0
- package/40-checker/scripts/attestation-check.mjs +0 -0
- package/40-checker/scripts/build-offline-kit.mjs +0 -0
- package/40-checker/scripts/build-sidecar.mjs +0 -0
- package/40-checker/scripts/bundle-smoke.mjs +0 -0
- package/40-checker/scripts/claim-check.mjs +0 -0
- package/40-checker/scripts/clause-map.mjs +0 -0
- package/40-checker/scripts/collect-fixtures.mjs +0 -0
- package/40-checker/scripts/dashboard.mjs +0 -0
- package/40-checker/scripts/dco-check.mjs +0 -0
- package/40-checker/scripts/dependabot-check.mjs +0 -0
- package/40-checker/scripts/doc-commands-check.mjs +0 -0
- package/40-checker/scripts/entry-scan.mjs +0 -0
- package/40-checker/scripts/entry-validate.mjs +0 -0
- package/40-checker/scripts/entry18-attribution.mjs +0 -0
- package/40-checker/scripts/entry18-ci.mjs +0 -0
- package/40-checker/scripts/entry18-realweb-summary.mjs +0 -0
- package/40-checker/scripts/entry18-web.mjs +0 -0
- package/40-checker/scripts/evidence-chain.mjs +0 -0
- package/40-checker/scripts/flow-collect.mjs +0 -0
- package/40-checker/scripts/flow-index.mjs +0 -0
- package/40-checker/scripts/flow-sample-ci.mjs +0 -0
- package/40-checker/scripts/governance-check.mjs +0 -0
- package/40-checker/scripts/host-farm.mjs +0 -0
- package/40-checker/scripts/journey-config-observe.mjs +0 -0
- package/40-checker/scripts/journey-disclosure-shape.mjs +0 -0
- package/40-checker/scripts/journey-runtime.mjs +0 -0
- package/40-checker/scripts/journey.mjs +0 -0
- package/40-checker/scripts/label-drift.mjs +0 -0
- package/40-checker/scripts/label-sync.mjs +0 -0
- package/40-checker/scripts/label-verify.mjs +0 -0
- package/40-checker/scripts/land-runtime-artifacts.mjs +184 -0
- package/40-checker/scripts/landlock-exec.c +0 -0
- package/40-checker/scripts/level-audit.mjs +0 -0
- package/40-checker/scripts/m1-sidecar.mjs +0 -0
- package/40-checker/scripts/m2-runner.mjs +0 -0
- package/40-checker/scripts/repo-anchor-check.mjs +206 -0
- package/40-checker/scripts/round-robin.mjs +0 -0
- package/40-checker/scripts/run-tests.mjs +0 -0
- package/40-checker/scripts/runtime-child.mjs +0 -0
- package/40-checker/scripts/sample-frame.mjs +0 -0
- package/40-checker/scripts/sample20-ci.mjs +0 -0
- package/40-checker/scripts/sample60-ci.mjs +0 -0
- package/40-checker/scripts/sign-evidence.mjs +0 -0
- package/40-checker/scripts/stale-check.mjs +0 -0
- package/40-checker/scripts/surveillance.mjs +0 -0
- package/40-checker/scripts/web-probe.mjs +0 -0
- package/40-checker/src/author-cli.mjs +0 -0
- package/40-checker/src/author-report.mjs +0 -0
- package/40-checker/src/bundle-static.mjs +0 -0
- package/40-checker/src/cli.mjs +0 -0
- package/40-checker/src/client-shape.mjs +0 -0
- package/40-checker/src/declarations.mjs +29 -2
- package/40-checker/src/flow-evidence.mjs +0 -0
- package/40-checker/src/index.mjs +0 -0
- package/40-checker/src/install-spec.mjs +0 -0
- package/40-checker/src/label.mjs +0 -0
- package/40-checker/src/manifest.mjs +0 -0
- package/40-checker/src/npm-command.mjs +0 -0
- package/40-checker/src/permissions.mjs +0 -0
- package/40-checker/src/remediation.mjs +0 -0
- package/40-checker/src/report.mjs +0 -0
- package/40-checker/src/result.mjs +0 -0
- package/40-checker/src/runtime-child.mjs +0 -0
- package/40-checker/src/runtime.mjs +0 -0
- package/40-checker/src/sandbox-env.mjs +0 -0
- package/40-checker/src/sandbox-run.mjs +0 -0
- package/40-checker/src/security.mjs +0 -0
- package/40-checker/src/semver.mjs +0 -0
- package/40-checker/src/signature.mjs +0 -0
- package/40-checker/src/util.mjs +0 -0
- package/40-checker/vendor/babel/README.md +0 -0
- package/40-checker/vendor/babel/index.cjs +0 -0
- package/40-checker/vendor/babel/node_modules/@babel/helper-string-parser/LICENSE +0 -0
- package/40-checker/vendor/babel/node_modules/@babel/helper-string-parser/README.md +0 -0
- package/40-checker/vendor/babel/node_modules/@babel/helper-string-parser/lib/index.d.ts +0 -0
- package/40-checker/vendor/babel/node_modules/@babel/helper-string-parser/lib/index.js +0 -0
- package/40-checker/vendor/babel/node_modules/@babel/helper-string-parser/package.json +0 -0
- package/40-checker/vendor/babel/node_modules/@babel/helper-validator-identifier/LICENSE +0 -0
- package/40-checker/vendor/babel/node_modules/@babel/helper-validator-identifier/README.md +0 -0
- package/40-checker/vendor/babel/node_modules/@babel/helper-validator-identifier/lib/identifier-browser.js +0 -0
- package/40-checker/vendor/babel/node_modules/@babel/helper-validator-identifier/lib/identifier.js +0 -0
- package/40-checker/vendor/babel/node_modules/@babel/helper-validator-identifier/lib/index.d.ts +0 -0
- package/40-checker/vendor/babel/node_modules/@babel/helper-validator-identifier/lib/index.js +0 -0
- package/40-checker/vendor/babel/node_modules/@babel/helper-validator-identifier/package.json +0 -0
- package/40-checker/vendor/babel/node_modules/@babel/parser/CHANGELOG.md +0 -0
- package/40-checker/vendor/babel/node_modules/@babel/parser/LICENSE +0 -0
- package/40-checker/vendor/babel/node_modules/@babel/parser/README.md +0 -0
- package/40-checker/vendor/babel/node_modules/@babel/parser/bin/babel-parser.js +0 -0
- package/40-checker/vendor/babel/node_modules/@babel/parser/lib/index.d.ts +0 -0
- package/40-checker/vendor/babel/node_modules/@babel/parser/lib/index.js +0 -0
- package/40-checker/vendor/babel/node_modules/@babel/parser/package.json +0 -0
- package/40-checker/vendor/babel/node_modules/@babel/parser/typings/babel-parser.d.ts +0 -0
- package/40-checker/vendor/babel/node_modules/@babel/types/LICENSE +0 -0
- package/40-checker/vendor/babel/node_modules/@babel/types/README.md +0 -0
- package/40-checker/vendor/babel/node_modules/@babel/types/lib/index-legacy.d.ts +0 -0
- package/40-checker/vendor/babel/node_modules/@babel/types/lib/index.d.ts +0 -0
- package/40-checker/vendor/babel/node_modules/@babel/types/lib/index.js +0 -0
- package/40-checker/vendor/babel/node_modules/@babel/types/lib/index.js.flow +0 -0
- package/40-checker/vendor/babel/node_modules/@babel/types/package.json +0 -0
- package/CHANGELOG.md +44 -0
- package/LICENSE +0 -0
- package/LICENSE-APACHE +0 -0
- package/LICENSE-CC-BY +0 -0
- package/NOTICE +0 -0
- package/NOTICE.md +0 -0
- package/README.en.md +1 -1
- package/README.es.md +1 -1
- package/README.hi.md +1 -1
- package/README.md +8 -1
- package/README.pt.md +1 -1
- package/SECURITY.md +0 -0
- package/bin/dsh-flow-collect.mjs +0 -0
- package/bin/dsh-levels.mjs +0 -0
- package/bin/dsh-standards.mjs +0 -0
- package/docs/BOOST-FIXTURES-2026-11-02.md +0 -0
- package/docs/COMPATUM.md +193 -0
- package/docs/DEVELOPER-JOURNEY.md +0 -0
- package/docs/HOST-J3-BUG-REPORT-DRAFT.md +0 -0
- package/docs/HOST-J3-CONFIG-REPRO-2026-11-02.md +0 -0
- package/docs/NAMING-FALLBACK.md +0 -0
- package/docs/SIGNING.md +0 -0
- package/docs/assets/dsh-standards-flow-dark.svg +0 -0
- package/docs/assets/dsh-standards-flow-light.svg +0 -0
- package/docs/assets/dsh-standards-flow-v3-dark.svg +0 -0
- package/docs/assets/dsh-standards-flow-v3-light.svg +0 -0
- package/docs/assets/dsh-standards-flow-v4-dark.svg +0 -0
- package/docs/assets/dsh-standards-flow-v4-light.svg +0 -0
- package/docs/assets/dsh-standards-hero-en-dark.webp +0 -0
- package/docs/assets/dsh-standards-hero-en-light.webp +0 -0
- package/docs/assets/dsh-standards-hero-zh-dark.webp +0 -0
- package/docs/assets/dsh-standards-hero-zh-light.webp +0 -0
- package/docs/coverage.md +0 -0
- package/docs/fork-policy.md +0 -0
- package/docs/full-test-plan-2026-11-02.md +0 -0
- package/docs/incident.md +0 -0
- package/docs/onboarding.md +0 -0
- package/docs/privacy.md +0 -0
- package/docs/release.md +0 -0
- package/docs/repo-anchors-rc3-2026-11-14.md +58 -0
- package/docs/scope-security.md +0 -0
- package/docs/status-taxonomy.md +0 -0
- package/docs/sunset.md +0 -0
- package/docs/translating.md +0 -0
- package/examples/compatum/mcp-profile.json +105 -0
- package/examples/compatum/permission-rules-profile.json +97 -0
- package/examples/compatum/plugin-full.json +155 -0
- package/examples/compatum/plugin-min.json +48 -0
- package/package.json +5 -2
- package/spec/README.md +3 -0
- package/spec/boost/README.md +0 -0
- package/spec/clauses.json +0 -0
- package/spec/compatum-validate.mjs +791 -0
- package/spec/compatum.schema.json +939 -0
- package/spec/coverage-contract.md +0 -0
- package/spec/dsc-clauses.json +1 -1
- package/spec/entry/README.md +0 -0
- package/spec/examples/boost-card.example.json +0 -0
- package/spec/examples/flow-evidence.example.json +0 -0
- package/spec/flow/README.md +0 -0
- package/spec/flow-evidence.schema.json +0 -0
- package/spec/levels.json +0 -0
- package/spec/levels.schema.json +0 -0
- package/spec/reference-suite.json +0 -0
- package/spec/remediation.json +1 -1
- package/spec/schemas/advice.schema.json +0 -0
- package/spec/schemas/attestation.schema.json +0 -0
- package/spec/schemas/boost-card.schema.json +0 -0
- package/spec/schemas/conformance.schema.json +0 -0
- package/spec/schemas/evidence.schema.json +0 -0
- package/spec/schemas/report.schema.json +0 -0
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* land-runtime-artifacts.mjs — turn uploaded GitHub Actions artifacts from the
|
|
4
|
+
* rc3 runtime runs into committed evidence, without rewriting history.
|
|
5
|
+
*
|
|
6
|
+
* The 2026-11-14 rc3 runs uploaded their per-row artifacts to GitHub Actions
|
|
7
|
+
* (`entry18-runtime` run and `web-runtime` run). Artifacts expire; the repo's
|
|
8
|
+
* committed evidence is the durable copy. This script downloads the artifacts
|
|
9
|
+
* and writes them into a NEW asOf directory (e.g.
|
|
10
|
+
* `40-checker/results/entry/18/fullbase-rc3-20261114/`), never into the
|
|
11
|
+
* historical `fullbase/` / `webruntime/` directories.
|
|
12
|
+
*
|
|
13
|
+
* It only lands raw evidence; the REPORT.md / RUNTIME.md / SUPPORTED.md prose
|
|
14
|
+
* stays a human edit (the numbers must match the landed files).
|
|
15
|
+
*
|
|
16
|
+
* Credentials: imports DSH_KEY (default the deepseek-community-hub _key.mjs),
|
|
17
|
+
* whose side effect sets GH_TOKEN. Tokens are never printed.
|
|
18
|
+
*
|
|
19
|
+
* Usage:
|
|
20
|
+
* node 40-checker/scripts/land-runtime-artifacts.mjs \
|
|
21
|
+
* --kind entry18 --run 43560480242 --out 40-checker/results/entry/18/fullbase-rc3-20261114
|
|
22
|
+
* node 40-checker/scripts/land-runtime-artifacts.mjs \
|
|
23
|
+
* --kind web-runtime --run 43560484422 --out 40-checker/results/webruntime-rc3-20261114
|
|
24
|
+
*
|
|
25
|
+
* Options: --repo (default PerryLink/dsh-standards), --dry-run, --keep (comma list
|
|
26
|
+
* of extra artifact files to keep for web rows).
|
|
27
|
+
*/
|
|
28
|
+
import fs from 'node:fs'
|
|
29
|
+
import path from 'node:path'
|
|
30
|
+
import zlib from 'node:zlib'
|
|
31
|
+
|
|
32
|
+
const KEY = process.env.DSH_KEY || '/mnt/d/Projects/dsh/deepseek-community-hub/00-live/_key.mjs'
|
|
33
|
+
if (fs.existsSync(KEY)) await import(KEY)
|
|
34
|
+
|
|
35
|
+
const API = 'https://api.github.com'
|
|
36
|
+
const WEB_ROW_FILES = ['client-export.json', 'installed-package.json', 'probe.json', 'shot.png', 'summary.md']
|
|
37
|
+
|
|
38
|
+
function usage(message) {
|
|
39
|
+
if (message) console.error(`error: ${message}`)
|
|
40
|
+
console.error('usage: land-runtime-artifacts.mjs --kind entry18|web-runtime --run <id> --out <dir> [--repo owner/name] [--dry-run]')
|
|
41
|
+
process.exit(2)
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function parseArgs(argv) {
|
|
45
|
+
const options = { repo: 'PerryLink/dsh-standards', kind: '', run: '', out: '', dryRun: false }
|
|
46
|
+
for (let index = 0; index < argv.length; index += 1) {
|
|
47
|
+
const arg = argv[index]
|
|
48
|
+
if (arg === '--kind') options.kind = argv[++index]
|
|
49
|
+
else if (arg === '--run') options.run = argv[++index]
|
|
50
|
+
else if (arg === '--out') options.out = argv[++index]
|
|
51
|
+
else if (arg === '--repo') options.repo = argv[++index]
|
|
52
|
+
else if (arg === '--dry-run') options.dryRun = true
|
|
53
|
+
else if (arg === '--help' || arg === '-h') usage()
|
|
54
|
+
else usage(`unknown argument: ${arg}`)
|
|
55
|
+
}
|
|
56
|
+
if (!['entry18', 'web-runtime'].includes(options.kind)) usage('--kind must be entry18 or web-runtime')
|
|
57
|
+
if (!/^\d+$/.test(options.run)) usage('--run must be a workflow run id')
|
|
58
|
+
if (!options.out) usage('--out is required')
|
|
59
|
+
if (!process.env.GH_TOKEN) usage('GH_TOKEN is not set (check DSH_KEY)')
|
|
60
|
+
return options
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
async function github(pathname) {
|
|
64
|
+
const response = await fetch(API + pathname, {
|
|
65
|
+
headers: {
|
|
66
|
+
Authorization: `Bearer ${process.env.GH_TOKEN}`,
|
|
67
|
+
Accept: 'application/vnd.github+json',
|
|
68
|
+
'User-Agent': 'dsh-standards-land-artifacts',
|
|
69
|
+
},
|
|
70
|
+
})
|
|
71
|
+
if (!response.ok) throw new Error(`GitHub ${pathname} → ${response.status}: ${(await response.text()).slice(0, 200)}`)
|
|
72
|
+
return response
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/** Minimal ZIP reader (deflate/store) — enough for Actions artifact zips. */
|
|
76
|
+
export function unzip(buffer) {
|
|
77
|
+
const eocdSignature = 0x06054b50
|
|
78
|
+
let eocd = -1
|
|
79
|
+
for (let index = buffer.length - 22; index >= Math.max(0, buffer.length - 66000); index -= 1) {
|
|
80
|
+
if (buffer.readUInt32LE(index) === eocdSignature) { eocd = index; break }
|
|
81
|
+
}
|
|
82
|
+
if (eocd < 0) throw new Error('not a zip: EOCD not found')
|
|
83
|
+
const count = buffer.readUInt16LE(eocd + 10)
|
|
84
|
+
let offset = buffer.readUInt32LE(eocd + 16)
|
|
85
|
+
const files = new Map()
|
|
86
|
+
for (let entry = 0; entry < count; entry += 1) {
|
|
87
|
+
if (buffer.readUInt32LE(offset) !== 0x02014b50) throw new Error('bad central directory header')
|
|
88
|
+
const method = buffer.readUInt16LE(offset + 10)
|
|
89
|
+
const compressedSize = buffer.readUInt32LE(offset + 20)
|
|
90
|
+
const nameLength = buffer.readUInt16LE(offset + 28)
|
|
91
|
+
const extraLength = buffer.readUInt16LE(offset + 30)
|
|
92
|
+
const commentLength = buffer.readUInt16LE(offset + 32)
|
|
93
|
+
const localOffset = buffer.readUInt32LE(offset + 42)
|
|
94
|
+
const name = buffer.subarray(offset + 46, offset + 46 + nameLength).toString('utf8')
|
|
95
|
+
if (buffer.readUInt32LE(localOffset) !== 0x04034b50) throw new Error('bad local file header')
|
|
96
|
+
const localNameLength = buffer.readUInt16LE(localOffset + 26)
|
|
97
|
+
const localExtraLength = buffer.readUInt16LE(localOffset + 28)
|
|
98
|
+
const dataStart = localOffset + 30 + localNameLength + localExtraLength
|
|
99
|
+
const compressed = buffer.subarray(dataStart, dataStart + compressedSize)
|
|
100
|
+
const data = method === 0 ? Buffer.from(compressed) : zlib.inflateRawSync(compressed)
|
|
101
|
+
files.set(name, data)
|
|
102
|
+
offset += 46 + nameLength + extraLength + commentLength
|
|
103
|
+
}
|
|
104
|
+
return files
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
function rowIdFromArtifact(name, kind) {
|
|
108
|
+
if (kind === 'entry18') {
|
|
109
|
+
const prefix = 'entry18-fullbase-'
|
|
110
|
+
if (!name.startsWith(prefix) || name === 'entry18-fullbase-summary') return null
|
|
111
|
+
return name.slice(prefix.length)
|
|
112
|
+
}
|
|
113
|
+
const prefix = 'web-runtime-'
|
|
114
|
+
if (!name.startsWith(prefix)) return null
|
|
115
|
+
return name.slice(prefix.length)
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export async function land({ repo, kind, run, out, dryRun = false }) {
|
|
119
|
+
const root = path.resolve(out)
|
|
120
|
+
const artifacts = []
|
|
121
|
+
for (let page = 1; ; page += 1) {
|
|
122
|
+
const response = await github(`/repos/${repo}/actions/runs/${run}/artifacts?per_page=100&page=${page}`)
|
|
123
|
+
const payload = await response.json()
|
|
124
|
+
artifacts.push(...(payload.artifacts || []))
|
|
125
|
+
if (!payload.artifacts || payload.artifacts.length < 100) break
|
|
126
|
+
}
|
|
127
|
+
const landed = []
|
|
128
|
+
const skipped = []
|
|
129
|
+
for (const artifact of artifacts.sort((a, b) => a.name.localeCompare(b.name))) {
|
|
130
|
+
const id = rowIdFromArtifact(artifact.name, kind)
|
|
131
|
+
if (id === null) { skipped.push(artifact.name); continue }
|
|
132
|
+
const response = await github(`/repos/${repo}/actions/artifacts/${artifact.id}/zip`)
|
|
133
|
+
const files = unzip(Buffer.from(await response.arrayBuffer()))
|
|
134
|
+
if (kind === 'entry18') {
|
|
135
|
+
const jsonName = `${id}.json`
|
|
136
|
+
const row = files.get(jsonName)
|
|
137
|
+
if (!row) throw new Error(`${artifact.name}: missing ${jsonName}`)
|
|
138
|
+
const target = path.join(root, jsonName)
|
|
139
|
+
if (!dryRun) { fs.mkdirSync(root, { recursive: true }); fs.writeFileSync(target, row) }
|
|
140
|
+
landed.push({ artifact: artifact.name, file: path.relative(process.cwd(), target), bytes: row.length })
|
|
141
|
+
} else {
|
|
142
|
+
const targetDir = path.join(root, id)
|
|
143
|
+
if (!dryRun) fs.mkdirSync(targetDir, { recursive: true })
|
|
144
|
+
const kept = []
|
|
145
|
+
for (const name of WEB_ROW_FILES) {
|
|
146
|
+
const data = files.get(name)
|
|
147
|
+
if (!data) continue
|
|
148
|
+
if (!dryRun) fs.writeFileSync(path.join(targetDir, name), data)
|
|
149
|
+
kept.push(name)
|
|
150
|
+
}
|
|
151
|
+
// Rows that are not client-bearing (shell-only / gate-rejected) carry only
|
|
152
|
+
// probe.json + summary.md in the historical layout; keep the subset.
|
|
153
|
+
const required = ['probe.json', 'summary.md']
|
|
154
|
+
const missing = required.filter(name => !kept.includes(name))
|
|
155
|
+
if (missing.length > 0) throw new Error(`${artifact.name}: missing required files (${missing.join(',')})`)
|
|
156
|
+
landed.push({ artifact: artifact.name, dir: path.relative(process.cwd(), targetDir), files: kept })
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
// entry18 also carries the aggregate summary artifact.
|
|
160
|
+
if (kind === 'entry18') {
|
|
161
|
+
const summaryArtifact = artifacts.find(artifact => artifact.name === 'entry18-fullbase-summary')
|
|
162
|
+
if (!summaryArtifact) throw new Error('summary artifact not found')
|
|
163
|
+
const response = await github(`/repos/${repo}/actions/artifacts/${summaryArtifact.id}/zip`)
|
|
164
|
+
const files = unzip(Buffer.from(await response.arrayBuffer()))
|
|
165
|
+
const summary = files.get('summary.json')
|
|
166
|
+
if (!summary) throw new Error('summary.json not found inside the summary artifact')
|
|
167
|
+
const target = path.join(root, 'summary.json')
|
|
168
|
+
if (!dryRun) { fs.mkdirSync(root, { recursive: true }); fs.writeFileSync(target, summary) }
|
|
169
|
+
landed.push({ artifact: summaryArtifact.name, file: path.relative(process.cwd(), target), bytes: summary.length })
|
|
170
|
+
}
|
|
171
|
+
return { repo, run, kind, out: root, landed, skipped }
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
function main() {
|
|
175
|
+
const options = parseArgs(process.argv.slice(2))
|
|
176
|
+
land({ repo: options.repo, kind: options.kind, run: options.run, out: options.out, dryRun: options.dryRun })
|
|
177
|
+
.then(result => {
|
|
178
|
+
console.log(JSON.stringify(result, null, 2))
|
|
179
|
+
if (options.dryRun) console.log('\n(dry run: nothing written)')
|
|
180
|
+
})
|
|
181
|
+
.catch(error => { console.error(error.stack || error.message); process.exit(1) })
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
if (process.argv[1] && path.resolve(process.argv[1]) === new URL(import.meta.url).pathname) main()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* repo-anchor-check.mjs — verify `REPO/<path>:<line(s)>` evidence anchors in the
|
|
4
|
+
* standard documents against a real host checkout at a pinned commit.
|
|
5
|
+
*
|
|
6
|
+
* The standard cites upstream source by `REPO/packages/.../file.ts:123` (or a
|
|
7
|
+
* line list such as `:32-41`, `:109,150`). When the host moves those lines can
|
|
8
|
+
* drift even though the file still exists, so a prose anchor is only as good as
|
|
9
|
+
* the commit it was re-taken at. This script is the mechanical half of P1-8
|
|
10
|
+
* (2026-11-14 rc3 audit): it proves every anchor still resolves at the pinned
|
|
11
|
+
* commit and reports the ones that no longer point at a real line.
|
|
12
|
+
*
|
|
13
|
+
* What it proves:
|
|
14
|
+
* - the referenced file exists at the pinned commit;
|
|
15
|
+
* - every referenced line number is within the file;
|
|
16
|
+
* - the referenced line is not blank (a blank line is almost never intended).
|
|
17
|
+
*
|
|
18
|
+
* What it does NOT prove: that the line still contains the *same* symbol named
|
|
19
|
+
* around the anchor. That is a semantic re-take; the script prints the current
|
|
20
|
+
* line text so a reviewer can eyeball it (and `--context` gives N lines).
|
|
21
|
+
*
|
|
22
|
+
* Exit codes: 0 all anchors resolve; 1 at least one drift; 2 usage/host error.
|
|
23
|
+
*
|
|
24
|
+
* Usage:
|
|
25
|
+
* DSH_HOST=/path/to/deepseek-harness node 40-checker/scripts/repo-anchor-check.mjs
|
|
26
|
+
* node 40-checker/scripts/repo-anchor-check.mjs --host /path --commit 38a6a5c9 --json
|
|
27
|
+
* node 40-checker/scripts/repo-anchor-check.mjs --files 31-DS-C条款.md,60-权限与标注规范.md
|
|
28
|
+
*/
|
|
29
|
+
import { execFileSync } from 'node:child_process'
|
|
30
|
+
import fs from 'node:fs'
|
|
31
|
+
import path from 'node:path'
|
|
32
|
+
import { fileURLToPath } from 'node:url'
|
|
33
|
+
|
|
34
|
+
const HERE = path.dirname(fileURLToPath(import.meta.url))
|
|
35
|
+
const ROOT = path.resolve(HERE, '..', '..')
|
|
36
|
+
const DEFAULT_COMMIT = '38a6a5c965aa99ab525161efb7cc5cf1fe62fced'
|
|
37
|
+
const DEFAULT_FILES = [
|
|
38
|
+
'31-DS-C条款.md',
|
|
39
|
+
'32-DS-R条款.md',
|
|
40
|
+
'33-DS-G条款.md',
|
|
41
|
+
'35-三层开发建议与验收清单.md',
|
|
42
|
+
'60-权限与标注规范.md',
|
|
43
|
+
'93-开发建议-入门.md',
|
|
44
|
+
]
|
|
45
|
+
// REPO/path/to/file.ext:1 | :10-12 | :10,12 | :10-12,20
|
|
46
|
+
const REF = /REPO\/([A-Za-z0-9_.][A-Za-z0-9_./-]*):([0-9][0-9,\-]*)/g
|
|
47
|
+
|
|
48
|
+
function parseArgs(argv) {
|
|
49
|
+
const options = {
|
|
50
|
+
host: process.env.DSH_HOST || '',
|
|
51
|
+
commit: process.env.DSH_COMMIT || DEFAULT_COMMIT,
|
|
52
|
+
files: DEFAULT_FILES,
|
|
53
|
+
json: false,
|
|
54
|
+
context: 0,
|
|
55
|
+
}
|
|
56
|
+
for (let index = 0; index < argv.length; index += 1) {
|
|
57
|
+
const arg = argv[index]
|
|
58
|
+
if (arg === '--host') options.host = argv[++index]
|
|
59
|
+
else if (arg.startsWith('--host=')) options.host = arg.slice('--host='.length)
|
|
60
|
+
else if (arg === '--commit') options.commit = argv[++index]
|
|
61
|
+
else if (arg.startsWith('--commit=')) options.commit = arg.slice('--commit='.length)
|
|
62
|
+
else if (arg === '--files') options.files = argv[++index].split(',').map(item => item.trim()).filter(Boolean)
|
|
63
|
+
else if (arg === '--json') options.json = true
|
|
64
|
+
else if (arg === '--context') options.context = Number(argv[++index])
|
|
65
|
+
else if (arg === '--help' || arg === '-h') {
|
|
66
|
+
console.log('usage: repo-anchor-check.mjs --host <dsh-checkout> [--commit <sha>] [--files a.md,b.md] [--json] [--context N]')
|
|
67
|
+
process.exit(0)
|
|
68
|
+
} else {
|
|
69
|
+
console.error(`unknown argument: ${arg}`)
|
|
70
|
+
process.exit(2)
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
if (!options.host) {
|
|
74
|
+
console.error('error: --host <dsh-checkout> or DSH_HOST is required (the host checkout is read-only)')
|
|
75
|
+
process.exit(2)
|
|
76
|
+
}
|
|
77
|
+
if (!/^[0-9a-f]{7,40}$/i.test(options.commit)) {
|
|
78
|
+
console.error(`error: bad commit: ${options.commit}`)
|
|
79
|
+
process.exit(2)
|
|
80
|
+
}
|
|
81
|
+
return options
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
function gitShow(host, commit, relative) {
|
|
85
|
+
try {
|
|
86
|
+
return execFileSync('git', ['-C', host, 'show', `${commit}:${relative}`], {
|
|
87
|
+
encoding: 'utf8',
|
|
88
|
+
maxBuffer: 64 * 1024 * 1024,
|
|
89
|
+
stdio: ['ignore', 'pipe', 'pipe'],
|
|
90
|
+
})
|
|
91
|
+
} catch (error) {
|
|
92
|
+
return null
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
function lineNumbers(spec) {
|
|
97
|
+
const numbers = []
|
|
98
|
+
for (const part of spec.split(',')) {
|
|
99
|
+
if (!part) continue
|
|
100
|
+
const range = part.match(/^(\d+)-(\d+)$/)
|
|
101
|
+
if (range) {
|
|
102
|
+
const start = Number(range[1])
|
|
103
|
+
const end = Number(range[2])
|
|
104
|
+
for (let line = start; line <= end; line += 1) numbers.push(line)
|
|
105
|
+
} else {
|
|
106
|
+
numbers.push(Number(part))
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
return numbers
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export function scanAnchors({ host, commit, files, root = ROOT }) {
|
|
113
|
+
const cache = new Map()
|
|
114
|
+
const docs = []
|
|
115
|
+
for (const file of files) {
|
|
116
|
+
const absolute = path.isAbsolute(file) ? file : path.join(root, file)
|
|
117
|
+
if (!fs.existsSync(absolute)) {
|
|
118
|
+
docs.push({ file, missing: true, anchors: 0, drifts: [] })
|
|
119
|
+
continue
|
|
120
|
+
}
|
|
121
|
+
const text = fs.readFileSync(absolute, 'utf8')
|
|
122
|
+
const anchors = []
|
|
123
|
+
for (const match of text.matchAll(REF)) {
|
|
124
|
+
const relative = match[1]
|
|
125
|
+
const spec = match[2]
|
|
126
|
+
const line = text.slice(0, match.index).split('\n').length
|
|
127
|
+
const numbers = lineNumbers(spec)
|
|
128
|
+
let content = cache.get(relative)
|
|
129
|
+
if (content === undefined) {
|
|
130
|
+
content = gitShow(host, commit, relative)
|
|
131
|
+
cache.set(relative, content)
|
|
132
|
+
}
|
|
133
|
+
const entry = {
|
|
134
|
+
doc: file,
|
|
135
|
+
docLine: line,
|
|
136
|
+
target: relative,
|
|
137
|
+
spec,
|
|
138
|
+
numbers,
|
|
139
|
+
sourceLine: text.split('\n')[line - 1].trim(),
|
|
140
|
+
}
|
|
141
|
+
if (content === null) {
|
|
142
|
+
entry.reason = 'file not found at the pinned commit'
|
|
143
|
+
} else {
|
|
144
|
+
const lines = content.split('\n')
|
|
145
|
+
entry.lineCount = lines.length
|
|
146
|
+
const outOfRange = numbers.filter(number => number < 1 || number > lines.length)
|
|
147
|
+
const blank = numbers.filter(number => {
|
|
148
|
+
const value = lines[number - 1]
|
|
149
|
+
return number >= 1 && number <= lines.length && value !== undefined && value.trim() === ''
|
|
150
|
+
})
|
|
151
|
+
// A range anchor legitimately spans blank lines; only a single-line
|
|
152
|
+
// anchor pointing at a blank line is suspicious (likely an off-by-one).
|
|
153
|
+
if (outOfRange.length > 0) entry.reason = `line(s) out of range (file has ${lines.length} lines): ${outOfRange.join(',')}`
|
|
154
|
+
else if (numbers.length === 1 && blank.length > 0) entry.warning = `single-line anchor points at a blank line: ${blank.join(',')}`
|
|
155
|
+
else {
|
|
156
|
+
entry.current = numbers.map(number => ({ line: number, text: lines[number - 1].trim() }))
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
anchors.push(entry)
|
|
160
|
+
}
|
|
161
|
+
docs.push({
|
|
162
|
+
file,
|
|
163
|
+
anchors: anchors.length,
|
|
164
|
+
drifts: anchors.filter(anchor => anchor.reason),
|
|
165
|
+
warnings: anchors.filter(anchor => !anchor.reason && anchor.warning),
|
|
166
|
+
entries: anchors,
|
|
167
|
+
})
|
|
168
|
+
}
|
|
169
|
+
const total = docs.reduce((sum, doc) => sum + doc.anchors, 0)
|
|
170
|
+
const drifts = docs.reduce((sum, doc) => sum + doc.drifts.length, 0)
|
|
171
|
+
const warnings = docs.reduce((sum, doc) => sum + (doc.warnings || []).length, 0)
|
|
172
|
+
return { commit, host, docs, total, drifts, warnings }
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
function main() {
|
|
176
|
+
const options = parseArgs(process.argv.slice(2))
|
|
177
|
+
try {
|
|
178
|
+
execFileSync('git', ['-C', options.host, 'rev-parse', '--git-dir'], { stdio: 'ignore' })
|
|
179
|
+
} catch {
|
|
180
|
+
console.error(`error: ${options.host} is not a git checkout`)
|
|
181
|
+
process.exit(2)
|
|
182
|
+
}
|
|
183
|
+
const report = scanAnchors(options)
|
|
184
|
+
if (options.json) {
|
|
185
|
+
console.log(JSON.stringify(report, null, 2))
|
|
186
|
+
} else {
|
|
187
|
+
console.log(`REPO anchors at ${report.commit.slice(0, 12)} (host: ${report.host})`)
|
|
188
|
+
for (const doc of report.docs) {
|
|
189
|
+
if (doc.missing) {
|
|
190
|
+
console.log(` MISSING DOC ${doc.file}`)
|
|
191
|
+
continue
|
|
192
|
+
}
|
|
193
|
+
console.log(` ${doc.drifts.length > 0 ? '!!' : 'OK'} ${doc.file}: ${doc.anchors} anchors, ${doc.drifts.length} drift, ${(doc.warnings || []).length} warning`)
|
|
194
|
+
for (const drift of doc.drifts) {
|
|
195
|
+
console.log(` - line ${drift.docLine}: ${drift.target}:${drift.spec} → ${drift.reason}`)
|
|
196
|
+
}
|
|
197
|
+
for (const warning of doc.warnings || []) {
|
|
198
|
+
console.log(` ~ line ${warning.docLine}: ${warning.target}:${warning.spec} → ${warning.warning}`)
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
console.log(`total: ${report.total} anchors, ${report.drifts} drift, ${report.warnings} warning`)
|
|
202
|
+
}
|
|
203
|
+
process.exit(report.drifts > 0 ? 1 : 0)
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
if (process.argv[1] && path.resolve(process.argv[1]) === fileURLToPath(import.meta.url)) main()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/40-checker/src/cli.mjs
CHANGED
|
File without changes
|
|
File without changes
|
|
@@ -10,9 +10,30 @@ import { validateCommitments, validateDisclosure } from './permissions.mjs'
|
|
|
10
10
|
export const CAPABILITIES = new Set([
|
|
11
11
|
'fs:read', 'fs:write', 'shell', 'subprocess', 'network:egress', 'network:ingress',
|
|
12
12
|
'credentials:read', 'credentials:list', 'credentials:provider', 'llm:adapter',
|
|
13
|
-
'sessions:read', 'system-prompt:write', 'tools:register', 'remote:expose', 'plugin:install',
|
|
13
|
+
'sessions:read', 'sessions:write', 'system-prompt:write', 'tools:register', 'remote:expose', 'plugin:install',
|
|
14
14
|
])
|
|
15
15
|
|
|
16
|
+
// Reserved capability IDs (2026-11-14, P1-6): names the current standard version
|
|
17
|
+
// accepts but does not judge. They cover DSH 0.2.2-rc.3 host seams whose static
|
|
18
|
+
// observation surface / FAIL policy is not settled yet. C-11.1 accepts them
|
|
19
|
+
// (declaring one is never an "unknown capability id" FAIL), C-11.2 never maps a
|
|
20
|
+
// trigger to them (the FAIL surface stays exactly the judged set above), and
|
|
21
|
+
// C-11.5 reports not-run instead of an over-declaration WARN.
|
|
22
|
+
//
|
|
23
|
+
// Contract: removing an id is a breaking standard change; promoting one into
|
|
24
|
+
// CAPABILITIES requires a C-11.2 trigger, an observation surface (or a
|
|
25
|
+
// deliberate NO_OBSERVATION_SURFACE entry) and tests.
|
|
26
|
+
export const RESERVED_CAPABILITIES = new Set([
|
|
27
|
+
// pre-existing reserved vocabulary (kept for compatibility).
|
|
28
|
+
'mcp:client', 'browser', 'webhook:rule', 'theme:ui', 'client:ui',
|
|
29
|
+
// rc3 seams that had no declarable id before this version.
|
|
30
|
+
'computer:control', 'browser:control', 'mcp:manage', 'mcp:resources',
|
|
31
|
+
'ssh:connect', 'terminal:control', 'sandbox:override', 'approval:override',
|
|
32
|
+
'authorization:delegate', 'remote-access:use', 'session-log:egress',
|
|
33
|
+
])
|
|
34
|
+
|
|
35
|
+
export const KNOWN_CAPABILITIES = new Set([...CAPABILITIES, ...RESERVED_CAPABILITIES])
|
|
36
|
+
|
|
16
37
|
export const LABELS = new Set([
|
|
17
38
|
'prompt-modification', 'red-team', 'third-party-model-provider', 'remote-access', 'mirror',
|
|
18
39
|
])
|
|
@@ -29,6 +50,7 @@ const TRIGGERS = [
|
|
|
29
50
|
{ cap: 'credentials:list', pattern: /\.listRecords\s*\(/g },
|
|
30
51
|
{ cap: 'credentials:read', pattern: /ctx\.credentials\b/g },
|
|
31
52
|
{ cap: 'sessions:read', pattern: /ctx\.(?:sessions|sessionQuery)\b/g },
|
|
53
|
+
{ cap: 'sessions:write', pattern: /\bsession\.append\s*\(/g },
|
|
32
54
|
{ cap: 'shell', pattern: /ctx\.(?:shell|bash)\b/g },
|
|
33
55
|
{ cap: 'subprocess', pattern: /ctx\.subprocess\b/g },
|
|
34
56
|
{ cap: 'fs:read', pattern: /ctx\.fs\b/g },
|
|
@@ -655,7 +677,8 @@ export function checkCapabilities(manifest, sources, patch, scan = null) {
|
|
|
655
677
|
details.push(detail('C-11.1', 'WARN', 'dsh.capabilities is not declared (transitional WARN; host does not read it yet)', ['package.json#dsh.capabilities']))
|
|
656
678
|
} else if (!caps.error) {
|
|
657
679
|
for (const id of caps.list) {
|
|
658
|
-
|
|
680
|
+
// Reserved ids are accepted but not judged (see RESERVED_CAPABILITIES).
|
|
681
|
+
if (!KNOWN_CAPABILITIES.has(id)) details.push(detail('C-11.1', 'FAIL', `unknown capability id: ${id}`, ['package.json#dsh.capabilities']))
|
|
659
682
|
}
|
|
660
683
|
}
|
|
661
684
|
|
|
@@ -686,6 +709,10 @@ export function checkCapabilities(manifest, sources, patch, scan = null) {
|
|
|
686
709
|
: 'not-run: no source files were scanned, so no capability can be observed', []))
|
|
687
710
|
} else {
|
|
688
711
|
for (const cap of caps.list) {
|
|
712
|
+
if (RESERVED_CAPABILITIES.has(cap)) {
|
|
713
|
+
details.push(detail('C-11.5', 'NA', `not-run: reserved capability ${cap} is accepted but not judged in this standard version (no static observation surface / policy defined)`, []))
|
|
714
|
+
continue
|
|
715
|
+
}
|
|
689
716
|
if (NO_OBSERVATION_SURFACE.has(cap)) {
|
|
690
717
|
details.push(detail('C-11.5', 'NA', `not-run: no static observation surface for ${cap} in this checker version`, []))
|
|
691
718
|
continue
|
|
File without changes
|
package/40-checker/src/index.mjs
CHANGED
|
File without changes
|
|
File without changes
|
package/40-checker/src/label.mjs
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/40-checker/src/util.mjs
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/40-checker/vendor/babel/node_modules/@babel/helper-validator-identifier/lib/identifier.js
CHANGED
|
File without changes
|
package/40-checker/vendor/babel/node_modules/@babel/helper-validator-identifier/lib/index.d.ts
CHANGED
|
File without changes
|
package/40-checker/vendor/babel/node_modules/@babel/helper-validator-identifier/lib/index.js
CHANGED
|
File without changes
|
package/40-checker/vendor/babel/node_modules/@babel/helper-validator-identifier/package.json
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|