@ploaness/governance 1.1.0 → 1.3.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/dist/a11y-hit-target.d.ts.map +1 -1
- package/dist/a11y-hit-target.js +1 -21
- package/dist/a11y-hit-target.js.map +1 -1
- package/dist/a11y-incomplete.d.ts.map +1 -1
- package/dist/a11y-incomplete.js +1 -18
- package/dist/a11y-incomplete.js.map +1 -1
- package/dist/access-boundary.d.ts +43 -1
- package/dist/access-boundary.d.ts.map +1 -1
- package/dist/access-boundary.js +146 -5
- package/dist/access-boundary.js.map +1 -1
- package/dist/admin-view-coverage.d.ts.map +1 -1
- package/dist/admin-view-coverage.js +1 -17
- package/dist/admin-view-coverage.js.map +1 -1
- package/dist/asset-policy.d.ts.map +1 -1
- package/dist/asset-policy.js +1 -23
- package/dist/asset-policy.js.map +1 -1
- package/dist/axe-coverage.d.ts +3 -4
- package/dist/axe-coverage.d.ts.map +1 -1
- package/dist/axe-coverage.js +18 -51
- package/dist/axe-coverage.js.map +1 -1
- package/dist/blocklist-entries.d.ts +36 -0
- package/dist/blocklist-entries.d.ts.map +1 -0
- package/dist/blocklist-entries.js +338 -0
- package/dist/blocklist-entries.js.map +1 -0
- package/dist/blocklist.d.ts +91 -0
- package/dist/blocklist.d.ts.map +1 -0
- package/dist/blocklist.js +187 -0
- package/dist/blocklist.js.map +1 -0
- package/dist/checkov-check.d.ts +9 -0
- package/dist/checkov-check.d.ts.map +1 -0
- package/dist/checkov-check.js +4 -0
- package/dist/checkov-check.js.map +1 -0
- package/dist/checkov-checks-aws.d.ts +4 -0
- package/dist/checkov-checks-aws.d.ts.map +1 -0
- package/dist/checkov-checks-aws.js +93 -0
- package/dist/checkov-checks-aws.js.map +1 -0
- package/dist/checkov-checks-azure.d.ts +4 -0
- package/dist/checkov-checks-azure.d.ts.map +1 -0
- package/dist/checkov-checks-azure.js +32 -0
- package/dist/checkov-checks-azure.js.map +1 -0
- package/dist/checkov-checks-google.d.ts +6 -0
- package/dist/checkov-checks-google.d.ts.map +1 -0
- package/dist/checkov-checks-google.js +53 -0
- package/dist/checkov-checks-google.js.map +1 -0
- package/dist/checkov-policy.d.ts +63 -0
- package/dist/checkov-policy.d.ts.map +1 -0
- package/dist/checkov-policy.js +105 -0
- package/dist/checkov-policy.js.map +1 -0
- package/dist/container-failure.d.ts.map +1 -1
- package/dist/container-failure.js +1 -18
- package/dist/container-failure.js.map +1 -1
- package/dist/container-files.d.ts +16 -0
- package/dist/container-files.d.ts.map +1 -1
- package/dist/container-files.js +23 -8
- package/dist/container-files.js.map +1 -1
- package/dist/container-images.d.ts +43 -0
- package/dist/container-images.d.ts.map +1 -0
- package/dist/container-images.js +157 -0
- package/dist/container-images.js.map +1 -0
- package/dist/dependency-freshness.d.ts +8 -0
- package/dist/dependency-freshness.d.ts.map +1 -1
- package/dist/dependency-freshness.js +2 -18
- package/dist/dependency-freshness.js.map +1 -1
- package/dist/doc-blocks.d.ts.map +1 -1
- package/dist/doc-blocks.js +1 -13
- package/dist/doc-blocks.js.map +1 -1
- package/dist/editorconfig-policy.d.ts +7 -0
- package/dist/editorconfig-policy.d.ts.map +1 -1
- package/dist/editorconfig-policy.js +19 -12
- package/dist/editorconfig-policy.js.map +1 -1
- package/dist/environment-coherence.d.ts +59 -5
- package/dist/environment-coherence.d.ts.map +1 -1
- package/dist/environment-coherence.js +107 -27
- package/dist/environment-coherence.js.map +1 -1
- package/dist/environment-files.d.ts.map +1 -1
- package/dist/environment-files.js +1 -19
- package/dist/environment-files.js.map +1 -1
- package/dist/file-roles.d.ts +7 -2
- package/dist/file-roles.d.ts.map +1 -1
- package/dist/file-roles.js +10 -9
- package/dist/file-roles.js.map +1 -1
- package/dist/freshness-repair.d.ts +82 -0
- package/dist/freshness-repair.d.ts.map +1 -0
- package/dist/freshness-repair.js +91 -0
- package/dist/freshness-repair.js.map +1 -0
- package/dist/generated-denial.d.ts.map +1 -1
- package/dist/generated-denial.js +1 -9
- package/dist/generated-denial.js.map +1 -1
- package/dist/generated-drift.d.ts.map +1 -1
- package/dist/generated-drift.js +1 -12
- package/dist/generated-drift.js.map +1 -1
- package/dist/harness-package.d.ts +13 -0
- package/dist/harness-package.d.ts.map +1 -0
- package/dist/harness-package.js +20 -0
- package/dist/harness-package.js.map +1 -0
- package/dist/history-policy.d.ts.map +1 -1
- package/dist/history-policy.js +1 -7
- package/dist/history-policy.js.map +1 -1
- package/dist/image-assets.d.ts.map +1 -1
- package/dist/image-assets.js +1 -10
- package/dist/image-assets.js.map +1 -1
- package/dist/index.d.ts +20 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +20 -0
- package/dist/index.js.map +1 -1
- package/dist/install-policy.d.ts +21 -0
- package/dist/install-policy.d.ts.map +1 -1
- package/dist/install-policy.js +53 -1
- package/dist/install-policy.js.map +1 -1
- package/dist/jsx-accessibility-scope.d.ts +17 -0
- package/dist/jsx-accessibility-scope.d.ts.map +1 -0
- package/dist/jsx-accessibility-scope.js +36 -0
- package/dist/jsx-accessibility-scope.js.map +1 -0
- package/dist/jsx-accessibility.d.ts +13 -0
- package/dist/jsx-accessibility.d.ts.map +1 -0
- package/dist/jsx-accessibility.js +188 -0
- package/dist/jsx-accessibility.js.map +1 -0
- package/dist/network-policy.d.ts.map +1 -1
- package/dist/network-policy.js +1 -12
- package/dist/network-policy.js.map +1 -1
- package/dist/oxlint-policy.d.ts +16 -0
- package/dist/oxlint-policy.d.ts.map +1 -0
- package/dist/oxlint-policy.js +28 -0
- package/dist/oxlint-policy.js.map +1 -0
- package/dist/oxlint-report.d.ts +29 -0
- package/dist/oxlint-report.d.ts.map +1 -0
- package/dist/oxlint-report.js +84 -0
- package/dist/oxlint-report.js.map +1 -0
- package/dist/oxlint-scope.d.ts +13 -0
- package/dist/oxlint-scope.d.ts.map +1 -0
- package/dist/oxlint-scope.js +46 -0
- package/dist/oxlint-scope.js.map +1 -0
- package/dist/oxlint-suppressions.d.ts +17 -0
- package/dist/oxlint-suppressions.d.ts.map +1 -0
- package/dist/oxlint-suppressions.js +72 -0
- package/dist/oxlint-suppressions.js.map +1 -0
- package/dist/paired-assets.d.ts.map +1 -1
- package/dist/paired-assets.js.map +1 -1
- package/dist/payload-access.d.ts +6 -0
- package/dist/payload-access.d.ts.map +1 -1
- package/dist/payload-access.js +166 -9
- package/dist/payload-access.js.map +1 -1
- package/dist/payload-bootstrap.d.ts +52 -0
- package/dist/payload-bootstrap.d.ts.map +1 -0
- package/dist/payload-bootstrap.js +195 -0
- package/dist/payload-bootstrap.js.map +1 -0
- package/dist/payload-configs.d.ts +0 -1
- package/dist/payload-configs.d.ts.map +1 -1
- package/dist/payload-configs.js +36 -17
- package/dist/payload-configs.js.map +1 -1
- package/dist/payload-database.d.ts +80 -0
- package/dist/payload-database.d.ts.map +1 -0
- package/dist/payload-database.js +164 -0
- package/dist/payload-database.js.map +1 -0
- package/dist/payload-defaults.d.ts +128 -0
- package/dist/payload-defaults.d.ts.map +1 -0
- package/dist/payload-defaults.js +295 -0
- package/dist/payload-defaults.js.map +1 -0
- package/dist/payload-policy.d.ts +21 -0
- package/dist/payload-policy.d.ts.map +1 -1
- package/dist/payload-policy.js +92 -43
- package/dist/payload-policy.js.map +1 -1
- package/dist/relationship-cleanup.d.ts.map +1 -1
- package/dist/relationship-cleanup.js +16 -16
- package/dist/relationship-cleanup.js.map +1 -1
- package/dist/release-age.d.ts.map +1 -1
- package/dist/release-age.js +1 -16
- package/dist/release-age.js.map +1 -1
- package/dist/request-limits.d.ts.map +1 -1
- package/dist/request-limits.js +1 -11
- package/dist/request-limits.js.map +1 -1
- package/dist/route-map.d.ts.map +1 -1
- package/dist/route-map.js +1 -16
- package/dist/route-map.js.map +1 -1
- package/dist/run-plan.d.ts.map +1 -1
- package/dist/run-plan.js +1 -19
- package/dist/run-plan.js.map +1 -1
- package/dist/secret-policy.d.ts.map +1 -1
- package/dist/secret-policy.js +1 -11
- package/dist/secret-policy.js.map +1 -1
- package/dist/settings-layering.d.ts +8 -30
- package/dist/settings-layering.d.ts.map +1 -1
- package/dist/settings-layering.js +19 -48
- package/dist/settings-layering.js.map +1 -1
- package/dist/settings.d.ts +9 -2
- package/dist/settings.d.ts.map +1 -1
- package/dist/settings.js.map +1 -1
- package/dist/shell-files.d.ts +45 -0
- package/dist/shell-files.d.ts.map +1 -0
- package/dist/shell-files.js +105 -0
- package/dist/shell-files.js.map +1 -0
- package/dist/source-security.d.ts +10 -0
- package/dist/source-security.d.ts.map +1 -1
- package/dist/source-security.js +88 -1
- package/dist/source-security.js.map +1 -1
- package/dist/source-text.d.ts +2 -0
- package/dist/source-text.d.ts.map +1 -1
- package/dist/source-text.js +7 -16
- package/dist/source-text.js.map +1 -1
- package/dist/terraform-files.d.ts +29 -0
- package/dist/terraform-files.d.ts.map +1 -0
- package/dist/terraform-files.js +50 -0
- package/dist/terraform-files.js.map +1 -0
- package/dist/terraform-policy.d.ts +13 -0
- package/dist/terraform-policy.d.ts.map +1 -0
- package/dist/terraform-policy.js +261 -0
- package/dist/terraform-policy.js.map +1 -0
- package/dist/terraform-providers.d.ts +28 -0
- package/dist/terraform-providers.d.ts.map +1 -0
- package/dist/terraform-providers.js +68 -0
- package/dist/terraform-providers.js.map +1 -0
- package/dist/toolchain-pins.d.ts +1 -1
- package/dist/toolchain-pins.d.ts.map +1 -1
- package/dist/toolchain-pins.js +11 -21
- package/dist/toolchain-pins.js.map +1 -1
- package/dist/version-policy.d.ts +7 -8
- package/dist/version-policy.d.ts.map +1 -1
- package/dist/version-policy.js +15 -26
- package/dist/version-policy.js.map +1 -1
- package/dist/vulnerability-policy.d.ts.map +1 -1
- package/dist/vulnerability-policy.js +1 -11
- package/dist/vulnerability-policy.js.map +1 -1
- package/dist/wiring-policy.d.ts.map +1 -1
- package/dist/wiring-policy.js +4 -1
- package/dist/wiring-policy.js.map +1 -1
- package/dist/wiring-violation.d.ts.map +1 -1
- package/dist/wiring-violation.js +1 -6
- package/dist/wiring-violation.js.map +1 -1
- package/dist/workspace-policy.d.ts.map +1 -1
- package/dist/workspace-policy.js +3 -9
- package/dist/workspace-policy.js.map +1 -1
- package/dist/yaml-blocks.d.ts +10 -0
- package/dist/yaml-blocks.d.ts.map +1 -1
- package/dist/yaml-blocks.js +20 -0
- package/dist/yaml-blocks.js.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"a11y-hit-target.d.ts","sourceRoot":"","sources":["../src/a11y-hit-target.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"a11y-hit-target.d.ts","sourceRoot":"","sources":["../src/a11y-hit-target.ts"],"names":[],"mappings":"AAEA,qFAAqF;AACrF,MAAM,WAAW,cAAc;IAC7B,sCAAsC;IACtC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,uCAAuC;IACvC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,qDAAqD;IACrD,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,gDAAgD;IAChD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB;;;;;OAKG;IACH,QAAQ,CAAC,eAAe,EAAE,OAAO,CAAA;CAClC;AAED,yFAAyF;AACzF,MAAM,MAAM,gBAAgB,GAAG,WAAW,GAAG,iBAAiB,GAAG,UAAU,CAAA;AAE3E,qEAAqE;AACrE,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,OAAO,EAAE,gBAAgB,CAAA;IAClC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CACxB;AAyED;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB,GAAI,OAAO,cAAc,KAAG,uBAkBzD,CAAA"}
|
package/dist/a11y-hit-target.js
CHANGED
|
@@ -1,24 +1,4 @@
|
|
|
1
|
-
//
|
|
2
|
-
//
|
|
3
|
-
// The shipped accessibility sweep hovers every control in the site chrome to measure hover contrast.
|
|
4
|
-
// A skip link hidden with `clip-path: inset(50%)` - the standard accessible pattern - has no hit
|
|
5
|
-
// target, because a clip removes an element from hit testing as well as from painting. Playwright
|
|
6
|
-
// therefore retried the hover until the whole test timed out, and reported `<header> intercepts
|
|
7
|
-
// pointer events`: a message that blames the ancestor the browser found instead, and sends the reader
|
|
8
|
-
// to weaken a skip link that was correct.
|
|
9
|
-
//
|
|
10
|
-
// The repair cannot be "catch the failure and move on". A VISIBLE control that intercepts pointer
|
|
11
|
-
// events is a real page defect, and swallowing both cases would trade a misleading failure for no
|
|
12
|
-
// failure at all. So this decides between them, and the two answers differ:
|
|
13
|
-
//
|
|
14
|
-
// - visually hidden: skip the hover pass and say why. Nothing is lost, because hover contrast is a
|
|
15
|
-
// measurement of painted pixels and this element paints none. The focus pass still runs, which is
|
|
16
|
-
// the state that actually matters for a skip link.
|
|
17
|
-
// - obscured: something is on top of a control that does paint. That is the defect the sweep is for,
|
|
18
|
-
// and it should be reported as such rather than as a timeout.
|
|
19
|
-
//
|
|
20
|
-
// The classification is deliberately conservative: anything it cannot place is hoverable, so an
|
|
21
|
-
// undecided case runs the check rather than skipping it.
|
|
1
|
+
// Classify whether a control has painted pixels and a pointer target before a hover contrast scan.
|
|
22
2
|
// The legacy visually-hidden pattern draws a 1px box and clips it away, so its box has area and its
|
|
23
3
|
// paint does not. Anything at or under this in either dimension is that pattern rather than a control.
|
|
24
4
|
const HIDDEN_BOX_LIMIT = 1;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"a11y-hit-target.js","sourceRoot":"","sources":["../src/a11y-hit-target.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"a11y-hit-target.js","sourceRoot":"","sources":["../src/a11y-hit-target.ts"],"names":[],"mappings":"AAAA,mGAAmG;AA8BnG,oGAAoG;AACpG,uGAAuG;AACvG,MAAM,gBAAgB,GAAW,CAAC,CAAA;AAElC,kGAAkG;AAClG,qGAAqG;AACrG,uGAAuG;AACvG,mGAAmG;AACnG,MAAM,WAAW,GAAW,GAAG,CAAA;AAC/B,MA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H,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,KAAqB,EAA2B,EAAE;IAClF,IAAI,KAAK,CAAC,eAAe,EAAE,CAAC;QAC1B,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,kDAAkD,EAAE,CAAA;IAC7F,CAAC;IACD,IAAI,gBAAgB,CAAC,KAAK,CAAC,EAAE,CAAC;QAC5B,OAAO;YACL,OAAO,EAAE,iBAAiB;YAC1B,MAAM,EACJ,2FAA2F;gBAC3F,+EAA+E;SAClF,CAAA;IACH,CAAC;IACD,OAAO;QACL,OAAO,EAAE,UAAU;QACnB,MAAM,EACJ,yFAAyF;YACzF,iEAAiE;KACpE,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"a11y-incomplete.d.ts","sourceRoot":"","sources":["../src/a11y-incomplete.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"a11y-incomplete.d.ts","sourceRoot":"","sources":["../src/a11y-incomplete.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,EAAE,SAAS,MAAM,EAAmB,CAAA;AAuDzE;;;;;;;;GAQG;AACH,eAAO,MAAM,sBAAsB,GAAI,YAAY,OAAO,KAAG,SAAS,MAAM,EAGpE,CAAA"}
|
package/dist/a11y-incomplete.js
CHANGED
|
@@ -1,21 +1,4 @@
|
|
|
1
|
-
//
|
|
2
|
-
//
|
|
3
|
-
// axe returns three buckets, not two: `violations`, `passes`, and `incomplete` - the last meaning "a
|
|
4
|
-
// check ran and could not decide". The accessibility sweep asserted `violations` alone, which reads as
|
|
5
|
-
// the obvious thing to write and silently excluded the single worst defect the sweep exists to catch.
|
|
6
|
-
//
|
|
7
|
-
// An exactly equal foreground and background is filed as incomplete rather than as a violation,
|
|
8
|
-
// because axe reads identical colours as text hidden on purpose and refers the question to a human.
|
|
9
|
-
// So a control drawn in its own background colour - contrast ratio 1:1, invisible to every reader -
|
|
10
|
-
// passed a gate built to measure contrast. A project confirmed it by mutation: removing the colour fix
|
|
11
|
-
// from the page left the assertion green.
|
|
12
|
-
//
|
|
13
|
-
// The answer is narrow on purpose. A blanket "incomplete must be empty" would be wrong for a rule no
|
|
14
|
-
// project can edit: text over a photograph, a gradient, or a partly transparent layer lands in this
|
|
15
|
-
// bucket legitimately, and axe defers there because the question genuinely needs a human. `equalRatio`
|
|
16
|
-
// is the one key that needs none - two identical colours cannot be a judgement call - so it is the one
|
|
17
|
-
// key that fails. The list is a floor to widen when another key turns out to be as unambiguous, not a
|
|
18
|
-
// ceiling.
|
|
1
|
+
// Promote only mechanically decidable axe incomplete results to failures; retain cases requiring visual judgment.
|
|
19
2
|
import { asRecord, asText, isArray } from './json-shapes.js';
|
|
20
3
|
/**
|
|
21
4
|
* The axe `incomplete` message keys that describe a defect rather than a question.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"a11y-incomplete.js","sourceRoot":"","sources":["../src/a11y-incomplete.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"a11y-incomplete.js","sourceRoot":"","sources":["../src/a11y-incomplete.ts"],"names":[],"mappings":"AAAA,kHAAkH;AAClH,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAE5D;;;;;GAKG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAsB,CAAC,YAAY,CAAC,CAAA;AAEzE,sGAAsG;AACtG,uGAAuG;AACvG,8EAA8E;AAC9E,MAAM,UAAU,GAAsB,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,CAAC,CAAA;AAE5D,qGAAqG;AACrG,qGAAqG;AACrG,MAAM,gBAAgB,GAAW,OAAO,CAAA;AAExC,MAAM,QAAQ,GAAG,CAAC,IAAa,EAAU,EAAE;IACzC,MAAM,MAAM,GAAY,QAAQ,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAA;IAChD,IAAI,CA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,OAAO,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAA;AACnC,CAAC,CAAA;AAED,MAAM,cAAc,GAAG,CAAC,MAAc,EAAE,IAAa,EAAqB,EAAE,CAC1E,QAAQ,CAAC,IAAI,CAAC;KACX,MAAM,CAAC,CAAC,KAAc,EAAW,EAAE,CAAC,wBAAwB,CAAC,QAAQ,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC;KAC3F,GAAG,CAAC,CAAC,KAAc,EAAU,EAAE,CAAC,aAAa,CAAC,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC,CAAA;AAExE,MAAM,aAAa,GAAG,CAAC,MAAe,EAAqB,EAAE;IAC3D,MAAM,KAAK,GAAY,QAAQ,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAA;IAChD,MAAM,MAAM,GAAW,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,CAAA;IACrD,OAAO,OAAO,CAAC,KAAK,CAAC;QACnB,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAa,EAAqB,EAAE,CAAC,cAAc,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;QACnF,CAAC,CAAC,EAAE,CAAA;AACR,CAAC,CAAA;AAED;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,UAAmB,EAAqB,EAAE,CAC/E,OAAO,CAAC,UAAU,CAAC;IACjB,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,MAAe,EAAqB,EAAE,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;IACnF,CAAC,CAAC,EAAE,CAAA"}
|
|
@@ -38,6 +38,15 @@ export interface Granted {
|
|
|
38
38
|
* A write is never a default a project should be able to reach by accident: Payload grants none of these
|
|
39
39
|
* to an anonymous caller unless the project's own rule says so. `read` is judged too, but it is the one
|
|
40
40
|
* a public site legitimately grants, which is what `publicAccess` exists to record.
|
|
41
|
+
*
|
|
42
|
+
* `readVersions` and `unlock` are judged for the reason `payload-defaults` demands they be decided at
|
|
43
|
+
* all. A version is the whole document, so a read narrowed to an audience is undone by asking for a
|
|
44
|
+
* version instead - and `readVersions: theSameHelperAsRead` reads as obviously right while handing a
|
|
45
|
+
* stranger everything the helper's filter was written to keep back. `unlock` clears the lockout an
|
|
46
|
+
* attempt cap just set. Payload reports both beside the four, and both were passing unlooked-at.
|
|
47
|
+
*
|
|
48
|
+
* Composed from the lists `payload-defaults.ts` already declares rather than restated here, so the two
|
|
49
|
+
* halves of the harness cannot drift into disagreeing about what an operation is called.
|
|
41
50
|
*/
|
|
42
51
|
export declare const JUDGED_OPERATIONS: readonly string[];
|
|
43
52
|
/** Whether Payload reported this operation as permitted, in either of the two shapes it sends. */
|
|
@@ -46,10 +55,43 @@ export declare const isPermitted: (permission: ReportedFields | ReportedPermissi
|
|
|
46
55
|
export declare const grantedPermissions: (report: AccessReport) => readonly Granted[];
|
|
47
56
|
/** How one grant is named, both in a report and in the `publicAccess` entry that would declare it. */
|
|
48
57
|
export declare const describeGrant: (granted: Granted) => string;
|
|
58
|
+
/** The field paths an entity reports but stores nothing behind, keyed by the entity's slug. */
|
|
59
|
+
export type DatalessFields = Readonly<Record<string, readonly string[]>>;
|
|
60
|
+
/**
|
|
61
|
+
* Every field path a built Payload configuration reports but keeps no data behind.
|
|
62
|
+
*
|
|
63
|
+
* Read through the untyped accessors rather than through Payload's types, because this package depends
|
|
64
|
+
* on nothing: what arrives is the configuration Payload booted, and what is read of it is the same four
|
|
65
|
+
* keys the response is built from.
|
|
66
|
+
* @param config the built Payload configuration, as its module's default export.
|
|
67
|
+
* @returns the dataless paths of each entity that has any, keyed by slug.
|
|
68
|
+
*/
|
|
69
|
+
export declare const datalessFieldsIn: (config: unknown) => DatalessFields;
|
|
49
70
|
/**
|
|
50
71
|
* The grants the running application makes to a stranger that the project has not recorded. Empty is
|
|
51
72
|
* the only passing answer: a project that declares nothing is judged most strictly, and a declaration
|
|
52
73
|
* narrows nothing else.
|
|
74
|
+
* @param report the body of `/api/access` for an anonymous caller.
|
|
75
|
+
* @param declared the project's `publicAccess` entries.
|
|
76
|
+
* @param dataless the field paths the configuration reports but stores nothing behind, from
|
|
77
|
+
* `datalessFieldsIn`. Defaulted to none, which judges every reported path and so errs strictly.
|
|
78
|
+
* @returns one finding per undeclared grant, in report order.
|
|
79
|
+
*/
|
|
80
|
+
export declare const undeclaredGrants: (report: AccessReport, declared: readonly PublicAccess[], dataless?: DatalessFields) => readonly string[];
|
|
81
|
+
/**
|
|
82
|
+
* Every `publicAccess` declaration the running application does not bear out: an entity and operation
|
|
83
|
+
* it grants nobody, or a field path under a granted operation that no reported field matches.
|
|
84
|
+
*
|
|
85
|
+
* The mirror of `undeclaredGrants`, and the access-boundary twin of an exclusion that excludes nothing:
|
|
86
|
+
* a declaration matching no grant records a decision with no effect, outlives the field it was written
|
|
87
|
+
* for, and covers that field the day it is exposed again without anyone being asked. A `.**` subtree
|
|
88
|
+
* counts as borne out while the group or anything beneath it is granted, which keeps the trade that
|
|
89
|
+
* form makes; a subtree under which nothing is granted is a misspelling like any other.
|
|
90
|
+
* @param report the body of `/api/access` for an anonymous caller.
|
|
91
|
+
* @param declared the project's `publicAccess` entries.
|
|
92
|
+
* @param dataless the field paths the configuration reports but stores nothing behind, from
|
|
93
|
+
* `datalessFieldsIn`. A declaration naming one is therefore reported stale and can be removed.
|
|
94
|
+
* @returns one finding per stale entry or field, in declaration order.
|
|
53
95
|
*/
|
|
54
|
-
export declare const
|
|
96
|
+
export declare const staleDeclarations: (report: AccessReport, declared: readonly PublicAccess[], dataless?: DatalessFields) => readonly string[];
|
|
55
97
|
//# sourceMappingURL=access-boundary.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"access-boundary.d.ts","sourceRoot":"","sources":["../src/access-boundary.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"access-boundary.d.ts","sourceRoot":"","sources":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AAO,MAAM,kBAAkB,GAAI,QAAQ,YAAY,KAAG,SAAS,OAAO,EAGzE,CAAA;AAED,sGAAsG;AACtG,eAAO,MAAM,aAAa,GAAI,SAAS,OAAO,KAAG,MAG8B,CAAA;AAE/E,+FAA+F;AAC/F,MAAM,MAAM,cAAc,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC,CAAC,CAAA;AA4ExE;;;;;;;;GAQG;AACH,eAAO,MAAM,gBAAgB,GAAI,QAAQ,OAAO,KAAG,cAGjD,CAAA;AAyCF;;;;;;;;;GASG;AACH,eAAO,MAAM,gBAAgB,GAC3B,QAAQ,YAAY,EACpB,UAAU,SAAS,YAAY,EAAE,EACjC,WAAU,cAAmB,KAC5B,SAAS,MAAM,EAG4C,CAAA;AA0B9D;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,iBAAiB,GAC5B,QAAQ,YAAY,EACpB,UAAU,SAAS,YAAY,EAAE,EACjC,WAAU,cAAmB,KAC5B,SAAS,MAAM,EAiBjB,CAAA"}
|
package/dist/access-boundary.js
CHANGED
|
@@ -1,9 +1,25 @@
|
|
|
1
|
+
// Compare Payload anonymous grants with explicit entity and field declarations, including stale exceptions.
|
|
2
|
+
import { isArray, readKey } from './json-shapes.js';
|
|
3
|
+
import { COLLECTION_OPERATIONS, READ_VERSIONS_OPERATION, UNLOCK_OPERATION, } from './payload-defaults.js';
|
|
1
4
|
/**
|
|
2
5
|
* A write is never a default a project should be able to reach by accident: Payload grants none of these
|
|
3
6
|
* to an anonymous caller unless the project's own rule says so. `read` is judged too, but it is the one
|
|
4
7
|
* a public site legitimately grants, which is what `publicAccess` exists to record.
|
|
8
|
+
*
|
|
9
|
+
* `readVersions` and `unlock` are judged for the reason `payload-defaults` demands they be decided at
|
|
10
|
+
* all. A version is the whole document, so a read narrowed to an audience is undone by asking for a
|
|
11
|
+
* version instead - and `readVersions: theSameHelperAsRead` reads as obviously right while handing a
|
|
12
|
+
* stranger everything the helper's filter was written to keep back. `unlock` clears the lockout an
|
|
13
|
+
* attempt cap just set. Payload reports both beside the four, and both were passing unlooked-at.
|
|
14
|
+
*
|
|
15
|
+
* Composed from the lists `payload-defaults.ts` already declares rather than restated here, so the two
|
|
16
|
+
* halves of the harness cannot drift into disagreeing about what an operation is called.
|
|
5
17
|
*/
|
|
6
|
-
export const JUDGED_OPERATIONS = [
|
|
18
|
+
export const JUDGED_OPERATIONS = [
|
|
19
|
+
...COLLECTION_OPERATIONS,
|
|
20
|
+
READ_VERSIONS_OPERATION,
|
|
21
|
+
UNLOCK_OPERATION,
|
|
22
|
+
];
|
|
7
23
|
/** The path standing in for a `fields` map Payload collapsed, which grants every field at once. */
|
|
8
24
|
const EVERY_FIELD = '*';
|
|
9
25
|
const PATH_SEPARATOR = '.';
|
|
@@ -58,11 +74,90 @@ export const grantedPermissions = (report) => [
|
|
|
58
74
|
export const describeGrant = (granted) => granted.field === undefined
|
|
59
75
|
? `${granted.entity}.${granted.operation}`
|
|
60
76
|
: `${granted.entity}.${granted.operation}${PATH_SEPARATOR}${granted.field}`;
|
|
77
|
+
/** The field type Payload renders in the panel and keeps no column for. */
|
|
78
|
+
const UI_FIELD_TYPE = 'ui';
|
|
79
|
+
// A tab set is a container whose children live one level down; each tab hoists or adds a segment of its
|
|
80
|
+
// own, which is why it is walked apart from an ordinary named field.
|
|
81
|
+
const TABS_FIELD_TYPE = 'tabs';
|
|
82
|
+
// Blocks are reported as a map of their own, keyed by block slug, and `fieldPathsFor` never descends
|
|
83
|
+
// into one. Descending here would compose paths the report never sends, which match nothing.
|
|
84
|
+
const BLOCKS_FIELD_TYPE = 'blocks';
|
|
85
|
+
/** A field's or tab's own name, or nothing when it is presentational and hoists its children. */
|
|
86
|
+
const nameOf = (subject) => {
|
|
87
|
+
const name = readKey(subject, 'name');
|
|
88
|
+
return typeof name === 'string' && name.length > 0 ? name : undefined;
|
|
89
|
+
};
|
|
90
|
+
// A named container adds its segment; an unnamed one - a row, a collapsible, an unnamed group or tab -
|
|
91
|
+
// stores nothing of its own, and Payload reports its children at the parent's level.
|
|
92
|
+
const prefixUnder = (prefix, name) => name === undefined ? prefix : `${prefix}${name}${PATH_SEPARATOR}`;
|
|
93
|
+
// Stated as the lists to descend into rather than by recursing here, so the walk below recurses into
|
|
94
|
+
// itself alone. A tab set contributes one list per tab, each hoisting or adding its own segment; a UI
|
|
95
|
+
// field and a block set contribute none; everything else contributes its own `fields`, which is absent
|
|
96
|
+
// on a leaf and read as an empty list.
|
|
97
|
+
const childFieldsOf = (field, prefix) => {
|
|
98
|
+
const type = readKey(field, 'type');
|
|
99
|
+
if (type === UI_FIELD_TYPE || type === BLOCKS_FIELD_TYPE) {
|
|
100
|
+
return [];
|
|
101
|
+
}
|
|
102
|
+
if (type === TABS_FIELD_TYPE) {
|
|
103
|
+
const tabs = readKey(field, 'tabs');
|
|
104
|
+
return (isArray(tabs) ? tabs : []).map((tab) => ({
|
|
105
|
+
fields: readKey(tab, 'fields'),
|
|
106
|
+
prefix: prefixUnder(prefix, nameOf(tab)),
|
|
107
|
+
}));
|
|
108
|
+
}
|
|
109
|
+
return [{ fields: readKey(field, 'fields'), prefix: prefixUnder(prefix, nameOf(field)) }];
|
|
110
|
+
};
|
|
111
|
+
// An unnamed UI field is reported by nothing, so it names no path to drop.
|
|
112
|
+
const datalessPathOf = (field, prefix) => {
|
|
113
|
+
const name = nameOf(field);
|
|
114
|
+
return name !== undefined && readKey(field, 'type') === UI_FIELD_TYPE ? [`${prefix}${name}`] : [];
|
|
115
|
+
};
|
|
116
|
+
const datalessInFields = (fields, prefix) => (isArray(fields) ? fields : []).flatMap((field) => [
|
|
117
|
+
...datalessPathOf(field, prefix),
|
|
118
|
+
...childFieldsOf(field, prefix).flatMap((child) => datalessInFields(child.fields, child.prefix)),
|
|
119
|
+
]);
|
|
120
|
+
const datalessInEntities = (entities) => Object.fromEntries((isArray(entities) ? entities : []).flatMap((entity) => {
|
|
121
|
+
const slug = readKey(entity, 'slug');
|
|
122
|
+
const paths = datalessInFields(readKey(entity, 'fields'), '');
|
|
123
|
+
return typeof slug !== 'string' || paths.length === 0 ? [] : [[slug, paths]];
|
|
124
|
+
}));
|
|
125
|
+
/**
|
|
126
|
+
* Every field path a built Payload configuration reports but keeps no data behind.
|
|
127
|
+
*
|
|
128
|
+
* Read through the untyped accessors rather than through Payload's types, because this package depends
|
|
129
|
+
* on nothing: what arrives is the configuration Payload booted, and what is read of it is the same four
|
|
130
|
+
* keys the response is built from.
|
|
131
|
+
* @param config the built Payload configuration, as its module's default export.
|
|
132
|
+
* @returns the dataless paths of each entity that has any, keyed by slug.
|
|
133
|
+
*/
|
|
134
|
+
export const datalessFieldsIn = (config) => ({
|
|
135
|
+
...datalessInEntities(readKey(config, 'collections')),
|
|
136
|
+
...datalessInEntities(readKey(config, 'globals')),
|
|
137
|
+
});
|
|
138
|
+
const isDataless = (granted, dataless) => granted.field !== undefined && (dataless[granted.entity] ?? []).includes(granted.field);
|
|
139
|
+
/** Every permission the report grants over something the configuration actually stores. */
|
|
140
|
+
const dataBearingGrants = (report, dataless) => grantedPermissions(report).filter((granted) => !isDataless(granted, dataless));
|
|
61
141
|
// A field is matched by name and never by a wildcard the project could write for itself. An entry
|
|
62
142
|
// listing `*` covers only the grant Payload itself collapsed to `*`, where every field is open and the
|
|
63
|
-
// declaration is therefore exact rather than blanket.
|
|
64
|
-
//
|
|
65
|
-
|
|
143
|
+
// declaration is therefore exact rather than blanket.
|
|
144
|
+
//
|
|
145
|
+
// The ONE pattern a project may write is a trailing `.**` on a non-empty, star-free prefix: `sizes.**`
|
|
146
|
+
// names the group and everything beneath it - `sizes`, `sizes.thumbnail.url`, and a `sizes.*` Payload
|
|
147
|
+
// collapsed. An upload collection with eight renditions reports fifty-seven paths under `sizes`, and a
|
|
148
|
+
// list that long is a list nobody rereads, which defeats the declaration it exists to be. The trade is
|
|
149
|
+
// stated rather than hidden: a field added under that group later is covered by the same declaration.
|
|
150
|
+
// Every other spelling - `**` alone, `**` mid-path, `*` under a prefix - is a literal name, and a
|
|
151
|
+
// literal Payload never reports covers nothing, which fails in the safe direction. A top-level field
|
|
152
|
+
// therefore still has to be named one by one.
|
|
153
|
+
const SUBTREE_DECLARATION = /^([^*]+)\.\*\*$/;
|
|
154
|
+
const coversPath = (declared, field) => {
|
|
155
|
+
const prefix = SUBTREE_DECLARATION.exec(declared)?.[1];
|
|
156
|
+
return prefix === undefined
|
|
157
|
+
? declared === field
|
|
158
|
+
: field === prefix || field.startsWith(`${prefix}${PATH_SEPARATOR}`);
|
|
159
|
+
};
|
|
160
|
+
const coversField = (entry, field) => (entry.fields ?? []).some((declared) => coversPath(declared, field));
|
|
66
161
|
const isDeclared = (granted, declared) => declared.some((entry) => {
|
|
67
162
|
if (entry.entity !== granted.entity || entry.operation !== granted.operation) {
|
|
68
163
|
return false;
|
|
@@ -73,8 +168,54 @@ const isDeclared = (granted, declared) => declared.some((entry) => {
|
|
|
73
168
|
* The grants the running application makes to a stranger that the project has not recorded. Empty is
|
|
74
169
|
* the only passing answer: a project that declares nothing is judged most strictly, and a declaration
|
|
75
170
|
* narrows nothing else.
|
|
171
|
+
* @param report the body of `/api/access` for an anonymous caller.
|
|
172
|
+
* @param declared the project's `publicAccess` entries.
|
|
173
|
+
* @param dataless the field paths the configuration reports but stores nothing behind, from
|
|
174
|
+
* `datalessFieldsIn`. Defaulted to none, which judges every reported path and so errs strictly.
|
|
175
|
+
* @returns one finding per undeclared grant, in report order.
|
|
76
176
|
*/
|
|
77
|
-
export const undeclaredGrants = (report, declared) =>
|
|
177
|
+
export const undeclaredGrants = (report, declared, dataless = {}) => dataBearingGrants(report, dataless)
|
|
78
178
|
.filter((granted) => !isDeclared(granted, declared))
|
|
79
179
|
.map((granted) => describeGrant(granted));
|
|
180
|
+
const isGranted = (entry, granted) => granted.some((grant) => grant.entity === entry.entity && grant.operation === entry.operation);
|
|
181
|
+
const isCovering = (entry, declared, granted) => granted.some((grant) => grant.entity === entry.entity &&
|
|
182
|
+
grant.operation === entry.operation &&
|
|
183
|
+
grant.field !== undefined &&
|
|
184
|
+
coversPath(declared, grant.field));
|
|
185
|
+
const describeDeclaration = (entry, field) => describeGrant({
|
|
186
|
+
entity: entry.entity,
|
|
187
|
+
operation: entry.operation,
|
|
188
|
+
...(field !== undefined && { field }),
|
|
189
|
+
});
|
|
190
|
+
const NO_MATCHING_GRANT = 'covers no grant the application makes';
|
|
191
|
+
/**
|
|
192
|
+
* Every `publicAccess` declaration the running application does not bear out: an entity and operation
|
|
193
|
+
* it grants nobody, or a field path under a granted operation that no reported field matches.
|
|
194
|
+
*
|
|
195
|
+
* The mirror of `undeclaredGrants`, and the access-boundary twin of an exclusion that excludes nothing:
|
|
196
|
+
* a declaration matching no grant records a decision with no effect, outlives the field it was written
|
|
197
|
+
* for, and covers that field the day it is exposed again without anyone being asked. A `.**` subtree
|
|
198
|
+
* counts as borne out while the group or anything beneath it is granted, which keeps the trade that
|
|
199
|
+
* form makes; a subtree under which nothing is granted is a misspelling like any other.
|
|
200
|
+
* @param report the body of `/api/access` for an anonymous caller.
|
|
201
|
+
* @param declared the project's `publicAccess` entries.
|
|
202
|
+
* @param dataless the field paths the configuration reports but stores nothing behind, from
|
|
203
|
+
* `datalessFieldsIn`. A declaration naming one is therefore reported stale and can be removed.
|
|
204
|
+
* @returns one finding per stale entry or field, in declaration order.
|
|
205
|
+
*/
|
|
206
|
+
export const staleDeclarations = (report, declared, dataless = {}) => {
|
|
207
|
+
const granted = dataBearingGrants(report, dataless);
|
|
208
|
+
return declared.flatMap((entry) => {
|
|
209
|
+
if (!isGranted(entry, granted)) {
|
|
210
|
+
return [
|
|
211
|
+
`publicAccess entry "${describeDeclaration(entry)}" ${NO_MATCHING_GRANT}; the access rule ` +
|
|
212
|
+
'was closed or the entity renamed, so remove the entry',
|
|
213
|
+
];
|
|
214
|
+
}
|
|
215
|
+
return (entry.fields ?? [])
|
|
216
|
+
.filter((field) => !isCovering(entry, field, granted))
|
|
217
|
+
.map((field) => `publicAccess entry "${describeDeclaration(entry, field)}" ${NO_MATCHING_GRANT}; the field ` +
|
|
218
|
+
'was renamed, hidden or misspelt, so correct or remove it');
|
|
219
|
+
});
|
|
220
|
+
};
|
|
80
221
|
//# sourceMappingURL=access-boundary.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"access-boundary.js","sourceRoot":"","sources":["../src/access-boundary.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"access-boundary.js","sourceRoot":"","sources":["../src/access-boundary.ts"],"names":[],"mappings":"AAAA,4GAA4G;AAC5G,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AACnD,OAAO,EACL,qBAAqB,EACrB,uBAAuB,EACvB,gBAAgB,GACjB,MAAM,uBAAuB,CAAA;AA0C9B;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAsB;IAClD,GAAG,qBAAqB;IACxB,uBAAuB;IACvB,gBAAgB;CACjB,CAAA;AAED,mGAAmG;AACnG,MAAM,WAAW,GAAW,GAAG,CAAA;AAE/B,MAAM,cAAc,GAAW,GAAG,CAAA;AAElC,kGAAkG;AAClG,MAAM,CAAC,MAAM,WAAW,GAAG,CACzB,UAA2D,EAClD,EAAE;IACX,IAAI,UAAU,KAAK,SAAS,IAAI,OAAO,UAAU,KAAK,SAAS,EAAE,CAAC;QAChE,OAAO,UAAU,KAAK,IAAI,CAAA;IAC5B,CAAC;IACD,mGAAmG;IACnG,iGAAiG;IACjG,qCAAqC;IACrC,MAAM,WAAW,GAAsC,UAAU,CAAA;IACjE,OAAO,WAAW,CAAC,UAAU,KAAK,IAAI,CAAA;AACxC,CAAC,CAAA;AAED;;;;;;GAMG;AACH,MAAM,aAAa,GAAG,CACpB,MAAkC,EAClC,SAAiB,EACjB,MAAc,EACK,EAAE;IACrB,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;QACzB,OAAO,EAAE,CAAA;IACX,CAAC;IACD,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Aa,EAAU,EAAE,CACxB,uBAAuB,mBAAmB,CAAC,KAAK,EAAE,KAAK,CAAC,KAAK,iBAAiB,cAAc;YAC5F,0DAA0D,CAC7D,CAAA;IACL,CAAC,CAAC,CAAA;AACJ,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"admin-view-coverage.d.ts","sourceRoot":"","sources":["../src/admin-view-coverage.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"admin-view-coverage.d.ts","sourceRoot":"","sources":["../src/admin-view-coverage.ts"],"names":[],"mappings":"AACA,OAAO,EAA6B,KAAK,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAC9E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAG3D,sFAAsF;AACtF,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CACtB;AAsCD;;;;;;;GAOG;AACH,eAAO,MAAM,sBAAsB,GAAI,QAAQ,MAAM,KAAG,SAAS,iBAAiB,EAejF,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,uBAAuB,GAClC,OAAO,SAAS,iBAAiB,EAAE,EACnC,OAAO,SAAS,UAAU,EAAE,EAC5B,WAAW,SAAS,UAAU,EAAE,KAC/B,SAAS,gBAAgB,EA6BxB,CAAA"}
|
|
@@ -1,20 +1,4 @@
|
|
|
1
|
-
//
|
|
2
|
-
//
|
|
3
|
-
// The pinned sweep skips `/admin` unconditionally, and correctly: the panel is Payload's markup rather
|
|
4
|
-
// than the project's, and the crawl carries no credential to sign in with. A CUSTOM admin view is the
|
|
5
|
-
// one thing inside that exemption the project wrote itself, and nothing else in the harness will ever
|
|
6
|
-
// look at it. `jsx-a11y` reads the source, so it cannot see contrast, focus order, or a landmark whose
|
|
7
|
-
// role depends on where the framework's template put the markup - and that last one is not
|
|
8
|
-
// hypothetical: a bare `header` in a custom view becomes a second `banner` beside the panel's own,
|
|
9
|
-
// which is invisible until something renders it.
|
|
10
|
-
//
|
|
11
|
-
// ploaness cannot do the scanning. It cannot sign in, it does not know which container belongs to the
|
|
12
|
-
// project rather than to Payload, and a scan of the whole panel would report defects in components
|
|
13
|
-
// nobody working in that project can repair. What it can do is refuse to let the view go unlooked at.
|
|
14
|
-
// The configuration says a custom view exists; a spec has to say something scans it.
|
|
15
|
-
//
|
|
16
|
-
// This is the same shape as the anonymous-grant rule: the framework will happily leave a decision
|
|
17
|
-
// unmade, so the project is required to have made it somewhere a check can see.
|
|
1
|
+
// Require static test evidence for authored admin views excluded from the anonymous crawl.
|
|
18
2
|
import { containsRoute, reachesAxe } from './axe-coverage.js';
|
|
19
3
|
import { balancedArguments, lineOf, stripComments } from './source-text.js';
|
|
20
4
|
// `components` then `views`, each read as the block it opens rather than as text found anywhere in the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"admin-view-coverage.js","sourceRoot":"","sources":["../src/admin-view-coverage.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"admin-view-coverage.js","sourceRoot":"","sources":["../src/admin-view-coverage.ts"],"names":[],"mappings":"AAAA,2FAA2F;AAC3F,OAAO,EAAE,aAAa,EAAE,UAAU,EAAmB,MAAM,mBAAmB,CAAA;AAE9E,OAAO,EAAE,iBAAiB,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAQ3E,uGAAuG;AACvG,qGAAqG;AACrG,sEAAsE;AACtE,MAAM,cAAc,GAAsB;IACxC,MAAM,CAAC,GAAG,CAAA,uBAAuB;IACjC,MAAM,CAAC,GAAG,CAAA,kBAAkB;CAC7B,CAAA;AAED,MAAM,SAAS,GAAW,mCAAmC,CAAA;AAO7D,sGAAsG;AACtG,qGAAqG;AACrG,oGAAoG;AACpG,+DAA+D;AAC/D,MAAM,OAAO,GAAG,CAAC,MAAc,EAAE,EAAU,EAAqB,EAAE;IAChE,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ACF,CAAA;AACP,CAAC,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"asset-policy.d.ts","sourceRoot":"","sources":["../src/asset-policy.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"asset-policy.d.ts","sourceRoot":"","sources":["../src/asset-policy.ts"],"names":[],"mappings":"AAEA,+DAA+D;AAC/D,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,MAAM,GAAG,WAAW,GAAG,SAAS,GAAG,WAAW,CAAA;AAEnF;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,UAAU,GAAG,YAAY,GAAG,aAAa,GAAG,SAAS,GAAG,YAAY,CAAA;AAEhF,sFAAsF;AACtF,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAA;IACjC,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAA;CAC3B;AAED,gEAAgE;AAChE,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CACxB;AAED,qGAAqG;AACrG,MAAM,WAAW,UAAU;IACzB,gEAAgE;IAChE,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAA;IAC3B,sEAAsE;IACtE,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IACnC,mFAAmF;IACnF,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAA;CACtC;AAED,4FAA4F;AAC5F,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,MAAM,EAAE,SAAS,YAAY,EAAE,CAAA;IACxC,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAA;CACrC;AA6BD,2DAA2D;AAC3D,eAAO,MAAM,aAAa,EAAE,MAAuD,CAAA;AAEnF,4DAA4D;AAC5D,eAAO,MA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AED;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,GAAI,QAAQ,SAAS,YAAY,EAAE,KAAG,SAAS,YAAY,EAGrF,CAAA;AAEH;;;;;;;;GAQG;AACH,eAAO,MAAM,YAAY,GACvB,QAAQ,SAAS,YAAY,EAAE,EAC/B,MAAM,SAAS,KACd,SAAS,YAAY,EASpB,CAAA"}
|
package/dist/asset-policy.js
CHANGED
|
@@ -1,26 +1,4 @@
|
|
|
1
|
-
//
|
|
2
|
-
// from the working tree by tools ploaness does not run (git, editors, coding agents), so it cannot live
|
|
3
|
-
// inside the package and be resolved through node_modules the way an ESLint or Biome config can. Those
|
|
4
|
-
// files are materialised into the consumer tree by `ploaness sync` and policed here.
|
|
5
|
-
//
|
|
6
|
-
// Five dispositions:
|
|
7
|
-
// PINNED - ploaness owns the content; the file must exist and match byte for byte.
|
|
8
|
-
// SEED - ploaness writes it once when absent; the project owns it thereafter and may edit it.
|
|
9
|
-
// FORBIDDEN - the path must not exist, because ploaness supplies that configuration itself and a
|
|
10
|
-
// working-tree copy would silently shadow or contradict it.
|
|
11
|
-
// SECTION - ploaness owns a marked block at the top of the file; the project owns everything below
|
|
12
|
-
// it. Neither PINNED nor SEED fits a file both parties must write: pinning it would forbid
|
|
13
|
-
// the project its own agent instructions, and seeding it would let the contract statement
|
|
14
|
-
// drift the moment ploaness changed.
|
|
15
|
-
// REFERENCE - the path need not exist, but if it does it carries nothing but a pointer at AGENTS.md.
|
|
16
|
-
// This is for the entry-point file a coding agent other than Claude reads. PINNED cannot
|
|
17
|
-
// express it: pinning would force a project to carry an entry point for a tool it does
|
|
18
|
-
// not use, and FORBIDDEN would bar it from using that tool at all. What the rule refuses
|
|
19
|
-
// is a second set of instructions - the standard says the root instruction file holds the
|
|
20
|
-
// rules and a tool-specific one only points at it, so two agents cannot be told two
|
|
21
|
-
// different things. The form of the pointer is the tool's own: `@AGENTS.md` is Claude's
|
|
22
|
-
// import syntax and means nothing to Cursor, so the check reads for the NAME rather than
|
|
23
|
-
// demanding one spelling and forcing a file the tool cannot act on.
|
|
1
|
+
// Manage files that tools read from the working tree, where installed package configuration cannot reach them.
|
|
24
2
|
const DISPOSITIONS = new Set([
|
|
25
3
|
'PINNED',
|
|
26
4
|
'SEED',
|
package/dist/asset-policy.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"asset-policy.js","sourceRoot":"","sources":["../src/asset-policy.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"asset-policy.js","sourceRoot":"","sources":["../src/asset-policy.ts"],"names":[],"mappings":"AAAA,+GAA+G;AAgD/G,MAAM,YAAY,GAAwB,IAAI,GAAG,CAAS;IACxD,QAAQ;IACR,MAAM;IACN,WAAW;IACX,SAAS;IACT,WAAW;CACZ,CAAC,CAAA;AAEF,oGAAoG;AACpG,sGAAsG;AACtG,iFAAiF;AACjF,MAAM,aAAa,GAAG,CAAC,GAAW,EAAsB,EAAE,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;AAEhF,MAAM,MAAM,GAAwB,IAAI,GAAG,CAAS;IAClD,YAAY;IACZ,aAAa;IACb,SAAS;IACT,YAAY;CACb,CAAC,CAAA;AAEF,MAAM,OAAO,GAAG,CAAC,GAAW,EAAqB,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;AAEnE,wGAAwG;AACxG,uGAAuG;AACvG,wGAAwG;AACxG,MAAM,gBAAgB,GAAW,CAAC,CAAA;AAElC,2DAA2D;AAC3D,MAAM,CAAC,MAAM,aAAa,GAAW,8CAA8C,CAAA;AAEnF,4DAA4D;AAC5D,MAAM,CAAC,MAAM,WAAW,GAAW,4CAA4C,CAAA;AAa/E,MAAM,WAAW,GAAG,CAAC,OAAe,EAAE,MAAc,EAAU,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,MAAM,GAAG,CAAC,CAAA;AAEjG;;;;;;;;;;GAUG;AACH,MAAM,CAA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d.ts
CHANGED
|
@@ -30,12 +30,11 @@ export declare const containsBuiltRoute: (source: string, prefix: string) => boo
|
|
|
30
30
|
/**
|
|
31
31
|
* Whether a specification scans with axe, directly or through a helper it imports.
|
|
32
32
|
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
* would trade a rule anyone can predict for one nobody can.
|
|
33
|
+
* This is static source evidence through at most one helper import. It does not establish execution;
|
|
34
|
+
* the end-to-end suite must run the scan.
|
|
36
35
|
* @param spec the specification being judged.
|
|
37
36
|
* @param everyFile every file it may import a scan from, the specifications included.
|
|
38
|
-
* @returns true when
|
|
37
|
+
* @returns true when the source names axe directly or through an imported helper.
|
|
39
38
|
*/
|
|
40
39
|
export declare const reachesAxe: (spec: SpecSource, everyFile: readonly SpecSource[]) => boolean;
|
|
41
40
|
//# sourceMappingURL=axe-coverage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"axe-coverage.d.ts","sourceRoot":"","sources":["../src/axe-coverage.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"axe-coverage.d.ts","sourceRoot":"","sources":["../src/axe-coverage.ts"],"names":[],"mappings":"AAGA,uFAAuF;AACvF,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CACxB;AAoBD;;;;;;;;GAQG;AACH,eAAO,MAAM,aAAa,GAAI,QAAQ,MAAM,EAAE,OAAO,MAAM,KAAG,OACmB,CAAA;AAEjF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,kBAAkB,GAAI,QAAQ,MAAM,EAAE,QAAQ,MAAM,KAAG,OACD,CAAA;AAgCnE;;;;;;;;GAQG;AACH,eAAO,MAAM,UAAU,GAAI,MAAM,UAAU,EAAE,WAAW,SAAS,UAAU,EAAE,KAAG,OAI7E,CAAA"}
|