Skip to content

Commit 9294a04

Browse files
authored
ci: dependabot title exemption, dependency floors, masked account id (#110)
Phase C of the OSS-ready program. - **PR-title gate**: Conventional-Commits pattern still enforced for all; the 72-char ceiling now exempts `dependabot[bot]` (titles are machine-generated and unshortenable — #76/#78 fail today solely on length; commitlint's own ceiling is 100). - **Dependency floors**: `dompurify` → 3.4.12 (closes alert #5); `body-parser` → 2.3.0 (resolved 2.2.2 was in-range via express + MCP-SDK paths, closes alert #4). - **`CLOUDFLARE_ACCOUNT_ID`** now read from secrets (masked in public run logs; secret created beforehand; the variable is deleted after the next validated dispatch — historical logs remain unredacted regardless). - `build-snapshot` environment casing normalized to `Production`; sandbox Dockerfile comment ties alerts #9/#8 to the existing overlay mitigation. ## Verification notes - [x] `pnpm lint` / `pnpm typecheck` / `pnpm turbo build --force` / `pnpm deadcode` / `pnpm architecture:check` / `pnpm turbo skills:build` — independent clean-install rerun - Lockfile diff limited to the two override resolutions; `pnpm why body-parser` single-resolves 2.3.0. - Post-merge: rebase #76/#78 (title gate), re-run #96 (expired quarantine), merge #81 after diff re-check; dispatch deploy to validate the secret-backed account id; then delete the variable.
1 parent 2daed6d commit 9294a04

6 files changed

Lines changed: 23 additions & 17 deletions

File tree

.github/workflows/build-snapshot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
build-snapshot:
2525
runs-on: ubuntu-24.04
2626
timeout-minutes: 60
27-
environment: production
27+
environment: Production
2828
steps:
2929
- name: Authorize snapshot publication
3030
env:

.github/workflows/deploy-cloudflare.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,5 +70,5 @@ jobs:
7070
--var "CHEATCODE_RELEASE_SHA:$GITHUB_SHA"
7171
done
7272
env:
73-
CLOUDFLARE_ACCOUNT_ID: ${{ vars.CLOUDFLARE_ACCOUNT_ID }}
73+
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
7474
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}

.github/workflows/static-checks.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,21 +38,24 @@ jobs:
3838
- name: Validate pull request title
3939
if: github.event_name == 'pull_request'
4040
env:
41+
PR_AUTHOR: ${{ github.event.pull_request.user.login }}
4142
PR_TITLE: ${{ github.event.pull_request.title }}
4243
run: |
4344
python3 - <<'PY'
4445
import os
4546
import re
4647
48+
author = os.environ["PR_AUTHOR"]
4749
title = os.environ["PR_TITLE"]
4850
pattern = re.compile(
4951
r"(?:build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test)"
5052
r"(?:\([a-z0-9][a-z0-9._/-]*\))?!?: \S.*"
5153
)
52-
if len(title) > 72 or pattern.fullmatch(title) is None:
53-
raise SystemExit(
54-
"Pull request titles must use Conventional Commits and be at most 72 characters."
55-
)
54+
if pattern.fullmatch(title) is None:
55+
raise SystemExit("Pull request titles must use Conventional Commits.")
56+
# Dependabot titles are machine-generated from group/directory names, grow past 72 chars, and are not configurable; commitlint's own ceiling is 100.
57+
if len(title) > 72 and author != "dependabot[bot]":
58+
raise SystemExit("Pull request titles must be at most 72 characters.")
5659
PY
5760
5861
- name: Classify changed files

infra/containers/sandbox/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ COPY package-manager/package.json package-manager/package-lock.json /opt/cheatco
3535
COPY doc-runtime/package.json doc-runtime/package-lock.json /opt/cheatcode-doc-runtime/
3636
# npm, pnpm, and code-server ship their own dependency trees, so ordinary
3737
# top-level overrides cannot replace vulnerable packages inside those bundles.
38+
# Dependabot alerts #9 (brace-expansion) and #8 (tar) are lockfile-metadata findings mitigated by this overlay because npm has not re-bundled the fixed versions.
3839
COPY runtime-security-overrides/package.json runtime-security-overrides/package-lock.json /opt/cheatcode-runtime-security-overrides/
3940
COPY skill-runtime/package.json skill-runtime/package-lock.json skill-runtime/tsconfig.json /opt/cheatcode-skill-runtime/
4041
COPY skill-runtime/bin/ /opt/cheatcode-skill-runtime/bin/

pnpm-lock.yaml

Lines changed: 11 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pnpm-workspace.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ overrides:
4949
'@tootallnate/once@>=2.0.0 <2.0.1': 2.0.1
5050
'@vercel/node@5.8.25>undici': 6.27.0
5151
'ajv@>=8.0.0 <8.18.0': 8.20.0
52-
'dompurify@<=3.4.10': 3.4.11
52+
'body-parser@>=2.0.0 <2.3.0': 2.3.0
53+
'dompurify@<=3.4.11': 3.4.12
5354
'fast-uri@<3.1.4': 3.1.4
5455
'js-yaml@<3.15.0': 3.15.0
5556
'js-yaml@>=4.0.0 <4.3.0': 4.3.0

0 commit comments

Comments
 (0)