Skip to content

chore: org hardening — SHA-pinned CI gate, Dependabot, CODEOWNERS, SECURITY, CONTRIBUTING - #63

Merged
FumingPower3925 merged 5 commits into
mainfrom
chore/org-hardening
Sep 5, 2026
Merged

chore: org hardening — SHA-pinned CI gate, Dependabot, CODEOWNERS, SECURITY, CONTRIBUTING#63
FumingPower3925 merged 5 commits into
mainfrom
chore/org-hardening

Conversation

@FumingPower3925

Copy link
Copy Markdown
Contributor

File-based follow-ups from the org hardening review 2026-09-06 for goceleris/docs. No workflow semantics change; sync-benchmarks.yml is untouched (see below). GitHub settings/rulesets are handled separately and are not part of this PR.

Changes and rationale

Change Why
.github/workflows/ci.yml (new) — job build: actions/checkoutoven-sh/setup-bunbun install --frozen-lockfilebun run buildbun run checkbun test, on pull_request and push to main, permissions: contents: read, concurrency-cancel on superseded PR runs, 20-minute timeout Nothing checked a PR before it reached main; the only build was Cloudflare Workers Builds after the merge, so a broken change surfaced as a failed deploy. The job is named build so a required status check on main can reference it.
↳ actions pinned to full commit SHAs with # vX.Y.Z trailer: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1, oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0 Org-wide SHA-pinning rule; a moving tag can be retargeted, a SHA cannot. Both tags are lightweight (object.type: commit), so the SHA is the commit itself; the floating v7 / v2 tags resolve to the same commits.
persist-credentials: false on checkout The job never pushes or calls the API, so the GITHUB_TOKEN should not be left in .git/config for later steps.
setup-bun instead of setup-node + npm ci Deviation from the generic recipe, on purpose: the repo is a Bun project (bun.lock only, no package-lock.json, engines.bun >= 1.3, scripts run bun scripts/*.ts directly), so npm ci cannot install it. bun-version: latest mirrors what Cloudflare Workers Builds uses; package.json only sets a floor.
build runs before check astro check type-checks imports of the gitignored src/data/generated/*.json that build:data emits; run in the other order it fails with 6 ts(2307) errors (verified locally).
.github/dependabot.yml (new) — npm weekly (grouped) with an ignore for typescript version-update:semver-major + semver-minor; github-actions weekly (grouped) The repo had no Dependabot at all. typescript stays exactly 6.0.3 because @astrojs/check breaks on TypeScript 7; only patch releases may be proposed. The github-actions entry is what keeps the new SHA pins current. Weekly cadence: static site, no runtime server.
.github/CODEOWNERS (new) — header, * @FumingPower3925, commented area-delegation example Lets GitHub auto-request the owner's review and lets the main ruleset require a code-owner approval.
SECURITY.md (new) Private reporting via the repository's Security tab → "Report a vulnerability" (private vulnerability reporting is enabled on this repo — verified via the API) as the preferred channel, security@goceleris.dev as the alternative; acknowledgement within 72 hours; scope = build pipeline, published content, dashboard island, hosting config; points engine reports at celeris/SECURITY.md, which owns the supported-versions table.
CONTRIBUTING.md (new) How to run the site locally with Bun, what CI runs, PR flow with conventional prefixes, the pinned-typescript and results/-is-publisher-owned rules, and the merge rule (green build job + code-owner approval).

sync-benchmarks.yml — no change needed

The existing workflow has no uses: steps at all (a single run: step that echoes the dispatch payload) and no checkout, so there is nothing to SHA-pin and no persist-credentials to set. Its permissions: contents: read already matches the hardening baseline. Left byte-identical.

Verification

  • actionlint on both workflows: clean.
  • python3 -c 'import yaml' parse of ci.yml, sync-benchmarks.yml, dependabot.yml: valid.
  • grep -rnE 'uses: [^./][^@]*@v' .github/workflows: no matches outside comments.
  • Tag → SHA resolution via gh api repos/<owner>/<repo>/git/ref/tags/<tag> (both object.type: commit, no annotated-tag dereference needed); floating v7/v2 confirmed to point at the same SHAs.
  • Local run of the exact CI sequence on this branch with Bun 1.3.14: bun install --frozen-lockfile ✓, bun run build ✓ (Pagefind indexed 28 pages), bun run check ✓ (0 errors, 0 warnings, 12 pre-existing hints), bun test ✓ (16 pass, 0 fail).
  • No dependency versions touched; bun.lock unchanged.

Because the workflow triggers on pull_request, the build check runs on this PR itself; after merge it can be added as a required status check on main.

Until now nothing checked a pull request before it reached main: the only
build of the site was Cloudflare Workers Builds on the push to main, so a
broken change surfaced as a failed deploy after the merge. This workflow
runs on pull_request and on push to main with the same install and build
the deploy performs (bun install --frozen-lockfile, bun run build), then
astro check and the data-layer tests. The job is named `build` so a
required status check on main can reference it.

Hardening details:
- actions are pinned to full commit SHAs with a `# vX.Y.Z` trailer
  (actions/checkout v7.0.1, oven-sh/setup-bun v2.2.0); Dependabot's
  github-actions ecosystem keeps them current.
- permissions: contents: read only, and checkout uses
  persist-credentials: false because no later step pushes or calls the
  API, so the token is never left in .git/config.
- setup-bun rather than setup-node + npm ci: the repo is a Bun project
  (bun.lock, engines.bun >= 1.3, scripts run `bun scripts/*.ts`) and has
  no package-lock.json, so npm ci could not install it.
- build runs before check: astro check type-checks imports of the
  gitignored src/data/generated/*.json that build:data emits.

Org hardening review 2026-09-06.
The site had no Dependabot configuration, so neither its JavaScript
dependencies nor the action SHAs the new CI workflow pins would ever be
proposed for update. Both ecosystems run weekly and are grouped into one
PR per run: this is a static site with no runtime server, so a daily PR
stream buys nothing.

typescript is deliberately pinned to exactly 6.0.3 because @astrojs/check
breaks on TypeScript 7 and drifting the pin would ship the site with no
type-check gate. An ignore rule excludes semver-major and semver-minor
updates for it so only patch releases of the 6.0 line are proposed.

Dependabot's npm ecosystem reads package.json + bun.lock, so it covers a
Bun-installed project without any extra configuration.

Org hardening review 2026-09-06.
Lets GitHub request review from the owner on every pull request and lets
the main ruleset require a code-owner approval before merge. Includes a
commented example of delegating an area to a co-maintainer so the format
is obvious when the first delegation happens.

Org hardening review 2026-09-06.
SECURITY.md gives reporters a private channel: the repository's Security
tab -> "Report a vulnerability" (private vulnerability reporting is
enabled on this repo) as the preferred route, security@goceleris.dev as
the alternative, with a 72-hour acknowledgement commitment. It scopes the
policy to the site build pipeline and hosting configuration and points
engine reports at celeris/SECURITY.md, which owns the supported-versions
table.

CONTRIBUTING.md documents how to run the site locally with Bun, what CI
runs (build, astro check, bun test), the PR flow, the pinned-typescript
and results/-is-publisher-owned rules, and the merge rule: green `build`
job plus a code-owner approval.

Org hardening review 2026-09-06.
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 5, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
goceleris-docs 5adc264 Commit Preview URL

Branch Preview URL
Sep 05 2026, 11:12 PM

…deps

The npm entry could not do what its comment claimed. Dependabot's `npm`
ecosystem is dependabot-core's npm_and_yarn, which reads package-lock.json,
yarn.lock and pnpm-lock.yaml and never bun.lock (its file fetcher has no
Bun code path); Bun is a separate ecosystem, `bun`, with its own fetcher
and bun.lock parser. Pointed at this repo, npm would have seen a
manifest-only project: no PRs for the ^-ranged dependencies until a new
major shipped, and the one exact pin (typescript 6.0.3) would have got a
patch PR that edited package.json without refreshing bun.lock, so the
`bun install --frozen-lockfile` step of the `build` CI job would have
failed on every Dependabot npm PR.

Switch the entry to `package-ecosystem: bun` (GitHub: Bun >= 1.1.39, text
lockfile). directory, weekly schedule, the typescript semver-major/minor
ignore, the all-js-deps group and the `deps` commit prefix carry over
unchanged. The comment now states the actual mechanism and records the
one caveat: the bun ecosystem does version updates only, so Dependabot
security alerts on JS dependencies do not auto-generate PRs here.

Verified against dependabot-core (common/lib/dependabot/config/file.rb
maps "npm" => "npm_and_yarn" and "bun" => "bun"; bun/lib/dependabot/bun/
is a separate ecosystem; npm_and_yarn's file_fetcher.rb has zero Bun
references) and GitHub's supported-ecosystems table. dependabot.yml
still parses and both entries are in the SchemaStore dependabot-2.0 enum.
@FumingPower3925
FumingPower3925 merged commit f42caab into main Sep 5, 2026
6 checks passed
@FumingPower3925
FumingPower3925 deleted the chore/org-hardening branch September 5, 2026 23:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant