@qijenchen/governance 0.1.0-beta.144 → 0.1.0-beta.146

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.
@@ -4,8 +4,8 @@
4
4
  "kind": "provider-lifecycle-ledger",
5
5
  "immutableHead": {
6
6
  "providerInventorySha256": "86e9d0668cb54ad1bf05c36e78b4aa80417d5f468c929dd3ddcf69c1afbf32e4",
7
- "releaseVersion": "0.1.0-beta.143",
8
- "snapshotSha256": "308a306e6c2914e54b750cd5c63f3e8bfd647e5655aaebb8446b8ce4ad6c257e"
7
+ "releaseVersion": "0.1.0-beta.145",
8
+ "snapshotSha256": "fbd0fb8a22296a8646f99ee7edeaba1a76455b8aba591cfb8ec4ccf859f4af9e"
9
9
  },
10
10
  "snapshots": [
11
11
  {
@@ -3703,6 +3703,160 @@
3703
3703
  }
3704
3704
  ],
3705
3705
  "retiredProviders": []
3706
+ },
3707
+ {
3708
+ "releaseVersion": "0.1.0-beta.145",
3709
+ "previousSnapshotSha256": "073ca2de0f49bb62353b6549fe5e3a8d3450505fae46cfe8d328c2ff9315726b",
3710
+ "providers": [
3711
+ {
3712
+ "id": "claude",
3713
+ "discovery": {
3714
+ "providerRootNames": [
3715
+ ".claude"
3716
+ ],
3717
+ "instructionNames": [
3718
+ "CLAUDE.md"
3719
+ ],
3720
+ "instructionOverrideNames": [
3721
+ "CLAUDE.local.md",
3722
+ "CLAUDE.override.md"
3723
+ ],
3724
+ "configPaths": [
3725
+ ".claude/settings.json",
3726
+ ".claude/settings.local.json",
3727
+ ".mcp.json"
3728
+ ],
3729
+ "pluginRootNames": [
3730
+ ".claude-plugin"
3731
+ ]
3732
+ },
3733
+ "surfaces": [
3734
+ {
3735
+ "path": ".claude/settings.json",
3736
+ "kind": "file"
3737
+ },
3738
+ {
3739
+ "path": ".claude/skills",
3740
+ "kind": "tree"
3741
+ },
3742
+ {
3743
+ "path": "CLAUDE.md",
3744
+ "kind": "file"
3745
+ }
3746
+ ]
3747
+ },
3748
+ {
3749
+ "id": "codex",
3750
+ "discovery": {
3751
+ "providerRootNames": [
3752
+ ".agents",
3753
+ ".codex"
3754
+ ],
3755
+ "instructionNames": [
3756
+ "AGENTS.md"
3757
+ ],
3758
+ "instructionOverrideNames": [
3759
+ "AGENTS.local.md",
3760
+ "AGENTS.override.md"
3761
+ ],
3762
+ "configPaths": [
3763
+ ".codex/config.toml",
3764
+ ".codex/hooks.json"
3765
+ ],
3766
+ "pluginRootNames": [
3767
+ ".codex-plugin"
3768
+ ]
3769
+ },
3770
+ "surfaces": [
3771
+ {
3772
+ "path": ".agents/skills",
3773
+ "kind": "tree"
3774
+ },
3775
+ {
3776
+ "path": ".codex/hooks.json",
3777
+ "kind": "file"
3778
+ }
3779
+ ]
3780
+ }
3781
+ ],
3782
+ "retiredProviders": []
3783
+ },
3784
+ {
3785
+ "releaseVersion": "0.1.0-beta.146",
3786
+ "previousSnapshotSha256": "fbd0fb8a22296a8646f99ee7edeaba1a76455b8aba591cfb8ec4ccf859f4af9e",
3787
+ "providers": [
3788
+ {
3789
+ "id": "claude",
3790
+ "discovery": {
3791
+ "providerRootNames": [
3792
+ ".claude"
3793
+ ],
3794
+ "instructionNames": [
3795
+ "CLAUDE.md"
3796
+ ],
3797
+ "instructionOverrideNames": [
3798
+ "CLAUDE.local.md",
3799
+ "CLAUDE.override.md"
3800
+ ],
3801
+ "configPaths": [
3802
+ ".claude/settings.json",
3803
+ ".claude/settings.local.json",
3804
+ ".mcp.json"
3805
+ ],
3806
+ "pluginRootNames": [
3807
+ ".claude-plugin"
3808
+ ]
3809
+ },
3810
+ "surfaces": [
3811
+ {
3812
+ "path": ".claude/settings.json",
3813
+ "kind": "file"
3814
+ },
3815
+ {
3816
+ "path": ".claude/skills",
3817
+ "kind": "tree"
3818
+ },
3819
+ {
3820
+ "path": "CLAUDE.md",
3821
+ "kind": "file"
3822
+ }
3823
+ ]
3824
+ },
3825
+ {
3826
+ "id": "codex",
3827
+ "discovery": {
3828
+ "providerRootNames": [
3829
+ ".agents",
3830
+ ".codex"
3831
+ ],
3832
+ "instructionNames": [
3833
+ "AGENTS.md"
3834
+ ],
3835
+ "instructionOverrideNames": [
3836
+ "AGENTS.local.md",
3837
+ "AGENTS.override.md"
3838
+ ],
3839
+ "configPaths": [
3840
+ ".codex/config.toml",
3841
+ ".codex/hooks.json"
3842
+ ],
3843
+ "pluginRootNames": [
3844
+ ".codex-plugin"
3845
+ ]
3846
+ },
3847
+ "surfaces": [
3848
+ {
3849
+ "path": ".agents/skills",
3850
+ "kind": "tree"
3851
+ },
3852
+ {
3853
+ "path": ".codex/hooks.json",
3854
+ "kind": "file"
3855
+ }
3856
+ ]
3857
+ }
3858
+ ],
3859
+ "retiredProviders": []
3706
3860
  }
3707
3861
  ]
3708
3862
  }
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/ajenchen/design-system.git"
6
6
  },
7
- "version": "0.1.0-beta.144",
7
+ "version": "0.1.0-beta.146",
8
8
  "description": "Provider-neutral DS-author control plane for deterministic snapshots, adapters, checks, and evidence manifests.",
9
9
  "type": "module",
10
10
  "license": "UNLICENSED",
@@ -53,6 +53,36 @@ const CLOSED_GIT_ENVIRONMENT = Object.freeze({
53
53
  PATH: '/usr/bin:/bin',
54
54
  XDG_CONFIG_HOME: '/dev/null',
55
55
  })
56
+
57
+ // 2026-09-23:上面那張表把 HOME 與 global/system config 全遮掉(hermetic),於是 actions/checkout 為 runner 寫進 global 的
58
+ // safe.directory 也一起被遮 —— 在 Playwright 容器裡(執行者是 root,簽出目錄屬於 uid 1001)`git ls-files` 直接
59
+ // exit 128「dubious ownership」,Visual Regression run #289 死在第一步安裝依賴。修法不是放寬成 `safe.directory=*`:
60
+ // 呼叫端指名 cwd 本身就是「在這個 repo 跑」的信任決定,所以只把 cwd、以及跟 cwd **同一個擁有者**的祖先目錄列為
61
+ // safe.directory(git 會往上找 .git;擁有者一換就停,CVE-2022-24765 要擋的「別人塞在上層的 .git」仍然擋得住)。
62
+ // 走 GIT_CONFIG_{COUNT,KEY,VALUE}(command scope 屬 protected config,safe.directory 只認 system / global / command
63
+ // 三層),不走 -c —— 呼叫端注入 -c 仍照舊被拒。兩面對照組:scripts/closed-git-foreign-owner-invariant.mjs
64
+ //(ci.yml `container-closed-git` job 用與 Visual Regression 相同的容器映像,每支 PR 跑)。
65
+ export function closedGitSafeDirectories(cwd, { stat = statSync } = {}) {
66
+ const owner = stat(cwd).uid
67
+ const directories = [cwd]
68
+ for (let current = cwd; ;) {
69
+ const parent = dirname(current)
70
+ if (parent === current || stat(parent).uid !== owner) break
71
+ directories.push(parent)
72
+ current = parent
73
+ }
74
+ return directories
75
+ }
76
+
77
+ function closedGitSafeDirectoryEnvironment(cwd) {
78
+ const directories = closedGitSafeDirectories(cwd)
79
+ const environment = { GIT_CONFIG_COUNT: String(directories.length) }
80
+ directories.forEach((directory, index) => {
81
+ environment[`GIT_CONFIG_KEY_${index}`] = 'safe.directory'
82
+ environment[`GIT_CONFIG_VALUE_${index}`] = directory
83
+ })
84
+ return environment
85
+ }
56
86
  const CLOSED_GH_CANDIDATES = Object.freeze({
57
87
  darwin: ['/opt/homebrew/bin/gh', '/usr/local/bin/gh', '/usr/bin/gh'],
58
88
  linux: ['/usr/bin/gh', '/usr/local/bin/gh', '/home/linuxbrew/.linuxbrew/bin/gh'],
@@ -487,6 +517,7 @@ export function runClosedGit(args, {
487
517
  encoding: output === 'capture' ? 'utf8' : (output === 'buffer' ? null : undefined),
488
518
  env: {
489
519
  ...CLOSED_GIT_ENVIRONMENT,
520
+ ...closedGitSafeDirectoryEnvironment(cwd),
490
521
  ...closedGitIdentityEnvironment(gitIdentity),
491
522
  },
492
523
  input,