Skip to content

Remove obsolete warlock private-git-dependency CI steps#185

Merged
sarahxsanders merged 2 commits into
mainfrom
posthog-code/remove-warlock-git-dep-ci-steps
Jun 15, 2026
Merged

Remove obsolete warlock private-git-dependency CI steps#185
sarahxsanders merged 2 commits into
mainfrom
posthog-code/remove-warlock-git-dep-ci-steps

Conversation

@sarahxsanders

@sarahxsanders sarahxsanders commented Jun 15, 2026

Copy link
Copy Markdown
Collaborator

What

Makes CI pass on forked PRs, in two parts:

  1. Removes the now-obsolete Generate token for private dependencies and Configure git auth for private deps steps (plus their stale TODO comment) from build.yml and build-release.yml.
  2. Makes the Scan skills with Warlock step non-blocking on fork PRs in build.yml, via continue-on-error: ${{ github.event.pull_request.head.repo.fork == true }}.

Why — remove the private-git-dep steps

@posthog/warlock is now published to npm — package.json pins ^0.2.2 and pnpm-lock.yaml resolves it from the registry (sha512 integrity hash, not a git URL). The CI runner no longer needs GitHub App credentials to clone it as a private git dependency, which is exactly what these two steps did.

These steps fail on forked PRs: GitHub does not pass repo/org secrets to fork workflows, so secrets.GH_APP_POSTHOG_WIZARD_CI_BOT_APP_ID resolves empty and the action throws before anything builds:

Error: Input required and not supplied: app-id

The steps' own comment already said to remove them once warlock was published:

# TODO: Remove these two steps once @posthog/warlock is published to npm.

So this honors that TODO.

Why — make the scan non-blocking on forks

Removing the steps above clears the app-id failure but exposes a second fork issue: the Scan skills with Warlock step needs CONTEXT_MILL_WARLOCK_POSTHOG_PERSONAL_KEY to reach the LLM gateway for triage. Forks don't get that secret, so the scan can't triage and reports every match (including false positives) as a threat → the build fails. Warlock is noisy against this repo's own skill docs, so fork contributors would routinely hit red builds they can't do anything about.

Scoping continue-on-error to forks fixes this:

  • On forks: the scan still runs and still posts its annotations inline on the diff, but a scan failure no longer fails the job → the check goes green and the PR is mergeable without an admin override.
  • On trusted runs (internal-branch PRs, push-to-main, release): the expression is false, so the scan stays a hard gate with full LLM triage.

It is scoped to that single step — install, build, lint, and bundle-size checks all still block the build normally on forks.

Review workflow this implies

Fork PR scans become advisory: a maintainer reviews the Warlock annotations on the diff as part of normal review. Nothing unsafe can ship, because the full triaged scan still gates build-release (on merge to main, where the secret exists). If contribution volume ever makes manual triage annoying, the proper next step is an approval-gated workflow — intentionally out of scope here.

Left untouched (intentionally)

  • build-release.ymlGenerate skills repo token (SKILLS_PUSH_APP_ID) — unrelated; pushes generated plugins to skills/ai-plugin.
  • wizard-ci-trigger.ymlGenerate GitHub App token — unrelated; handles the /wizard-ci command.
  • The Scan skills with Warlock step still runs in both workflows — it's the actual security scan, and stays a hard gate everywhere except fork PRs.

🤖 Generated with Claude Code

@posthog/warlock is now published to npm (package.json pins ^0.2.2 and
pnpm-lock.yaml resolves it from the registry), so the CI runner no longer
needs GitHub App credentials to clone it as a private git dependency.

Remove the now-obsolete `Generate token for private dependencies` and
`Configure git auth for private deps` steps (and their stale TODO comment)
from build.yml and build-release.yml. These steps fail on forked PRs because
GitHub does not pass repo/org secrets to forks, so `app-id` resolves empty and
the action throws (`Input required and not supplied: app-id`) before the build
runs. Removing them honors the steps' own TODO and unblocks fork CI.

The unrelated skills-repo token step (build-release.yml) and wizard-ci token
step (wizard-ci-trigger.yml) are left untouched, as is the Scan skills with
Warlock security-scan step, which never needed git auth.

Generated-By: PostHog Code
Task-Id: 0d9df375-0b9d-42c7-b35f-7f335b65634d
@github-actions

Copy link
Copy Markdown

🧙 Wizard CI

Run the Wizard CI and test your changes against wizard-workbench example apps by replying with a GitHub comment using one of the following commands:

Test all apps:

  • /wizard-ci all

Test all apps in a directory:

  • /wizard-ci basic-integration
  • /wizard-ci error-tracking-upload-source-maps
  • /wizard-ci misc
  • /wizard-ci revenue

Test an individual app:

  • /wizard-ci basic-integration/android
  • /wizard-ci basic-integration/angular
  • /wizard-ci basic-integration/astro
Show more apps
  • /wizard-ci basic-integration/django
  • /wizard-ci basic-integration/fastapi
  • /wizard-ci basic-integration/flask
  • /wizard-ci basic-integration/javascript-node
  • /wizard-ci basic-integration/javascript-web
  • /wizard-ci basic-integration/laravel
  • /wizard-ci basic-integration/next-js
  • /wizard-ci basic-integration/nuxt
  • /wizard-ci basic-integration/python
  • /wizard-ci basic-integration/rails
  • /wizard-ci basic-integration/react-native
  • /wizard-ci basic-integration/react-router
  • /wizard-ci basic-integration/sveltekit
  • /wizard-ci basic-integration/swift
  • /wizard-ci basic-integration/tanstack-router
  • /wizard-ci basic-integration/tanstack-start
  • /wizard-ci basic-integration/vue
  • /wizard-ci error-tracking-upload-source-maps/android
  • /wizard-ci error-tracking-upload-source-maps/cicd-docker-node-raw
  • /wizard-ci error-tracking-upload-source-maps/cicd-github-actions-docker-node-raw
  • /wizard-ci error-tracking-upload-source-maps/cicd-github-actions-nested-docker-node-raw
  • /wizard-ci error-tracking-upload-source-maps/cicd-github-actions-node-raw
  • /wizard-ci error-tracking-upload-source-maps/cicd-gitlab-node-raw
  • /wizard-ci error-tracking-upload-source-maps/cicd-ssh-vps-node-raw
  • /wizard-ci error-tracking-upload-source-maps/flutter
  • /wizard-ci error-tracking-upload-source-maps/ios
  • /wizard-ci error-tracking-upload-source-maps/next
  • /wizard-ci error-tracking-upload-source-maps/next-no-posthog
  • /wizard-ci error-tracking-upload-source-maps/node-raw
  • /wizard-ci error-tracking-upload-source-maps/node-rollup
  • /wizard-ci error-tracking-upload-source-maps/node-rollup-typescript-plugin
  • /wizard-ci error-tracking-upload-source-maps/node-webpack
  • /wizard-ci error-tracking-upload-source-maps/nuxt-3-6
  • /wizard-ci error-tracking-upload-source-maps/nuxt-4-3
  • /wizard-ci error-tracking-upload-source-maps/react-native
  • /wizard-ci error-tracking-upload-source-maps/react-vite
  • /wizard-ci error-tracking-upload-source-maps/rust
  • /wizard-ci misc/quack-quack
  • /wizard-ci revenue/stripe

Results will be posted here when complete.

@sarahxsanders sarahxsanders requested a review from a team June 15, 2026 15:45
@sarahxsanders sarahxsanders reopened this Jun 15, 2026
Fork PRs don't receive repo secrets, so Warlock can't reach the LLM gateway to
triage matches and ends up reporting every hit (including false positives) as a
threat, failing the build.

Mark the scan step continue-on-error when the PR head is a fork. The scan still
runs and posts its annotations on the diff for maintainer review, but a failure
no longer blocks the check. Trusted runs (main-repo PRs, push-to-main, release)
have the secret, so fork == false and the scan remains a hard gate with full LLM
triage — the real release gate is unchanged.

Generated-By: PostHog Code
Task-Id: 0d9df375-0b9d-42c7-b35f-7f335b65634d
@sarahxsanders sarahxsanders merged commit cd5e6b3 into main Jun 15, 2026
8 checks 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.

2 participants