From 715e7c4477aa5025e0ef4920047e72170c113fb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A9ril=20Pilon?= Date: Wed, 28 Oct 2026 08:48:38 +0000 Subject: [PATCH 1/5] PE-1695: Align CI and Dependabot with team-plain/github-actions --- .gitattributes | 1 + .github/dependabot.yml | 21 +++++---- .github/workflows/ci.yml | 11 ++++- .github/workflows/codeql.yml | 3 ++ .github/workflows/release.yml | 13 +++--- .../workflows/scheduled-node-version-bump.yml | 5 ++- package.json | 2 +- pnpm-lock.yaml | 44 ++++++++----------- 8 files changed, 57 insertions(+), 43 deletions(-) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..6340d8e --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +pnpm-lock.yaml linguist-generated=true diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 4796e26..7264a1a 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -4,13 +4,14 @@ version: 2 updates: - package-ecosystem: github-actions directory: "/" + # A week of soak time before we pick up a release, so a compromised or + # yanked version has a chance to be caught upstream first. + cooldown: + default-days: 7 schedule: interval: weekly time: "10:30" timezone: "Europe/London" - # A week gives compromised action releases time to be discovered before adoption. - cooldown: - default-days: 7 groups: gha-deps: patterns: @@ -18,14 +19,19 @@ updates: - package-ecosystem: npm directory: "/" + # Must stay at or above minimumReleaseAge in pnpm-workspace.yaml (7 days), + # or pnpm rejects whatever Dependabot proposes. + cooldown: + default-days: 7 schedule: interval: weekly time: "10:30" timezone: "Europe/London" + # Majors land one per PR, so the default of 5 stalls the queue. + open-pull-requests-limit: 15 + # This is a published package, so Dependabot's default would widen ranges + # instead of raising them. versioning-strategy: increase - # Must be at least minimumReleaseAge in pnpm-workspace.yaml. - cooldown: - default-days: 7 groups: npm-patch: applies-to: version-updates @@ -50,5 +56,4 @@ updates: ignore: # Tracks the minimum supported runtime in engines.node, not latest. - dependency-name: "@types/node" - update-types: - - "version-update:semver-major" + update-types: ["version-update:semver-major"] diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 92e8cfe..66ecfcb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,13 +6,16 @@ on: push: branches: [main] -permissions: - contents: read +permissions: {} jobs: lint: name: Lint + # GitHub-hosted, not depot: this repo is public, so fork PRs must not run on paid runners. runs-on: ubuntu-latest + timeout-minutes: 15 + permissions: + contents: read steps: - name: Check out the repository uses: actions/checkout@v7 @@ -46,7 +49,11 @@ jobs: test: name: Test (Node ${{ matrix.node }}) + # GitHub-hosted, not depot: this repo is public, so fork PRs must not run on paid runners. runs-on: ubuntu-latest + timeout-minutes: 15 + permissions: + contents: read strategy: fail-fast: false matrix: diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index e66d30c..0aeb9b0 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -13,9 +13,12 @@ concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: ${{ github.event_name == 'pull_request' }} +permissions: {} + jobs: analyze: name: Analyze (${{ matrix.language }}) + # GitHub-hosted, not depot: this repo is public, so fork PRs must not run on paid runners. runs-on: ubuntu-latest timeout-minutes: 30 permissions: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0274e11..2cb9f57 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,16 +7,19 @@ on: concurrency: ${{ github.workflow }}-${{ github.ref }} -permissions: - contents: write - pull-requests: write - # npm trusted publishing: pnpm exchanges the GitHub OIDC token for a short lived publish token. - id-token: write +permissions: {} jobs: release: name: Release + # npm trusted publishing only accepts OIDC tokens from GitHub-hosted runners. runs-on: ubuntu-latest + timeout-minutes: 15 + permissions: + contents: write + pull-requests: write + # npm trusted publishing: pnpm exchanges the GitHub OIDC token for a short lived publish token. + id-token: write steps: - name: Check out the repository uses: actions/checkout@v7 diff --git a/.github/workflows/scheduled-node-version-bump.yml b/.github/workflows/scheduled-node-version-bump.yml index 0b40c95..53e9bba 100644 --- a/.github/workflows/scheduled-node-version-bump.yml +++ b/.github/workflows/scheduled-node-version-bump.yml @@ -5,14 +5,15 @@ on: - cron: "0 6,18 * * *" workflow_dispatch: -permissions: - contents: read +permissions: {} jobs: bump: name: Bump Node.js runs-on: ubuntu-slim timeout-minutes: 5 + permissions: + contents: read steps: - id: app uses: actions/create-github-app-token@v3 diff --git a/package.json b/package.json index b72568e..ba464a9 100644 --- a/package.json +++ b/package.json @@ -42,5 +42,5 @@ "dependencies": { "@team-plain/graphql": "^3.2.0" }, - "packageManager": "pnpm@12.8.2+sha512.a5941679663d952c5f0ecc38ba98af98b4dc01b95780354f6894f2f873973cef2f7e2989d7db3ee5393938ae21f62fe06bcdf685d475ddad829a62095d2b8b11" + "packageManager": "pnpm@12.12.1+sha512.b7f98934c0b1f29a65f5da52f2d7f994e7faad573ffdddea1497fb4dcb5aec051590ee7c7d95a38172b4bfae103a5b83edf2ee866e11731c2cafa96063610ac5" } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 987429c..af74bc7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -496,10 +496,6 @@ packages: '@yuku-toolchain/types@0.19.0': resolution: {integrity: sha512-tFkNbsP4WXX9UMUC5syJGdK9dPMLK0PPaIuXCcCYH75sZ8MrebfBZ2XvCILRTw8AgLivSSCfDa4R67iYBDa4Kg==} - cac@7.0.0: - resolution: {integrity: sha512-tixWYgm5ZoOD+3g6UTea91eow5z6AAHaho3g0V9CNSNb45gM8SmflpAc+GRd1InC4AqN/07Unrgp56Y94N9hJQ==} - engines: {node: '>=20.19.0'} - cac@7.1.0: resolution: {integrity: sha512-LMDU/U2yA4IPIY8KT0NsNPWEYZvAMkbgyspxJ6btJaYV+WMDOHAZCmB0lsTObiHaRS1V/ztKAl7+TSkTqXyeoA==} engines: {node: '>=20.19.0'} @@ -549,8 +545,8 @@ packages: hookable@6.1.2: resolution: {integrity: sha512-+abwxtiEA52GCVIsQqut3S/uKTbUwYIp4Pe/vv+6py5XiXBCqMZHg6pA6Y5qhgLSEys0/cYuPbO0z1QFj5ZCmg==} - human-id@4.2.1: - resolution: {integrity: sha512-zPGsiS+dWoTZtZ4AtpA9Y+BdSFSNWvnouNlWNoUFyAM6xHOHmdCvqO3k8AIbdamCOv4gUFUVNPf6rJFfc4UiJw==} + human-id@4.2.2: + resolution: {integrity: sha512-Z+8unD6em/MJwyrkWQ2M3wygRGI1+MztbutiNwk1DCuEPXOZRWGjtcMPZYP1exY9iNZMhd7ZOSMQSo9WYtiQRw==} hasBin: true import-meta-resolve@4.2.0: @@ -569,8 +565,8 @@ packages: launch-editor@2.14.2: resolution: {integrity: sha512-NHJEb30MGBCkmZXLZwz25t37QR4aY03ZzPYUJXOJaOa92uWwExI9SBQUuIznBYc1xkD7cJNGX7oc3Nl3sq2kQQ==} - lilconfig@3.1.3: - resolution: {integrity: sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==} + lilconfig@3.1.4: + resolution: {integrity: sha512-zJZyBmQhArDRefuWTypZxwDpFDIYmrj8ypSBvwGD5P13Y95s6DjzKgu4DVdGbeQa5PDEsAOCAPNk4X+QOR006w==} engines: {node: '>=14'} mri@1.2.0: @@ -584,8 +580,8 @@ packages: resolution: {integrity: sha512-5vvB5+W7ePv+p3uqxi+RcW1XAzLW0/hxt3/4X4Lc4qHudzOhmBiBwOY6DRob4WnanAEGvNcLjF+KNOufrUoEQw==} engines: {node: '>=12.20.0'} - package-manager-detector@1.8.0: - resolution: {integrity: sha512-yQA4H19AmPEoMUeavPMDIe1higySl/gH/yaQrkT/s07Qp+7pp2hYz30N3z2l5BkjVkF9Ow6o0wjJamm2y7Sn0A==} + package-manager-detector@1.9.0: + resolution: {integrity: sha512-zAMfbta9nPA8AKkA4WdmNAT8R8s6Dk0/xwPsqNnRidMFcLo1YkLuPDTgs2f64XdzS8vbLNnoJ+uUIkgbz7oRHA==} picocolors@1.1.1: resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} @@ -641,8 +637,8 @@ packages: engines: {node: '>=10'} hasBin: true - shell-quote@1.11.0: - resolution: {integrity: sha512-JdxDPD0DBTyu08pq0kPC0xSNet/qsU07qT6IsX1AS8oO2ICNRY4ldNa8OAI6PuwAH8tG3lxEhbqmyp4Dw4036g==} + shell-quote@1.12.0: + resolution: {integrity: sha512-PcByqNyT/38F2kDNi006HAMRJaULuBzq/FOsw3qdZvX/GA9W/jamDaRskgHjubHiftXK5sIFxLNkvrXUwcof6Q==} engines: {node: '>= 0.4'} sisteransi@1.0.5: @@ -812,10 +808,10 @@ snapshots: '@clack/prompts': 1.8.1 '@manypkg/get-packages': 3.1.0 '@pnpm/deps.graph-sequencer': 1100.0.1 - cac: 7.0.0 + cac: 7.1.0 import-meta-resolve: 4.2.0 launch-editor: 2.14.2 - package-manager-detector: 1.8.0 + package-manager-detector: 1.9.0 semver: 7.8.5 tinyexec: 1.3.1 @@ -831,7 +827,7 @@ snapshots: '@changesets/format@0.1.2': dependencies: - package-manager-detector: 1.8.0 + package-manager-detector: 1.9.0 tinyexec: 1.3.1 '@changesets/get-dependents-graph@3.0.0': @@ -874,7 +870,7 @@ snapshots: dependencies: '@changesets/format': 0.1.2 '@changesets/types': 7.0.0 - human-id: 4.2.1 + human-id: 4.2.2 '@clack/core@1.5.1': dependencies: @@ -1077,8 +1073,6 @@ snapshots: '@yuku-toolchain/types@0.19.0': {} - cac@7.0.0: {} - cac@7.1.0: {} defu@6.1.7: {} @@ -1109,7 +1103,7 @@ snapshots: hookable@6.1.2: {} - human-id@4.2.1: {} + human-id@4.2.2: {} import-meta-resolve@4.2.0: {} @@ -1122,9 +1116,9 @@ snapshots: launch-editor@2.14.2: dependencies: picocolors: 1.1.1 - shell-quote: 1.11.0 + shell-quote: 1.12.0 - lilconfig@3.1.3: {} + lilconfig@3.1.4: {} mri@1.2.0: {} @@ -1134,7 +1128,7 @@ snapshots: obug@3.0.0: {} - package-manager-detector@1.8.0: {} + package-manager-detector@1.9.0: {} picocolors@1.1.1: {} @@ -1143,7 +1137,7 @@ snapshots: publint@0.3.25: dependencies: '@publint/pack': 0.1.7 - package-manager-detector: 1.8.0 + package-manager-detector: 1.9.0 picocolors: 1.1.1 sade: 1.8.1 @@ -1192,13 +1186,13 @@ snapshots: semver@7.8.5: {} - shell-quote@1.11.0: {} + shell-quote@1.12.0: {} sisteransi@1.0.5: {} size-limit@14.2.0: dependencies: - lilconfig: 3.1.3 + lilconfig: 3.1.4 nanospinner: 1.2.2 tinyexec@1.3.1: {} From 5d16224bc0da98ecfdf0fd283ff4d5f36cba7262 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A9ril=20Pilon?= Date: Wed, 28 Oct 2026 08:51:05 +0000 Subject: [PATCH 2/5] Remove runner, cooldown and PR limit comments --- .github/dependabot.yml | 3 --- .github/workflows/ci.yml | 2 -- .github/workflows/codeql.yml | 1 - .github/workflows/release.yml | 1 - 4 files changed, 7 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 7264a1a..0ec856c 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -4,8 +4,6 @@ version: 2 updates: - package-ecosystem: github-actions directory: "/" - # A week of soak time before we pick up a release, so a compromised or - # yanked version has a chance to be caught upstream first. cooldown: default-days: 7 schedule: @@ -27,7 +25,6 @@ updates: interval: weekly time: "10:30" timezone: "Europe/London" - # Majors land one per PR, so the default of 5 stalls the queue. open-pull-requests-limit: 15 # This is a published package, so Dependabot's default would widen ranges # instead of raising them. diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 66ecfcb..6bdea33 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,6 @@ permissions: {} jobs: lint: name: Lint - # GitHub-hosted, not depot: this repo is public, so fork PRs must not run on paid runners. runs-on: ubuntu-latest timeout-minutes: 15 permissions: @@ -49,7 +48,6 @@ jobs: test: name: Test (Node ${{ matrix.node }}) - # GitHub-hosted, not depot: this repo is public, so fork PRs must not run on paid runners. runs-on: ubuntu-latest timeout-minutes: 15 permissions: diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 0aeb9b0..7f22e4b 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -18,7 +18,6 @@ permissions: {} jobs: analyze: name: Analyze (${{ matrix.language }}) - # GitHub-hosted, not depot: this repo is public, so fork PRs must not run on paid runners. runs-on: ubuntu-latest timeout-minutes: 30 permissions: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2cb9f57..8f2ac4c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,7 +12,6 @@ permissions: {} jobs: release: name: Release - # npm trusted publishing only accepts OIDC tokens from GitHub-hosted runners. runs-on: ubuntu-latest timeout-minutes: 15 permissions: From 96f5df3795966600e117b0b171322a9977aad2b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A9ril=20Pilon?= Date: Wed, 28 Oct 2026 08:57:38 +0000 Subject: [PATCH 3/5] Align pnpm workspace settings and CodeQL workflow --- .github/actionlint.yml | 3 +++ .../trusted-actions-owners/codeql-pack.yml | 8 ++++++ .../models/trusted_actions_owner.yml | 6 +++++ .github/workflows/codeql.yml | 27 ++++++++++++------- pnpm-workspace.yaml | 2 +- 5 files changed, 36 insertions(+), 10 deletions(-) create mode 100644 .github/actionlint.yml create mode 100644 .github/codeql/extensions/trusted-actions-owners/codeql-pack.yml create mode 100644 .github/codeql/extensions/trusted-actions-owners/models/trusted_actions_owner.yml diff --git a/.github/actionlint.yml b/.github/actionlint.yml new file mode 100644 index 0000000..a79d109 --- /dev/null +++ b/.github/actionlint.yml @@ -0,0 +1,3 @@ +self-hosted-runner: + labels: + - depot-* diff --git a/.github/codeql/extensions/trusted-actions-owners/codeql-pack.yml b/.github/codeql/extensions/trusted-actions-owners/codeql-pack.yml new file mode 100644 index 0000000..78800ac --- /dev/null +++ b/.github/codeql/extensions/trusted-actions-owners/codeql-pack.yml @@ -0,0 +1,8 @@ +# Advanced setup does not pick this directory up on its own; codeql.yml passes the pack to the CLI. +name: team-plain/cli-trusted-actions-owners +version: 0.0.0 +library: true +extensionTargets: + codeql/actions-all: '*' +dataExtensions: + - models/**/*.yml diff --git a/.github/codeql/extensions/trusted-actions-owners/models/trusted_actions_owner.yml b/.github/codeql/extensions/trusted-actions-owners/models/trusted_actions_owner.yml new file mode 100644 index 0000000..7258416 --- /dev/null +++ b/.github/codeql/extensions/trusted-actions-owners/models/trusted_actions_owner.yml @@ -0,0 +1,6 @@ +extensions: + - addsTo: + pack: codeql/actions-all + extensible: trustedActionsOwnerDataModel + data: + - ["pnpm"] diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 7f22e4b..4f4c919 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -7,7 +7,7 @@ on: branches: [main] schedule: # Catches new queries shipped in CodeQL releases even when main is quiet. - - cron: "36 8 * * 2" + - cron: '36 8 * * 2' concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -18,7 +18,7 @@ permissions: {} jobs: analyze: name: Analyze (${{ matrix.language }}) - runs-on: ubuntu-latest + runs-on: ${{ matrix.runner }} timeout-minutes: 30 permissions: security-events: write @@ -28,23 +28,32 @@ jobs: strategy: fail-fast: false matrix: - language: [actions, javascript-typescript] + include: + - language: actions + runner: depot-ubuntu-24.04 + # Only default setup loads .github/codeql/extensions on its own, so the model pack is + # handed to the CLI here. It extends codeql/actions-all, so it stays off the JS leg. + extra-options: >- + {"database": {"run-queries": [ + "--additional-packs=.github/codeql/extensions", + "--model-packs=team-plain/cli-trusted-actions-owners"]}} + - language: javascript-typescript + runner: depot-ubuntu-24.04-4 steps: - - name: Check out the repository - uses: actions/checkout@v7 + - uses: actions/checkout@v7 with: persist-credentials: false # build-mode none reads the sources directly, so there is no pnpm install in this job. - - name: Initialize CodeQL - uses: github/codeql-action/init@v4 + - uses: github/codeql-action/init@v4 with: languages: ${{ matrix.language }} build-mode: none queries: security-extended - - name: Analyze - uses: github/codeql-action/analyze@v4 + - uses: github/codeql-action/analyze@v4 + env: + CODEQL_ACTION_EXTRA_OPTIONS: ${{ matrix.extra-options }} with: category: /language:${{ matrix.language }} diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 2d61005..686c642 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,4 +1,4 @@ -# 7 days. Keep at or below the Dependabot cooldown, or pnpm rejects its updates. +saveExact: true minimumReleaseAge: 10080 # pnpm 12 writes its own pinned version as a first YAML document in From 002648d1e5dda8c84ab4892057bff0935b7b7128 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A9ril=20Pilon?= Date: Wed, 28 Oct 2026 09:00:57 +0000 Subject: [PATCH 4/5] Align the CodeQL trusted owners and drop the unused actionlint config --- .github/actionlint.yml | 3 --- .../codeql/extensions/trusted-actions-owners/codeql-pack.yml | 1 - .../trusted-actions-owners/models/trusted_actions_owner.yml | 3 +++ 3 files changed, 3 insertions(+), 4 deletions(-) delete mode 100644 .github/actionlint.yml diff --git a/.github/actionlint.yml b/.github/actionlint.yml deleted file mode 100644 index a79d109..0000000 --- a/.github/actionlint.yml +++ /dev/null @@ -1,3 +0,0 @@ -self-hosted-runner: - labels: - - depot-* diff --git a/.github/codeql/extensions/trusted-actions-owners/codeql-pack.yml b/.github/codeql/extensions/trusted-actions-owners/codeql-pack.yml index 78800ac..43f20d3 100644 --- a/.github/codeql/extensions/trusted-actions-owners/codeql-pack.yml +++ b/.github/codeql/extensions/trusted-actions-owners/codeql-pack.yml @@ -1,4 +1,3 @@ -# Advanced setup does not pick this directory up on its own; codeql.yml passes the pack to the CLI. name: team-plain/cli-trusted-actions-owners version: 0.0.0 library: true diff --git a/.github/codeql/extensions/trusted-actions-owners/models/trusted_actions_owner.yml b/.github/codeql/extensions/trusted-actions-owners/models/trusted_actions_owner.yml index 7258416..c80b5f0 100644 --- a/.github/codeql/extensions/trusted-actions-owners/models/trusted_actions_owner.yml +++ b/.github/codeql/extensions/trusted-actions-owners/models/trusted_actions_owner.yml @@ -3,4 +3,7 @@ extensions: pack: codeql/actions-all extensible: trustedActionsOwnerDataModel data: + - ["aws-actions"] - ["pnpm"] + - ["pulumi"] + - ["team-plain"] From 11268caa76cde6a6f976296264fc4d447e989698 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A9ril=20Pilon?= Date: Wed, 28 Oct 2026 09:14:22 +0000 Subject: [PATCH 5/5] Run CodeQL on GitHub-hosted runners --- .github/workflows/codeql.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 4f4c919..7250bab 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -30,7 +30,7 @@ jobs: matrix: include: - language: actions - runner: depot-ubuntu-24.04 + runner: ubuntu-latest # Only default setup loads .github/codeql/extensions on its own, so the model pack is # handed to the CLI here. It extends codeql/actions-all, so it stays off the JS leg. extra-options: >- @@ -38,7 +38,7 @@ jobs: "--additional-packs=.github/codeql/extensions", "--model-packs=team-plain/cli-trusted-actions-owners"]}} - language: javascript-typescript - runner: depot-ubuntu-24.04-4 + runner: ubuntu-latest steps: - uses: actions/checkout@v7