@mark1russell7/conventions 0.58.0 → 0.59.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -89,6 +89,7 @@ The rules come from the invariants audit of 2026-10-26 (strategy item s38). The
89
89
  | `gate-trigger` | No workflow has `paths` or `paths-ignore` on `on.pull_request` or `on.pull_request_target`. The ruleset needs the summary check `<Name> OK` of each gate, and a workflow with a path filter does not start on each pull request. Then its check is not there, the ruleset cannot ask for it, and a pull request can merge before the gate ends. A gate uses the actions `changes` and `gate-summary` of the template (`CI.md`, "A gate with paths"). | private `gate-trigger` (a decision of 2026-11-02). |
90
90
  | `summary-job` | Each gate workflow (`ci.yml`, `security.yml`) that starts on pull requests has one summary job `<Name> OK` that needs each of its jobs. The ruleset names only the summary checks. Without them, it must name each job: then it does not wait for a new job, and a renamed job blocks each pull request. On 2026-11-09, 21 of 43 public repositories had a gate with no summary job. | private `summary-job` (a decision of 2026-11-09). |
91
91
  | `release-mode` | A `release.yml` that calls the build of the template has the job `version`, and its jobs publish and tag skip the mode `version`. From 2026-11-29 the build packs nothing while a changeset waits. Without the job, the publish fails and no pull request "Version the packages" opens, so the repository releases nothing. On 2026-11-30, 48 callers had this form. | private `release-mode` (a decision of 2026-11-30). |
92
+ | `call-permissions` | Each job that calls a shared workflow of the template at a commit grants the permissions that the jobs of the called workflow ask for, also through its nested calls. GitHub refuses a called workflow that asks for more: the run stops at its start (`startup_failure`), and no job shows why. On 2026-11-26, a pin move to a template commit whose `reusable-release-version.yml` asked for `actions: write` stopped each release run of a repository. The rule downloads each called file at its commit. A call with no `permissions` in the job or in the workflow gets the default of the repository, which the rule does not know, so the rule does not examine it. The entry `@mark1russell7/conventions/permissions` has the functions, and the release train uses them before it moves a pin. The rule fails from 2026-12-13. | release-train #248 (2026-11-26), private `conventions-call-permissions` (a decision of 2026-11-29). |
92
93
  | `license-file` | Each public package has a license field, and a license file with the same license in its own folder. A public repository, or a repository with a public package, has a license file at its root. In a GitHub Actions run, the event file tells if the repository is public, and the option `license` (MIT by default) is the license of a root with no public package. npm packs only the license file of the folder of the package, and GitHub reads only the one of the root: on 2026-11-02 five public repositories showed no license on GitHub while npm said MIT. `conventions fix` writes the missing files. | private strategy (2026-11-02). |
93
94
  | `coverage-provider` | When a workflow calls the shared CI and the CI starts the action `coverage`, each package whose test script starts Vitest has `@vitest/coverage-v8`. The provider has the range of `vitest`. The package or the root can hold both. On `main` of a public repository, the action skips a package with no provider, so the artifact `coverage` has no report of it. On 2026-11-09, 15 of 43 public repositories had no provider. `conventions fix` adds it at the range of `vitest`. A caller with `coverage-on-main: false` does not break. The rule fails from 2026-11-25. | template `packages/cli` (`package add`), ireko `packages/ireko/package.json`, codeatlas `packages/*/package.json`. |
94
95
  | `pack-no-buildinfo` | npm does not pack the build info file of tsc. The rule finds the file of each tsconfig of a public package after its `extends` chain. When `incremental` and `composite` are off, tsc writes no file. When an entry of `files` takes the file and no `!<path>` removes it, the rule breaks. A package with no field `files` packs each file, so it breaks too. The file changes on each build, and the release stops when the files of an unchanged version differ from npm. On 2026-11-09 this made the main of splay-react red. `conventions fix` adds the negation after its entry. A changed list of packed files needs a PATCH version. The rule fails from 2026-11-25. | splay-react `package.json` (1.0.2), splay `package.json`, cue `npm/package/ts.cue` (2.1.3). |
package/build/cli.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { readFileSync } from "node:fs";
3
- import { c as runCli } from "./run-4e6UIfOv.js";
3
+ import { c as runCli } from "./run-B9ocr1v_.js";
4
4
  // src/cli.ts
5
5
  try {
6
6
  const args = process.argv.slice(2);
package/build/index.d.ts CHANGED
@@ -353,6 +353,25 @@ export declare function addReleaseMode(text: string): {
353
353
  reason?: string;
354
354
  };
355
355
  export declare const releaseModeRule: Rule;
356
+ /** The answer for one URL: the text of the file, or the reason why there is no text. */
357
+ type HomeAnswer = {
358
+ readonly text: string;
359
+ } | {
360
+ readonly error: string;
361
+ };
362
+ /** A function that downloads each URL, and gives the answer for each URL. */
363
+ type HomeFetch = (urls: readonly string[]) => ReadonlyMap<string, HomeAnswer>;
364
+ /** The time in milliseconds that the rule waits for one home. A home that does not answer in this time is a break. */
365
+ export declare const HOME_TIMEOUT_MS = 3e4;
366
+ /** This function downloads each URL in one child process of Node. Each download stops after `HOME_TIMEOUT_MS`. */
367
+ export declare const githubFetch: HomeFetch;
368
+ /** This function gives the SHA-256 of the lines of a block: the lines with LF line ends, and a last LF. */
369
+ export declare const blockHash: (body: readonly string[]) => string;
370
+ /** This function makes the rule with the download function `fetchHomes`. The tests give a fake function. */
371
+ export declare function sharedDocsRule(fetchHomes?: HomeFetch): Rule;
372
+ /** This function makes the rule with the download function `fetchFiles`. The tests give a fake function. */
373
+ export declare function callPermissionsRule(fetchFiles?: HomeFetch): Rule;
374
+ export declare const callPermissions: Rule;
356
375
  export declare const setupCue: Rule;
357
376
  /** The shared workflows of the template, by file name. */
358
377
  export declare const SHARED_WORKFLOWS: readonly string[];
@@ -1089,22 +1108,6 @@ export declare function calledJobs(values: readonly string[]): Record<string, nu
1089
1108
  */
1090
1109
  export declare const TEMPLATE_CALLED: readonly string[];
1091
1110
  export declare const runnerPeak: Rule;
1092
- /** The answer for one URL: the text of the file, or the reason why there is no text. */
1093
- type HomeAnswer = {
1094
- readonly text: string;
1095
- } | {
1096
- readonly error: string;
1097
- };
1098
- /** A function that downloads each URL, and gives the answer for each URL. */
1099
- type HomeFetch = (urls: readonly string[]) => ReadonlyMap<string, HomeAnswer>;
1100
- /** The time in milliseconds that the rule waits for one home. A home that does not answer in this time is a break. */
1101
- export declare const HOME_TIMEOUT_MS = 3e4;
1102
- /** This function downloads each URL in one child process of Node. Each download stops after `HOME_TIMEOUT_MS`. */
1103
- export declare const githubFetch: HomeFetch;
1104
- /** This function gives the SHA-256 of the lines of a block: the lines with LF line ends, and a last LF. */
1105
- export declare const blockHash: (body: readonly string[]) => string;
1106
- /** This function makes the rule with the download function `fetchHomes`. The tests give a fake function. */
1107
- export declare function sharedDocsRule(fetchHomes?: HomeFetch): Rule;
1108
1111
  /** This function gives each path in the value of an entry field (a string, or the strings in an object). */
1109
1112
  export declare function pathsOf(value: unknown): string[];
1110
1113
  /** This function tells if a path is a source file: a file in `src/`, or a TypeScript file that is not a declaration file. */
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../src/rule.ts","../src/config.ts","../src/rules/cue-preset.ts","../src/rules/gate-after-cancel.ts","../src/rules/gate-trigger.ts","../src/rules/security-gate.ts","../src/rules/security-one-job.ts","../src/rules/summary-job.ts","../src/rules/release-mode.ts","../src/rules/setup-cue.ts","../src/rules/shared-ci.ts","../src/rules/service-run-main.ts","../src/map.ts","../src/rules/home-module.ts","../src/rules/home-package.ts","../src/home-shapes.ts","../src/rules/home-shape.ts","../src/rules/license-file.ts","../src/rules/coverage-provider.ts","../src/rules/main-check.ts","../src/rules/no-build-output.ts","../src/rules/no-console.ts","../src/private-names.ts","../src/rules/no-local-paths.ts","../src/rules/pack-no-buildinfo.ts","../src/rules/publish-text-safe.ts","../src/rules/exports-require.ts","../src/rules/api-report-script.ts","../src/rules/pages-after-release.ts","../src/rules/pages-site.ts","../src/rules/site-check-in-ci.ts","../src/rules/pinned-git-deps.ts","../src/rules/pipe-fails.ts","../src/rules/job-fails.ts","../src/rules/playwright-install.ts","../src/rules/push-main-only.ts","../src/rules/unreleased-change.ts","../src/rules/published-minor.ts","../src/rules/release-files.ts","../src/rules/required-scripts.ts","../src/rules/roadmap-parses.ts","../src/rules/runner-budget.ts","../src/workflow.ts","../src/rules/runner-peak.ts","../src/rules/shared-docs.ts","../src/rules/source-main.ts","../src/rules/tests-required.ts","../src/rules/tsconfig-test.ts","../src/rules/typed-files.ts","../src/rules/typed-scripts.ts","../src/rules/trust-policy.ts","../src/rules/version-title.ts","../src/rules/workflow-parses.ts","../src/rules/workspace-protocol.ts","../src/rules/index.ts","../src/run.ts","../src/pre-push.ts","../src/workflow-expression.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D,cAAc,cAAc,QAAQ,mBAAmB,UAAS,KAAK,0CAA+C;;wBAwCpH,UAAU,SAAS,eAAe;;UAuEjC;;WAEN;;WAEA;;WAEA,QAAQ;;;;;;;wBAWH,OAAO,SAAS,eAAe;;wBAyC/B,aAAa,QAAQ;;wBA4BrB,gBAAgB,QAAQ;;;;;;wBA2BxB,YAAY,QAAQ;;wBAapB,UAAU,QAAQ,+BAA+B,iBAAgB;;UAkBhE;WACN;WACA,KAAK,SAAS;WACd,SAAS;WACT,SAAS;;WAET;;;qBAIE;;wBA8EG,OAAO,yBAAyB,IAAI;;qBC7YvC;;UAGI;;WAEN;;;;;WAKA;;;;;WAKA;;;;;WAKA;;WAEA;WACA,KAAK,SAAS;;WAEd;;WAEA,MAAM;;WAEN,YAAY;;;;;;;;;;;;wBA0MP,QAAQ,SAAS,gBAAgB,IAAI,KAAK;;UA6GzC;;WAEN;WACA;WACA;WACA;;;;;;wBAOK,iBAAiB,0BAA0B;;;;;wBAuB3C,eAAe,MAAM,aAAa,IAAI,KAAK;;qBAS9C;;;;;;;;qBAgCA;;UAgBI;;WAEN;WACA,KAAK,SAAS;;WAEd,MAAM;;;;;;;wBAQD,YAAY,SAAS,aAAa,IAAI,KAAK;;;;;;;;;;;;KCzc/C;;UAGK;WACN,OAAO,YAAY;WACnB;;WAEA;;;wBA8DK,mBAAmB,cAAc,gBAAgB;;;;;wBAoGjD,WAAW,eAAe,gBAAgB,YAAY;;;;;wBActD,OAAO,mBAAmB;;qBCjM7B,cAAc,SAAS;WAA0B;WAA0B;;;;;;;;;qBCM3E;;wBAGG,QAAQ,cAAc,iBAAiB;;;;;;;;wBAavC,iBAAiB,kBAAkB,iBAAiB;;wBA+BpD,OAAO,cAAc;;;;;wBAQrB,aAAa,cAAc,iBAAiB"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../src/rule.ts","../src/config.ts","../src/rules/cue-preset.ts","../src/rules/gate-after-cancel.ts","../src/rules/gate-trigger.ts","../src/rules/security-gate.ts","../src/rules/security-one-job.ts","../src/rules/summary-job.ts","../src/rules/release-mode.ts","../src/rules/shared-docs.ts","../src/rules/call-permissions.ts","../src/rules/setup-cue.ts","../src/rules/shared-ci.ts","../src/rules/service-run-main.ts","../src/map.ts","../src/rules/home-module.ts","../src/rules/home-package.ts","../src/home-shapes.ts","../src/rules/home-shape.ts","../src/rules/license-file.ts","../src/rules/coverage-provider.ts","../src/rules/main-check.ts","../src/rules/no-build-output.ts","../src/rules/no-console.ts","../src/private-names.ts","../src/rules/no-local-paths.ts","../src/rules/pack-no-buildinfo.ts","../src/rules/publish-text-safe.ts","../src/rules/exports-require.ts","../src/rules/api-report-script.ts","../src/rules/pages-after-release.ts","../src/rules/pages-site.ts","../src/rules/site-check-in-ci.ts","../src/rules/pinned-git-deps.ts","../src/rules/pipe-fails.ts","../src/rules/job-fails.ts","../src/rules/playwright-install.ts","../src/rules/push-main-only.ts","../src/rules/unreleased-change.ts","../src/rules/published-minor.ts","../src/rules/release-files.ts","../src/rules/required-scripts.ts","../src/rules/roadmap-parses.ts","../src/rules/runner-budget.ts","../src/workflow.ts","../src/rules/runner-peak.ts","../src/rules/source-main.ts","../src/rules/tests-required.ts","../src/rules/tsconfig-test.ts","../src/rules/typed-files.ts","../src/rules/typed-scripts.ts","../src/rules/trust-policy.ts","../src/rules/version-title.ts","../src/rules/workflow-parses.ts","../src/rules/workspace-protocol.ts","../src/rules/index.ts","../src/run.ts","../src/pre-push.ts","../src/workflow-expression.ts","../src/home-exports.ts","../src/release-text.ts"],"mappings":";;;;;;;;;;;;;;;;;;;UASiB;WACN;WACA;WACA;;;UAIM;;WAEN;;WAEA;WACA;;WAEA;;WAEA,iBAAiB;;;;;;UAOX;;WAEN;;WAEA;;WAEA;;;wBAIK,YAAY,cAAc,cAAc;;KAQ5C;;KAGA,UAAU,SAAS,eAAe;;UAG7B;WACN;WACA,SAAS;WACT;;;KAIC,WAAW,SAAS;;UAGf;WACN,iBAAiB;;WAEjB;;;UAIM;;WAE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B;;UAkBhE;WACN;WACA,KAAK,SAAS;WACd,SAAS;WACT,SAAS;;WAET;;;qBAIE;;wBA8EG,OAAO,yBAAyB,IAAI;;qBC7YvC;;UAGI;;WAEN;;;;;WAKA;;;;;WAKA;;;;;WAKA;;WAEA;WACA,KAAK,SAAS;;WAEd;;WAEA,MAAM;;WAEN,YAAY;;;;;;;;;;;;wBA0MP,QAAQ,SAAS,gBAAgB,IAAI,KAAK;;UA6GzC;;WAEN;WACA;WACA;WACA;;;;;;wBAOK,iBAAiB,0BAA0B;;;;;wBAuB3C,eAAe,MAAM,aAAa,IAAI,KAAK;;qBAS9C;;;;;;;;qBAgCA;;UAgBI;;WAEN;WACA,KAAK,SAAS;;WAEd,MAAM;;;;;;;wBAQD,YAAY,SAAS,aAAa,IAAI,KAAK;;;;;;;;;;;;KCzc/C;;UAGK;WACN,OAAO,YAAY;WACnB;;WAEA;;;wBA8DK,mBAAmB,cAAc,gBAAgB;;;;;wBAoGjD,WAAW,eAAe,gBAAgB,YAAY;;;;;wBActD,OAAO,mBAAmB;;qBCjM7B,cAAc,SAAS;WAA0B;WAA0B;;;;;;;;;qBCM3E;;wBAGG,QAAQ,cAAc,iBAAiB;;;;;;;;wBAavC,iBAAiB,kBAAkB,iBAAiB;;wBA+BpD,OAAO,cAAc;;;;;wBAQrB,aAAa,cAAc,iBAAiB"}
package/build/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as requiredScripts, $n as releaseModeRule, $r as runGitShow, $t as CONSOLE_LAST_DAY, A as scriptsOf, An as HOMES, Ar as gateAfterCancel, At as packNoBuildinfo, B as TEMPLATE_CALLED, Bn as runCalls, Br as cleanPath, Bt as privatePatterns, C as setVersions, Cn as declaredName, Cr as ACTIONS_COMMIT, Ct as pagesAfterRelease, D as trustPolicy, Dn as reposOf, Dr as skippableJobs, Dt as pagesSite, E as TRAIN_SCOPES, En as repoOf, Er as prPathFilters, Et as pagesCalls, F as sourceMain, Fn as mergeHomes, Fr as yamlFaults, Ft as PRIVATE_PATTERNS_VARIABLE, G as runnerPeak, Gn as SHARED_CI, Gr as lineOf, Gt as isAllowedHit, H as calledJobs, Hn as hasTests, Hr as hasFile, Ht as PRIVATE_NAME_LIST, I as HOME_TIMEOUT_MS, In as npmDrift, Ir as STRICT_OPTIONS, It as invalidPatternBreaks, J as evaluateExpression, Jn as sharedCi, Jr as parseJsonc, Jt as lineNameHits, K as runsAtOnce, Kn as SHARED_WORKFLOWS, Kr as matchesAny, Kt as isCommonUse, L as blockHash, Ln as npmNames, Lr as cuePreset, Lt as noLocalPaths, M as testsRequired, Mn as findHomes, Mr as parseWorkflow, Mt as HOME_PATTERNS, N as isSourcePath, Nn as mapMarkdown, Nr as readAction, Nt as PRIVATE_NAMES_FILE_CONFIG, O as typedScripts, On as signaturesOf, Or as summaryJob, Ot as exportsRequire, P as pathsOf, Pn as mapText, Pr as readWorkflow, Pt as PRIVATE_NAMES_FILE_VARIABLE, Q as roadmapParses, Qn as hasReleaseMode, Qr as runGit, Qt as pathNameHit, R as githubFetch, Rn as readOverlay, Rr as DEPENDENCY_FIELDS, Rt as privateNamesFile, S as namedVersions, Sn as modulesOf, Sr as repositoryIsPublic, St as siteCheckInCi, T as IGNORE_AFTER, Tn as messageOf, Tr as gateTrigger, Tt as PAGES_WORKFLOWS, U as eventClass, Un as tsconfigTest, Ur as inFolder, Ut as PrivateNameListError, V as UNKNOWN_MATRIX_JOBS, Vn as serviceRunMain, Vr as codePackages, Vt as privateTextBreaks, W as matrixPeak, Wn as SHARED_ACTIONS, Wr as keyLine, Wt as firstNameMatch, X as mayRun, Xn as addReleaseMode, Xr as replaceLine, Xt as nameMatches, Y as groupParts, Yn as setupCue, Yr as readJsonc, Yt as mergePrivateNames, Z as roadmapOfLine, Zn as callsReleaseBuild, Zr as repositoryOfRemote, Zt as parsePrivateNames, _ as runPrePushArgs, _n as spansOf, _r as LICENSE_TEXTS, _t as swallowsTests, a as listRules, an as noConsole, ar as addSummaryJob, at as reachOf, b as GITHUB_YAML, bn as moduleMessage, br as licenseFileOf, bt as isPinned, c as runCli, cn as hasImportMetaMain, cr as summaryJobRule, ct as UNSHIPPED_FILES, d as HOOK_MARKER, dn as apiReportScript, dr as SECURITY_TIMEOUT_MINUTES, dt as unreleasedChangeRule, ei as showFiles, en as NOT_SOURCE, er as SECURITY_FILE, et as releaseFiles, f as NO_READ_LINE, fn as containedHome, fr as securityCallers, ft as playwrightInstall, g as prePush, gn as shapesOfSource, gr as scheduleMinute, gt as startsTests, h as parsePrePushArgs, hn as shapeMessage, hr as runnerBudget, ht as parseAdvisory, i as formatResult, ii as parseRuleConfig, in as isCliFile, ir as SUMMARY_GATES, it as publishedMinorRule, j as typedFiles, jn as MAP_RULE, jr as MATRIX_EXPAND_MAX, jt as DEFAULT_ALLOWED, k as configsOfScript, kn as HOME_EXPORTS, kr as summaryName, kt as publishTextSafe, l as runFix, ln as mainCheck, lr as SECURITY_SCAN_COMMIT, lt as npmLookup, m as installHook, mn as homeShapesOf, mr as withOneJob, mt as jobFails, n as annotations, ni as defaultOptions, nn as consoleGate, nr as securityGate, nt as minorOf, o as readConfig, on as noBuildOutput, or as hasSummaryJob, ot as NPM_REGISTRY, p as PRE_PUSH_HOOK, pn as homeShape, pr as securityOneJob, pt as hiddenFailures, q as workflowPeaks, qn as callsSharedCi, qr as parseCatFileBatch, qt as lineNameHit, r as createContext, ri as parseConfig, rn as consoleKind, rr as securityWorkflow, rt as publishedMinor, s as runChecks, sn as REAL_COMPARE, sr as startsOnPullRequest, st as SHIPPED_FIELDS, t as USAGE, ti as specifiersOf, tn as consoleBreaks, tr as isSecurityGate, tt as lockedVersions, u as summaryMarkdown, un as coverageProvider, ur as SECURITY_SCAN_INPUTS, ut as unreleasedChange, v as RULES, vn as HOME_SHAPES, vr as authorOf, vt as pipeFails, w as versionTitle, wn as homePackage, wr as convertGate, wt as pushMainOnly, x as workflowParses, xn as moduleUses, xr as mitText, xt as pinnedGitDeps, y as workspaceProtocol, yn as homeModule, yr as licenseFile, yt as isGitSpecifier, z as sharedDocsRule, zn as SERVICE_PACKAGE, zr as RULE_WARN_DAYS, zt as privateNamesFiles } from "./run-4e6UIfOv.js";
1
+ import { $ as publishedMinor, $n as callsReleaseBuild, $r as repositoryOfRemote, $t as consoleKind, A as scriptsOf, An as mapText, Ar as summaryJob, At as PRIVATE_NAMES_FILE_VARIABLE, B as matrixPeak, Bn as SHARED_ACTIONS, Br as DEPENDENCY_FIELDS, Bt as firstNameMatch, C as setVersions, Cn as reposOf, Cr as mitText, Ct as pagesSite, D as trustPolicy, Dn as MAP_RULE, Dr as gateTrigger, Dt as DEFAULT_ALLOWED, E as TRAIN_SCOPES, En as HOMES, Er as convertGate, Et as packNoBuildinfo, F as sourceMain, Fn as SERVICE_PACKAGE, Fr as readAction, Ft as privateNamesFiles, G as groupParts, Gn as setupCue, Gr as inFolder, Gt as mergePrivateNames, H as runsAtOnce, Hn as SHARED_WORKFLOWS, Hr as cleanPath, Ht as isCommonUse, I as TEMPLATE_CALLED, In as runCalls, Ir as readWorkflow, It as privatePatterns, J as roadmapParses, Jn as HOME_TIMEOUT_MS, Jr as matchesAny, Jt as pathNameHit, K as mayRun, Kn as callPermissions, Kr as keyLine, Kt as nameMatches, L as UNKNOWN_MATRIX_JOBS, Ln as serviceRunMain, Lr as yamlFaults, Lt as privateTextBreaks, M as testsRequired, Mn as npmDrift, Mr as gateAfterCancel, Mt as invalidPatternBreaks, N as isSourcePath, Nn as npmNames, Nr as MATRIX_EXPAND_MAX, Nt as noLocalPaths, O as typedScripts, On as findHomes, Or as prPathFilters, Ot as HOME_PATTERNS, P as pathsOf, Pn as readOverlay, Pr as parseWorkflow, Pt as privateNamesFile, Q as minorOf, Qn as addReleaseMode, Qr as replaceLine, Qt as consoleGate, R as calledJobs, Rn as hasTests, Rr as STRICT_OPTIONS, Rt as PRIVATE_NAME_LIST, S as namedVersions, Sn as repoOf, Sr as licenseFileOf, St as pagesCalls, T as IGNORE_AFTER, Tn as HOME_EXPORTS, Tr as ACTIONS_COMMIT, Tt as publishTextSafe, U as workflowPeaks, Un as callsSharedCi, Ur as codePackages, Ut as lineNameHit, V as runnerPeak, Vn as SHARED_CI, Vr as RULE_WARN_DAYS, Vt as isAllowedHit, W as evaluateExpression, Wn as sharedCi, Wr as hasFile, Wt as lineNameHits, X as releaseFiles, Xn as githubFetch, Xr as parseJsonc, Xt as NOT_SOURCE, Y as requiredScripts, Yn as blockHash, Yr as parseCatFileBatch, Yt as CONSOLE_LAST_DAY, Z as lockedVersions, Zn as sharedDocsRule, Zr as readJsonc, Zt as consoleBreaks, _ as runPrePushArgs, _n as moduleUses, _r as runnerBudget, _t as pinnedGitDeps, a as listRules, ai as parseConfig, an as mainCheck, ar as securityWorkflow, at as npmLookup, b as GITHUB_YAML, bn as homePackage, br as authorOf, bt as pushMainOnly, c as runCli, cn as containedHome, cr as hasSummaryJob, ct as playwrightInstall, d as HOOK_MARKER, dn as shapeMessage, dr as SECURITY_SCAN_COMMIT, dt as parseAdvisory, ei as runGit, en as isCliFile, er as hasReleaseMode, et as publishedMinorRule, f as NO_READ_LINE, fn as shapesOfSource, fr as SECURITY_SCAN_INPUTS, ft as startsTests, g as prePush, gn as moduleMessage, gr as withOneJob, gt as isPinned, h as parsePrePushArgs, hn as homeModule, hr as securityOneJob, ht as isGitSpecifier, i as formatResult, ii as defaultOptions, in as hasImportMetaMain, ir as securityGate, it as UNSHIPPED_FILES, j as typedFiles, jn as mergeHomes, jr as summaryName, jt as PRIVATE_PATTERNS_VARIABLE, k as configsOfScript, kn as mapMarkdown, kr as skippableJobs, kt as PRIVATE_NAMES_FILE_CONFIG, l as runFix, ln as homeShape, lr as startsOnPullRequest, lt as hiddenFailures, m as installHook, mn as HOME_SHAPES, mr as securityCallers, mt as pipeFails, n as annotations, ni as showFiles, nn as noBuildOutput, nr as SECURITY_FILE, nt as NPM_REGISTRY, o as readConfig, oi as parseRuleConfig, on as coverageProvider, or as SUMMARY_GATES, ot as unreleasedChange, p as PRE_PUSH_HOOK, pn as spansOf, pr as SECURITY_TIMEOUT_MINUTES, pt as swallowsTests, q as roadmapOfLine, qn as callPermissionsRule, qr as lineOf, qt as parsePrivateNames, r as createContext, ri as specifiersOf, rn as REAL_COMPARE, rr as isSecurityGate, rt as SHIPPED_FIELDS, s as runChecks, sn as apiReportScript, sr as addSummaryJob, st as unreleasedChangeRule, t as USAGE, ti as runGitShow, tn as noConsole, tr as releaseModeRule, tt as reachOf, u as summaryMarkdown, un as homeShapesOf, ur as summaryJobRule, ut as jobFails, v as RULES, vn as modulesOf, vr as scheduleMinute, vt as siteCheckInCi, w as versionTitle, wn as signaturesOf, wr as repositoryIsPublic, wt as exportsRequire, x as workflowParses, xn as messageOf, xr as licenseFile, xt as PAGES_WORKFLOWS, y as workspaceProtocol, yn as declaredName, yr as LICENSE_TEXTS, yt as pagesAfterRelease, z as eventClass, zn as tsconfigTest, zr as cuePreset, zt as PrivateNameListError } from "./run-B9ocr1v_.js";
2
2
  import { OWNERS, ownerOf, ownersOf, repoKeyer, sharedNames } from "./owners.js";
3
3
  import { a as packageFolders, i as isWorkspaceFolder, l as workspaceGlobs, n as globFolders, o as parseWorkspaceGlobs, r as globToRegExp } from "./workspace-B6xQXXcL.js";
4
4
  // src/release-text.ts
@@ -66,6 +66,6 @@ function releaseNotes(name, version, changelog) {
66
66
  if (section.length <= 1e5) return section;
67
67
  return `${section.slice(0, MAX_NOTES)}\n\n(The CHANGELOG.md of \`${name}\` has the full text.)`;
68
68
  }
69
- export { ACTIONS_COMMIT, CONSOLE_LAST_DAY, DEFAULT_ALLOWED, DEPENDENCY_FIELDS, GITHUB_YAML, HOMES, HOME_EXPORTS, HOME_PATTERNS, HOME_SHAPES, HOME_TIMEOUT_MS, HOOK_MARKER, IGNORE_AFTER, LICENSE_TEXTS, MAP_RULE, MATRIX_EXPAND_MAX, MAX_NOTES, NOT_SOURCE, NO_READ_LINE, NPM_REGISTRY, OWNERS, PAGES_WORKFLOWS, PRE_PUSH_HOOK, PRIVATE_NAMES_FILE_CONFIG, PRIVATE_NAMES_FILE_VARIABLE, PRIVATE_NAME_LIST, PRIVATE_PATTERNS_VARIABLE, PrivateNameListError, REAL_COMPARE, RULES, RULE_WARN_DAYS, SECURITY_FILE, SECURITY_SCAN_COMMIT, SECURITY_SCAN_INPUTS, SECURITY_TIMEOUT_MINUTES, SERVICE_PACKAGE, SHARED_ACTIONS, SHARED_CI, SHARED_WORKFLOWS, SHIPPED_FIELDS, STRICT_OPTIONS, SUMMARY_GATES, TEMPLATE_CALLED, TRAIN_SCOPES, UNKNOWN_MATRIX_JOBS, UNSHIPPED_FILES, USAGE, addReleaseMode, addSummaryJob, annotations, apiReportScript, authorOf, blockHash, calledJobs, callsReleaseBuild, callsSharedCi, changelogSection, cleanPath, codePackages, configsOfScript, consoleBreaks, consoleGate, consoleKind, containedHome, convertGate, coverageProvider, createContext, cuePreset, declaredName, defaultOptions, evaluateExpression, eventClass, exportsRequire, findHomes, firstNameMatch, formatResult, gateAfterCancel, gateTrigger, githubFetch, globFolders, globToRegExp, groupParts, hasFile, hasImportMetaMain, hasReleaseMode, hasSummaryJob, hasTests, hiddenFailures, homeModule, homePackage, homeShape, homeShapesOf, inFolder, installHook, invalidPatternBreaks, isAllowedHit, isCliFile, isCommonUse, isGitSpecifier, isPinned, isSecurityGate, isSourcePath, isWorkspaceFolder, jobFails, keyLine, licenseFile, licenseFileOf, lineNameHit, lineNameHits, lineOf, listRules, lockedVersions, mainCheck, mapMarkdown, mapText, matchesAny, matrixPeak, mayRun, mergeHomes, mergePrivateNames, messageOf, minorOf, mitText, moduleMessage, moduleUses, modulesOf, nameMatches, namedVersions, noBuildOutput, noConsole, noLocalPaths, npmDrift, npmLookup, npmNames, npmUrl, ownerOf, ownersOf, packNoBuildinfo, packageFolders, pagesAfterRelease, pagesCalls, pagesSite, parseAdvisory, parseCatFileBatch, parseConfig, parseJsonc, parsePrePushArgs, parsePrivateNames, parseRuleConfig, parseWorkflow, parseWorkspaceGlobs, pathNameHit, pathsOf, pinnedGitDeps, pipeFails, playwrightInstall, prPathFilters, prePush, privateNamesFile, privateNamesFiles, privatePatterns, privateTextBreaks, publishTextSafe, publishedMinor, publishedMinorRule, pushMainOnly, reachOf, readAction, readConfig, readJsonc, readOverlay, readWorkflow, releaseFiles, releaseModeRule, releaseNotes, replaceLine, repoKeyer, repoOf, reposOf, repositoryIsPublic, repositoryOfRemote, requiredScripts, roadmapOfLine, roadmapParses, runCalls, runChecks, runCli, runFix, runGit, runGitShow, runPrePushArgs, runnerBudget, runnerPeak, runsAtOnce, scheduleMinute, scriptsOf, securityCallers, securityGate, securityOneJob, securityWorkflow, serviceRunMain, setVersions, setupCue, shapeMessage, shapesOfSource, sharedCi, sharedDocsRule, sharedNames, showFiles, signaturesOf, siteCheckInCi, skippableJobs, sourceMain, spansOf, specifiersOf, startsOnPullRequest, startsTests, summaryJob, summaryJobRule, summaryMarkdown, summaryName, swallowsTests, tagName, testsRequired, trustPolicy, tsconfigTest, typedFiles, typedScripts, unreleasedChange, unreleasedChangeRule, versionTitle, withOneJob, workflowParses, workflowPeaks, workspaceGlobs, workspaceProtocol, yamlFaults };
69
+ export { ACTIONS_COMMIT, CONSOLE_LAST_DAY, DEFAULT_ALLOWED, DEPENDENCY_FIELDS, GITHUB_YAML, HOMES, HOME_EXPORTS, HOME_PATTERNS, HOME_SHAPES, HOME_TIMEOUT_MS, HOOK_MARKER, IGNORE_AFTER, LICENSE_TEXTS, MAP_RULE, MATRIX_EXPAND_MAX, MAX_NOTES, NOT_SOURCE, NO_READ_LINE, NPM_REGISTRY, OWNERS, PAGES_WORKFLOWS, PRE_PUSH_HOOK, PRIVATE_NAMES_FILE_CONFIG, PRIVATE_NAMES_FILE_VARIABLE, PRIVATE_NAME_LIST, PRIVATE_PATTERNS_VARIABLE, PrivateNameListError, REAL_COMPARE, RULES, RULE_WARN_DAYS, SECURITY_FILE, SECURITY_SCAN_COMMIT, SECURITY_SCAN_INPUTS, SECURITY_TIMEOUT_MINUTES, SERVICE_PACKAGE, SHARED_ACTIONS, SHARED_CI, SHARED_WORKFLOWS, SHIPPED_FIELDS, STRICT_OPTIONS, SUMMARY_GATES, TEMPLATE_CALLED, TRAIN_SCOPES, UNKNOWN_MATRIX_JOBS, UNSHIPPED_FILES, USAGE, addReleaseMode, addSummaryJob, annotations, apiReportScript, authorOf, blockHash, callPermissions, callPermissionsRule, calledJobs, callsReleaseBuild, callsSharedCi, changelogSection, cleanPath, codePackages, configsOfScript, consoleBreaks, consoleGate, consoleKind, containedHome, convertGate, coverageProvider, createContext, cuePreset, declaredName, defaultOptions, evaluateExpression, eventClass, exportsRequire, findHomes, firstNameMatch, formatResult, gateAfterCancel, gateTrigger, githubFetch, globFolders, globToRegExp, groupParts, hasFile, hasImportMetaMain, hasReleaseMode, hasSummaryJob, hasTests, hiddenFailures, homeModule, homePackage, homeShape, homeShapesOf, inFolder, installHook, invalidPatternBreaks, isAllowedHit, isCliFile, isCommonUse, isGitSpecifier, isPinned, isSecurityGate, isSourcePath, isWorkspaceFolder, jobFails, keyLine, licenseFile, licenseFileOf, lineNameHit, lineNameHits, lineOf, listRules, lockedVersions, mainCheck, mapMarkdown, mapText, matchesAny, matrixPeak, mayRun, mergeHomes, mergePrivateNames, messageOf, minorOf, mitText, moduleMessage, moduleUses, modulesOf, nameMatches, namedVersions, noBuildOutput, noConsole, noLocalPaths, npmDrift, npmLookup, npmNames, npmUrl, ownerOf, ownersOf, packNoBuildinfo, packageFolders, pagesAfterRelease, pagesCalls, pagesSite, parseAdvisory, parseCatFileBatch, parseConfig, parseJsonc, parsePrePushArgs, parsePrivateNames, parseRuleConfig, parseWorkflow, parseWorkspaceGlobs, pathNameHit, pathsOf, pinnedGitDeps, pipeFails, playwrightInstall, prPathFilters, prePush, privateNamesFile, privateNamesFiles, privatePatterns, privateTextBreaks, publishTextSafe, publishedMinor, publishedMinorRule, pushMainOnly, reachOf, readAction, readConfig, readJsonc, readOverlay, readWorkflow, releaseFiles, releaseModeRule, releaseNotes, replaceLine, repoKeyer, repoOf, reposOf, repositoryIsPublic, repositoryOfRemote, requiredScripts, roadmapOfLine, roadmapParses, runCalls, runChecks, runCli, runFix, runGit, runGitShow, runPrePushArgs, runnerBudget, runnerPeak, runsAtOnce, scheduleMinute, scriptsOf, securityCallers, securityGate, securityOneJob, securityWorkflow, serviceRunMain, setVersions, setupCue, shapeMessage, shapesOfSource, sharedCi, sharedDocsRule, sharedNames, showFiles, signaturesOf, siteCheckInCi, skippableJobs, sourceMain, spansOf, specifiersOf, startsOnPullRequest, startsTests, summaryJob, summaryJobRule, summaryMarkdown, summaryName, swallowsTests, tagName, testsRequired, trustPolicy, tsconfigTest, typedFiles, typedScripts, unreleasedChange, unreleasedChangeRule, versionTitle, withOneJob, workflowParses, workflowPeaks, workspaceGlobs, workspaceProtocol, yamlFaults };
70
70
 
71
71
  //# sourceMappingURL=index.js.map
@@ -0,0 +1,99 @@
1
+ /** The access of one permission scope. */
2
+ export type Access = "none" | "read" | "write";
3
+ /** The permissions of a job: the access of each named scope, and the access of each other scope. */
4
+ export interface Grant {
5
+ /** The access of each scope that the block does not name. `read-all` gives `read`, `write-all` gives `write`, a map gives `none`. */
6
+ readonly base: Access;
7
+ readonly scopes: Readonly<Record<string, Access>>;
8
+ }
9
+ /** One scope that a called job asks for and that its caller does not grant. */
10
+ export interface MissingPermission {
11
+ readonly scope: string;
12
+ readonly asked: Access;
13
+ readonly granted: Access;
14
+ }
15
+ /** One gap of the permission gate: a caller job, the called workflow, and the scopes of one called job that its caller does not grant. */
16
+ export interface PermissionGap {
17
+ /** The job of the caller workflow. */
18
+ readonly job: string;
19
+ /** The path of the called workflow in the template. */
20
+ readonly workflow: string;
21
+ /** The commit of the called workflow. */
22
+ readonly sha: string;
23
+ /** The job of the called workflow that asks, with the jobs of the nested calls before it (`a > b`). Null for the file of the caller job. */
24
+ readonly calledJob: string | null;
25
+ readonly missing: readonly MissingPermission[];
26
+ /** This value is true when the train cannot read the called file (`workflow` at `sha`). Then the gate cannot check it, so it holds. */
27
+ readonly unread: boolean;
28
+ }
29
+ /** This function reads a file of the template at a commit, or gives null. */
30
+ export type ReadAt = (path: string, sha: string) => Promise<string | null>;
31
+ /** The scopes of the `GITHUB_TOKEN`. The report of a `write-all` ask names each of them. */
32
+ export declare const PERMISSION_SCOPES: readonly string[];
33
+ /**
34
+ * This function reads a `permissions` value of a workflow or of a job. It gives null when the value is absent: then the
35
+ * job inherits. `{}` gives no access. An unknown text gives no access.
36
+ */
37
+ export declare function grantOf(value: unknown): Grant | null;
38
+ /**
39
+ * This function gives each scope that `asked` asks for and that `granted` does not cover, in the order of the scope names.
40
+ * `write` covers `read`. An empty list is a pass.
41
+ */
42
+ export declare function missingPermissions(granted: Grant, asked: Grant): MissingPermission[];
43
+ /** One job of a caller workflow that calls a shared workflow of the template. */
44
+ export interface TemplateCall {
45
+ readonly job: string;
46
+ readonly path: string;
47
+ readonly sha: string;
48
+ /** The cap of the call: the `permissions` of the job, else of the workflow. Null when the file sets none: the cap is the default of the repository. */
49
+ readonly grant: Grant | null;
50
+ }
51
+ /**
52
+ * This function gives each job of a workflow text that calls a shared workflow of the template at a commit. A ref of a
53
+ * composite action (`.github/actions/...`) has no permissions, so it is not in the list.
54
+ */
55
+ export declare function templateCalls(text: string, owner: string, template?: string): TemplateCall[];
56
+ /** A file of the template at a commit. */
57
+ export interface TemplateFile {
58
+ readonly path: string;
59
+ readonly sha: string;
60
+ }
61
+ /** This function gives the key of a file of the template at a commit in a map of known files: `<path>@<sha>`. */
62
+ export declare const fileKey: (file: TemplateFile) => string;
63
+ /**
64
+ * The files of the template that a walk knows: the text of each key of `fileKey`, or null when the file cannot be read.
65
+ * A key that is not in the map is a file that the walk needs.
66
+ */
67
+ export type KnownFiles = ReadonlyMap<string, string | null>;
68
+ /** The result of a walk over the known files: the gaps, and the files that the walk needs and does not know. */
69
+ export interface GapWalk {
70
+ readonly gaps: readonly PermissionGap[];
71
+ /** The files to read before the next walk. When it is empty, `gaps` is the full result. */
72
+ readonly needs: readonly TemplateFile[];
73
+ }
74
+ /**
75
+ * This function gives the gaps of calls over the files that `known` gives. A gap is a job of a called workflow, or of
76
+ * its nested calls, that asks for more than the cap of its call. A called file that is null in `known` is one gap
77
+ * with no missing permission (`unread`), so a gate holds. A called file that is not in `known` goes to `needs`. The walk
78
+ * reads no file, so a synchronous rule and an asynchronous reader use it the same way: read the needs, then walk again.
79
+ * Each walk goes one level of calls further, so the needs are empty after `CALL_DEPTH` reads at the most.
80
+ */
81
+ export declare function walkGaps(calls: readonly (TemplateCall & {
82
+ readonly grant: Grant;
83
+ })[], owner: string, known: KnownFiles, template?: string): GapWalk;
84
+ /** This function gives the calls of a workflow text that a gap walk examines: each template call with a cap in the file. */
85
+ export declare function checkedCalls(text: string, owner: string, template?: string): (TemplateCall & {
86
+ readonly grant: Grant;
87
+ })[];
88
+ /**
89
+ * This function gives the gaps of one call: each job of the called workflow (and of its nested calls) whose permissions
90
+ * the cap of the call does not cover. A called file that `read` cannot give is one gap with no called job, so the gate holds.
91
+ */
92
+ export declare function callGaps(call: TemplateCall & {
93
+ readonly grant: Grant;
94
+ }, owner: string, read: ReadAt, template?: string): Promise<PermissionGap[]>;
95
+ /** This function gives the gaps of each template call of a workflow text (refer to `checkedCalls`). */
96
+ export declare function workflowGaps(text: string, owner: string, read: ReadAt, template?: string): Promise<PermissionGap[]>;
97
+ /** This function gives one line of a gap for the report: the caller job, the called workflow and each missing permission. */
98
+ export declare function gapLine(path: string, g: PermissionGap): string;
99
+ //# sourceMappingURL=permissions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"permissions.d.ts","names":[],"sources":["../src/permissions.ts"],"mappings":";YAeY;;iBAGK;;WAEN,MAAM;WACN,QAAQ,SAAS,eAAe;;;iBAI1B;WACN;WACA,OAAO;WACP,SAAS;;;iBAIH;;WAEN;;WAEA;;WAEA;;WAEA;WACA,kBAAkB;;WAElB;;;YAIC,UAAU,cAAc,gBAAgB;;qBAGvC;;;;;wBA+BG,QAAQ,iBAAiB;;;;;wBAkBzB,mBAAmB,SAAS,OAAO,OAAO,QAAQ;;iBAoCjD;WACN;WACA;WACA;;WAEA,OAAO;;;;;;wBAOF,cAAc,cAAc,eAAe,oBAAwB;;iBAgBlE;WACN;WACA;;;qBAIE,UAAW,MAAM;;;;;YAMlB,aAAa;;iBAGR;WACN,eAAe;;WAEf,gBAAgB;;;;;;;;;wBAUX,SAAS,iBAAiB;WAA0B,OAAO;MAAY,eAAe,OAAO,YAAY,oBAAwB;;wBAuCjI,aAAa,cAAc,eAAe,qBAAyB;WAA0B,OAAO;;;;;;wBAqB9F,SAAS,MAAM;WAA0B,OAAO;GAAS,eAAe,MAAM,QAAQ,oBAAwB,QAAQ;;wBAKtH,aAAa,cAAc,eAAe,MAAM,QAAQ,oBAAwB,QAAQ;;wBAK9F,QAAQ,cAAc,GAAG"}
@@ -0,0 +1,241 @@
1
+ import { parse } from "yaml";
2
+ import { escapeRegExp } from "@mark1russell7/text";
3
+ // src/permissions.ts
4
+ /**
5
+ * The permission gap of a call of a shared workflow. GitHub refuses a called workflow that asks for more permissions than
6
+ * its caller job grants: the run stops at its start (`startup_failure`). On 2026-11-26, the pins of a release workflow
7
+ * moved to a template commit whose `reusable-release-version.yml` asked for `actions: write`. Then each release run of that
8
+ * repository failed. The release train finds such a gap before it pushes the pins, and the rule `call-permissions` finds
9
+ * it in the checks of each repository. The two use the functions of this file (entry `@mark1russell7/conventions/permissions`).
10
+ *
11
+ * The rules of GitHub: the `permissions` of the caller job cap the called workflow. A caller job with no `permissions`
12
+ * gets the `permissions` of its workflow. `write` covers `read`. `read-all` and `write-all` set each scope. In the called
13
+ * workflow, a job with no `permissions` gets the `permissions` of its file. With none of the two, it asks for nothing more.
14
+ */
15
+ /** The scopes of the `GITHUB_TOKEN`. The report of a `write-all` ask names each of them. */
16
+ const PERMISSION_SCOPES = [
17
+ "actions",
18
+ "attestations",
19
+ "checks",
20
+ "contents",
21
+ "deployments",
22
+ "discussions",
23
+ "id-token",
24
+ "issues",
25
+ "models",
26
+ "packages",
27
+ "pages",
28
+ "pull-requests",
29
+ "repository-projects",
30
+ "security-events",
31
+ "statuses"
32
+ ];
33
+ /** The most levels of nested called workflows that the gate follows. GitHub lets a run have four levels. */
34
+ const CALL_DEPTH = 4;
35
+ const RANK = {
36
+ none: 0,
37
+ read: 1,
38
+ write: 2
39
+ };
40
+ function access(value) {
41
+ return value === "write" || value === "read" ? value : "none";
42
+ }
43
+ /**
44
+ * This function reads a `permissions` value of a workflow or of a job. It gives null when the value is absent: then the
45
+ * job inherits. `{}` gives no access. An unknown text gives no access.
46
+ */
47
+ function grantOf(value) {
48
+ if (value === void 0 || value === null) return null;
49
+ if (value === "write-all") return {
50
+ base: "write",
51
+ scopes: {}
52
+ };
53
+ if (value === "read-all") return {
54
+ base: "read",
55
+ scopes: {}
56
+ };
57
+ if (typeof value !== "object" || Array.isArray(value)) return {
58
+ base: "none",
59
+ scopes: {}
60
+ };
61
+ const scopes = {};
62
+ for (const [k, v] of Object.entries(value)) scopes[k] = access(v);
63
+ return {
64
+ base: "none",
65
+ scopes
66
+ };
67
+ }
68
+ function level(g, scope) {
69
+ return g.scopes[scope] ?? g.base;
70
+ }
71
+ /**
72
+ * This function gives each scope that `asked` asks for and that `granted` does not cover, in the order of the scope names.
73
+ * `write` covers `read`. An empty list is a pass.
74
+ */
75
+ function missingPermissions(granted, asked) {
76
+ const names = /* @__PURE__ */ new Set([...Object.keys(asked.scopes), ...Object.keys(granted.scopes)]);
77
+ if (asked.base !== "none") for (const s of PERMISSION_SCOPES) names.add(s);
78
+ const out = [];
79
+ for (const scope of [...names].sort()) {
80
+ const a = level(asked, scope);
81
+ const g = level(granted, scope);
82
+ if (RANK[a] > RANK[g]) out.push({
83
+ scope,
84
+ asked: a,
85
+ granted: g
86
+ });
87
+ }
88
+ return out;
89
+ }
90
+ function jobsOf(text) {
91
+ let doc;
92
+ try {
93
+ doc = parse(text);
94
+ } catch {
95
+ return null;
96
+ }
97
+ if (doc === null || typeof doc !== "object") return null;
98
+ const jobs = doc.jobs;
99
+ if (jobs === null || typeof jobs !== "object") return {
100
+ doc,
101
+ jobs: []
102
+ };
103
+ return {
104
+ doc,
105
+ jobs: Object.entries(jobs).map(([id, j]) => [id, j ?? {}])
106
+ };
107
+ }
108
+ /**
109
+ * This function gives each job of a workflow text that calls a shared workflow of the template at a commit. A ref of a
110
+ * composite action (`.github/actions/...`) has no permissions, so it is not in the list.
111
+ */
112
+ function templateCalls(text, owner, template = "template") {
113
+ const parsed = jobsOf(text);
114
+ if (!parsed) return [];
115
+ const re = new RegExp(`^${escapeRegExp(owner)}/${escapeRegExp(template)}/([^@\\s]+)@([0-9a-f]{40})$`);
116
+ const top = grantOf(parsed.doc.permissions);
117
+ const out = [];
118
+ for (const [job, j] of parsed.jobs) {
119
+ if (typeof j.uses !== "string") continue;
120
+ const m = re.exec(j.uses.trim());
121
+ if (!m?.[1] || !m[2] || m[1].startsWith(".github/actions/")) continue;
122
+ out.push({
123
+ job,
124
+ path: m[1],
125
+ sha: m[2],
126
+ grant: grantOf(j.permissions) ?? top
127
+ });
128
+ }
129
+ return out;
130
+ }
131
+ /** This function gives the key of a file of the template at a commit in a map of known files: `<path>@<sha>`. */
132
+ const fileKey = (file) => `${file.path}@${file.sha}`;
133
+ /**
134
+ * This function gives the gaps of calls over the files that `known` gives. A gap is a job of a called workflow, or of
135
+ * its nested calls, that asks for more than the cap of its call. A called file that is null in `known` is one gap
136
+ * with no missing permission (`unread`), so a gate holds. A called file that is not in `known` goes to `needs`. The walk
137
+ * reads no file, so a synchronous rule and an asynchronous reader use it the same way: read the needs, then walk again.
138
+ * Each walk goes one level of calls further, so the needs are empty after `CALL_DEPTH` reads at the most.
139
+ */
140
+ function walkGaps(calls, owner, known, template = "template") {
141
+ const out = [];
142
+ const needs = /* @__PURE__ */ new Map();
143
+ const nested = new RegExp(`^${escapeRegExp(owner)}/${escapeRegExp(template)}/(\\.github/workflows/[^@\\s]+)@([0-9a-f]{40})$`);
144
+ const walk = (call, cap, path, sha, chain, depth) => {
145
+ const key = fileKey({
146
+ path,
147
+ sha
148
+ });
149
+ if (!known.has(key)) {
150
+ needs.set(key, {
151
+ path,
152
+ sha
153
+ });
154
+ return;
155
+ }
156
+ const text = known.get(key) ?? null;
157
+ const parsed = text === null ? null : jobsOf(text);
158
+ if (!parsed) {
159
+ out.push({
160
+ job: call.job,
161
+ workflow: path,
162
+ sha,
163
+ calledJob: chain === "" ? null : chain,
164
+ missing: [],
165
+ unread: true
166
+ });
167
+ return;
168
+ }
169
+ const top = grantOf(parsed.doc.permissions);
170
+ for (const [id, j] of parsed.jobs) {
171
+ const name = chain === "" ? id : `${chain} > ${id}`;
172
+ const own = grantOf(j.permissions) ?? top;
173
+ if (own !== null) {
174
+ const missing = missingPermissions(cap, own);
175
+ if (missing.length > 0) out.push({
176
+ job: call.job,
177
+ workflow: call.path,
178
+ sha: call.sha,
179
+ calledJob: name,
180
+ missing,
181
+ unread: false
182
+ });
183
+ }
184
+ if (typeof j.uses !== "string" || depth >= CALL_DEPTH) continue;
185
+ const uses = j.uses.trim();
186
+ const local = uses.startsWith("./.github/workflows/") ? {
187
+ path: uses.slice(2),
188
+ sha
189
+ } : null;
190
+ const m = local ? null : nested.exec(uses);
191
+ const next = local ?? (m?.[1] && m[2] ? {
192
+ path: m[1],
193
+ sha: m[2]
194
+ } : null);
195
+ if (next) walk(call, own ?? cap, next.path, next.sha, name, depth + 1);
196
+ }
197
+ };
198
+ for (const call of calls) walk(call, call.grant, call.path, call.sha, "", 1);
199
+ return {
200
+ gaps: out,
201
+ needs: [...needs.values()]
202
+ };
203
+ }
204
+ /** This function gives the calls of a workflow text that a gap walk examines: each template call with a cap in the file. */
205
+ function checkedCalls(text, owner, template = "template") {
206
+ return templateCalls(text, owner, template).filter((call) => call.grant !== null);
207
+ }
208
+ /** This function walks the calls, and reads the needs of each walk with `read`, until the walk needs no file. */
209
+ async function readAndWalk(calls, owner, read, template) {
210
+ const known = /* @__PURE__ */ new Map();
211
+ for (;;) {
212
+ const { gaps, needs } = walkGaps(calls, owner, known, template);
213
+ if (needs.length === 0) return [...gaps];
214
+ const texts = await Promise.all(needs.map((file) => read(file.path, file.sha).catch(() => null)));
215
+ needs.forEach((file, i) => known.set(fileKey(file), texts[i] ?? null));
216
+ }
217
+ }
218
+ /**
219
+ * This function gives the gaps of one call: each job of the called workflow (and of its nested calls) whose permissions
220
+ * the cap of the call does not cover. A called file that `read` cannot give is one gap with no called job, so the gate holds.
221
+ */
222
+ async function callGaps(call, owner, read, template = "template") {
223
+ return readAndWalk([call], owner, read, template);
224
+ }
225
+ /** This function gives the gaps of each template call of a workflow text (refer to `checkedCalls`). */
226
+ async function workflowGaps(text, owner, read, template = "template") {
227
+ return readAndWalk(checkedCalls(text, owner, template), owner, read, template);
228
+ }
229
+ /** This function gives one line of a gap for the report: the caller job, the called workflow and each missing permission. */
230
+ function gapLine(path, g) {
231
+ const at = `\`${g.workflow}\` at \`${g.sha.slice(0, 7)}\``;
232
+ if (g.unread) {
233
+ const through = g.calledJob === null ? "" : ` (through its job \`${g.calledJob}\`)`;
234
+ return `\`${path}\` job \`${g.job}\` calls ${at}${through}, but its file cannot be read, so the permission check cannot examine it.`;
235
+ }
236
+ const list = g.missing.map((m) => `\`${m.scope}: ${m.asked}\` (the caller grants \`${m.granted}\`)`).join(", ");
237
+ return `\`${path}\` job \`${g.job}\` calls ${at}. Its job \`${g.calledJob}\` asks for ${list}. GitHub refuses such a run at its start. Add the permissions to the caller job, or remove them from the template.`;
238
+ }
239
+ export { PERMISSION_SCOPES, callGaps, checkedCalls, fileKey, gapLine, grantOf, missingPermissions, templateCalls, walkGaps, workflowGaps };
240
+
241
+ //# sourceMappingURL=permissions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"permissions.js","names":["parseYaml","escapeRe"],"sources":["../src/permissions.ts"],"sourcesContent":["/**\n * The permission gap of a call of a shared workflow. GitHub refuses a called workflow that asks for more permissions than\n * its caller job grants: the run stops at its start (`startup_failure`). On 2026-11-26, the pins of a release workflow\n * moved to a template commit whose `reusable-release-version.yml` asked for `actions: write`. Then each release run of that\n * repository failed. The release train finds such a gap before it pushes the pins, and the rule `call-permissions` finds\n * it in the checks of each repository. The two use the functions of this file (entry `@mark1russell7/conventions/permissions`).\n *\n * The rules of GitHub: the `permissions` of the caller job cap the called workflow. A caller job with no `permissions`\n * gets the `permissions` of its workflow. `write` covers `read`. `read-all` and `write-all` set each scope. In the called\n * workflow, a job with no `permissions` gets the `permissions` of its file. With none of the two, it asks for nothing more.\n */\nimport { parse as parseYaml } from \"yaml\";\nimport { escapeRegExp as escapeRe } from \"@mark1russell7/text\";\n\n/** The access of one permission scope. */\nexport type Access = \"none\" | \"read\" | \"write\";\n\n/** The permissions of a job: the access of each named scope, and the access of each other scope. */\nexport interface Grant {\n /** The access of each scope that the block does not name. `read-all` gives `read`, `write-all` gives `write`, a map gives `none`. */\n readonly base: Access;\n readonly scopes: Readonly<Record<string, Access>>;\n}\n\n/** One scope that a called job asks for and that its caller does not grant. */\nexport interface MissingPermission {\n readonly scope: string;\n readonly asked: Access;\n readonly granted: Access;\n}\n\n/** One gap of the permission gate: a caller job, the called workflow, and the scopes of one called job that its caller does not grant. */\nexport interface PermissionGap {\n /** The job of the caller workflow. */\n readonly job: string;\n /** The path of the called workflow in the template. */\n readonly workflow: string;\n /** The commit of the called workflow. */\n readonly sha: string;\n /** The job of the called workflow that asks, with the jobs of the nested calls before it (`a > b`). Null for the file of the caller job. */\n readonly calledJob: string | null;\n readonly missing: readonly MissingPermission[];\n /** This value is true when the train cannot read the called file (`workflow` at `sha`). Then the gate cannot check it, so it holds. */\n readonly unread: boolean;\n}\n\n/** This function reads a file of the template at a commit, or gives null. */\nexport type ReadAt = (path: string, sha: string) => Promise<string | null>;\n\n/** The scopes of the `GITHUB_TOKEN`. The report of a `write-all` ask names each of them. */\nexport const PERMISSION_SCOPES: readonly string[] = [\n \"actions\",\n \"attestations\",\n \"checks\",\n \"contents\",\n \"deployments\",\n \"discussions\",\n \"id-token\",\n \"issues\",\n \"models\",\n \"packages\",\n \"pages\",\n \"pull-requests\",\n \"repository-projects\",\n \"security-events\",\n \"statuses\",\n];\n\n/** The most levels of nested called workflows that the gate follows. GitHub lets a run have four levels. */\nconst CALL_DEPTH = 4;\n\nconst RANK: Readonly<Record<Access, number>> = { none: 0, read: 1, write: 2 };\n\nfunction access(value: unknown): Access {\n return value === \"write\" || value === \"read\" ? value : \"none\";\n}\n\n/**\n * This function reads a `permissions` value of a workflow or of a job. It gives null when the value is absent: then the\n * job inherits. `{}` gives no access. An unknown text gives no access.\n */\nexport function grantOf(value: unknown): Grant | null {\n if (value === undefined || value === null) return null;\n if (value === \"write-all\") return { base: \"write\", scopes: {} };\n if (value === \"read-all\") return { base: \"read\", scopes: {} };\n if (typeof value !== \"object\" || Array.isArray(value)) return { base: \"none\", scopes: {} };\n const scopes: Record<string, Access> = {};\n for (const [k, v] of Object.entries(value as Record<string, unknown>)) scopes[k] = access(v);\n return { base: \"none\", scopes };\n}\n\nfunction level(g: Grant, scope: string): Access {\n return g.scopes[scope] ?? g.base;\n}\n\n/**\n * This function gives each scope that `asked` asks for and that `granted` does not cover, in the order of the scope names.\n * `write` covers `read`. An empty list is a pass.\n */\nexport function missingPermissions(granted: Grant, asked: Grant): MissingPermission[] {\n const names = new Set([...Object.keys(asked.scopes), ...Object.keys(granted.scopes)]);\n if (asked.base !== \"none\") for (const s of PERMISSION_SCOPES) names.add(s);\n const out: MissingPermission[] = [];\n for (const scope of [...names].sort()) {\n const a = level(asked, scope);\n const g = level(granted, scope);\n if (RANK[a] > RANK[g]) out.push({ scope, asked: a, granted: g });\n }\n return out;\n}\n\ninterface WorkflowDoc {\n permissions?: unknown;\n jobs?: unknown;\n}\n\ninterface JobDoc {\n permissions?: unknown;\n uses?: unknown;\n}\n\nfunction jobsOf(text: string): { doc: WorkflowDoc; jobs: [string, JobDoc][] } | null {\n let doc: unknown;\n try {\n doc = parseYaml(text);\n } catch {\n return null;\n }\n if (doc === null || typeof doc !== \"object\") return null;\n const jobs = (doc as WorkflowDoc).jobs;\n if (jobs === null || typeof jobs !== \"object\") return { doc: doc as WorkflowDoc, jobs: [] };\n return { doc: doc as WorkflowDoc, jobs: Object.entries(jobs as Record<string, unknown>).map(([id, j]) => [id, (j ?? {}) as JobDoc]) };\n}\n\n/** One job of a caller workflow that calls a shared workflow of the template. */\nexport interface TemplateCall {\n readonly job: string;\n readonly path: string;\n readonly sha: string;\n /** The cap of the call: the `permissions` of the job, else of the workflow. Null when the file sets none: the cap is the default of the repository. */\n readonly grant: Grant | null;\n}\n\n/**\n * This function gives each job of a workflow text that calls a shared workflow of the template at a commit. A ref of a\n * composite action (`.github/actions/...`) has no permissions, so it is not in the list.\n */\nexport function templateCalls(text: string, owner: string, template = \"template\"): TemplateCall[] {\n const parsed = jobsOf(text);\n if (!parsed) return [];\n const re = new RegExp(`^${escapeRe(owner)}/${escapeRe(template)}/([^@\\\\s]+)@([0-9a-f]{40})$`);\n const top = grantOf(parsed.doc.permissions);\n const out: TemplateCall[] = [];\n for (const [job, j] of parsed.jobs) {\n if (typeof j.uses !== \"string\") continue;\n const m = re.exec(j.uses.trim());\n if (!m?.[1] || !m[2] || m[1].startsWith(\".github/actions/\")) continue;\n out.push({ job, path: m[1], sha: m[2], grant: grantOf(j.permissions) ?? top });\n }\n return out;\n}\n\n/** A file of the template at a commit. */\nexport interface TemplateFile {\n readonly path: string;\n readonly sha: string;\n}\n\n/** This function gives the key of a file of the template at a commit in a map of known files: `<path>@<sha>`. */\nexport const fileKey = (file: TemplateFile): string => `${file.path}@${file.sha}`;\n\n/**\n * The files of the template that a walk knows: the text of each key of `fileKey`, or null when the file cannot be read.\n * A key that is not in the map is a file that the walk needs.\n */\nexport type KnownFiles = ReadonlyMap<string, string | null>;\n\n/** The result of a walk over the known files: the gaps, and the files that the walk needs and does not know. */\nexport interface GapWalk {\n readonly gaps: readonly PermissionGap[];\n /** The files to read before the next walk. When it is empty, `gaps` is the full result. */\n readonly needs: readonly TemplateFile[];\n}\n\n/**\n * This function gives the gaps of calls over the files that `known` gives. A gap is a job of a called workflow, or of\n * its nested calls, that asks for more than the cap of its call. A called file that is null in `known` is one gap\n * with no missing permission (`unread`), so a gate holds. A called file that is not in `known` goes to `needs`. The walk\n * reads no file, so a synchronous rule and an asynchronous reader use it the same way: read the needs, then walk again.\n * Each walk goes one level of calls further, so the needs are empty after `CALL_DEPTH` reads at the most.\n */\nexport function walkGaps(calls: readonly (TemplateCall & { readonly grant: Grant })[], owner: string, known: KnownFiles, template = \"template\"): GapWalk {\n const out: PermissionGap[] = [];\n const needs = new Map<string, TemplateFile>();\n const nested = new RegExp(`^${escapeRe(owner)}/${escapeRe(template)}/(\\\\.github/workflows/[^@\\\\s]+)@([0-9a-f]{40})$`);\n const walk = (call: TemplateCall, cap: Grant, path: string, sha: string, chain: string, depth: number): void => {\n const key = fileKey({ path, sha });\n if (!known.has(key)) {\n needs.set(key, { path, sha });\n return;\n }\n const text = known.get(key) ?? null;\n const parsed = text === null ? null : jobsOf(text);\n if (!parsed) {\n out.push({ job: call.job, workflow: path, sha, calledJob: chain === \"\" ? null : chain, missing: [], unread: true });\n return;\n }\n const top = grantOf(parsed.doc.permissions);\n for (const [id, j] of parsed.jobs) {\n const name = chain === \"\" ? id : `${chain} > ${id}`;\n const own = grantOf(j.permissions) ?? top;\n if (own !== null) {\n const missing = missingPermissions(cap, own);\n if (missing.length > 0) out.push({ job: call.job, workflow: call.path, sha: call.sha, calledJob: name, missing, unread: false });\n }\n if (typeof j.uses !== \"string\" || depth >= CALL_DEPTH) continue;\n const uses = j.uses.trim();\n // A local ref of a called workflow names a file of the same repository and commit.\n const local = uses.startsWith(\"./.github/workflows/\") ? { path: uses.slice(2), sha } : null;\n const m = local ? null : nested.exec(uses);\n const next = local ?? (m?.[1] && m[2] ? { path: m[1], sha: m[2] } : null);\n // The own permissions of the job cap its nested call. A job with none passes the cap of its caller.\n if (next) walk(call, own ?? cap, next.path, next.sha, name, depth + 1);\n }\n };\n for (const call of calls) walk(call, call.grant, call.path, call.sha, \"\", 1);\n return { gaps: out, needs: [...needs.values()] };\n}\n\n/** This function gives the calls of a workflow text that a gap walk examines: each template call with a cap in the file. */\nexport function checkedCalls(text: string, owner: string, template = \"template\"): (TemplateCall & { readonly grant: Grant })[] {\n // A call whose cap is the default of the repository (no `permissions` in the job or in the workflow) is not examined,\n // because the default is not known.\n return templateCalls(text, owner, template).filter((call): call is TemplateCall & { readonly grant: Grant } => call.grant !== null);\n}\n\n/** This function walks the calls, and reads the needs of each walk with `read`, until the walk needs no file. */\nasync function readAndWalk(calls: readonly (TemplateCall & { readonly grant: Grant })[], owner: string, read: ReadAt, template: string): Promise<PermissionGap[]> {\n const known = new Map<string, string | null>();\n for (;;) {\n const { gaps, needs } = walkGaps(calls, owner, known, template);\n if (needs.length === 0) return [...gaps];\n const texts = await Promise.all(needs.map((file) => read(file.path, file.sha).catch(() => null)));\n needs.forEach((file, i) => known.set(fileKey(file), texts[i] ?? null));\n }\n}\n\n/**\n * This function gives the gaps of one call: each job of the called workflow (and of its nested calls) whose permissions\n * the cap of the call does not cover. A called file that `read` cannot give is one gap with no called job, so the gate holds.\n */\nexport async function callGaps(call: TemplateCall & { readonly grant: Grant }, owner: string, read: ReadAt, template = \"template\"): Promise<PermissionGap[]> {\n return readAndWalk([call], owner, read, template);\n}\n\n/** This function gives the gaps of each template call of a workflow text (refer to `checkedCalls`). */\nexport async function workflowGaps(text: string, owner: string, read: ReadAt, template = \"template\"): Promise<PermissionGap[]> {\n return readAndWalk(checkedCalls(text, owner, template), owner, read, template);\n}\n\n/** This function gives one line of a gap for the report: the caller job, the called workflow and each missing permission. */\nexport function gapLine(path: string, g: PermissionGap): string {\n const at = `\\`${g.workflow}\\` at \\`${g.sha.slice(0, 7)}\\``;\n if (g.unread) {\n const through = g.calledJob === null ? \"\" : ` (through its job \\`${g.calledJob}\\`)`;\n return `\\`${path}\\` job \\`${g.job}\\` calls ${at}${through}, but its file cannot be read, so the permission check cannot examine it.`;\n }\n const list = g.missing.map((m) => `\\`${m.scope}: ${m.asked}\\` (the caller grants \\`${m.granted}\\`)`).join(\", \");\n return `\\`${path}\\` job \\`${g.job}\\` calls ${at}. Its job \\`${g.calledJob}\\` asks for ${list}. GitHub refuses such a run at its start. Add the permissions to the caller job, or remove them from the template.`;\n}\n"],"mappings":";;;;;;;;;;;;;;;AAkDA,MAAa,oBAAuC;CAClD;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;;AAGA,MAAM,aAAa;AAEnB,MAAM,OAAyC;CAAE,MAAM;CAAG,MAAM;CAAG,OAAO;AAAE;AAE5E,SAAS,OAAO,OAAwB;CACtC,OAAO,UAAU,WAAW,UAAU,SAAS,QAAQ;AACzD;;;;;AAMA,SAAgB,QAAQ,OAA8B;CACpD,IAAI,UAAU,KAAA,KAAa,UAAU,MAAM,OAAO;CAClD,IAAI,UAAU,aAAa,OAAO;EAAE,MAAM;EAAS,QAAQ,CAAC;CAAE;CAC9D,IAAI,UAAU,YAAY,OAAO;EAAE,MAAM;EAAQ,QAAQ,CAAC;CAAE;CAC5D,IAAI,OAAO,UAAU,YAAY,MAAM,QAAQ,KAAK,GAAG,OAAO;EAAE,MAAM;EAAQ,QAAQ,CAAC;CAAE;CACzF,MAAM,SAAiC,CAAC;CACxC,KAAK,MAAM,CAAC,GAAG,MAAM,OAAO,QAAQ,KAAgC,GAAG,OAAO,KAAK,OAAO,CAAC;CAC3F,OAAO;EAAE,MAAM;EAAQ;CAAO;AAChC;AAEA,SAAS,MAAM,GAAU,OAAuB;CAC9C,OAAO,EAAE,OAAO,UAAU,EAAE;AAC9B;;;;;AAMA,SAAgB,mBAAmB,SAAgB,OAAmC;CACpF,MAAM,wBAAQ,IAAI,IAAI,CAAC,GAAG,OAAO,KAAK,MAAM,MAAM,GAAG,GAAG,OAAO,KAAK,QAAQ,MAAM,CAAC,CAAC;CACpF,IA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