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/codeql/extensions/trusted-actions-owners/codeql-pack.yml b/.github/codeql/extensions/trusted-actions-owners/codeql-pack.yml new file mode 100644 index 0000000..43f20d3 --- /dev/null +++ b/.github/codeql/extensions/trusted-actions-owners/codeql-pack.yml @@ -0,0 +1,7 @@ +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..c80b5f0 --- /dev/null +++ b/.github/codeql/extensions/trusted-actions-owners/models/trusted_actions_owner.yml @@ -0,0 +1,9 @@ +extensions: + - addsTo: + pack: codeql/actions-all + extensible: trustedActionsOwnerDataModel + data: + - ["aws-actions"] + - ["pnpm"] + - ["pulumi"] + - ["team-plain"] diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 4796e26..0ec856c 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -4,13 +4,12 @@ version: 2 updates: - package-ecosystem: github-actions directory: "/" + 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 +17,18 @@ 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" + 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 +53,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..6bdea33 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,13 +6,15 @@ on: push: branches: [main] -permissions: - contents: read +permissions: {} jobs: lint: name: Lint runs-on: ubuntu-latest + timeout-minutes: 15 + permissions: + contents: read steps: - name: Check out the repository uses: actions/checkout@v7 @@ -47,6 +49,9 @@ jobs: test: name: Test (Node ${{ matrix.node }}) 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..7250bab 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -7,16 +7,18 @@ 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 }} cancel-in-progress: ${{ github.event_name == 'pull_request' }} +permissions: {} + jobs: analyze: name: Analyze (${{ matrix.language }}) - runs-on: ubuntu-latest + runs-on: ${{ matrix.runner }} timeout-minutes: 30 permissions: security-events: write @@ -26,23 +28,32 @@ jobs: strategy: fail-fast: false matrix: - language: [actions, javascript-typescript] + include: + - language: actions + 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: >- + {"database": {"run-queries": [ + "--additional-packs=.github/codeql/extensions", + "--model-packs=team-plain/cli-trusted-actions-owners"]}} + - language: javascript-typescript + runner: ubuntu-latest 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/.github/workflows/release.yml b/.github/workflows/release.yml index 0274e11..8f2ac4c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,16 +7,18 @@ 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 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: {} 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