Skip to content

ci: add hardening workflows (CodeQL, PR lint, gradle wrapper validation, stale) - #2

Merged
turnipdabeets merged 2 commits into
mainfrom
ci/add-hardening-workflows
Jul 9, 2026
Merged

turnipdabeets merged 2 commits into
mainfrom
ci/add-hardening-workflows

Conversation

@turnipdabeets

@turnipdabeets turnipdabeets commented Jul 9, 2026 •

Copy link
Copy Markdown
Collaborator

What

Adds baseline CI convention workflows that the rest of the PostHog SDK fleet has (modeled on posthog-android), which posthog-kmp was missing after the initial commit. No release logic — publish.yml is untouched.

Workflow Purpose
lint-pr.yml Validate PR titles against Conventional Commits (shared PostHog/.github reusable workflow)
gradle-wrapper-validation.yml Verify the Gradle wrapper jar checksum
stale.yaml Stale issue/PR bot with the fleet's standard timings

Why no CodeQL workflow

I initially added a codeql.yml (advanced setup) like posthog-android, but the repo already has CodeQL default setup enabled (the CodeQL check). Default and advanced setup conflict — the advanced SARIF upload is rejected — and build-mode: none can't extract a Kotlin-only codebase (no plain Java). Dropped it; the repo keeps its existing default-setup coverage. Converting to advanced setup would require an admin to disable default setup first and isn't worth it here.

Not included (follow-ups)

  • SDK compliance harness adapter
  • sampo-based release pipeline + RELEASING.md (separate PR, in progress)
  • signed-commits ruleset (a repo setting, not a workflow file)

Test plan

  • lint-pr, gradle-wrapper-validation pass
  • stale correctly does not run on PRs (scheduled cron only)

…on, stale)

Bring posthog-kmp in line with the PostHog SDK fleet conventions (modeled on
posthog-android):

- codeql.yml: security-and-quality scanning for java-kotlin + actions.
  Uses build-mode: none (buildless) instead of autobuild, since the iOS
  targets only build on macOS and autobuild runs on ubuntu.
- lint-pr.yml: validate PR titles against Conventional Commits via the
  shared PostHog/.github reusable workflow.
- gradle-wrapper-validation.yml: verify the Gradle wrapper jar checksum.
- stale.yaml: stale issue/PR bot with the fleet's standard timings.

No release logic changes; publish.yml is untouched.
The repo already has CodeQL default setup enabled (visible as the 'CodeQL'
check), which conflicts with an advanced-setup workflow: the SARIF upload is
rejected ('Code Scanning could not process the submitted SARIF file'), and
build-mode: none can't extract a Kotlin-only codebase anyway. Rely on the
existing default setup instead.
@turnipdabeets
turnipdabeets requested a review from a team July 9, 2026 16:00
@turnipdabeets
turnipdabeets merged commit 23fe856 into main Jul 9, 2026
14 of 15 checks passed
@turnipdabeets
turnipdabeets deleted the ci/add-hardening-workflows branch July 9, 2026 22:04
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