Skip to content

ci: harden GitHub Actions permissions, action versions, dependabot, and release script - #222

Merged
brucearctor merged 2 commits into
apache:masterfrom
brucearctor:ci/harden-workflows-and-lint-gates
Nov 24, 2026
Merged

brucearctor merged 2 commits into
apache:masterfrom
brucearctor:ci/harden-workflows-and-lint-gates

Conversation

@brucearctor

Copy link
Copy Markdown
Contributor

Closes #220

Summary

Hardens GitHub Actions workflows, Dependabot configuration, and release packaging:

  • Least-privilege permissions: contents: read: Added top-level read-only permissions to .github/workflows/userale_ci.yml, distill_ci.yml, and license.yml (stale.yml already scopes explicit write permissions).
  • userale_ci.yml:
    • Replaces npm install -g pnpm@10 with pnpm/action-setup@v4 (reads packageManager from root package.json). Keeps pnpm i since .gitignore excludes pnpm-lock.yaml.
    • Adds proto/** and site/_includes/useralejsDemo.html to push.paths and pull_request.paths.
    • Adds pnpm exec tsc --noEmit -p packages/flagon-userale/tsconfig.json typechecking to pre-build.
  • distill_ci.yml:
  • site.yml:
    • Upgrades actions/checkout@v2 -> @v4 and actions/setup-node@v2 -> @v4.
    • Replaces fixed /tmp/_site and unquoted rm -rf * with mktemp -d + trap cleanup and git rm -rf --ignore-unmatch ..
  • .github/dependabot.yml:
    • Updates /products/distill from pip to uv.
    • Adds github-actions and root npm ecosystems.
  • scripts/make-release-artifacts.sh:
    • Uses mktemp -d + trap cleanup instead of predictable ${TMPDIR:-/tmp}/release-working-dir, quotes path expansions, and uses pnpm in products/userale.

Verification

  • Parsed all .github/**/*.yml workflow & Dependabot configs cleanly with PyYAML.
  • Verified bash -n scripts/make-release-artifacts.sh exits 0.
  • Pre-commit hooks passed.

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.

ci: harden GitHub Actions permissions, lockfile freezing, action versions, and lint/typecheck gates

2 participants