Commit 1ac3201
authored
📖 [Docs]: A dependency pinning standard, and its PowerShell version-constraint implementation (#26)
The coding standards now include a **Dependencies** standard: how to pin
a dependency and keep it current, across every ecosystem. It lays out
the locking spectrum — from identity pins through patch, minor, and
major to floating latest — and the balance every pin has to strike:
loose enough to take security patches and fixes quickly, tight enough
that unvetted or compromised code never lands automatically. PowerShell
version constraints and GitHub Actions SHA pinning are its concrete
implementations.
## New: the Dependencies standard
`Coding Standards → Dependencies` separates a pin into two axes —
**identity** (which artifact, proven: a module `GUID`, an Action SHA, an
image digest) and **version tightness** (exact through latest) — and
walks the spectrum with the tradeoff at each step: tighter is safer but
slower to update; looser is faster but less vetted and not reproducible.
It states the resolution the ecosystem follows — pin for integrity and
automate the movement — and answers the practical questions: which
update tracks exist, who each is for, and that a repository does not
need all of them. A library declares a wide compatibility floor so it
does not over-constrain its consumers; an application pins tight for
reproducibility and lets the updater move it. It links to Security →
Supply chain (the why) and the Dependency Updates capability (the
automation).
## New: PowerShell version constraints
`Coding Standards → PowerShell → Version Constraints` is the PowerShell
implementation. Express every constraint as a NuGet version range in
explicit brackets; a new locking-spectrum table maps identity, exact,
patch, minor, major, and latest to NuGet ranges and `#Requires` keys.
The syntax applies directly on PSResourceGet
(`Install`/`Find`/`Save`/`Update-PSResource -Version`,
`RequiredResourceFile`) and .NET `PackageReference`, maps to
`ModuleVersion` / `MaximumVersion` / `RequiredVersion` for `#Requires`
and manifests (which cannot take a NuGet string), and flags the
PSResourceGet trap where a bare version is treated as the exact version,
not a minimum.
## Changed: GitHub Actions
The "Pin every action to a full commit SHA" section now names SHA
pinning as the GitHub Actions expression of the Dependencies standard —
an identity pin, kept current by the updater.
## Technical Details
- New `src/docs/Coding-Standards/Dependencies.md` (baseline tier, placed
after Security); reframed
`src/docs/Coding-Standards/PowerShell/Version-Constraints.md` (adds the
locking-spectrum table, folds the old intent→ModuleSpecification table
into it); one cross-link added to
`src/docs/Coding-Standards/GitHub-Actions.md`; registered in
`src/zensical.toml` nav and the generated index tables.
- Complements the in-flight `#Requires` PRs #22 (major-version bounding)
and #23 (the `#Requires -Modules` reference); the spectrum's major lock
(`ModuleVersion='6.0.0'; MaximumVersion='6.*'`) matches them.
- Validated locally: `Update-DocumentationIndex.ps1 -Check`,
`Test-DocumentationLink.ps1`, and markdownlint (repo config) all pass;
front matter parses as YAML.
<details>
<summary>Related issues</summary>
No linked issue — created on direct request. The Dependencies standard
is the "separate doc" for the broader dependency/supply-chain
update-management concept; open a tracking issue if it should be
tracked.
</details>1 parent fcf92a1 commit 1ac3201
6 files changed
Lines changed: 182 additions & 1 deletion
File tree
- src
- docs/Coding-Standards
- PowerShell
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
20 | 22 | | |
21 | 23 | | |
22 | 24 | | |
| |||
Lines changed: 103 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
0 commit comments